blob: 7ac8f1c451ada6c41155eb66c14d9e9b7f570a0f [file] [log] [blame]
Jude Cross986e3f52017-07-24 14:57:20 -07001# 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
16ACTIVE_CONNECTIONS = 'active_connections'
17ADMIN_STATE_UP = 'admin_state_up'
18BYTES_IN = 'bytes_in'
19BYTES_OUT = 'bytes_out'
20CREATED_AT = 'created_at'
21DESCRIPTION = 'description'
Adam Harwella795ae62018-04-23 12:11:19 -070022FLAVOR_ID = 'flavor_id'
Jude Cross986e3f52017-07-24 14:57:20 -070023ID = 'id'
24LISTENERS = 'listeners'
25LOADBALANCER = 'loadbalancer'
26NAME = 'name'
27OPERATING_STATUS = 'operating_status'
28POOLS = 'pools'
29PROJECT_ID = 'project_id'
30PROVIDER = 'provider'
31PROVISIONING_STATUS = 'provisioning_status'
32REQUEST_ERRORS = 'request_errors'
33TOTAL_CONNECTIONS = 'total_connections'
34UPDATED_AT = 'updated_at'
35VIP_ADDRESS = 'vip_address'
36VIP_NETWORK_ID = 'vip_network_id'
37VIP_PORT_ID = 'vip_port_id'
38VIP_SUBNET_ID = 'vip_subnet_id'
39VIP_QOS_POLICY_ID = 'vip_qos_policy_id'
Jude Crossfbbd2b42017-08-09 15:21:04 -070040PROTOCOL = 'protocol'
41PROTOCOL_PORT = 'protocol_port'
42LOADBALANCER_ID = 'loadbalancer_id'
43CONNECTION_LIMIT = 'connection_limit'
44INSERT_HEADERS = 'insert_headers'
45X_FORWARDED_FOR = 'X-Forwarded-For'
46X_FORWARDED_PORT = 'X-Forwarded-Port'
47TIMEOUT_CLIENT_DATA = 'timeout_client_data'
48TIMEOUT_MEMBER_CONNECT = 'timeout_member_connect'
49TIMEOUT_MEMBER_DATA = 'timeout_member_data'
50TIMEOUT_TCP_INSPECT = 'timeout_tcp_inspect'
51DEFAULT_TLS_CONTAINER_REF = 'default_tls_container_ref'
52SNI_CONTAINER_REFS = 'sni_container_refs'
53DEFAULT_POOL_ID = 'default_pool_id'
54L7_POLICIES = 'l7_policies'
Jude Cross986e3f52017-07-24 14:57:20 -070055
56# API valid fields
57SHOW_LOAD_BALANCER_RESPONSE_FIELDS = (
Adam Harwella795ae62018-04-23 12:11:19 -070058 ADMIN_STATE_UP, CREATED_AT, DESCRIPTION, FLAVOR_ID, ID, LISTENERS, NAME,
Jude Cross986e3f52017-07-24 14:57:20 -070059 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 Crossfbbd2b42017-08-09 15:21:04 -070063SHOW_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 Cross986e3f52017-07-24 14:57:20 -070072# Other constants
73ACTIVE = 'ACTIVE'
74ADMIN_STATE_UP_TRUE = 'true'
75ASC = 'asc'
76DELETED = 'DELETED'
77DESC = 'desc'
78FIELDS = 'fields'
79OFFLINE = 'OFFLINE'
80ONLINE = 'ONLINE'
81SORT = 'sort'
82
Jude Crossfbbd2b42017-08-09 15:21:04 -070083# Protocols
84HTTP = 'HTTP'
85HTTPS = 'HTTPS'
86TCP = 'TCP'
87
Jude Cross986e3f52017-07-24 14:57:20 -070088# RBAC options
89ADVANCED = 'advanced'
90OWNERADMIN = 'owner_or_admin'
91NONE = 'none'