本文整理汇总了Python中healthnmon.resourcemodel.healthnmonResourceModel.VmHost.set_storageVolumeIds方法的典型用法代码示例。如果您正苦于以下问题:Python VmHost.set_storageVolumeIds方法的具体用法?Python VmHost.set_storageVolumeIds怎么用?Python VmHost.set_storageVolumeIds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类healthnmon.resourcemodel.healthnmonResourceModel.VmHost
的用法示例。
在下文中一共展示了VmHost.set_storageVolumeIds方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from healthnmon.resourcemodel.healthnmonResourceModel import VmHost [as 别名]
# 或者: from healthnmon.resourcemodel.healthnmonResourceModel.VmHost import set_storageVolumeIds [as 别名]
def setUp(self):
super(StorageVolumeEventsTest, self).setUp()
self.connection = LibvirtConnection(False)
vmHost = VmHost()
vmHost.set_storageVolumeIds([])
InventoryCacheManager.update_object_in_cache('1', vmHost)
self.connection._wrapped_conn = libvirt.open('qemu:///system')
self.LibvirtStorageVolume = \
LibvirtStorageVolume(self.connection._wrapped_conn, '1')
self.LibvirtStorageVolume.vmHost = vmHost
self.LibvirtStorageVolume.cur_total_storage_size = 0
self.LibvirtStorageVolume.curr_storage_free = 0
self.LibvirtStorageVolume.old_total_storage_size = 0
self.LibvirtStorageVolume.old_storage_free = 0
self.LibvirtStorageVolume.vmHost.set_id('1')
self.connection.compute_rmcontext = \
ComputeRMContext(rmType='KVM', rmIpAddress='10.10.155.165',
rmUserName='openstack',
rmPassword='password')
self.flags(healthnmon_notification_drivers=[
'nova.notifier.test_notifier'])
test_notifier.NOTIFICATIONS = []
self.mox.StubOutWithMock(nova_db, 'service_get_all_by_topic')
nova_db.service_get_all_by_topic(
mox.IgnoreArg(),
mox.IgnoreArg()).MultipleTimes().AndReturn(None)
示例2: setUp
# 需要导入模块: from healthnmon.resourcemodel.healthnmonResourceModel import VmHost [as 别名]
# 或者: from healthnmon.resourcemodel.healthnmonResourceModel.VmHost import set_storageVolumeIds [as 别名]
def setUp(self):
self.connection = LibvirtConnection(False)
vmHost = VmHost()
vmHost.set_storageVolumeIds([])
InventoryCacheManager.update_object_in_cache('1', vmHost)
self.connection._wrapped_conn = libvirt.open('qemu:///system')
self.LibvirtStorageVolume = \
LibvirtStorageVolume(self.connection._wrapped_conn, '1')
self.connection.compute_rmcontext = \
ComputeRMContext(rmType='KVM', rmIpAddress='10.10.155.165',
rmUserName='openstack',
rmPassword='password')
self.mock = mox.Mox()
示例3: setUp
# 需要导入模块: from healthnmon.resourcemodel.healthnmonResourceModel import VmHost [as 别名]
# 或者: from healthnmon.resourcemodel.healthnmonResourceModel.VmHost import set_storageVolumeIds [as 别名]
def setUp(self):
super(test_LibvirtStorage, self).setUp()
self.connection = LibvirtConnection(False)
vmHost = VmHost()
vmHost.set_storageVolumeIds([])
InventoryCacheManager.update_object_in_cache('1', vmHost)
self.connection._wrapped_conn = libvirt.open('qemu:///system')
self.LibvirtStorageVolume = \
LibvirtStorageVolume(self.connection._wrapped_conn, '1')
self.connection.compute_rmcontext = \
ComputeRMContext(rmType='KVM', rmIpAddress='10.10.155.165',
rmUserName='openstack',
rmPassword='password')
cfg.CONF.set_override('healthnmon_notification_drivers',
['healthnmon.notifier.log_notifier'])
self.mock = mox.Mox()