本文整理汇总了Python中xen.xend.XendBase.XendBase.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python XendBase.__init__方法的具体用法?Python XendBase.__init__怎么用?Python XendBase.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xen.xend.XendBase.XendBase
的用法示例。
在下文中一共展示了XendBase.__init__方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from xen.xend.XendBase import XendBase [as 别名]
# 或者: from xen.xend.XendBase.XendBase import __init__ [as 别名]
def __init__(self, uuid, record):
XendBase.__init__(self, uuid, record)
v_hctl = self.virtual_HCTL.split(':')
self.virtual_host = int(v_hctl[0])
self.virtual_channel = int(v_hctl[1])
self.virtual_target = int(v_hctl[2])
self.virtual_lun = int(v_hctl[3])
示例2: __init__
# 需要导入模块: from xen.xend.XendBase import XendBase [as 别名]
# 或者: from xen.xend.XendBase.XendBase import __init__ [as 别名]
def __init__(self, record, uuid):
# This is a read-only attr, so we need to
# set it here, as super class won't try to
if record.has_key("managed"):
self.managed = record["managed"]
else:
self.managed = True
XendBase.__init__(self, uuid, record)
示例3: __init__
# 需要导入模块: from xen.xend.XendBase import XendBase [as 别名]
# 或者: from xen.xend.XendBase.XendBase import __init__ [as 别名]
def __init__(self, uuid, record):
XendBase.__init__(self, uuid, record)
self.virtual_domain = -1
self.virtual_bus = -1
self.virtual_slot = -1
self.virtual_func = -1
self.VM = record['VM']
self.PPCI = record['PPCI']
self.hotplug_slot = record['hotplug_slot']
if 'options' in record.keys():
self.options = record['options']
示例4: __init__
# 需要导入模块: from xen.xend.XendBase import XendBase [as 别名]
# 或者: from xen.xend.XendBase.XendBase import __init__ [as 别名]
def __init__(self, uuid, record):
self.domain = record['domain']
self.bus = record['bus']
self.slot = record['slot']
self.func = record['func']
self.vendor_id = record['vendor_id']
self.vendor_name = record['vendor_name']
self.device_id = record['device_id']
self.device_name = record['device_name']
self.revision_id = record['revision_id']
self.class_code = record['class_code']
self.class_name = record['class_name']
self.subsystem_vendor_id = record['subsystem_vendor_id']
self.subsystem_vendor_name = record['subsystem_vendor_name']
self.subsystem_id = record['subsystem_id']
self.subsystem_name = record['subsystem_name']
self.driver = record['driver']
XendBase.__init__(self, uuid, record)
示例5: __init__
# 需要导入模块: from xen.xend.XendBase import XendBase [as 别名]
# 或者: from xen.xend.XendBase.XendBase import __init__ [as 别名]
def __init__(self, uuid, record):
self.physical_HCTL = record['physical_HCTL']
self.vendor_name = record['vendor_name']
self.model = record['model']
self.type_id = record['type_id']
self.type = record['type']
self.dev_name = record['dev_name']
self.sg_name = record['sg_name']
self.revision = record['revision']
self.scsi_id = record['scsi_id']
self.scsi_level = record['scsi_level']
p_hctl = self.physical_HCTL.split(':')
self.physical_host = int(p_hctl[0])
self.physical_channel = int(p_hctl[1])
self.physical_target = int(p_hctl[2])
self.physical_lun = int(p_hctl[3])
XendBase.__init__(self, uuid, record)
示例6: __init__
# 需要导入模块: from xen.xend.XendBase import XendBase [as 别名]
# 或者: from xen.xend.XendBase.XendBase import __init__ [as 别名]
def __init__(self, record, new_uuid, managed_pool=True):
XendBase.__init__(self, new_uuid, record)
try:
self._managed = managed_pool
self.name_label = None
name = record.get('name_label', 'Pool-Unnamed')
self._checkName(name)
self.name_label = name
self.name_description = record.get('name_description',
self.name_label)
self.proposed_cpus = [ int(cpu)
for cpu in record.get('proposed_CPUs', []) ]
self.auto_power_on = bool(record.get('auto_power_on', False))
self.ncpu = int(record.get('ncpu', 1))
self.sched_policy = record.get('sched_policy', '')
self.other_config = record.get('other_config', {})
except Exception, ex:
XendBase.destroy(self)
raise ex
示例7: __init__
# 需要导入模块: from xen.xend.XendBase import XendBase [as 别名]
# 或者: from xen.xend.XendBase.XendBase import __init__ [as 别名]
def __init__(self, uuid, xend_domain_instance):
XendBase.__init__(self, uuid, {})
self.xend_domain_instance = xend_domain_instance
示例8: __init__
# 需要导入模块: from xen.xend.XendBase import XendBase [as 别名]
# 或者: from xen.xend.XendBase.XendBase import __init__ [as 别名]
def __init__(self, uuid, record):
self.physical_host = record['physical_host']
XendBase.__init__(self, uuid, record)
示例9: __init__
# 需要导入模块: from xen.xend.XendBase import XendBase [as 别名]
# 或者: from xen.xend.XendBase.XendBase import __init__ [as 别名]
def __init__(self, record, uuid):
XendBase.__init__(self, uuid, record)
self.currently_attached = True
示例10: __init__
# 需要导入模块: from xen.xend.XendBase import XendBase [as 别名]
# 或者: from xen.xend.XendBase.XendBase import __init__ [as 别名]
def __init__(self, xspol, record, uuid):
""" xspol = actual XSPolicy object """
self.xspol = xspol
XendBase.__init__(self, uuid, record)
示例11: __init__
# 需要导入模块: from xen.xend.XendBase import XendBase [as 别名]
# 或者: from xen.xend.XendBase.XendBase import __init__ [as 别名]
def __init__(self, record, uuid, metrics_uuid):
XendBase.__init__(self, uuid, record)
self.metrics = metrics_uuid