本文整理汇总了Python中healthnmon.resourcemodel.healthnmonResourceModel.VmHost.set_processorCoresCount方法的典型用法代码示例。如果您正苦于以下问题:Python VmHost.set_processorCoresCount方法的具体用法?Python VmHost.set_processorCoresCount怎么用?Python VmHost.set_processorCoresCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类healthnmon.resourcemodel.healthnmonResourceModel.VmHost
的用法示例。
在下文中一共展示了VmHost.set_processorCoresCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createInvCache
# 需要导入模块: from healthnmon.resourcemodel.healthnmonResourceModel import VmHost [as 别名]
# 或者: from healthnmon.resourcemodel.healthnmonResourceModel.VmHost import set_processorCoresCount [as 别名]
def createInvCache(self, vmrunning, hostconnection='Connected'):
vmhost = VmHost()
vmhost.set_id(self.vmhost_id)
vmhost.set_connectionState(hostconnection)
vm = Vm()
vm.set_id(self.vm_id)
if vmrunning:
vm.set_powerState(Constants.VM_POWER_STATES[1])
else:
vm.set_powerState(Constants.VM_POWER_STATES[0])
vm.set_vmHostId(self.vmhost_id)
vmhost.set_virtualMachineIds([self.vm_id
])
vmhost.set_processorSpeedMhz(2100)
vmhost.set_processorCoresCount(4)
vmhost.set_processorCount('2')
vmhost.set_memorySize(2097152)
vmhost.set_memoryConsumed(2097152)
InventoryCacheManager.update_object_in_cache(self.vmhost_id, vmhost)
InventoryCacheManager.update_object_in_cache(
self.vm_id,
vm)