aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-02-11 14:51:22 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-02-11 14:51:22 +0000
commit283dddae870fc59c34dca7242a4988bf82a92c7a (patch)
treed3e7b4e1ae2c562c9a1ff8eaa03a5a3425403bcb /tools
parentc35e8672fbd86aca2422aece979cc2eae8ed3cdd (diff)
downloadxen-283dddae870fc59c34dca7242a4988bf82a92c7a.tar.gz
xen-283dddae870fc59c34dca7242a4988bf82a92c7a.tar.bz2
xen-283dddae870fc59c34dca7242a4988bf82a92c7a.zip
xen-api: Fix some errors in Xen-API's PBD class.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/python/xen/xend/XendPBD.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/python/xen/xend/XendPBD.py b/tools/python/xen/xend/XendPBD.py
index 10d8c32b81..2187cd7850 100644
--- a/tools/python/xen/xend/XendPBD.py
+++ b/tools/python/xen/xend/XendPBD.py
@@ -20,6 +20,7 @@ import uuid
from XendLogging import log
from xen.xend.XendBase import XendBase
from xen.xend import XendAPIStore
+from xen.xend import uuid as genuuid
class XendPBD(XendBase):
"""Physical block devices."""
@@ -39,8 +40,7 @@ class XendPBD(XendBase):
return XendBase.getAttrRW() + attrRW
def getAttrInst(self):
- return ['uuid',
- 'host',
+ return ['host',
'SR',
'device_config']
@@ -61,31 +61,31 @@ class XendPBD(XendBase):
getFuncs = classmethod(getFuncs)
def recreate(uuid, record):
- pbd = XendPBD(uuid, record)
+ pbd = XendPBD(record, uuid)
return uuid
def create(cls, record):
uuid = genuuid.createString()
- pbd = XendPBD(uuid, record)
- return uuid
+ pbd = XendPBD(record, uuid)
+ return uuid
create = classmethod(create)
- def __init__(self, uuid, record):
+ def __init__(self, record, uuid):
XendBase.__init__(self, uuid, record)
- this.currently_attached = True
+ self.currently_attached = True
def get_host(self):
- return this.host
+ return self.host
def get_SR(self):
- return this.SR
+ return self.SR
def get_device_config(self):
- return this.device_config
+ return self.device_config
def get_currently_attached(self):
- return this.currently_attached
+ return self.currently_attached
def destroy(self):
pass