mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
Migrate source code to python 3.7 and refine code style
This commit is contained in:
parent
0e231a930d
commit
a4d74a09a6
55 changed files with 192 additions and 306 deletions
|
|
@ -143,13 +143,13 @@ class wvmStorage(wvmConnect):
|
|||
return util.get_xml_path(self._XMLDesc(0), "/pool/target/path")
|
||||
|
||||
def get_allocation(self):
|
||||
return long(util.get_xml_path(self._XMLDesc(0), "/pool/allocation"))
|
||||
return int(util.get_xml_path(self._XMLDesc(0), "/pool/allocation"))
|
||||
|
||||
def get_available(self):
|
||||
return long(util.get_xml_path(self._XMLDesc(0), "/pool/available"))
|
||||
return int(util.get_xml_path(self._XMLDesc(0), "/pool/available"))
|
||||
|
||||
def get_capacity(self):
|
||||
return long(util.get_xml_path(self._XMLDesc(0), "/pool/capacity"))
|
||||
return int(util.get_xml_path(self._XMLDesc(0), "/pool/capacity"))
|
||||
|
||||
def get_pretty_allocation(self):
|
||||
return util.pretty_bytes(self.get_allocation())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue