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


Python VDiskList.get_in_volume_ids方法代码示例

本文整理汇总了Python中ovs.dal.lists.vdisklist.VDiskList.get_in_volume_ids方法的典型用法代码示例。如果您正苦于以下问题:Python VDiskList.get_in_volume_ids方法的具体用法?Python VDiskList.get_in_volume_ids怎么用?Python VDiskList.get_in_volume_ids使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ovs.dal.lists.vdisklist.VDiskList的用法示例。


在下文中一共展示了VDiskList.get_in_volume_ids方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _vdisks_guids

# 需要导入模块: from ovs.dal.lists.vdisklist import VDiskList [as 别名]
# 或者: from ovs.dal.lists.vdisklist.VDiskList import get_in_volume_ids [as 别名]
 def _vdisks_guids(self):
     """
     Gets the vDisk guids served by this StorageRouter.
     """
     from ovs.dal.lists.vdisklist import VDiskList
     vdisk_guids = []
     for storagedriver in self.storagedrivers:
         storagedriver_client = storagedriver.vpool.storagedriver_client
         vdisk_guids += VDiskList.get_in_volume_ids(storagedriver_client.list_volumes(str(storagedriver.storagedriver_id))).guids
     return vdisk_guids
开发者ID:DarumasLegs,项目名称:framework,代码行数:12,代码来源:storagerouter.py

示例2: _vdisks_guids

# 需要导入模块: from ovs.dal.lists.vdisklist import VDiskList [as 别名]
# 或者: from ovs.dal.lists.vdisklist.VDiskList import get_in_volume_ids [as 别名]
 def _vdisks_guids(self):
     """
     Gets the vDisk guids served by this StorageDriver.
     """
     from ovs.dal.lists.vdisklist import VDiskList
     volume_ids = []
     for entry in self.vpool.objectregistry_client.get_all_registrations():
         if entry.node_id() == self.storagedriver_id:
             volume_ids.append(entry.object_id())
     return VDiskList.get_in_volume_ids(volume_ids).guids
开发者ID:grimpy,项目名称:openvstorage,代码行数:12,代码来源:storagedriver.py

示例3: _vmachines_guids

# 需要导入模块: from ovs.dal.lists.vdisklist import VDiskList [as 别名]
# 或者: from ovs.dal.lists.vdisklist.VDiskList import get_in_volume_ids [as 别名]
 def _vmachines_guids(self):
     """
     Gets the vMachine guids served by this StorageRouter.
     Definition of "served by": vMachine whose disks are served by a given StorageRouter
     """
     from ovs.dal.lists.vdisklist import VDiskList
     vmachine_guids = set()
     for storagedriver in self.storagedrivers:
         storagedriver_client = storagedriver.vpool.storagedriver_client
         for vdisk in VDiskList.get_in_volume_ids(storagedriver_client.list_volumes(str(storagedriver.storagedriver_id))):
             if vdisk.vmachine_guid is not None:
                 vmachine_guids.add(vdisk.vmachine_guid)
     return list(vmachine_guids)
开发者ID:DarumasLegs,项目名称:framework,代码行数:15,代码来源:storagerouter.py

示例4: _vdisks_guids

# 需要导入模块: from ovs.dal.lists.vdisklist import VDiskList [as 别名]
# 或者: from ovs.dal.lists.vdisklist.VDiskList import get_in_volume_ids [as 别名]
 def _vdisks_guids(self):
     """
     Gets the vDisk guids served by this StorageRouter.
     """
     from ovs.dal.lists.vdisklist import VDiskList
     volume_ids = []
     vpools = set()
     storagedriver_ids = []
     for storagedriver in self.storagedrivers:
         vpools.add(storagedriver.vpool)
         storagedriver_ids.append(storagedriver.storagedriver_id)
     for vpool in vpools:
         for entry in vpool.objectregistry_client.get_all_registrations():
             if entry.node_id() in storagedriver_ids:
                 volume_ids.append(entry.object_id())
     return VDiskList.get_in_volume_ids(volume_ids).guids
开发者ID:grimpy,项目名称:openvstorage,代码行数:18,代码来源:storagerouter.py


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