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
= [{'selector-type': 'DICT_SELECTOR', 'table-name': 'networks', 'translation-type': 'HDICT', 'field-translators': ({'fieldname': 'status', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'subnets', 'translator': {'table-name': 'networks.subnets', 'val-col': 'subnet', 'translator': {'translation-type': 'VALUE'}, 'translation-type': 'LIST', 'id-col': 'subnet_group_id'}, 'col': 'subnet_group_id'}, {'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', 'translator': {'translation-type': 'VALUE'}})}, {'selector-type': 'DICT_SELECTOR', 'table-name': 'ports', 'translation-type': 'HDICT', 'field-translators': ({'fieldname': 'allowed_address_pairs', 'translator': {'table-name': 'ports.address_pairs', 'val-col': 'address', 'translator': {'translation-type': 'VALUE'}, 'translation-type': 'LIST', 'id-col': 'allowed_address_pairs_id'}, 'col': 'allowed_address_pairs_id'}, {'fieldname': 'security_groups', 'translator': {'table-name': 'ports.security_groups', 'val-col': 'security_group_id', 'translator': {'translation-type': 'VALUE'}, 'translation-type': 'LIST', 'id-col': 'security_groups_id'}, 'col': 'security_groups_id'}, {'fieldname': 'extra_dhcp_opts', 'translator': {'table-name': 'ports.extra_dhcp_opts', 'val-col': 'dhcp_opt', 'translator': {'translation-type': 'VALUE'}, 'translation-type': 'LIST', 'id-col': 'extra_dhcp_opt_group_id'}, 'col': 'extra_dhcp_opt_group_id'}, {'fieldname': 'binding:capabilities', 'translator': {'val-col': 'value', 'table-name': 'ports.binding_capabilities', 'translator': {'translation-type': 'VALUE'}, 'id-col': 'binding:capabilities_id', 'translation-type': 'VDICT', 'key-col': 'key'}, 'col': 'binding:capabilities_id'}, {'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', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'fixed_ips', 'translator': {'table-name': 'ports.fixed_ips_groups', 'val-col': 'fixed_ip_id', 'translator': {'val-col': 'value', 'table-name': 'ports.fixed_ips', 'translator': {'translation-type': 'VALUE'}, 'id-col': 'fixed_ip_id', 'translation-type': 'VDICT', 'key-col': 'key'}, 'translation-type': 'LIST', 'id-col': 'fixed_ips_group_id'}, 'col': 'fixed_ips'}, {'fieldname': 'id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'device_id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'binding:host_id', 'translator': {'translation-type': 'VALUE'}})}, {'selector-type': 'DICT_SELECTOR', 'table-name': 'routers', 'translation-type': 'HDICT', 'field-translators': ({'fieldname': 'status', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'external_gateway_info', 'translator': {'val-col': 'value', 'table-name': 'routers.external_gateways', 'translator': {'translation-type': 'VALUE'}, 'id-col': 'external_gateway_info', 'translation-type': 'VDICT', 'key-col': 'key'}}, {'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', 'translator': {'translation-type': 'VALUE'}})}, {'selector-type': 'DICT_SELECTOR', 'table-name': 'security_groups', 'translation-type': 'HDICT', 'field-translators': ({'fieldname': 'tenant_id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'description', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'id', 'translator': {'translation-type': 'VALUE'}})}]¶
-
execute
(action, action_args)¶ Overwrite ExecutionDriver.execute().
-
static
get_datasource_info
()¶
-
get_neutron_credentials
(creds)¶
-
initialize_update_methods
()¶
-
networks_translator
= {'selector-type': 'DICT_SELECTOR', 'table-name': 'networks', 'translation-type': 'HDICT', 'field-translators': ({'fieldname': 'status', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'subnets', 'translator': {'table-name': 'networks.subnets', 'val-col': 'subnet', 'translator': {'translation-type': 'VALUE'}, 'translation-type': 'LIST', 'id-col': 'subnet_group_id'}, 'col': 'subnet_group_id'}, {'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', 'translator': {'translation-type': 'VALUE'}})}¶
-
ports_translator
= {'selector-type': 'DICT_SELECTOR', 'table-name': 'ports', 'translation-type': 'HDICT', 'field-translators': ({'fieldname': 'allowed_address_pairs', 'translator': {'table-name': 'ports.address_pairs', 'val-col': 'address', 'translator': {'translation-type': 'VALUE'}, 'translation-type': 'LIST', 'id-col': 'allowed_address_pairs_id'}, 'col': 'allowed_address_pairs_id'}, {'fieldname': 'security_groups', 'translator': {'table-name': 'ports.security_groups', 'val-col': 'security_group_id', 'translator': {'translation-type': 'VALUE'}, 'translation-type': 'LIST', 'id-col': 'security_groups_id'}, 'col': 'security_groups_id'}, {'fieldname': 'extra_dhcp_opts', 'translator': {'table-name': 'ports.extra_dhcp_opts', 'val-col': 'dhcp_opt', 'translator': {'translation-type': 'VALUE'}, 'translation-type': 'LIST', 'id-col': 'extra_dhcp_opt_group_id'}, 'col': 'extra_dhcp_opt_group_id'}, {'fieldname': 'binding:capabilities', 'translator': {'val-col': 'value', 'table-name': 'ports.binding_capabilities', 'translator': {'translation-type': 'VALUE'}, 'id-col': 'binding:capabilities_id', 'translation-type': 'VDICT', 'key-col': 'key'}, 'col': 'binding:capabilities_id'}, {'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', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'fixed_ips', 'translator': {'table-name': 'ports.fixed_ips_groups', 'val-col': 'fixed_ip_id', 'translator': {'val-col': 'value', 'table-name': 'ports.fixed_ips', 'translator': {'translation-type': 'VALUE'}, 'id-col': 'fixed_ip_id', 'translation-type': 'VDICT', 'key-col': 'key'}, 'translation-type': 'LIST', 'id-col': 'fixed_ips_group_id'}, 'col': 'fixed_ips'}, {'fieldname': 'id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'device_id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'binding:host_id', 'translator': {'translation-type': 'VALUE'}})}¶
-
routers_translator
= {'selector-type': 'DICT_SELECTOR', 'table-name': 'routers', 'translation-type': 'HDICT', 'field-translators': ({'fieldname': 'status', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'external_gateway_info', 'translator': {'val-col': 'value', 'table-name': 'routers.external_gateways', 'translator': {'translation-type': 'VALUE'}, 'id-col': 'external_gateway_info', 'translation-type': 'VDICT', 'key-col': 'key'}}, {'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', 'translator': {'translation-type': 'VALUE'}})}¶
-
security_groups_translator
= {'selector-type': 'DICT_SELECTOR', 'table-name': 'security_groups', 'translation-type': 'HDICT', 'field-translators': ({'fieldname': 'tenant_id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'description', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'id', 'translator': {'translation-type': 'VALUE'}})}¶
-
value_trans
= {'translation-type': 'VALUE'}¶
-