Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 1 | # Copyright 2018 Rackspace US Inc. All rights reserved. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 4 | # not use this file except in compliance with the License. You may obtain |
| 5 | # a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | # License for the specific language governing permissions and limitations |
| 13 | # under the License. |
| 14 | |
| 15 | # API field names |
| 16 | ACTIVE_CONNECTIONS = 'active_connections' |
| 17 | ADMIN_STATE_UP = 'admin_state_up' |
| 18 | BYTES_IN = 'bytes_in' |
| 19 | BYTES_OUT = 'bytes_out' |
| 20 | CREATED_AT = 'created_at' |
| 21 | DESCRIPTION = 'description' |
Adam Harwell | a795ae6 | 2018-04-23 12:11:19 -0700 | [diff] [blame] | 22 | FLAVOR_ID = 'flavor_id' |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 23 | ID = 'id' |
| 24 | LISTENERS = 'listeners' |
| 25 | LOADBALANCER = 'loadbalancer' |
| 26 | NAME = 'name' |
| 27 | OPERATING_STATUS = 'operating_status' |
| 28 | POOLS = 'pools' |
| 29 | PROJECT_ID = 'project_id' |
| 30 | PROVIDER = 'provider' |
| 31 | PROVISIONING_STATUS = 'provisioning_status' |
| 32 | REQUEST_ERRORS = 'request_errors' |
| 33 | TOTAL_CONNECTIONS = 'total_connections' |
| 34 | UPDATED_AT = 'updated_at' |
| 35 | VIP_ADDRESS = 'vip_address' |
| 36 | VIP_NETWORK_ID = 'vip_network_id' |
| 37 | VIP_PORT_ID = 'vip_port_id' |
| 38 | VIP_SUBNET_ID = 'vip_subnet_id' |
| 39 | VIP_QOS_POLICY_ID = 'vip_qos_policy_id' |
Jude Cross | fbbd2b4 | 2017-08-09 15:21:04 -0700 | [diff] [blame^] | 40 | PROTOCOL = 'protocol' |
| 41 | PROTOCOL_PORT = 'protocol_port' |
| 42 | LOADBALANCER_ID = 'loadbalancer_id' |
| 43 | CONNECTION_LIMIT = 'connection_limit' |
| 44 | INSERT_HEADERS = 'insert_headers' |
| 45 | X_FORWARDED_FOR = 'X-Forwarded-For' |
| 46 | X_FORWARDED_PORT = 'X-Forwarded-Port' |
| 47 | TIMEOUT_CLIENT_DATA = 'timeout_client_data' |
| 48 | TIMEOUT_MEMBER_CONNECT = 'timeout_member_connect' |
| 49 | TIMEOUT_MEMBER_DATA = 'timeout_member_data' |
| 50 | TIMEOUT_TCP_INSPECT = 'timeout_tcp_inspect' |
| 51 | DEFAULT_TLS_CONTAINER_REF = 'default_tls_container_ref' |
| 52 | SNI_CONTAINER_REFS = 'sni_container_refs' |
| 53 | DEFAULT_POOL_ID = 'default_pool_id' |
| 54 | L7_POLICIES = 'l7_policies' |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 55 | |
| 56 | # API valid fields |
| 57 | SHOW_LOAD_BALANCER_RESPONSE_FIELDS = ( |
Adam Harwell | a795ae6 | 2018-04-23 12:11:19 -0700 | [diff] [blame] | 58 | ADMIN_STATE_UP, CREATED_AT, DESCRIPTION, FLAVOR_ID, ID, LISTENERS, NAME, |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 59 | OPERATING_STATUS, POOLS, PROJECT_ID, PROVIDER, PROVISIONING_STATUS, |
| 60 | UPDATED_AT, VIP_ADDRESS, VIP_NETWORK_ID, VIP_PORT_ID, VIP_SUBNET_ID, |
| 61 | VIP_QOS_POLICY_ID) |
| 62 | |
Jude Cross | fbbd2b4 | 2017-08-09 15:21:04 -0700 | [diff] [blame^] | 63 | SHOW_LISTENER_RESPONSE_FIELDS = ( |
| 64 | ID, NAME, DESCRIPTION, PROVISIONING_STATUS, OPERATING_STATUS, |
| 65 | ADMIN_STATE_UP, PROTOCOL, PROTOCOL_PORT, CONNECTION_LIMIT, |
| 66 | DEFAULT_TLS_CONTAINER_REF, SNI_CONTAINER_REFS, PROJECT_ID, |
| 67 | DEFAULT_POOL_ID, L7_POLICIES, INSERT_HEADERS, CREATED_AT, UPDATED_AT, |
| 68 | TIMEOUT_CLIENT_DATA, TIMEOUT_MEMBER_CONNECT, TIMEOUT_MEMBER_DATA, |
| 69 | TIMEOUT_TCP_INSPECT |
| 70 | ) |
| 71 | |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 72 | # Other constants |
| 73 | ACTIVE = 'ACTIVE' |
| 74 | ADMIN_STATE_UP_TRUE = 'true' |
| 75 | ASC = 'asc' |
| 76 | DELETED = 'DELETED' |
| 77 | DESC = 'desc' |
| 78 | FIELDS = 'fields' |
| 79 | OFFLINE = 'OFFLINE' |
| 80 | ONLINE = 'ONLINE' |
| 81 | SORT = 'sort' |
| 82 | |
Jude Cross | fbbd2b4 | 2017-08-09 15:21:04 -0700 | [diff] [blame^] | 83 | # Protocols |
| 84 | HTTP = 'HTTP' |
| 85 | HTTPS = 'HTTPS' |
| 86 | TCP = 'TCP' |
| 87 | |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 88 | # RBAC options |
| 89 | ADVANCED = 'advanced' |
| 90 | OWNERADMIN = 'owner_or_admin' |
| 91 | NONE = 'none' |