当前位置: 首页>>代码示例>>Python>>正文


Python XendBase.__init__方法代码示例

本文整理汇总了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])
开发者ID:Angel666,项目名称:android_hardware_intel,代码行数:9,代码来源:XendDSCSI.py

示例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)
开发者ID:Angel666,项目名称:android_hardware_intel,代码行数:10,代码来源:XendNetwork.py

示例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']
开发者ID:amodj,项目名称:Utopia,代码行数:15,代码来源:XendDPCI.py

示例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)
开发者ID:Angel666,项目名称:android_hardware_intel,代码行数:20,代码来源:XendPPCI.py

示例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)
开发者ID:a2k2,项目名称:xen-unstable,代码行数:21,代码来源:XendPSCSI.py

示例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
开发者ID:jinho10,项目名称:d-pride,代码行数:22,代码来源:XendCPUPool.py

示例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
开发者ID:jinho10,项目名称:d-pride,代码行数:5,代码来源:XendVMMetrics.py

示例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)
开发者ID:Angel666,项目名称:android_hardware_intel,代码行数:5,代码来源:XendPSCSI.py

示例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
开发者ID:Angel666,项目名称:android_hardware_intel,代码行数:5,代码来源:XendPBD.py

示例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)
开发者ID:a2k2,项目名称:xen-unstable,代码行数:6,代码来源:XendXSPolicy.py

示例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
开发者ID:mikesun,项目名称:xen-cow-checkpointing,代码行数:5,代码来源:XendPIF.py


注:本文中的xen.xend.XendBase.XendBase.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。