2 Definitions of common variables for the system test robot suites of the
5 Authors: Baohua Yang@IBM, Denghui Huang@IBM
6 Edited: Many times by many people
9 # VM Environment defaults
10 DEFAULT_LINUX_PROMPT = '>'
11 DEFAULT_USER = 'jenkins'
12 DEFAULT_TIMEOUT = '30s'
14 # ODL system variables
15 ODL_SYSTEM_IP = '127.0.0.1' # Override if ODL is not running locally to pybot
16 ODL_SYSTEM_IP_LIST = ['ODL_SYSTEM_1_IP', 'ODL_SYSTEM_2_IP', 'ODL_SYSTEM_3_IP']
17 ODL_SYSTEM_USER = DEFAULT_USER
18 ODL_SYSTEM_PASSWORD = '' # empty means use public key authentication
19 ODL_SYSTEM_PROMPT = DEFAULT_LINUX_PROMPT
21 # "Tools" system variables (mininet etc).
22 TOOLS_SYSTEM_IP = '127.0.0.1' # Override if tools are not run locally to pybot
23 TOOLS_SYSTEM_USER = DEFAULT_USER
24 TOOLS_SYSTEM_PASSWORD = '' # empty means use public key authentication
25 TOOLS_SYSTEM_PROMPT = DEFAULT_LINUX_PROMPT
28 KARAF_SHELL_PORT = '8101'
29 ESCAPE_CHARACTER = '\x1B'
30 KARAF_DETAILED_PROMPT = '@' + ESCAPE_CHARACTER + '[0m' + ESCAPE_CHARACTER + '[34mroot' + ESCAPE_CHARACTER + '[0m>'
32 KARAF_PASSWORD = 'karaf'
33 KARAF_PROMPT = 'opendaylight-user'
36 DEFAULT_ODL_LOG_LEVEL = 'INFO'
37 DEFAULT_BGPCEP_LOG_LEVEL = DEFAULT_ODL_LOG_LEVEL
38 DEFAULT_PROTOCOL_LOG_LEVEL = DEFAULT_BGPCEP_LOG_LEVEL
39 BGPCEP_LOG_LEVEL = DEFAULT_BGPCEP_LOG_LEVEL
40 PROTOCOL_LOG_LEVEL = BGPCEP_LOG_LEVEL
44 BGP_TOOL_PORT = '17900'
47 ODL_RESTCONF_USER = 'admin'
48 ODL_RESTCONF_PASSWORD = 'admin'
51 ODL_NETCONF_PORT = '2830'
52 ODL_NETCONF_USER = 'admin'
53 ODL_NETCONF_PASSWORD = 'admin'
54 ODL_NETCONF_PROMPT = ']]>]]>'
55 ODL_NETCONF_NAMESPACE = 'urn:ietf:params:xml:ns:netconf:base:1.0'
58 ODL_OF_PLUGIN = 'lithium'
60 # VTN Coordinator Variables
63 VTNC_PREFIX = 'http://' + VTNC + ':' + VTNCPORT
64 VTNC_HEADERS = {'Content-Type': 'application/json',
65 'username': 'admin', 'password': 'adminpass'}
67 VTNWEBAPI = '/vtn-webapi'
69 CTRLS_CREATE = 'controllers.json'
74 VTNS_CREATE = 'vtns.json'
78 VBRS_CREATE = 'vbridges.json'
82 VBRIFS_CREATE = 'interfaces.json'
86 PORTMAP_CREATE = 'portmap.json'
89 VLANMAP_CREATE = 'vlanmaps.json'
92 PORTS = 'ports/detail.json'
95 FLOWLISTS_CREATE = 'flowlists.json'
98 FLOWLISTENTRIES_CREATE = 'flowlistentries.json'
99 FLOWLISTS = 'flowlists'
102 FLOWFILTERS_CREATE = 'flowfilters.json'
103 FLOWFILTERENTRIES_CREATE = 'flowfilterentries.json'
104 FLOWFILTERS = 'flowfilters/in'
105 FLOWFILTERS_UPDATE = 'flowfilterentries'
109 CONFIG_NODES_API = '/restconf/config/opendaylight-inventory:nodes'
110 OPERATIONAL_NODES_API = '/restconf/operational/opendaylight-inventory:nodes'
111 OPERATIONAL_NODES_NETVIRT = '/restconf/operational/network-topology:network-topology/topology/netvirt:1'
112 OPERATIONAL_TOPO_API = '/restconf/operational/network-topology:' \
114 CONFIG_TOPO_API = '/restconf/config/network-topology:network-topology'
115 CONTROLLER_CONFIG_MOUNT = ('/restconf/config/network-topology:'
116 'network-topology/topology'
117 '/topology-netconf/node/'
118 'controller-config/yang-ext:mount')
119 CONFIG_API = '/restconf/config'
120 OPERATIONAL_API = '/restconf/operational'
121 MODULES_API = '/restconf/modules'
124 PREDEFINE_ROLE_URI = '/restconf/config/nemo-user:user-roles'
125 PREDEFINE_NODE_URI = '/restconf/config/nemo-object:node-definitions'
126 PREDEFINE_CONNECTION_URI = '/restconf/config/nemo-object:connection-definitions'
127 REGISTER_TENANT_URI = '/restconf/operations/nemo-intent:register-user'
128 STRUCTURE_INTENT_URI = '/restconf/operations/nemo-intent:structure-style-nemo-update'
129 GET_INTENTS_URI = '/retconf/config/intent:intents'
132 AUTH_TOKEN_API = '/oauth2/token'
133 REVOKE_TOKEN_API = '/oauth2/revoke'
135 # Base Mininet Mac address. DPID of mininet switches will be derived from this.
136 BASE_MAC_1 = '00:4b:00:00:00:00'
137 # Base IP of mininet hosts
138 BASE_IP_1 = '75.75.0.0'
140 # Vlan Custom Topology Path and File
141 CREATE_VLAN_TOPOLOGY_FILE = "vlan_vtn_test.py"
142 CREATE_VLAN_TOPOLOGY_FILE_PATH = "MininetTopo/" +\
143 CREATE_VLAN_TOPOLOGY_FILE
145 # Mininet Custom Topology Path and File
146 CREATE_FULLYMESH_TOPOLOGY_FILE = "create_fullymesh.py"
147 CREATE_FULLYMESH_TOPOLOGY_FILE_PATH = "libraries/MininetTopo/" +\
148 CREATE_FULLYMESH_TOPOLOGY_FILE
150 # Mininet Custom Topology Path and File for Path Policy
151 CREATE_PATHPOLICY_TOPOLOGY_FILE = "topo-3sw-2host_multipath.py"
152 CREATE_PATHPOLICY_TOPOLOGY_FILE_PATH = "MininetTopo/" +\
153 CREATE_PATHPOLICY_TOPOLOGY_FILE
155 GBP_REGEP_API = "/restconf/operations/endpoint:register-endpoint"
156 GBP_UNREGEP_API = "/restconf/operations/endpoint:unregister-endpoint"
157 GBP_TENANTS_API = "/restconf/config/policy:tenants"
158 GBP_TUNNELS_API = "/restconf/config/opendaylight-inventory:nodes"
160 # LISP Flow Mapping variables
161 LFM_RPC_API = "/restconf/operations/odl-mappingservice"
162 LFM_RPC_API_LI = "/restconf/operations/lfm-mapping-database"
163 LFM_SB_RPC_API = "/restconf/operations/odl-lisp-sb"
165 # Other global variables
166 # TODO: Move these to more apropriate sections.
169 RESTCONFPORT = '8181'
171 CONTAINER = 'default'
172 PREFIX = 'http://' + ODL_SYSTEM_IP + ':' + PORT # TODO: determine where this is used; create a better named variable
173 USER = 'admin' # TODO: who is using this? Can we make it more specific? (e.g. RESTCONF_USER)
176 AUTH = [u'admin', u'admin']
178 HEADERS = {'Content-Type': 'application/json'}
179 HEADERS_YANG_JSON = {'Content-Type': 'application/yang.data+json'}
180 HEADERS_XML = {'Content-Type': 'application/xml'}
181 ACCEPT_XML = {'Accept': 'application/xml'}
182 ACCEPT_JSON = {'Accept': 'application/json'}
183 ACCEPT_EMPTY = {} # Json should be default, but no-output RPC cannot have Accept header.
184 ODL_CONTROLLER_SESSION = None
190 CONTROLLER_STOP_TIMEOUT = 120 # Max number of seconds test will wait for a controller to stop
191 TOPOLOGY_URL = 'network-topology:network-topology/topology'
192 SEND_ACCEPT_XML_HEADERS = {'Content-Type': 'application/xml', 'Accept': 'application/xml'}
194 # Test deadlines global control
195 ENABLE_GLOBAL_TEST_DEADLINES = True
197 # Deprecated old variables, to be removed once all tests that need them are
198 # updated to use the new names.
199 CONTROLLER = ODL_SYSTEM_IP
200 CONTROLLERS = ['CONTROLLER', 'CONTROLLER1', 'CONTROLLER2']
201 CONTROLLER_PASSWORD = ODL_SYSTEM_PASSWORD
202 CONTROLLER_PROMPT = ODL_SYSTEM_PROMPT
203 MININET = TOOLS_SYSTEM_IP
204 MININET_USER = TOOLS_SYSTEM_USER
205 MININET_PASSWORD = TOOLS_SYSTEM_PASSWORD
206 MININET_PROMPT = TOOLS_SYSTEM_PROMPT
207 PROMPT = '>' # TODO: remove this as it's vague. need to fix any occurances of it first.