废话不说直接上代码
目录
detail_cluster_configurationEx
detail_cluster
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# author:hanxiaoshun
# datetime:2020/6/28 9:48
# software: PyCharm
from xxxxxxx.vmware_api.detail_cluster_configuration import detail_cluster_configuration
from xxxxxxx.vmware_api.detail_cluster_configurationEx import detail_cluster_configurationEx
from xxxxxxxx.vmware_api.detail_cluster_summary import detail_cluster_summary
def detail_cluster(cluster):
cluster_tmp = {}
cluster_tmp['actionHistory'] = []
cluster_tmp['alarmActionsEnabled'] = cluster.alarmActionsEnabled
cluster_tmp['availableField'] = []
cluster_tmp['configIssue'] = []
cluster_tmp['configStatus'] = cluster.configStatus
cluster_tmp['configuration'] = detail_cluster_configuration(cluster.configuration)
cluster_tmp['configurationEx'] = detail_cluster_configurationEx(cluster.configurationEx)
cluster_tmp['customValue'] = []
datastore_list = []
for datastore in cluster.datastore:
datastore_tmp = {}
datastore_tmp['_moId'] = datastore._moId
datastore_tmp['name'] = datastore.name
datastore_list.append(datastore_tmp)
cluster_tmp['datastore'] = datastore_list
cluster_tmp['declaredAlarmState'] = []
cluster_tmp['disabledMethod'] = []
cluster_tmp['drsFault'] = []
cluster_tmp['drsRecommendation'] = []
cluster_tmp['effectiveRole'] = []
cluster_tmp['environmentBrowser'] = {}
host_list = []
for host in cluster.host:
host_tmp = {}
host_tmp['_moId'] = host._moId
host_tmp['name'] = host.name
host_list.append(host_tmp)
cluster_tmp['host'] = host_list
cluster_tmp['migrationHistory'] = []
cluster_tmp['name'] = cluster.name
network_list = []
for network in cluster.network:
network_tmp = {}
network_tmp['_moId'] = network._moId
network_tmp['name'] = network.name
network_list.append(network_tmp)
cluster_tmp['network'] = network_list
cluster_tmp['overallStatus'] = cluster.overallStatus
cluster_tmp['parent'] = {}
cluster_tmp['permission'] = []
cluster_tmp['recentTask'] = []
cluster_tmp['recommendation'] = []
cluster_tmp['resourcePool'] = str(cluster.resourcePool)
cluster_tmp['summary'] = detail_cluster_summary(cluster.summary)
cluster_tmp['tag'] = []
cluster_tmp['value'] = []
return cluster_tmp
from cloudenforce.vmware_api.detail_datacenter import detail_datacenter
# -*- coding: utf-8 -*-
from pyvim import connect
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
import atexit
vcenter_address = 'vc22.cloudenforcex.com'
service_instance = connect.SmartConnect(host=vcenter_address,
user='administrator@xxxx.xxx',
pwd='xxxxxxxxx',
port=443)
content = service_instance.RetrieveContent()
vcontent = service_instance.content
from cloudenforce.vmware_api.vcenter_mongo import insert_patch
if __name__ == '__main__':
data_list = []
for datacenter in vcontent.rootFolder.childEntity:
for cluster in datacenter.hostFolder.childEntity:
cluster_tmp = detail_cluster(cluster)
data_list.append(cluster_tmp)
print(data_list)
insert_patch(data_list, 'vcenter_cluster')
detail_cluster_configuration
#!/usr/bin/env python
#-*- coding:utf-8 -*-
# author:hanxiaoshun
# datetime:2020/6/26 11:17
# software: PyCharm
def detail_cluster_configuration(configuration=None):
configuration_tmp = {}
configuration_tmp = {}
configuration_tmp['dasConfig'] = {}
configuration_tmp['dasVmConfig'] = ''
configuration_tmp['drsConfig'] = {}
configuration_tmp['drsVmConfig'] = ''
configuration_tmp['rule'] = []
if getattr(configuration, 'dasConfig'):
configuration_tmp['dasConfig']['admissionControlEnabled'] = getattr(
configuration.dasConfig,
'admissionControlEnabled')
configuration_tmp['dasConfig']['admissionControlPolicy'] = {}
configuration_tmp['dasConfig']['admissionControlPolicy'][
'autoComputePercentages'] = getattr(
configuration.dasConfig.admissionControlPolicy,
'autoComputePercentages')
configuration_tmp['dasConfig']['admissionControlPolicy'][
'cpuFailoverResourcesPercent'] = getattr(
configuration.dasConfig.admissionControlPolicy,
'cpuFailoverResourcesPercent')
configuration_tmp['dasConfig']['admissionControlPolicy'][
'failoverLevel'] = getattr(
configuration.dasConfig.admissionControlPolicy,
'failoverLevel')
configuration_tmp['dasConfig']['admissionControlPolicy'][
'memoryFailoverResourcesPercent'] = getattr(
configuration.dasConfig.admissionControlPolicy,
'memoryFailoverResourcesPercent')
configuration_tmp['dasConfig']['admissionControlPolicy'][
'resourceReductionToToleratePercent'] = getattr(
configuration.dasConfig.admissionControlPolicy,
'resourceReductionToToleratePercent')
if getattr(configuration.dasConfig, 'defaultVmSettings'):
configuration_tmp['dasConfig']['defaultVmSettings'] = {}
configuration_tmp['dasConfig']['defaultVmSettings'][
'isolationResponse'] = getattr(
configuration.dasConfig.defaultVmSettings,
'isolationResponse')
configuration_tmp['dasConfig']['defaultVmSettings'][
'restartPriority'] = getattr(
configuration.dasConfig.defaultVmSettings,
'restartPriority')
configuration_tmp['dasConfig']['defaultVmSettings'][
'restartPriorityTimeout'] = getattr(
configuration.dasConfig.defaultVmSettings,
'restartPriorityTimeout')
if hasattr(configuration.dasConfig.defaultVmSettings, 'vmComponentProtectionSettings'):
configuration_tmp['dasConfig']['defaultVmSettings'][
'vmComponentProtectionSettings'] = {}
configuration_tmp['dasConfig']['defaultVmSettings'][
'vmComponentProtectionSettings']['enableAPDTimeoutForHosts'] = getattr(
configuration.dasConfig.defaultVmSettings.vmComponentProtectionSettings,
'enableAPDTimeoutForHosts')
configuration_tmp['dasConfig']['defaultVmSettings'][
'vmComponentProtectionSettings']['enableAPDTimeoutForHosts'] = getattr(
configuration.dasConfig.defaultVmSettings.vmComponentProtectionSettings,
'enableAPDTimeoutForHosts')
configuration_tmp['dasConfig']['defaultVmSettings'][
'vmComponentProtectionSettings']['vmReactionOnAPDCleared'] = getattr(
configuration.dasConfig.defaultVmSettings.vmComponentProtectionSettings,
'vmReactionOnAPDCleared')
configuration_tmp['dasConfig']['defaultVmSettings'][
'vmComponentProtectionSettings']['vmStorageProtectionForAPD '] = getattr(
configuration.dasConfig.defaultVmSettings.vmComponentProtectionSettings,
'vmStorageProtectionForAPD')
configuration_tmp['dasConfig']['defaultVmSettings'][
'vmComponentProtectionSettings']['vmStorageProtectionForPDL'] = getattr(
configuration.dasConfig.defaultVmSettings.vmComponentProtectionSettings,
'vmStorageProtectionForPDL')
configuration_tmp['dasConfig']['defaultVmSettings'][
'vmComponentProtectionSettings']['vmTerminateDelayForAPDSec'] = getattr(
configuration.dasConfig.defaultVmSettings.vmComponentProtectionSettings,
'vmTerminateDelayForAPDSec')
if hasattr(configuration.dasConfig.defaultVmSettings, 'vmToolsMonitoringSettings'):
configuration_tmp['dasConfig']['defaultVmSettings'][
'vmToolsMonitoringSettings'] = {}
configuration_tmp['dasConfig']['defaultVmSettings'][
'vmToolsMonitoringSettings']['clusterSettings'] = getattr(
configuration.dasConfig.defaultVmSettings.vmToolsMonitoringSettings,
'clusterSettings')
configuration_tmp['dasConfig']['defaultVmSettings'][
'vmToolsMonitoringSettings']['enabled'] = getattr(
configuration.dasConfig.defaultVmSettings.vmToolsMonitoringSettings,
'enabled')
configuration_tmp['dasConfig']['defaultVmSettings'][
'vmToolsMonitoringSettings']['failureInterval'] = getattr(
configuration.dasConfig.defaultVmSettings.vmToolsMonitoringSettings,
'failureInterval')
configuration_tmp['dasConfig']['defaultVmSettings'][
'vmToolsMonitoringSettings']['maxFailures'] = getattr(
configuration.dasConfig.defaultVmSettings.vmToolsMonitoringSettings,
'maxFailures')
configuration_tmp['dasConfig']['defaultVmSettings'][
'vmToolsMonitoringSettings']['minUpTime'] = getattr(
configuration.dasConfig.defaultVmSettings.vmToolsMonitoringSettings,
'minUpTime')
configuration_tmp['dasConfig']['defaultVmSettings'][
'vmToolsMonitoringSettings']['vmMonitoring'] = getattr(
configuration.dasConfig.defaultVmSettings.vmToolsMonitoringSettings,
'vmMonitoring')
if hasattr(configuration.dasConfig, 'enabled'):
configuration_tmp['dasConfig']['enabled'] = getattr(configuration.dasConfig,
'enabled')
if hasattr(configuration.dasConfig, 'enabled'):
configuration_tmp['dasConfig']['failoverLevel'] = getattr(
configuration.dasConfig,
'failoverLevel')
if hasattr(configuration.dasConfig, 'enabled'):
configuration_tmp['dasConfig']['hBDatastoreCandidatePolicy'] = getattr(
configuration.dasConfig,
'hBDatastoreCandidatePolicy')
if hasattr(configuration.dasConfig, 'enabled'):
configuration_tmp['dasConfig']['hostMonitoring'] = getattr(
configuration.dasConfig,
'hostMonitoring')
if hasattr(configuration.dasConfig, 'enabled'):
configuration_tmp['dasConfig']['vmComponentProtecting'] = getattr(
configuration.dasConfig,
'vmComponentProtecting')
if hasattr(configuration.dasConfig, 'enabled'):
configuration_tmp['dasConfig']['vmMonitoring'] = getattr(
configuration.dasConfig,
'vmMonitoring')
configuration_tmp['drsConfig'][
'defaultVmBehavior'] = configuration.drsConfig.defaultVmBehavior
configuration_tmp['drsConfig'][
'enableVmBehaviorOverrides'] = configuration.drsConfig.enableVmBehaviorOverrides
configuration_tmp['drsConfig']['enabled'] = configuration.drsConfig.enabled
configuration_tmp['drsConfig']['option'] = []
configuration_tmp['drsConfig'][
'vmotionRate'] = configuration.drsConfig.vmotionRate
rule_list = []
for rule in configuration.rule:
rule_dict = {}
rule_dict['affineHostGroupName'] = rule.affineHostGroupName
rule_dict['antiAffineHostGroupName'] = rule.antiAffineHostGroupName
rule_dict['enabled'] = rule.enabled
rule_dict['inCompliance'] = rule.inCompliance
rule_dict['key'] = rule.key
rule_dict['mandatory'] = rule.mandatory
rule_dict['name'] = rule.name
rule_dict['ruleUuid'] = rule.ruleUuid
rule_dict['status'] = rule.status
rule_dict['userCreated'] = rule.userCreated
rule_dict['vmGroupName'] = rule.vmGroupName
rule_list.append(rule_dict)
configuration_tmp['rule'] = rule_list
return configuration_tmp
detail_cluster_configurationEx
#!/usr/bin/env python
#-*- coding:utf-8 -*-
# author:hanxiaoshun
# datetime:2020/6/26 11:17
# software: PyCharm
def detail_cluster_configurationEx(configurationEx=None):
configurationEx_tmp = {}
configurationEx_tmp['dasConfig'] = {}
configurationEx_tmp['dasConfig']['admissionControlEnabled'] = configurationEx.dasConfig.admissionControlEnabled
configurationEx_tmp['dasConfig']['admissionControlPolicy'] = {}
configurationEx_tmp['dasConfig']['admissionControlPolicy']['autoComputePercentages'] = configurationEx.dasConfig.admissionControlPolicy.autoComputePercentages
configurationEx_tmp['dasConfig']['admissionControlPolicy']['cpuFailoverResourcesPercent'] = configurationEx.dasConfig.admissionControlPolicy.cpuFailoverResourcesPercent
configurationEx_tmp['dasConfig']['admissionControlPolicy']['failoverLevel'] = configurationEx.dasConfig.admissionControlPolicy.failoverLevel
configurationEx_tmp['dasConfig']['admissionControlPolicy']['memoryFailoverResourcesPercent'] = configurationEx.dasConfig.admissionControlPolicy.memoryFailoverResourcesPercent
configurationEx_tmp['dasConfig']['admissionControlPolicy']['resourceReductionToToleratePercent'] = configurationEx.dasConfig.admissionControlPolicy.resourceReductionToToleratePercent
configurationEx_tmp['dasConfig']['defaultVmSettings'] = {}
configurationEx_tmp['dasConfig']['defaultVmSettings']['isolationResponse'] = configurationEx.dasConfig.defaultVmSettings.isolationResponse
configurationEx_tmp['dasConfig']['defaultVmSettings']['restartPriority'] = configurationEx.dasConfig.defaultVmSettings.restartPriority
configurationEx_tmp['dasConfig']['defaultVmSettings']['restartPriorityTimeout'] = configurationEx.dasConfig.defaultVmSettings.restartPriorityTimeout
configurationEx_tmp['dasConfig']['defaultVmSettings']['vmComponentProtectionSettings'] = {}
configurationEx_tmp['dasConfig']['defaultVmSettings']['vmComponentProtectionSettings']['enableAPDTimeoutForHosts'] = configurationEx.dasConfig.defaultVmSettings.vmComponentProtectionSettings.enableAPDTimeoutForHosts
configurationEx_tmp['dasConfig']['defaultVmSettings']['vmComponentProtectionSettings']['vmReactionOnAPDCleared'] = configurationEx.dasConfig.defaultVmSettings.vmComponentProtectionSettings.vmReactionOnAPDCleared
configurationEx_tmp['dasConfig']['defaultVmSettings']['vmComponentProtectionSettings']['vmStorageProtectionForAPD'] = configurationEx.dasConfig.defaultVmSettings.vmComponentProtectionSettings.vmStorageProtectionForAPD
configurationEx_tmp['dasConfig']['defaultVmSettings']['vmComponentProtectionSettings']['vmStorageProtectionForPDL'] = configurationEx.dasConfig.defaultVmSettings.vmComponentProtectionSettings.vmStorageProtectionForPDL
configurationEx_tmp['dasConfig']['defaultVmSettings']['vmComponentProtectionSettings']['vmTerminateDelayForAPDSec'] = configurationEx.dasConfig.defaultVmSettings.vmComponentProtectionSettings.vmTerminateDelayForAPDSec
configurationEx_tmp['dasConfig']['defaultVmSettings']['vmToolsMonitoringSettings'] = {}
configurationEx_tmp['dasConfig']['defaultVmSettings']['vmToolsMonitoringSettings']['clusterSettings'] = configurationEx.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.clusterSettings
configurationEx_tmp['dasConfig']['defaultVmSettings']['vmToolsMonitoringSettings']['enabled'] = configurationEx.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.enabled
configurationEx_tmp['dasConfig']['defaultVmSettings']['vmToolsMonitoringSettings']['failureInterval'] = configurationEx.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.failureInterval
configurationEx_tmp['dasConfig']['defaultVmSettings']['vmToolsMonitoringSettings']['maxFailureWindow'] = configurationEx.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.maxFailureWindow
configurationEx_tmp['dasConfig']['defaultVmSettings']['vmToolsMonitoringSettings']['maxFailures'] = configurationEx.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.maxFailures
configurationEx_tmp['dasConfig']['defaultVmSettings']['vmToolsMonitoringSettings']['minUpTime'] = configurationEx.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.minUpTime
configurationEx_tmp['dasConfig']['defaultVmSettings']['vmToolsMonitoringSettings']['vmMonitoring'] = configurationEx.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.vmMonitoring
configurationEx_tmp['dasConfig']['enabled'] = configurationEx.dasConfig.enabled
configurationEx_tmp['dasConfig']['failoverLevel'] = configurationEx.dasConfig.failoverLevel
configurationEx_tmp['dasConfig']['hBDatastoreCandidatePolicy'] = configurationEx.dasConfig.hBDatastoreCandidatePolicy
configurationEx_tmp['dasConfig']['heartbeatDatastore'] = []
configurationEx_tmp['dasConfig']['hostMonitoring'] = configurationEx.dasConfig.hostMonitoring
configurationEx_tmp['dasConfig']['option'] = []
configurationEx_tmp['dasConfig']['vmComponentProtecting'] = configurationEx.dasConfig.vmComponentProtecting
configurationEx_tmp['dasConfig']['vmMonitoring'] = configurationEx.dasConfig.vmMonitoring
configurationEx_tmp['dasVmConfig'] = configurationEx.dasVmConfig
configurationEx_tmp['defaultHardwareVersionKey'] = configurationEx.defaultHardwareVersionKey
configurationEx_tmp['dpmConfigInfo'] = {}
configurationEx_tmp['dpmConfigInfo']['defaultDpmBehavior'] = configurationEx.dpmConfigInfo.defaultDpmBehavior
configurationEx_tmp['dpmConfigInfo']['enabled'] = configurationEx.dpmConfigInfo.enabled
configurationEx_tmp['dpmConfigInfo']['hostPowerActionRate'] = configurationEx.dpmConfigInfo.hostPowerActionRate
configurationEx_tmp['dpmConfigInfo']['option'] = []
configurationEx_tmp['drsConfig'] = {}
configurationEx_tmp['drsConfig']['defaultVmBehavior'] = configurationEx.drsConfig.defaultVmBehavior
configurationEx_tmp['drsConfig']['enableVmBehaviorOverrides'] = configurationEx.drsConfig.enableVmBehaviorOverrides
configurationEx_tmp['drsConfig']['enabled'] = configurationEx.drsConfig.enabled
configurationEx_tmp['drsConfig']['option'] = []
configurationEx_tmp['drsConfig']['vmotionRate'] = configurationEx.drsConfig.vmotionRate
configurationEx_tmp['drsVmConfig'] = []
configurationEx_tmp['group'] = []
configurationEx_tmp['infraUpdateHaConfig'] = {}
configurationEx_tmp['infraUpdateHaConfig']['behavior'] = configurationEx.infraUpdateHaConfig.behavior
configurationEx_tmp['infraUpdateHaConfig']['enabled'] = configurationEx.infraUpdateHaConfig.enabled
configurationEx_tmp['infraUpdateHaConfig']['moderateRemediation'] = configurationEx.infraUpdateHaConfig.moderateRemediation
configurationEx_tmp['infraUpdateHaConfig']['providers'] = []
configurationEx_tmp['infraUpdateHaConfig']['severeRemediation'] = configurationEx.infraUpdateHaConfig.severeRemediation
configurationEx_tmp['orchestration'] = {}
configurationEx_tmp['orchestration']['defaultVmReadiness'] = {}
configurationEx_tmp['orchestration']['defaultVmReadiness']['postReadyDelay'] = configurationEx.orchestration.defaultVmReadiness.postReadyDelay
configurationEx_tmp['orchestration']['defaultVmReadiness']['readyCondition'] = configurationEx.orchestration.defaultVmReadiness.readyCondition
configurationEx_tmp['proactiveDrsConfig'] = {}
configurationEx_tmp['proactiveDrsConfig']['enabled'] = configurationEx.proactiveDrsConfig.enabled
rule_list = []
for rule in configurationEx.rule:
rule_dict = {}
rule_dict['affineHostGroupName'] = rule.affineHostGroupName
rule_dict['antiAffineHostGroupName'] = rule.antiAffineHostGroupName
rule_dict['enabled'] = rule.enabled
rule_dict['inCompliance'] = rule.inCompliance
rule_dict['key'] = rule.key
rule_dict['mandatory'] = rule.mandatory
rule_dict['name'] = rule.name
rule_dict['ruleUuid'] = rule.ruleUuid
rule_dict['status'] = rule.status
rule_dict['userCreated'] = rule.userCreated
rule_dict['vmGroupName'] = rule.vmGroupName
rule_list.append(rule_dict)
configurationEx_tmp['rule'] = rule_list
configurationEx_tmp['spbmEnabled'] = configurationEx.spbmEnabled
configurationEx_tmp['vmOrchestration'] = []
configurationEx_tmp['vmSwapPlacement'] = configurationEx.vmSwapPlacement
configurationEx_tmp['vsanConfigInfo'] = {}
configurationEx_tmp['vsanConfigInfo']['defaultConfig'] = {}
configurationEx_tmp['vsanConfigInfo']['defaultConfig']['autoClaimStorage'] = configurationEx.vsanConfigInfo.defaultConfig.autoClaimStorage
configurationEx_tmp['vsanConfigInfo']['defaultConfig']['checksumEnabled'] = configurationEx.vsanConfigInfo.defaultConfig.checksumEnabled
configurationEx_tmp['vsanConfigInfo']['defaultConfig']['uuid'] = configurationEx.vsanConfigInfo.defaultConfig.uuid
configurationEx_tmp['vsanConfigInfo']['enabled'] = configurationEx.vsanConfigInfo.enabled
configurationEx_tmp['vsanHostConfig'] = []
return configurationEx_tmp
detail_cluster_summary
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# author:hanxiaoshun
# datetime:2020/6/26 11:31
# software: PyCharm
def detail_cluster_summary(summary=None):
template_tmp = {}
template_tmp['summary'] = {}
template_tmp['summary']['admissionControlInfo'] = summary.admissionControlInfo
template_tmp['summary']['currentBalance'] = summary.currentBalance
template_tmp['summary']['currentBalance'] = summary.currentBalance
template_tmp['summary']['currentEVCModeKey'] = summary.currentEVCModeKey
template_tmp['summary']['currentFailoverLevel'] = summary.currentFailoverLevel
template_tmp['summary']['dasData'] = summary.dasData
template_tmp['summary']['effectiveCpu'] = summary.effectiveCpu
template_tmp['summary']['effectiveMemory'] = summary.effectiveMemory
template_tmp['summary']['numCpuCores'] = summary.numCpuCores
template_tmp['summary']['numCpuThreads'] = summary.numCpuThreads
template_tmp['summary']['numEffectiveHosts'] = summary.numEffectiveHosts
template_tmp['summary']['numHosts'] = summary.numHosts
template_tmp['summary']['numVmotions'] = summary.numVmotions
template_tmp['summary']['overallStatus'] = summary.overallStatus
template_tmp['summary']['targetBalance'] = summary.targetBalance
template_tmp['summary']['totalCpu'] = summary.totalCpu
template_tmp['summary']['totalMemory'] = summary.totalMemory
template_tmp['summary']['usageSummary'] = {}
template_tmp['summary']['usageSummary'][
'cpuDemandMhz'] = summary.usageSummary.cpuDemandMhz
template_tmp['summary']['usageSummary'][
'cpuEntitledMhz'] = summary.usageSummary.cpuEntitledMhz
template_tmp['summary']['usageSummary'][
'cpuReservationMhz'] = summary.usageSummary.cpuReservationMhz
template_tmp['summary']['usageSummary'][
'memDemandMB'] = summary.usageSummary.memDemandMB
template_tmp['summary']['usageSummary'][
'memEntitledMB'] = summary.usageSummary.memEntitledMB
template_tmp['summary']['usageSummary'][
'memReservationMB'] = summary.usageSummary.memReservationMB
template_tmp['summary']['usageSummary'][
'poweredOffCpuReservationMhz'] = summary.usageSummary.poweredOffCpuReservationMhz
template_tmp['summary']['usageSummary'][
'poweredOffMemReservationMB'] = summary.usageSummary.poweredOffMemReservationMB
template_tmp['summary']['usageSummary'][
'statsGenNumber'] = summary.usageSummary.statsGenNumber
template_tmp['summary']['usageSummary'][
'totalCpuCapacityMhz'] = summary.usageSummary.totalCpuCapacityMhz
template_tmp['summary']['usageSummary'][
'totalMemCapacityMB'] = summary.usageSummary.totalMemCapacityMB
template_tmp['summary']['usageSummary'][
'totalVmCount'] = summary.usageSummary.totalVmCount
return template_tmp