Remove faulty variable KARAF_HOME
[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_DETAILED_PROMPT = '@' + ESCAPE_CHARACTER + '[0m' + ESCAPE_CHARACTER + '[34mroot' + ESCAPE_CHARACTER + '[0m>'
32 KARAF_USER = 'karaf'
33 KARAF_PASSWORD = 'karaf'
34 KARAF_PROMPT = 'opendaylight-user'
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 = {'Content-Type': 'application/json',
68                 'username': 'admin', 'password': 'adminpass'}
69
70 VTNWEBAPI = '/vtn-webapi'
71 # controllers URL
72 CTRLS_CREATE = 'controllers.json'
73 CTRLS = 'controllers'
74 SW = 'switches'
75
76 # vtn URL
77 VTNS_CREATE = 'vtns.json'
78 VTNS = 'vtns'
79
80 # vbridge URL
81 VBRS_CREATE = 'vbridges.json'
82 VBRS = 'vbridges'
83
84 # interfaces URL
85 VBRIFS_CREATE = 'interfaces.json'
86 VBRIFS = 'interfaces'
87
88 # portmap URL
89 PORTMAP_CREATE = 'portmap.json'
90
91 # vlanmap URL
92 VLANMAP_CREATE = 'vlanmaps.json'
93
94 # ports URL
95 PORTS = 'ports/detail.json'
96
97 # flowlist URL
98 FLOWLISTS_CREATE = 'flowlists.json'
99
100 # flowlistentry_URL
101 FLOWLISTENTRIES_CREATE = 'flowlistentries.json'
102 FLOWLISTS = 'flowlists'
103
104 # flowfilter_URL
105 FLOWFILTERS_CREATE = 'flowfilters.json'
106 FLOWFILTERENTRIES_CREATE = 'flowfilterentries.json'
107 FLOWFILTERS = 'flowfilters/in'
108 FLOWFILTERS_UPDATE = 'flowfilterentries'
109
110
111 # Common APIs
112 CONFIG_NODES_API = '/restconf/config/opendaylight-inventory:nodes'
113 OPERATIONAL_NODES_API = '/restconf/operational/opendaylight-inventory:nodes'
114 OPERATIONAL_NODES_NETVIRT = '/restconf/operational/network-topology:network-topology/topology/netvirt:1'
115 OPERATIONAL_TOPO_API = '/restconf/operational/network-topology:' \
116                        'network-topology'
117 CONFIG_TOPO_API = '/restconf/config/network-topology:network-topology'
118 CONTROLLER_CONFIG_MOUNT = ('/restconf/config/network-topology:'
119                            'network-topology/topology'
120                            '/topology-netconf/node/'
121                            'controller-config/yang-ext:mount')
122 CONFIG_API = '/restconf/config'
123 OPERATIONAL_API = '/restconf/operational'
124 MODULES_API = '/restconf/modules'
125
126 # NEMO Variables
127 PREDEFINE_ROLE_URI = '/restconf/config/nemo-user:user-roles'
128 PREDEFINE_NODE_URI = '/restconf/config/nemo-object:node-definitions'
129 PREDEFINE_CONNECTION_URI = '/restconf/config/nemo-object:connection-definitions'
130 REGISTER_TENANT_URI = '/restconf/operations/nemo-intent:register-user'
131 STRUCTURE_INTENT_URI = '/restconf/operations/nemo-intent:structure-style-nemo-update'
132 GET_INTENTS_URI = '/retconf/config/intent:intents'
133
134 # TOKEN
135 AUTH_TOKEN_API = '/oauth2/token'
136 REVOKE_TOKEN_API = '/oauth2/revoke'
137
138 # Base Mininet Mac address. DPID of mininet switches will be derived from this.
139 BASE_MAC_1 = '00:4b:00:00:00:00'
140 # Base IP of mininet hosts
141 BASE_IP_1 = '75.75.0.0'
142
143 # Vlan Custom Topology Path and File
144 CREATE_VLAN_TOPOLOGY_FILE = "vlan_vtn_test.py"
145 CREATE_VLAN_TOPOLOGY_FILE_PATH = "MininetTopo/" +\
146                                  CREATE_VLAN_TOPOLOGY_FILE
147
148 # Mininet Custom Topology Path and File
149 CREATE_FULLYMESH_TOPOLOGY_FILE = "create_fullymesh.py"
150 CREATE_FULLYMESH_TOPOLOGY_FILE_PATH = "libraries/MininetTopo/" +\
151                                       CREATE_FULLYMESH_TOPOLOGY_FILE
152
153 # Mininet Custom Topology Path and File for Path Policy
154 CREATE_PATHPOLICY_TOPOLOGY_FILE = "topo-3sw-2host_multipath.py"
155 CREATE_PATHPOLICY_TOPOLOGY_FILE_PATH = "MininetTopo/" +\
156                                        CREATE_PATHPOLICY_TOPOLOGY_FILE
157
158 GBP_REGEP_API = "/restconf/operations/endpoint:register-endpoint"
159 GBP_UNREGEP_API = "/restconf/operations/endpoint:unregister-endpoint"
160 GBP_ENDPOINTS_API = "/restconf/operational/endpoint:endpoints"
161 GBP_BASE_ENDPOINTS_API = "/restconf/operational/base-endpoint:endpoints"
162 GBP_TENANTS_API = "/restconf/config/policy:tenants"
163 OPERATIONAL_GBP_TENANTS_API = "/restconf/operational/policy:tenants"
164 GBP_TUNNELS_API = "/restconf/config/opendaylight-inventory:nodes"
165
166 # LISP Flow Mapping variables
167 LFM_RPC_API = "/restconf/operations/odl-mappingservice"
168 LFM_RPC_API_LI = "/restconf/operations/lfm-mapping-database"
169 LFM_SB_RPC_API = "/restconf/operations/odl-lisp-sb"
170
171 # Neutron
172 NEUTRON_NB_API = '/controller/nb/v2/neutron'
173 NEUTRON_NETWORKS_API = NEUTRON_NB_API + '/' + 'networks'
174 NEUTRON_PORTS_API = NEUTRON_NB_API + '/' + 'ports'
175 NEUTRON_ROUTERS_API = NEUTRON_NB_API + '/' + 'routers'
176 OSREST = '/v2.0/networks'
177
178 # Openstack System Prompt
179 OS_SYSTEM_PROMPT = '$'
180
181 # Other global variables
182 # TODO: Move these to more apropriate sections.
183 PORT = '8080'
184 RESTPORT = '8282'
185 RESTCONFPORT = '8181'
186 OVSDBPORT = '6640'
187 CONTAINER = 'default'
188 PREFIX = 'http://' + ODL_SYSTEM_IP + ':' + PORT  # TODO: determine where this is used; create a better named variable
189 USER = 'admin'  # TODO: who is using this?  Can we make it more specific? (e.g.  RESTCONF_USER)
190 PWD = 'admin'
191 PASSWORD = 'EMPTY'
192 AUTH = [u'admin', u'admin']
193 SCOPE = 'sdn'
194 HEADERS = {'Content-Type': 'application/json'}
195 HEADERS_YANG_JSON = {'Content-Type': 'application/yang.data+json'}
196 HEADERS_XML = {'Content-Type': 'application/xml'}
197 ACCEPT_XML = {'Accept': 'application/xml'}
198 ACCEPT_JSON = {'Accept': 'application/json'}
199 ACCEPT_EMPTY = {}  # Json should be default, but no-output RPC cannot have Accept header.
200 ODL_CONTROLLER_SESSION = None
201 TOPO_TREE_LEVEL = 2
202 TOPO_TREE_DEPTH = 3
203 TOPO_TREE_FANOUT = 2
204 KEYFILE_PASS = 'any'
205 SSH_KEY = 'id_rsa'
206 CONTROLLER_STOP_TIMEOUT = 120  # Max number of seconds test will wait for a controller to stop
207 TOPOLOGY_URL = 'network-topology:network-topology/topology'
208 SEND_ACCEPT_XML_HEADERS = {'Content-Type': 'application/xml', 'Accept': 'application/xml'}
209
210 # Test deadlines global control
211 ENABLE_GLOBAL_TEST_DEADLINES = True
212
213 # Deprecated old variables, to be removed once all tests that need them are
214 # updated to use the new names.
215 CONTROLLER = ODL_SYSTEM_IP
216 CONTROLLERS = ['ODL_SYSTEM_1_IP', 'ODL_SYSTEM_2_IP', 'ODL_SYSTEM_3_IP']
217 CONTROLLER_PASSWORD = ODL_SYSTEM_PASSWORD
218 CONTROLLER_PROMPT = ODL_SYSTEM_PROMPT
219
220 # Centinel Variables
221 SET_CONFIGURATION_URI = '/restconf/operations/configuration:set-centinel-configurations'
222 GET_CONFIGURATION_URI = '/restconf/operational/configuration:configurationRecord/'
223 STREAMRECORD_CONFIG = '/restconf/config/stream:streamRecord'
224 SET_STREAMRECORD = '/restconf/operations/stream:set-stream'
225 ALERTFIELDCONTENTRULERECORD = '/restconf/config/alertrule:alertFieldContentRuleRecord/'
226 SET_ALERTFIELDCONTENTRULERECORD = '/restconf/operations/alertrule:set-alert-field-content-rule'
227 ALERTFIELDVALUERULERECORD = '/restconf/config/alertrule:alertFieldValueRuleRecord'
228 SET_ALERTFIELDVALUERULERECORD = '/restconf/operations/alertrule:set-alert-field-value-rule'
229 ALERTMESSAGECOUNTRULERECORD = '/restconf/config/alertrule:alertMessageCountRuleRecord/'
230 SET_ALERTMESSAGECOUNTRULERECORD = '/restconf/operations/alertrule:set-alert-message-count-rule'
231 GET_DASHBOARDRECORD = '/restconf/operational/dashboardrule:dashboardRecord/'
232 SET_DASHBOARDRECORD = '/restconf/operations/dashboardrule:set-dashboard'
233 DELETE_DASHBOARDRECORD = '/restconf/operations/dashboardrule:delete-dashboard'
234 SET_SUBSCRIBEUSER = '/restconf/operations/subscribe:subscribe-user'
235 SUBSCRIPTION = '/restconf/config/subscribe:subscription/'
236
237 # Elasticsearch Variables
238 ELASTICPORT = 9200