Skip to content

Commit

Permalink
Merge pull request #351 from izapolsk/fix_vm_hardware_in_sprout
Browse files Browse the repository at this point in the history
[RFR] wrongly updated method during wrapanapi 3.0 conversion
  • Loading branch information
mshriver authored Jan 4, 2019
2 parents 860bddb + 74fb3c4 commit f20d2ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wrapanapi/systems/rhevm.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def mark_as_template(self, template_name=None, cluster=None, delete=True, delete
def get_hardware_configuration(self):
self.refresh()
return {
'ram': self.raw.memory,
'ram': self.raw.memory / 1024 / 1024,
'cpu': self.raw.cpu.topology.cores * self.raw.cpu.topology.sockets
}

Expand Down
2 changes: 1 addition & 1 deletion wrapanapi/systems/scvmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def enable_virtual_services(self):

def get_hardware_configuration(self):
self.refresh(read_from_hyperv=True)
data = {'mem': self.raw['CPUCount'], 'cpu': self.raw['Memory']}
data = {'mem': self.raw['Memory'], 'cpu': self.raw['CPUCount']}
return {
key: str(val) if isinstance(val, six.string_types) else val
for key, val in data.items()
Expand Down

0 comments on commit f20d2ea

Please sign in to comment.