Remove openstack integration
[integration/test.git] / csit / variables / Variables.py
1 """
2 Definitions of common variables for the system test robot suites of the
3 OpenDaylight project.
4
5 Authors: Baohua Yang@IBM, Denghui Huang@IBM
6 Edited: Many times by many people
7 """
8
9 # VM Environment defaults
10 DEFAULT_LINUX_PROMPT = ">"
11 DEFAULT_LINUX_PROMPT_STRICT = "]>"
12 DEFAULT_USER = "jenkins"
13 DEFAULT_TIMEOUT = "30s"
14
15 # ODL system variables
16 ODL_SYSTEM_IP = "127.0.0.1"  # Override if ODL is not running locally to pybot
17 ODL_SYSTEM_IP_LIST = ["ODL_SYSTEM_1_IP", "ODL_SYSTEM_2_IP", "ODL_SYSTEM_3_IP"]
18 ODL_SYSTEM_USER = DEFAULT_USER
19 ODL_SYSTEM_PASSWORD = ""  # empty means use public key authentication
20 ODL_SYSTEM_PROMPT = DEFAULT_LINUX_PROMPT
21
22 # "Tools" system variables (mininet etc).
23 TOOLS_SYSTEM_IP = "127.0.0.1"  # Override if tools are not run locally to pybot
24 TOOLS_SYSTEM_USER = DEFAULT_USER
25 TOOLS_SYSTEM_PASSWORD = ""  # empty means use public key authentication
26 TOOLS_SYSTEM_PROMPT = DEFAULT_LINUX_PROMPT
27
28 # KARAF Variables
29 KARAF_SHELL_PORT = "8101"
30 ESCAPE_CHARACTER = "\x1B"
31 KARAF_PROMPT_LOGIN = "opendaylight-user"
32 KARAF_USER = "karaf"
33 KARAF_PASSWORD = "karaf"
34 KARAF_PROMPT = "opendaylight-user.*root.*>"
35
36 # Logging levels
37 DEFAULT_ODL_LOG_LEVEL = "INFO"
38 DEFAULT_BGPCEP_LOG_LEVEL = DEFAULT_ODL_LOG_LEVEL
39 DEFAULT_PROTOCOL_LOG_LEVEL = DEFAULT_BGPCEP_LOG_LEVEL
40 BGPCEP_LOG_LEVEL = DEFAULT_BGPCEP_LOG_LEVEL
41 PROTOCOL_LOG_LEVEL = BGPCEP_LOG_LEVEL
42
43 # BGP variables
44 ODL_BGP_PORT = "1790"
45 BGP_TOOL_PORT = "17900"
46
47 # Restconf variables
48 ODL_RESTCONF_USER = "admin"
49 ODL_RESTCONF_PASSWORD = "admin"
50
51 # Netconf variables
52 ODL_NETCONF_CONFIG_PORT = "1830"
53 ODL_NETCONF_MDSAL_PORT = "2830"
54 ODL_NETCONF_USER = "admin"
55 ODL_NETCONF_PASSWORD = "admin"
56 ODL_NETCONF_PROMPT = "]]>]]>"
57 ODL_NETCONF_NAMESPACE = "urn:ietf:params:xml:ns:netconf:base:1.0"
58
59 # OpenFlow variables
60 ODL_OF_PORT = "6633"
61 ODL_OF_PLUGIN = "lithium"
62
63 # VTN Coordinator Variables
64 VTNC = "127.0.0.1"
65 VTNCPORT = "8083"
66 VTNC_PREFIX = "http://" + VTNC + ":" + VTNCPORT
67 VTNC_HEADERS = {
68     "Content-Type": "application/json",
69     "username": "admin",
70     "password": "adminpass",
71 }
72
73 VTNWEBAPI = "/vtn-webapi"
74 # controllers URL
75 CTRLS_CREATE = "controllers.json"
76 CTRLS = "controllers"
77 SW = "switches"
78
79 # vtn URL
80 VTNS_CREATE = "vtns.json"
81 VTNS = "vtns"
82
83 # vbridge URL
84 VBRS_CREATE = "vbridges.json"
85 VBRS = "vbridges"
86
87 # interfaces URL
88 VBRIFS_CREATE = "interfaces.json"
89 VBRIFS = "interfaces"
90
91 # portmap URL
92 PORTMAP_CREATE = "portmap.json"
93
94 # vlanmap URL
95 VLANMAP_CREATE = "vlanmaps.json"
96
97 # ports URL
98 PORTS = "ports/detail.json"
99
100 # flowlist URL
101 FLOWLISTS_CREATE = "flowlists.json"
102
103 # flowlistentry_URL
104 FLOWLISTENTRIES_CREATE = "flowlistentries.json"
105 FLOWLISTS = "flowlists"
106
107 # flowfilter_URL
108 FLOWFILTERS_CREATE = "flowfilters.json"
109 FLOWFILTERENTRIES_CREATE = "flowfilterentries.json"
110 FLOWFILTERS = "flowfilters/in"
111 FLOWFILTERS_UPDATE = "flowfilterentries"
112
113
114 # Common APIs
115 CONFIG_NODES_API = "/restconf/config/opendaylight-inventory:nodes"
116 OPERATIONAL_NODES_API = "/restconf/operational/opendaylight-inventory:nodes"
117 OPERATIONAL_NODES_NETVIRT = (
118     "/restconf/operational/network-topology:network-topology/topology/netvirt:1"
119 )
120 OPERATIONAL_TOPO_API = "/restconf/operational/network-topology:" "network-topology"
121 CONFIG_TOPO_API = "/restconf/config/network-topology:network-topology"
122 CONTROLLER_CONFIG_MOUNT = (
123     "/restconf/config/network-topology:"
124     "network-topology/topology"
125     "/topology-netconf/node/"
126     "controller-config/yang-ext:mount"
127 )
128 CONFIG_API = "/restconf/config"
129 OPERATIONAL_API = "/restconf/operational"
130 MODULES_API = "/rests/data/ietf-yang-library:modules-state"
131 VTN_INVENTORY_NODE_API = "/restconf/operational/vtn-inventory:vtn-nodes"
132
133 # NEMO Variables
134 PREDEFINE_ROLE_URI = "/restconf/config/nemo-user:user-roles"
135 PREDEFINE_NODE_URI = "/restconf/config/nemo-object:node-definitions"
136 PREDEFINE_CONNECTION_URI = "/restconf/config/nemo-object:connection-definitions"
137 REGISTER_TENANT_URI = "/restconf/operations/nemo-intent:register-user"
138 STRUCTURE_INTENT_URI = "/restconf/operations/nemo-intent:structure-style-nemo-update"
139 GET_INTENTS_URI = "/retconf/config/intent:intents"
140
141 # TOKEN
142 AUTH_TOKEN_API = "/oauth2/token"
143 REVOKE_TOKEN_API = "/oauth2/revoke"
144
145 # Vlan Custom Topology Path and File
146 CREATE_VLAN_TOPOLOGY_FILE = "vlan_vtn_test.py"
147 CREATE_VLAN_TOPOLOGY_FILE_PATH = "MininetTopo/" + CREATE_VLAN_TOPOLOGY_FILE
148
149 # Mininet Custom Topology Path and File for Path Policy
150 CREATE_PATHPOLICY_TOPOLOGY_FILE = "topo-3sw-2host_multipath.py"
151 CREATE_PATHPOLICY_TOPOLOGY_FILE_PATH = "MininetTopo/" + CREATE_PATHPOLICY_TOPOLOGY_FILE
152
153 GBP_REGEP_API = "/restconf/operations/endpoint:register-endpoint"
154 GBP_UNREGEP_API = "/restconf/operations/endpoint:unregister-endpoint"
155 GBP_ENDPOINTS_API = "/restconf/operational/endpoint:endpoints"
156 GBP_BASE_ENDPOINTS_API = "/restconf/operational/base-endpoint:endpoints"
157 GBP_TENANTS_API = "/restconf/config/policy:tenants"
158 OPERATIONAL_GBP_TENANTS_API = "/restconf/operational/policy:tenants"
159 GBP_TUNNELS_API = "/restconf/config/opendaylight-inventory:nodes"
160
161 # LISP Flow Mapping variables
162 LFM_RPC_API = "/restconf/operations/odl-mappingservice"
163 LFM_RPC_API_LI = "/restconf/operations/lfm-mapping-database"
164 LFM_SB_RPC_API = "/restconf/operations/odl-lisp-sb"
165
166 # Neutron
167 NEUTRON_NB_API = "/controller/nb/v2/neutron"
168 NEUTRON_NETWORKS_API = NEUTRON_NB_API + "/" + "networks"
169 NEUTRON_SUBNETS_API = NEUTRON_NB_API + "/" + "subnets"
170 NEUTRON_PORTS_API = NEUTRON_NB_API + "/" + "ports"
171 NEUTRON_ROUTERS_API = NEUTRON_NB_API + "/" + "routers"
172 OSREST = "/v2.0/networks"
173
174 # Other global variables
175 # TODO: Move these to more apropriate sections.
176 PORT = "8080"
177 RESTPORT = "8282"
178 RESTCONFPORT = "8181"
179 OVSDBPORT = "6640"
180 CONTAINER = "default"
181 PREFIX = (  # TODO: determine where this is used; create a better named variable
182     "http://" + ODL_SYSTEM_IP + ":" + PORT
183 )
184 USER = (  # TODO: who is using this?  Can we make it more specific? (e.g.  RESTCONF_USER)
185     "admin"
186 )
187 PWD = "admin"
188 PASSWORD = "EMPTY"
189 AUTH = ["admin", "admin"]
190 SCOPE = "sdn"
191 HEADERS = {"Content-Type": "application/json"}
192 # FIXME: keep it as 'application/json' to make it work for both Bierman02
193 #  and RFC8040 URLs. Change it to RFC8040 media type once RFC8040 migration
194 #  is completed.
195 HEADERS_YANG_JSON = {"Content-Type": "application/json"}
196 HEADERS_XML = {"Content-Type": "application/xml"}
197 ACCEPT_XML = {"Accept": "application/xml"}
198 ACCEPT_JSON = {"Accept": "application/json"}
199 ACCEPT_EMPTY = (
200     {}
201 )  # Json should be default, but no-output RPC cannot have Accept header.
202 ODL_CONTROLLER_SESSION = None
203 TOPO_TREE_LEVEL = 2
204 TOPO_TREE_DEPTH = 3
205 TOPO_TREE_FANOUT = 2
206 KEYFILE_PASS = "any"
207 SSH_KEY = "id_rsa"
208 CONTROLLER_STOP_TIMEOUT = (
209     120  # Max number of seconds test will wait for a controller to stop
210 )
211 TOPOLOGY_URL = "network-topology:network-topology/topology"
212 SEND_ACCEPT_XML_HEADERS = {
213     "Content-Type": "application/xml",
214     "Accept": "application/xml",
215 }
216
217 # Test deadlines global control
218 ENABLE_GLOBAL_TEST_DEADLINES = True
219
220 # Deprecated old variables, to be removed once all tests that need them are
221 # updated to use the new names.
222 CONTROLLER = ODL_SYSTEM_IP
223 CONTROLLERS = ["ODL_SYSTEM_1_IP", "ODL_SYSTEM_2_IP", "ODL_SYSTEM_3_IP"]
224 CONTROLLER_PASSWORD = ODL_SYSTEM_PASSWORD
225 CONTROLLER_PROMPT = ODL_SYSTEM_PROMPT
226
227 # Centinel Variables
228 SET_CONFIGURATION_URI = "/restconf/operations/configuration:set-centinel-configurations"
229 GET_CONFIGURATION_URI = "/restconf/operational/configuration:configurationRecord/"
230 STREAMRECORD_CONFIG = "/restconf/config/stream:streamRecord"
231 SET_STREAMRECORD = "/restconf/operations/stream:set-stream"
232 ALERTFIELDCONTENTRULERECORD = "/restconf/config/alertrule:alertFieldContentRuleRecord/"
233 SET_ALERTFIELDCONTENTRULERECORD = (
234     "/restconf/operations/alertrule:set-alert-field-content-rule"
235 )
236 ALERTFIELDVALUERULERECORD = "/restconf/config/alertrule:alertFieldValueRuleRecord"
237 SET_ALERTFIELDVALUERULERECORD = (
238     "/restconf/operations/alertrule:set-alert-field-value-rule"
239 )
240 ALERTMESSAGECOUNTRULERECORD = "/restconf/config/alertrule:alertMessageCountRuleRecord/"
241 SET_ALERTMESSAGECOUNTRULERECORD = (
242     "/restconf/operations/alertrule:set-alert-message-count-rule"
243 )
244 GET_DASHBOARDRECORD = "/restconf/operational/dashboardrule:dashboardRecord/"
245 SET_DASHBOARDRECORD = "/restconf/operations/dashboardrule:set-dashboard"
246 DELETE_DASHBOARDRECORD = "/restconf/operations/dashboardrule:delete-dashboard"
247 SET_SUBSCRIBEUSER = "/restconf/operations/subscribe:subscribe-user"
248 SUBSCRIPTION = "/restconf/config/subscribe:subscription/"
249
250 # Elasticsearch Variables
251 ELASTICPORT = 9200