ia64/xen-unstable

changeset 13220:c731c158f63c

Remove a few more explicit type conversions, now that stringify is fixed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Thu Dec 28 16:52:44 2006 +0000 (2006-12-28)
parents bfa793180cb9
children 62ef527eb19f
files tools/python/xen/xend/XendPIF.py tools/python/xen/xend/XendStorageRepository.py
line diff
     1.1 --- a/tools/python/xen/xend/XendPIF.py	Thu Dec 28 16:30:47 2006 +0000
     1.2 +++ b/tools/python/xen/xend/XendPIF.py	Thu Dec 28 16:52:44 2006 +0000
     1.3 @@ -123,13 +123,13 @@ class XendPIF:
     1.4      def get_record(self, transient = True):
     1.5          result = {'name': self.name,
     1.6                    'MAC': self.mac,
     1.7 -                  'MTU': str(self.mtu),
     1.8 +                  'MTU': self.mtu,
     1.9                    'VLAN': self.vlan,
    1.10                    'host': self.host.uuid,
    1.11                    'network': self.network.uuid}
    1.12          if transient:
    1.13 -            result['io_read_kbs'] = str(self.get_io_read_kbs())
    1.14 -            result['io_write_kbs'] = str(self.get_io_write_kbs())
    1.15 +            result['io_read_kbs'] = self.get_io_read_kbs()
    1.16 +            result['io_write_kbs'] = self.get_io_write_kbs()
    1.17          return result
    1.18  
    1.19  
     2.1 --- a/tools/python/xen/xend/XendStorageRepository.py	Thu Dec 28 16:30:47 2006 +0000
     2.2 +++ b/tools/python/xen/xend/XendStorageRepository.py	Thu Dec 28 16:52:44 2006 +0000
     2.3 @@ -103,16 +103,16 @@ class XendStorageRepository:
     2.4          retval = {'uuid': self.uuid,
     2.5                    'name_label': self.name_label,
     2.6                    'name_description': self.name_description,
     2.7 -                  'virtual_allocation': str(self.storage_alloc),
     2.8 -                  'physical_utilisation': str(self.storage_used),
     2.9 -                  'physical_size': str(self.storage_max),
    2.10 +                  'virtual_allocation': self.storage_alloc,
    2.11 +                  'physical_utilisation': self.storage_used,
    2.12 +                  'physical_size': self.storage_max,
    2.13                    'type': self.type,
    2.14                    'location': self.location,
    2.15                    'VDIs': self.images.keys()}
    2.16          
    2.17          if self.storage_max == XEND_STORAGE_NO_MAXIMUM:
    2.18              stfs = os.statvfs(self.location)
    2.19 -            retval['physical_size'] = str(stfs.f_blocks * stfs.f_frsize)
    2.20 +            retval['physical_size'] = stfs.f_blocks * stfs.f_frsize
    2.21  
    2.22          return retval
    2.23