The congress.datasources.vCenter_driver Module¶
-
class
congress.datasources.vCenter_driver.VCenterDriver(name=”, args=None, session=None)¶ Bases:
congress.datasources.datasource_driver.PollingDataSourceDriver,congress.datasources.datasource_driver.ExecutionDriver-
HOSTS= ‘hosts’¶
-
HOST_DNS= ‘host.DNS_IPs’¶
-
HOST_PNICS= ‘host.PNICs’¶
-
HOST_VNICS= ‘host.VNICs’¶
-
TRANSLATORS= [{‘field-translators’: ({‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘name’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘uuid’}, {‘col’: ‘Host:DNS_id’, ‘translator’: {‘id-col’: ‘Host:DNS_id’, ‘translation-type’: ‘LIST’, ‘val-col’: ‘DNS_IPs’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘table-name’: ‘host.DNS_IPs’}, ‘fieldname’: ‘host.DNS_IPs’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DICT_SELECTOR’, ‘table-name’: ‘hosts’}, {‘field-translators’: ({‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘host_uuid’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘device’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘mac’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘ipAddress’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘subnetMask’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DICT_SELECTOR’, ‘table-name’: ‘host.PNICs’}, {‘field-translators’: ({‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘host_uuid’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘device’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘mac’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘portgroup’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘ipAddress’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘subnetMask’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DICT_SELECTOR’, ‘table-name’: ‘host.VNICs’}, {‘field-translators’: ({‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘name’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘uuid’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘host_uuid’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘pathName’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘status’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘CpuDemand’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘CpuUsage’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘memorySizeMB’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘MemoryUsage’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘committedStorage’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘uncommittedStorage’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘annotation’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DICT_SELECTOR’, ‘table-name’: ‘vms’}]¶
-
VMS= ‘vms’¶
-
execute(action, action_args)¶ Overwrite ExecutionDriver.execute().
-
static
get_datasource_info()¶
-
hosts_translator= {‘field-translators’: ({‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘name’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘uuid’}, {‘col’: ‘Host:DNS_id’, ‘translator’: {‘id-col’: ‘Host:DNS_id’, ‘translation-type’: ‘LIST’, ‘val-col’: ‘DNS_IPs’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘table-name’: ‘host.DNS_IPs’}, ‘fieldname’: ‘host.DNS_IPs’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DICT_SELECTOR’, ‘table-name’: ‘hosts’}¶
-
pnic_translator= {‘field-translators’: ({‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘host_uuid’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘device’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘mac’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘ipAddress’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘subnetMask’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DICT_SELECTOR’, ‘table-name’: ‘host.PNICs’}¶
-
update_from_datasource()¶ Called when it is time to pull new data from this datasource.
Pulls lists of objects from vCenter, if the data does not match the correspondig table in the driver’s raw state or has not yet been added to the state, the driver calls methods to parse this data.
-
value_trans= {‘translation-type’: ‘VALUE’}¶
-
vms_translator= {‘field-translators’: ({‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘name’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘uuid’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘host_uuid’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘pathName’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘status’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘CpuDemand’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘CpuUsage’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘memorySizeMB’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘MemoryUsage’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘committedStorage’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘uncommittedStorage’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘annotation’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DICT_SELECTOR’, ‘table-name’: ‘vms’}¶
-
vnic_translator= {‘field-translators’: ({‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘host_uuid’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘device’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘mac’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘portgroup’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘ipAddress’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘subnetMask’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DICT_SELECTOR’, ‘table-name’: ‘host.VNICs’}¶
-