mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Remove a few more explicit type conversions, now that stringify is fixed.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
1 parent
a288b774b7
commit
396b267ecd
2 files changed
+7
-7
No files matched your search
@@ -123,13 +123,13 @@ class XendPIF:
|
||||
def get_record(self, transient = True):
|
||||
result = {'name': self.name,
|
||||
'MAC': self.mac,
|
||||
'MTU': str(self.mtu),
|
||||
'MTU': self.mtu,
|
||||
'VLAN': self.vlan,
|
||||
'host': self.host.uuid,
|
||||
'network': self.network.uuid}
|
||||
if transient:
|
||||
result['io_read_kbs'] = str(self.get_io_read_kbs())
|
||||
result['io_write_kbs'] = str(self.get_io_write_kbs())
|
||||
result['io_read_kbs'] = self.get_io_read_kbs()
|
||||
result['io_write_kbs'] = self.get_io_write_kbs()
|
||||
return result
|
||||
|
||||
|
||||
|
||||
@@ -103,16 +103,16 @@ class XendStorageRepository:
|
||||
retval = {'uuid': self.uuid,
|
||||
'name_label': self.name_label,
|
||||
'name_description': self.name_description,
|
||||
'virtual_allocation': str(self.storage_alloc),
|
||||
'physical_utilisation': str(self.storage_used),
|
||||
'physical_size': str(self.storage_max),
|
||||
'virtual_allocation': self.storage_alloc,
|
||||
'physical_utilisation': self.storage_used,
|
||||
'physical_size': self.storage_max,
|
||||
'type': self.type,
|
||||
'location': self.location,
|
||||
'VDIs': self.images.keys()}
|
||||
|
||||
if self.storage_max == XEND_STORAGE_NO_MAXIMUM:
|
||||
stfs = os.statvfs(self.location)
|
||||
retval['physical_size'] = str(stfs.f_blocks * stfs.f_frsize)
|
||||
retval['physical_size'] = stfs.f_blocks * stfs.f_frsize
|
||||
|
||||
return retval
|
||||
|
||||
|
||||