| 1 |
# Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 2 |
# not use this file except in compliance with the License. You may obtain |
| 3 |
# a copy of the License at |
| 4 |
# |
| 5 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 6 |
# |
| 7 |
# Unless required by applicable law or agreed to in writing, software |
| 8 |
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 9 |
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 10 |
# License for the specific language governing permissions and limitations |
| 11 |
# under the License. |
| 12 |
|
| 13 |
from neutron_lib import constants |
| 14 |
|
| 15 |
|
| 16 |
KNOWN_ATTRIBUTES = ( |
| 17 |
'admin_state_up', |
| 18 |
'allocation_pools', |
| 19 |
'cidr', |
| 20 |
'default_prefixlen', |
| 21 |
'default_quota', |
| 22 |
'description', |
| 23 |
'device_id', |
| 24 |
'device_owner', |
| 25 |
'dns_nameservers', |
| 26 |
'enable_dhcp', |
| 27 |
'enable_ndp_proxy', |
| 28 |
'external_gateways', |
| 29 |
'fixed_ips', |
| 30 |
'gateway_ip', |
| 31 |
'host_routes', |
| 32 |
'id', |
| 33 |
'ip_version', |
| 34 |
'ipv6_address_mode', |
| 35 |
'ipv6_ra_mode', |
| 36 |
'is_default', |
| 37 |
'mac_address', |
| 38 |
'max_prefixlen', |
| 39 |
'min_prefixlen', |
| 40 |
'name', |
| 41 |
'network_id', |
| 42 |
'port_id', |
| 43 |
'prefixes', |
| 44 |
'prefixlen', |
| 45 |
'project_id', |
| 46 |
'qos_policy_id', |
| 47 |
'service_types', |
| 48 |
constants.SHARED, |
| 49 |
'status', |
| 50 |
'subnets', |
| 51 |
'subnetpool_id', |
| 52 |
'tenant_id' |
| 53 |
) |
| 54 |
|
| 55 |
KNOWN_RESOURCES = ( |
| 56 |
'networks', |
| 57 |
'ports', |
| 58 |
'routers', |
| 59 |
'subnets', |
| 60 |
'subnetpools', |
| 61 |
'security_groups' |
| 62 |
) |
| 63 |
|
| 64 |
KNOWN_HTTP_ACTIONS = ( |
| 65 |
'DELETE', |
| 66 |
'GET', |
| 67 |
'POST', |
| 68 |
'PUT', |
| 69 |
) |
| 70 |
|
| 71 |
KNOWN_ACTION_STATUSES = ( |
| 72 |
200, |
| 73 |
201, |
| 74 |
202, |
| 75 |
203, |
| 76 |
204, |
| 77 |
205, |
| 78 |
206, |
| 79 |
) |
| 80 |
|
| 81 |
KNOWN_EXTENSIONS = ( |
| 82 |
'address-scope', |
| 83 |
'agent', |
| 84 |
'agent-resources-synced', |
| 85 |
'allowed-address-pairs', |
| 86 |
'allowed-address-pairs-atomic', |
| 87 |
'auto-allocated-topology', |
| 88 |
'availability_zone', |
| 89 |
'binding', |
| 90 |
'data-plane-status', |
| 91 |
'project-default-networks', |
| 92 |
'default-subnetpools', |
| 93 |
'dhcp_agent_scheduler', |
| 94 |
'dns-domain-ports', |
| 95 |
'dns-integration', |
| 96 |
'dvr', |
| 97 |
'enable-default-route-ecmp', |
| 98 |
'enable-default-route-bfd', |
| 99 |
'empty-string-filtering', |
| 100 |
'expose-l3-conntrack-helper', |
| 101 |
'expose-port-forwarding-in-fip', |
| 102 |
'ext-gw-mode', |
| 103 |
'external-net', |
| 104 |
'extra_dhcp_opt', |
| 105 |
'extraroute', |
| 106 |
'extraroute-atomic', |
| 107 |
'filter-validation', |
| 108 |
'fip-port-details', |
| 109 |
'flavors', |
| 110 |
'floating-ip-port-forwarding', |
| 111 |
'floating-ip-port-forwarding-description', |
| 112 |
'floatingip-autodelete-internal', |
| 113 |
'floatingip-pools', |
| 114 |
'ip-substring-filtering', |
| 115 |
'l3-conntrack-helper', |
| 116 |
'l3-ha', |
| 117 |
'l3_agent_scheduler', |
| 118 |
'l3-ext-ndp-proxy', |
| 119 |
'l3-ndp-proxy', |
| 120 |
'l3-port-ip-change-not-allowed', |
| 121 |
'logging', |
| 122 |
'metering', |
| 123 |
'metering_source_and_destination_filters', |
| 124 |
'multi-provider', |
| 125 |
'external-gateway-multihoming', |
| 126 |
'net-mtu', |
| 127 |
'network-ip-availability', |
| 128 |
'network-segment-range', |
| 129 |
'network_availability_zone', |
| 130 |
'pagination', |
| 131 |
'port-mac-address-override', |
| 132 |
'port-resource-request', |
| 133 |
'port-security', |
| 134 |
'project-id', |
| 135 |
'provider', |
| 136 |
'qos', |
| 137 |
'qos-bw-limit-direction', |
| 138 |
'qos-fip', |
| 139 |
'qos-fip-network-policy', |
| 140 |
'qos-gateway-ip', |
| 141 |
'qos-port-network-policy', |
| 142 |
'qos-pps-minimum', |
| 143 |
'qos-pps-minimum-rule-alias', |
| 144 |
'qos-rule-type-filter', |
| 145 |
'qos-rules-alias', |
| 146 |
'quotas', |
| 147 |
'quota-check-limit', |
| 148 |
'quota-check-limit-default', |
| 149 |
'port-hints', |
| 150 |
'port-hint-ovs-tx-steering', |
| 151 |
'port-numa-affinity-policy', |
| 152 |
'port-numa-affinity-policy-socket', |
| 153 |
'rbac-address-group', |
| 154 |
'rbac-address-scope', |
| 155 |
'rbac-bgpvpn', |
| 156 |
'rbac-policies', |
| 157 |
'rbac-security-groups', |
| 158 |
'rbac-subnetpool', |
| 159 |
'router', |
| 160 |
'router_availability_zone', |
| 161 |
'security-group', |
| 162 |
'segment', |
| 163 |
'service-type', |
| 164 |
'sort-key-validation', |
| 165 |
'sorting', |
| 166 |
'standard-attr-description', |
| 167 |
'standard-attr-fwaas-v2', |
| 168 |
'standard-attr-revisions', |
| 169 |
'standard-attr-segment', |
| 170 |
'standard-attr-timestamp', |
| 171 |
'subnet', |
| 172 |
'subnet_allocation', |
| 173 |
'subnet_dns_publish_fixed_ip', |
| 174 |
'subnet_onboard', |
| 175 |
'subnetpool-prefix-ops', |
| 176 |
'subnet-segmentid-enforce', |
| 177 |
'subnet-segmentid-writable', |
| 178 |
'tag', |
| 179 |
'tag-creation', |
| 180 |
'trunk', |
| 181 |
'trunk-details', |
| 182 |
'uplink-status-propagation', |
| 183 |
'uplink-status-propagation-updatable', |
| 184 |
# Add here list of extensions with pointers to the project repo, e.g. |
| 185 |
'bgp', # https://opendev.org/openstack/neutron-dynamic-routing |
| 186 |
|
| 187 |
# https://opendev.org/openstack/neutron-fwaas |
| 188 |
'fwaas', |
| 189 |
'fwaasrouterinsertion', |
| 190 |
'fwaas_v2', |
| 191 |
'bgpvpn', # https://opendev.org/openstack/networking-bgpvpn |
| 192 |
'bgpvpn-routes-control', |
| 193 |
'bgpvpn-vni', |
| 194 |
|
| 195 |
# https://opendev.org/openstack/neutron-vpnaas |
| 196 |
'vpnaas', |
| 197 |
'vpn-endpoint-groups', |
| 198 |
'vpn-flavors', |
| 199 |
|
| 200 |
# https://opendev.org/openstack/networking-sfc: |
| 201 |
'flow_classifier', |
| 202 |
'sfc', |
| 203 |
|
| 204 |
# https://opendev.org/openstack/tap-as-a-service |
| 205 |
'taas', |
| 206 |
'tap-mirror', |
| 207 |
'tap-mirror-both-direction', |
| 208 |
'taas-vlan-filter', |
| 209 |
) |
| 210 |
|
| 211 |
KNOWN_KEYWORDS = ( |
| 212 |
'allow_post', |
| 213 |
'allow_put', |
| 214 |
'convert_to', |
| 215 |
'convert_list_to', |
| 216 |
'default', |
| 217 |
'enforce_policy', |
| 218 |
'is_filter', |
| 219 |
'is_sort_key', |
| 220 |
'is_visible', |
| 221 |
'primary_key', |
| 222 |
'required_by_policy', |
| 223 |
'validate', |
| 224 |
'default_overrides_none', |
| 225 |
'dict_populate_defaults', |
| 226 |
) |