congress.datasources.neutronv2_driver module

congress.datasources.neutronv2_driver module

class congress.datasources.neutronv2_driver.NeutronV2Driver(name='', args=None)

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

ALLOCATION_POOLS = 'allocation_pools'
DNS_NAMESERVERS = 'dns_nameservers'
EXTERNAL_FIXED_IPS = 'external_fixed_ips'
EXTERNAL_GATEWAY_INFOS = 'external_gateway_infos'
FIXED_IPS = 'fixed_ips'
FLOATING_IPS = 'floating_ips'
HOST_ROUTES = 'host_routes'
NETWORKS = 'networks'
PORTS = 'ports'
ROUTERS = 'routers'
SECURITY_GROUPS = 'security_groups'
SECURITY_GROUP_PORT_BINDINGS = 'security_group_port_bindings'
SECURITY_GROUP_RULES = 'security_group_rules'
SUBNETS = 'subnets'
TRANSLATORS = [{'translation-type': 'HDICT', 'table-name': 'networks', 'selector-type': 'DICT_SELECTOR', 'field-translators': ({'fieldname': 'id', 'desc': 'Network ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'tenant_id', 'desc': 'Tenant ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'name', 'desc': 'Network name', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'status', 'desc': 'Network status', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.create_congress_enum_type.<locals>.NewType'>}}, {'fieldname': 'admin_state_up', 'desc': 'Administrative state of the network (true/false)', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Bool'>}}, {'fieldname': 'shared', 'desc': 'Indicates if network is shared across all tenants', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Bool'>}})}, {'translation-type': 'HDICT', 'table-name': 'ports', 'selector-type': 'DICT_SELECTOR', 'field-translators': ({'fieldname': 'id', 'desc': 'UUID of port', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'tenant_id', 'desc': 'tenant ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'name', 'desc': 'port name', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'network_id', 'desc': 'UUID of attached network', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'mac_address', 'desc': 'MAC address of the port', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'admin_state_up', 'desc': 'Administrative state of the port', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Bool'>}}, {'fieldname': 'status', 'desc': 'Port status', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.create_congress_enum_type.<locals>.NewType'>}}, {'fieldname': 'device_id', 'desc': 'The ID of the device that uses this port', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'device_owner', 'desc': 'The entity type that uses this port.E.g., compute:nova, network:router_interface', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'fixed_ips', 'desc': 'The IP addresses for the port', 'translator': {'translation-type': 'HDICT', 'table-name': 'fixed_ips', 'parent-key': 'id', 'parent-col-name': 'port_id', 'parent-key-desc': 'UUID of Port', 'selector-type': 'DICT_SELECTOR', 'in-list': True, 'field-translators': ({'fieldname': 'ip_address', 'desc': 'The IP addresses for the port', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.IPAddress'>}}, {'fieldname': 'subnet_id', 'desc': 'The UUID of the subnet to which the port is attached', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}})}}, {'fieldname': 'security_groups', 'translator': {'translation-type': 'LIST', 'table-name': 'security_group_port_bindings', 'parent-key': 'id', 'parent-col-name': 'port_id', 'parent-key-desc': 'UUID of port', 'val-col': 'security_group_id', 'val-col-desc': 'UUID of security group', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}})}, {'translation-type': 'HDICT', 'table-name': 'subnets', 'selector-type': 'DICT_SELECTOR', 'field-translators': ({'fieldname': 'id', 'desc': 'UUID of subnet', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'tenant_id', 'desc': 'tenant ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'name', 'desc': 'subnet name', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'network_id', 'desc': 'UUID of attached network', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'ip_version', 'desc': 'The IP version, which is 4 or 6', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.create_congress_enum_type.<locals>.NewType'>}}, {'fieldname': 'cidr', 'desc': 'The CIDR', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.IPNetwork'>}}, {'fieldname': 'gateway_ip', 'desc': 'The gateway IP address', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.IPAddress'>}}, {'fieldname': 'enable_dhcp', 'desc': 'Is DHCP is enabled or not', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Bool'>}}, {'fieldname': 'ipv6_ra_mode', 'desc': 'The IPv6 RA mode', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'ipv6_address_mode', 'desc': 'The IPv6 address mode', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'allocation_pools', 'translator': {'translation-type': 'HDICT', 'table-name': 'allocation_pools', 'parent-key': 'id', 'parent-col-name': 'subnet_id', 'parent-key-desc': 'UUID of subnet', 'selector-type': 'DICT_SELECTOR', 'in-list': True, 'field-translators': ({'fieldname': 'start', 'desc': 'The start address for the allocation pools', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'end', 'desc': 'The end address for the allocation pools', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}})}}, {'fieldname': 'dns_nameservers', 'translator': {'translation-type': 'LIST', 'table-name': 'dns_nameservers', 'parent-key': 'id', 'parent-col-name': 'subnet_id', 'parent-key-desc': 'UUID of subnet', 'val-col': 'dns_nameserver', 'val-col-desc': 'The DNS server', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}}, {'fieldname': 'host_routes', 'translator': {'translation-type': 'HDICT', 'table-name': 'host_routes', 'parent-key': 'id', 'parent-col-name': 'subnet_id', 'parent-key-desc': 'UUID of subnet', 'selector-type': 'DICT_SELECTOR', 'in-list': True, 'field-translators': ({'fieldname': 'destination', 'desc': 'The destination for static route', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'nexthop', 'desc': 'The next hop for the destination', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}})}})}, {'translation-type': 'HDICT', 'table-name': 'routers', 'selector-type': 'DICT_SELECTOR', 'field-translators': ({'fieldname': 'id', 'desc': 'uuid of the router', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'tenant_id', 'desc': 'tenant ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'status', 'desc': 'router status', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.create_congress_enum_type.<locals>.NewType'>}}, {'fieldname': 'admin_state_up', 'desc': 'administrative state of router', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Bool'>}}, {'fieldname': 'name', 'desc': 'router name', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'distributed', 'desc': "indicates if it's distributed router ", 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Bool'>}}, {'fieldname': 'external_gateway_info', 'translator': {'translation-type': 'HDICT', 'table-name': 'external_gateway_infos', 'parent-key': 'id', 'parent-col-name': 'router_id', 'parent-key-desc': 'UUID of router', 'selector-type': 'DICT_SELECTOR', 'field-translators': ({'fieldname': 'network_id', 'desc': 'Network ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'enable_snat', 'desc': 'current Source NAT status for router', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Bool'>}}, {'fieldname': 'external_fixed_ips', 'translator': {'translation-type': 'HDICT', 'table-name': 'external_fixed_ips', 'parent-key': 'router_id', 'parent-col-name': 'router_id', 'parent-key-desc': 'UUID of router', 'selector-type': 'DICT_SELECTOR', 'in-list': True, 'field-translators': ({'fieldname': 'subnet_id', 'desc': 'UUID of the subnet', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'ip_address', 'desc': 'IP Address', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.IPAddress'>}})}})}})}, {'translation-type': 'HDICT', 'table-name': 'security_groups', 'selector-type': 'DICT_SELECTOR', 'field-translators': ({'fieldname': 'id', 'desc': 'The UUID for the security group', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'tenant_id', 'desc': 'Tenant ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'name', 'desc': 'The security group name', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'description', 'desc': 'security group description', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'security_group_rules', 'translator': {'translation-type': 'HDICT', 'table-name': 'security_group_rules', 'parent-key': 'id', 'parent-col-name': 'security_group_id', 'parent-key-desc': 'uuid of security group', 'selector-type': 'DICT_SELECTOR', 'in-list': True, 'field-translators': ({'fieldname': 'id', 'desc': 'The UUID of the security group rule', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'tenant_id', 'desc': 'tenant ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'remote_group_id', 'desc': 'remote group id to associate with security group rule', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'direction', 'desc': 'Direction in which the security group rule is applied', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.create_congress_enum_type.<locals>.NewType'>}}, {'fieldname': 'ethertype', 'desc': 'IPv4 or IPv6', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'protocol', 'desc': 'protocol that is matched by the security group rule.', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'port_range_min', 'desc': 'Min port number in the range', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Int'>}}, {'fieldname': 'port_range_max', 'desc': 'Max port number in the range', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Int'>}}, {'fieldname': 'remote_ip_prefix', 'desc': 'Remote IP prefix to be associated', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}})}})}, {'translation-type': 'HDICT', 'table-name': 'floating_ips', 'selector-type': 'DICT_SELECTOR', 'field-translators': ({'fieldname': 'id', 'desc': 'The UUID of the floating IP address', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'router_id', 'desc': 'UUID of router', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'tenant_id', 'desc': 'Tenant ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'floating_network_id', 'desc': 'The UUID of the network associated with floating IP', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'fixed_ip_address', 'desc': 'Fixed IP address associated with floating IP address', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.IPAddress'>}}, {'fieldname': 'floating_ip_address', 'desc': 'The floating IP address', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.IPAddress'>}}, {'fieldname': 'port_id', 'desc': 'UUID of port', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'status', 'desc': 'The floating IP status', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.create_congress_enum_type.<locals>.NewType'>}})}]
attach_port_security_group(args)
detach_port_security_group(args)
execute(action, action_args)

Overwrite ExecutionDriver.execute().

external_fixed_ips_translator = {'field-translators': ({'fieldname': 'subnet_id', 'desc': 'UUID of the subnet', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'ip_address', 'desc': 'IP Address', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.IPAddress'>}}), 'in-list': True, 'parent-col-name': 'router_id', 'parent-key': 'router_id', 'parent-key-desc': 'UUID of router', 'selector-type': 'DICT_SELECTOR', 'table-name': 'external_fixed_ips', 'translation-type': 'HDICT'}
floating_ips_translator = {'field-translators': ({'fieldname': 'id', 'desc': 'The UUID of the floating IP address', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'router_id', 'desc': 'UUID of router', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'tenant_id', 'desc': 'Tenant ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'floating_network_id', 'desc': 'The UUID of the network associated with floating IP', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'fixed_ip_address', 'desc': 'Fixed IP address associated with floating IP address', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.IPAddress'>}}, {'fieldname': 'floating_ip_address', 'desc': 'The floating IP address', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.IPAddress'>}}, {'fieldname': 'port_id', 'desc': 'UUID of port', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'status', 'desc': 'The floating IP status', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.create_congress_enum_type.<locals>.NewType'>}}), 'selector-type': 'DICT_SELECTOR', 'table-name': 'floating_ips', 'translation-type': 'HDICT'}
static get_datasource_info()
initialize_update_methods()
networks_translator = {'field-translators': ({'fieldname': 'id', 'desc': 'Network ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'tenant_id', 'desc': 'Tenant ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'name', 'desc': 'Network name', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'status', 'desc': 'Network status', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.create_congress_enum_type.<locals>.NewType'>}}, {'fieldname': 'admin_state_up', 'desc': 'Administrative state of the network (true/false)', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Bool'>}}, {'fieldname': 'shared', 'desc': 'Indicates if network is shared across all tenants', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Bool'>}}), 'selector-type': 'DICT_SELECTOR', 'table-name': 'networks', 'translation-type': 'HDICT'}
ports_fixed_ips_translator = {'field-translators': ({'fieldname': 'ip_address', 'desc': 'The IP addresses for the port', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.IPAddress'>}}, {'fieldname': 'subnet_id', 'desc': 'The UUID of the subnet to which the port is attached', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}), 'in-list': True, 'parent-col-name': 'port_id', 'parent-key': 'id', 'parent-key-desc': 'UUID of Port', 'selector-type': 'DICT_SELECTOR', 'table-name': 'fixed_ips', 'translation-type': 'HDICT'}
ports_security_groups_translator = {'parent-col-name': 'port_id', 'parent-key': 'id', 'parent-key-desc': 'UUID of port', 'table-name': 'security_group_port_bindings', 'translation-type': 'LIST', 'translator': {'data-type': <class 'congress.data_types.Str'>, 'translation-type': 'VALUE'}, 'val-col': 'security_group_id', 'val-col-desc': 'UUID of security group'}
ports_translator = {'field-translators': ({'fieldname': 'id', 'desc': 'UUID of port', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'tenant_id', 'desc': 'tenant ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'name', 'desc': 'port name', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'network_id', 'desc': 'UUID of attached network', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'mac_address', 'desc': 'MAC address of the port', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'admin_state_up', 'desc': 'Administrative state of the port', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Bool'>}}, {'fieldname': 'status', 'desc': 'Port status', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.create_congress_enum_type.<locals>.NewType'>}}, {'fieldname': 'device_id', 'desc': 'The ID of the device that uses this port', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'device_owner', 'desc': 'The entity type that uses this port.E.g., compute:nova, network:router_interface', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'fixed_ips', 'desc': 'The IP addresses for the port', 'translator': {'translation-type': 'HDICT', 'table-name': 'fixed_ips', 'parent-key': 'id', 'parent-col-name': 'port_id', 'parent-key-desc': 'UUID of Port', 'selector-type': 'DICT_SELECTOR', 'in-list': True, 'field-translators': ({'fieldname': 'ip_address', 'desc': 'The IP addresses for the port', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.IPAddress'>}}, {'fieldname': 'subnet_id', 'desc': 'The UUID of the subnet to which the port is attached', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}})}}, {'fieldname': 'security_groups', 'translator': {'translation-type': 'LIST', 'table-name': 'security_group_port_bindings', 'parent-key': 'id', 'parent-col-name': 'port_id', 'parent-key-desc': 'UUID of port', 'val-col': 'security_group_id', 'val-col-desc': 'UUID of security group', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}}), 'selector-type': 'DICT_SELECTOR', 'table-name': 'ports', 'translation-type': 'HDICT'}
routers_external_gateway_infos_translator = {'field-translators': ({'fieldname': 'network_id', 'desc': 'Network ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'enable_snat', 'desc': 'current Source NAT status for router', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Bool'>}}, {'fieldname': 'external_fixed_ips', 'translator': {'translation-type': 'HDICT', 'table-name': 'external_fixed_ips', 'parent-key': 'router_id', 'parent-col-name': 'router_id', 'parent-key-desc': 'UUID of router', 'selector-type': 'DICT_SELECTOR', 'in-list': True, 'field-translators': ({'fieldname': 'subnet_id', 'desc': 'UUID of the subnet', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'ip_address', 'desc': 'IP Address', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.IPAddress'>}})}}), 'parent-col-name': 'router_id', 'parent-key': 'id', 'parent-key-desc': 'UUID of router', 'selector-type': 'DICT_SELECTOR', 'table-name': 'external_gateway_infos', 'translation-type': 'HDICT'}
routers_translator = {'field-translators': ({'fieldname': 'id', 'desc': 'uuid of the router', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'tenant_id', 'desc': 'tenant ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'status', 'desc': 'router status', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.create_congress_enum_type.<locals>.NewType'>}}, {'fieldname': 'admin_state_up', 'desc': 'administrative state of router', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Bool'>}}, {'fieldname': 'name', 'desc': 'router name', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'distributed', 'desc': "indicates if it's distributed router ", 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Bool'>}}, {'fieldname': 'external_gateway_info', 'translator': {'translation-type': 'HDICT', 'table-name': 'external_gateway_infos', 'parent-key': 'id', 'parent-col-name': 'router_id', 'parent-key-desc': 'UUID of router', 'selector-type': 'DICT_SELECTOR', 'field-translators': ({'fieldname': 'network_id', 'desc': 'Network ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'enable_snat', 'desc': 'current Source NAT status for router', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Bool'>}}, {'fieldname': 'external_fixed_ips', 'translator': {'translation-type': 'HDICT', 'table-name': 'external_fixed_ips', 'parent-key': 'router_id', 'parent-col-name': 'router_id', 'parent-key-desc': 'UUID of router', 'selector-type': 'DICT_SELECTOR', 'in-list': True, 'field-translators': ({'fieldname': 'subnet_id', 'desc': 'UUID of the subnet', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'ip_address', 'desc': 'IP Address', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.IPAddress'>}})}})}}), 'selector-type': 'DICT_SELECTOR', 'table-name': 'routers', 'translation-type': 'HDICT'}
security_group_rules_translator = {'field-translators': ({'fieldname': 'id', 'desc': 'The UUID of the security group rule', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'tenant_id', 'desc': 'tenant ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'remote_group_id', 'desc': 'remote group id to associate with security group rule', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'direction', 'desc': 'Direction in which the security group rule is applied', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.create_congress_enum_type.<locals>.NewType'>}}, {'fieldname': 'ethertype', 'desc': 'IPv4 or IPv6', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'protocol', 'desc': 'protocol that is matched by the security group rule.', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'port_range_min', 'desc': 'Min port number in the range', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Int'>}}, {'fieldname': 'port_range_max', 'desc': 'Max port number in the range', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Int'>}}, {'fieldname': 'remote_ip_prefix', 'desc': 'Remote IP prefix to be associated', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}), 'in-list': True, 'parent-col-name': 'security_group_id', 'parent-key': 'id', 'parent-key-desc': 'uuid of security group', 'selector-type': 'DICT_SELECTOR', 'table-name': 'security_group_rules', 'translation-type': 'HDICT'}
security_group_translator = {'field-translators': ({'fieldname': 'id', 'desc': 'The UUID for the security group', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'tenant_id', 'desc': 'Tenant ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'name', 'desc': 'The security group name', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'description', 'desc': 'security group description', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'security_group_rules', 'translator': {'translation-type': 'HDICT', 'table-name': 'security_group_rules', 'parent-key': 'id', 'parent-col-name': 'security_group_id', 'parent-key-desc': 'uuid of security group', 'selector-type': 'DICT_SELECTOR', 'in-list': True, 'field-translators': ({'fieldname': 'id', 'desc': 'The UUID of the security group rule', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'tenant_id', 'desc': 'tenant ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'remote_group_id', 'desc': 'remote group id to associate with security group rule', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'direction', 'desc': 'Direction in which the security group rule is applied', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.create_congress_enum_type.<locals>.NewType'>}}, {'fieldname': 'ethertype', 'desc': 'IPv4 or IPv6', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'protocol', 'desc': 'protocol that is matched by the security group rule.', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'port_range_min', 'desc': 'Min port number in the range', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Int'>}}, {'fieldname': 'port_range_max', 'desc': 'Max port number in the range', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Int'>}}, {'fieldname': 'remote_ip_prefix', 'desc': 'Remote IP prefix to be associated', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}})}}), 'selector-type': 'DICT_SELECTOR', 'table-name': 'security_groups', 'translation-type': 'HDICT'}
subnets_allocation_pools_translator = {'field-translators': ({'fieldname': 'start', 'desc': 'The start address for the allocation pools', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'end', 'desc': 'The end address for the allocation pools', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}), 'in-list': True, 'parent-col-name': 'subnet_id', 'parent-key': 'id', 'parent-key-desc': 'UUID of subnet', 'selector-type': 'DICT_SELECTOR', 'table-name': 'allocation_pools', 'translation-type': 'HDICT'}
subnets_dns_nameservers_translator = {'parent-col-name': 'subnet_id', 'parent-key': 'id', 'parent-key-desc': 'UUID of subnet', 'table-name': 'dns_nameservers', 'translation-type': 'LIST', 'translator': {'data-type': <class 'congress.data_types.Str'>, 'translation-type': 'VALUE'}, 'val-col': 'dns_nameserver', 'val-col-desc': 'The DNS server'}
subnets_routes_translator = {'field-translators': ({'fieldname': 'destination', 'desc': 'The destination for static route', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'nexthop', 'desc': 'The next hop for the destination', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}), 'in-list': True, 'parent-col-name': 'subnet_id', 'parent-key': 'id', 'parent-key-desc': 'UUID of subnet', 'selector-type': 'DICT_SELECTOR', 'table-name': 'host_routes', 'translation-type': 'HDICT'}
subnets_translator = {'field-translators': ({'fieldname': 'id', 'desc': 'UUID of subnet', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'tenant_id', 'desc': 'tenant ID', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'name', 'desc': 'subnet name', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'network_id', 'desc': 'UUID of attached network', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'ip_version', 'desc': 'The IP version, which is 4 or 6', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.create_congress_enum_type.<locals>.NewType'>}}, {'fieldname': 'cidr', 'desc': 'The CIDR', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.IPNetwork'>}}, {'fieldname': 'gateway_ip', 'desc': 'The gateway IP address', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.IPAddress'>}}, {'fieldname': 'enable_dhcp', 'desc': 'Is DHCP is enabled or not', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Bool'>}}, {'fieldname': 'ipv6_ra_mode', 'desc': 'The IPv6 RA mode', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'ipv6_address_mode', 'desc': 'The IPv6 address mode', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'allocation_pools', 'translator': {'translation-type': 'HDICT', 'table-name': 'allocation_pools', 'parent-key': 'id', 'parent-col-name': 'subnet_id', 'parent-key-desc': 'UUID of subnet', 'selector-type': 'DICT_SELECTOR', 'in-list': True, 'field-translators': ({'fieldname': 'start', 'desc': 'The start address for the allocation pools', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'end', 'desc': 'The end address for the allocation pools', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}})}}, {'fieldname': 'dns_nameservers', 'translator': {'translation-type': 'LIST', 'table-name': 'dns_nameservers', 'parent-key': 'id', 'parent-col-name': 'subnet_id', 'parent-key-desc': 'UUID of subnet', 'val-col': 'dns_nameserver', 'val-col-desc': 'The DNS server', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}}, {'fieldname': 'host_routes', 'translator': {'translation-type': 'HDICT', 'table-name': 'host_routes', 'parent-key': 'id', 'parent-col-name': 'subnet_id', 'parent-key-desc': 'UUID of subnet', 'selector-type': 'DICT_SELECTOR', 'in-list': True, 'field-translators': ({'fieldname': 'destination', 'desc': 'The destination for static route', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}}, {'fieldname': 'nexthop', 'desc': 'The next hop for the destination', 'translator': {'translation-type': 'VALUE', 'data-type': <class 'congress.data_types.Str'>}})}}), 'selector-type': 'DICT_SELECTOR', 'table-name': 'subnets', 'translation-type': 'HDICT'}
update_resource_attrs(args)
value_trans_bool = {'data-type': <class 'congress.data_types.Bool'>, 'translation-type': 'VALUE'}
value_trans_int = {'data-type': <class 'congress.data_types.Int'>, 'translation-type': 'VALUE'}
value_trans_str = {'data-type': <class 'congress.data_types.Str'>, 'translation-type': 'VALUE'}
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.