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
= [{‘table-name’: ‘hosts’, ‘selector-type’: ‘DICT_SELECTOR’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘fieldname’: ‘name’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘uuid’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘host.DNS_IPs’, ‘col’: ‘Host:DNS_id’, ‘translator’: {‘table-name’: ‘host.DNS_IPs’, ‘id-col’: ‘Host:DNS_id’, ‘translation-type’: ‘LIST’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘val-col’: ‘DNS_IPs’}})}, {‘table-name’: ‘host.PNICs’, ‘selector-type’: ‘DICT_SELECTOR’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘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’, ‘translator’: {‘translation-type’: ‘VALUE’}})}, {‘table-name’: ‘host.VNICs’, ‘selector-type’: ‘DICT_SELECTOR’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘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’, ‘translator’: {‘translation-type’: ‘VALUE’}})}, {‘table-name’: ‘vms’, ‘selector-type’: ‘DICT_SELECTOR’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘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’, ‘translator’: {‘translation-type’: ‘VALUE’}})}]¶
-
VMS
= ‘vms’¶
-
execute
(action, action_args)¶ Overwrite ExecutionDriver.execute().
-
static
get_datasource_info
()¶
-
hosts_translator
= {‘table-name’: ‘hosts’, ‘selector-type’: ‘DICT_SELECTOR’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘fieldname’: ‘name’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘uuid’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘host.DNS_IPs’, ‘col’: ‘Host:DNS_id’, ‘translator’: {‘table-name’: ‘host.DNS_IPs’, ‘id-col’: ‘Host:DNS_id’, ‘translation-type’: ‘LIST’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘val-col’: ‘DNS_IPs’}})}¶
-
pnic_translator
= {‘table-name’: ‘host.PNICs’, ‘selector-type’: ‘DICT_SELECTOR’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘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’, ‘translator’: {‘translation-type’: ‘VALUE’}})}¶
-
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
= {‘table-name’: ‘vms’, ‘selector-type’: ‘DICT_SELECTOR’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘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’, ‘translator’: {‘translation-type’: ‘VALUE’}})}¶
-
vnic_translator
= {‘table-name’: ‘host.VNICs’, ‘selector-type’: ‘DICT_SELECTOR’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘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’, ‘translator’: {‘translation-type’: ‘VALUE’}})}¶
-