The congress.datasources.neutron_driver Module

class congress.datasources.neutron_driver.NeutronDriver(name=”, args=None)

Bases: congress.datasources.datasource_driver.PollingDataSourceDriver, congress.datasources.datasource_driver.ExecutionDriver

NETWORKS = ‘networks’
NETWORKS_SUBNETS = ‘networks.subnets’
PORTS = ‘ports’
PORTS_ADDR_PAIRS = ‘ports.address_pairs’
PORTS_BINDING_CAPABILITIES = ‘ports.binding_capabilities’
PORTS_EXTRA_DHCP_OPTS = ‘ports.extra_dhcp_opts’
PORTS_FIXED_IPS = ‘ports.fixed_ips’
PORTS_FIXED_IPS_GROUPS = ‘ports.fixed_ips_groups’
PORTS_SECURITY_GROUPS = ‘ports.security_groups’
ROUTERS = ‘routers’
ROUTERS_EXTERNAL_GATEWAYS = ‘routers.external_gateways’
SECURITY_GROUPS = ‘security_groups’
TRANSLATORS = [{‘field-translators’: ({‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘status’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘name’}, {‘col’: ‘subnet_group_id’, ‘translator’: {‘id-col’: ‘subnet_group_id’, ‘translation-type’: ‘LIST’, ‘val-col’: ‘subnet’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘table-name’: ‘networks.subnets’}, ‘fieldname’: ‘subnets’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘provider:physical_network’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘admin_state_up’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘tenant_id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘provider:network_type’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘router:external’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘shared’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘provider:segmentation_id’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DICT_SELECTOR’, ‘table-name’: ‘networks’}, {‘field-translators’: ({‘col’: ‘allowed_address_pairs_id’, ‘translator’: {‘id-col’: ‘allowed_address_pairs_id’, ‘translation-type’: ‘LIST’, ‘val-col’: ‘address’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘table-name’: ‘ports.address_pairs’}, ‘fieldname’: ‘allowed_address_pairs’}, {‘col’: ‘security_groups_id’, ‘translator’: {‘id-col’: ‘security_groups_id’, ‘translation-type’: ‘LIST’, ‘val-col’: ‘security_group_id’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘table-name’: ‘ports.security_groups’}, ‘fieldname’: ‘security_groups’}, {‘col’: ‘extra_dhcp_opt_group_id’, ‘translator’: {‘id-col’: ‘extra_dhcp_opt_group_id’, ‘translation-type’: ‘LIST’, ‘val-col’: ‘dhcp_opt’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘table-name’: ‘ports.extra_dhcp_opts’}, ‘fieldname’: ‘extra_dhcp_opts’}, {‘col’: ‘binding:capabilities_id’, ‘translator’: {‘key-col’: ‘key’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘id-col’: ‘binding:capabilities_id’, ‘val-col’: ‘value’, ‘translation-type’: ‘VDICT’, ‘table-name’: ‘ports.binding_capabilities’}, ‘fieldname’: ‘binding:capabilities’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘status’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘name’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘admin_state_up’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘network_id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘tenant_id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘binding:vif_type’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘device_owner’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘mac_address’}, {‘col’: ‘fixed_ips’, ‘translator’: {‘id-col’: ‘fixed_ips_group_id’, ‘translation-type’: ‘LIST’, ‘val-col’: ‘fixed_ip_id’, ‘translator’: {‘key-col’: ‘key’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘id-col’: ‘fixed_ip_id’, ‘val-col’: ‘value’, ‘translation-type’: ‘VDICT’, ‘table-name’: ‘ports.fixed_ips’}, ‘table-name’: ‘ports.fixed_ips_groups’}, ‘fieldname’: ‘fixed_ips’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘device_id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘binding:host_id’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DICT_SELECTOR’, ‘table-name’: ‘ports’}, {‘field-translators’: ({‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘status’}, {‘translator’: {‘key-col’: ‘key’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘id-col’: ‘external_gateway_info’, ‘val-col’: ‘value’, ‘translation-type’: ‘VDICT’, ‘table-name’: ‘routers.external_gateways’}, ‘fieldname’: ‘external_gateway_info’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘networks’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘name’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘admin_state_up’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘tenant_id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘id’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DICT_SELECTOR’, ‘table-name’: ‘routers’}, {‘field-translators’: ({‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘tenant_id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘name’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘description’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘id’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DICT_SELECTOR’, ‘table-name’: ‘security_groups’}]
execute(action, action_args)

Overwrite ExecutionDriver.execute().

static get_datasource_info()
get_neutron_credentials(creds)
initialize_update_methods()
networks_translator = {‘field-translators’: ({‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘status’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘name’}, {‘col’: ‘subnet_group_id’, ‘translator’: {‘id-col’: ‘subnet_group_id’, ‘translation-type’: ‘LIST’, ‘val-col’: ‘subnet’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘table-name’: ‘networks.subnets’}, ‘fieldname’: ‘subnets’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘provider:physical_network’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘admin_state_up’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘tenant_id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘provider:network_type’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘router:external’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘shared’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘provider:segmentation_id’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DICT_SELECTOR’, ‘table-name’: ‘networks’}
ports_translator = {‘field-translators’: ({‘col’: ‘allowed_address_pairs_id’, ‘translator’: {‘id-col’: ‘allowed_address_pairs_id’, ‘translation-type’: ‘LIST’, ‘val-col’: ‘address’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘table-name’: ‘ports.address_pairs’}, ‘fieldname’: ‘allowed_address_pairs’}, {‘col’: ‘security_groups_id’, ‘translator’: {‘id-col’: ‘security_groups_id’, ‘translation-type’: ‘LIST’, ‘val-col’: ‘security_group_id’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘table-name’: ‘ports.security_groups’}, ‘fieldname’: ‘security_groups’}, {‘col’: ‘extra_dhcp_opt_group_id’, ‘translator’: {‘id-col’: ‘extra_dhcp_opt_group_id’, ‘translation-type’: ‘LIST’, ‘val-col’: ‘dhcp_opt’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘table-name’: ‘ports.extra_dhcp_opts’}, ‘fieldname’: ‘extra_dhcp_opts’}, {‘col’: ‘binding:capabilities_id’, ‘translator’: {‘key-col’: ‘key’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘id-col’: ‘binding:capabilities_id’, ‘val-col’: ‘value’, ‘translation-type’: ‘VDICT’, ‘table-name’: ‘ports.binding_capabilities’}, ‘fieldname’: ‘binding:capabilities’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘status’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘name’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘admin_state_up’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘network_id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘tenant_id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘binding:vif_type’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘device_owner’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘mac_address’}, {‘col’: ‘fixed_ips’, ‘translator’: {‘id-col’: ‘fixed_ips_group_id’, ‘translation-type’: ‘LIST’, ‘val-col’: ‘fixed_ip_id’, ‘translator’: {‘key-col’: ‘key’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘id-col’: ‘fixed_ip_id’, ‘val-col’: ‘value’, ‘translation-type’: ‘VDICT’, ‘table-name’: ‘ports.fixed_ips’}, ‘table-name’: ‘ports.fixed_ips_groups’}, ‘fieldname’: ‘fixed_ips’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘device_id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘binding:host_id’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DICT_SELECTOR’, ‘table-name’: ‘ports’}
routers_translator = {‘field-translators’: ({‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘status’}, {‘translator’: {‘key-col’: ‘key’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘id-col’: ‘external_gateway_info’, ‘val-col’: ‘value’, ‘translation-type’: ‘VDICT’, ‘table-name’: ‘routers.external_gateways’}, ‘fieldname’: ‘external_gateway_info’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘networks’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘name’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘admin_state_up’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘tenant_id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘id’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DICT_SELECTOR’, ‘table-name’: ‘routers’}
security_groups_translator = {‘field-translators’: ({‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘tenant_id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘name’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘description’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘id’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DICT_SELECTOR’, ‘table-name’: ‘security_groups’}
value_trans = {‘translation-type’: ‘VALUE’}