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_NETCONF_PORT = '2830'
48 ODL_NETCONF_USER = 'admin'
49 ODL_NETCONF_PASSWORD = 'admin'
50 ODL_NETCONF_PROMPT = ']]>]]>'
51 ODL_NETCONF_NAMESPACE = 'urn:ietf:params:xml:ns:netconf:base:1.0'
54 ODL_OF_PLUGIN = 'lithium'
56 # VTN Coordinator Variables
59 VTNC_PREFIX = 'http://' + VTNC + ':' + VTNCPORT
60 VTNC_HEADERS = {'Content-Type': 'application/json',
61 'username': 'admin', 'password': 'adminpass'}
63 VTNWEBAPI = '/vtn-webapi'
65 CTRLS_CREATE = 'controllers.json'
70 VTNS_CREATE = 'vtns.json'
74 VBRS_CREATE = 'vbridges.json'
78 VBRIFS_CREATE = 'interfaces.json'
82 PORTMAP_CREATE = 'portmap.json'
85 VLANMAP_CREATE = 'vlanmaps.json'
88 PORTS = 'ports/detail.json'
91 FLOWLISTS_CREATE = 'flowlists.json'
94 FLOWLISTENTRIES_CREATE = 'flowlistentries.json'
95 FLOWLISTS = 'flowlists'
98 FLOWFILTERS_CREATE = 'flowfilters.json'
99 FLOWFILTERENTRIES_CREATE = 'flowfilterentries.json'
100 FLOWFILTERS = 'flowfilters/in'
101 FLOWFILTERS_UPDATE = 'flowfilterentries'
105 CONFIG_NODES_API = '/restconf/config/opendaylight-inventory:nodes'
106 OPERATIONAL_NODES_API = '/restconf/operational/opendaylight-inventory:nodes'
107 OPERATIONAL_NODES_NETVIRT = '/restconf/operational/network-topology:network-topology/topology/netvirt:1'
108 OPERATIONAL_TOPO_API = '/restconf/operational/network-topology:' \
110 CONFIG_TOPO_API = '/restconf/config/network-topology:network-topology'
111 CONTROLLER_CONFIG_MOUNT = ('/restconf/config/network-topology:'
112 'network-topology/topology'
113 '/topology-netconf/node/'
114 'controller-config/yang-ext:mount')
115 CONFIG_API = '/restconf/config'
116 OPERATIONAL_API = '/restconf/operational'
117 MODULES_API = '/restconf/modules'
120 PREDEFINE_ROLE_URI = '/restconf/config/nemo-user:user-roles'
121 PREDEFINE_NODE_URI = '/restconf/config/nemo-object:node-definitions'
122 PREDEFINE_CONNECTION_URI = '/restconf/config/nemo-object:connection-definitions'
123 REGISTER_TENANT_URI = '/restconf/operations/nemo-intent:register-user'
124 STRUCTURE_INTENT_URI = '/restconf/operations/nemo-intent:structure-style-nemo-update'
125 GET_INTENTS_URI = '/retconf/config/intent:intents'
128 AUTH_TOKEN_API = '/oauth2/token'
129 REVOKE_TOKEN_API = '/oauth2/revoke'
131 # Base Mininet Mac address. DPID of mininet switches will be derived from this.
132 BASE_MAC_1 = '00:4b:00:00:00:00'
133 # Base IP of mininet hosts
134 BASE_IP_1 = '75.75.0.0'
136 # Vlan Custom Topology Path and File
137 CREATE_VLAN_TOPOLOGY_FILE = "vlan_vtn_test.py"
138 CREATE_VLAN_TOPOLOGY_FILE_PATH = "MininetTopo/" +\
139 CREATE_VLAN_TOPOLOGY_FILE
141 # Mininet Custom Topology Path and File
142 CREATE_FULLYMESH_TOPOLOGY_FILE = "create_fullymesh.py"
143 CREATE_FULLYMESH_TOPOLOGY_FILE_PATH = "libraries/MininetTopo/" +\
144 CREATE_FULLYMESH_TOPOLOGY_FILE
146 # Mininet Custom Topology Path and File for Path Policy
147 CREATE_PATHPOLICY_TOPOLOGY_FILE = "topo-3sw-2host_multipath.py"
148 CREATE_PATHPOLICY_TOPOLOGY_FILE_PATH = "MininetTopo/" +\
149 CREATE_PATHPOLICY_TOPOLOGY_FILE
151 GBP_REGEP_API = "/restconf/operations/endpoint:register-endpoint"
152 GBP_UNREGEP_API = "/restconf/operations/endpoint:unregister-endpoint"
153 GBP_TENANTS_API = "/restconf/config/policy:tenants"
154 GBP_TUNNELS_API = "/restconf/config/opendaylight-inventory:nodes"
156 # LISP Flow Mapping variables
157 LFM_RPC_API = "/restconf/operations/odl-mappingservice"
158 LFM_RPC_API_LI = "/restconf/operations/lfm-mapping-database"
159 LFM_SB_RPC_API = "/restconf/operations/odl-lisp-sb"
161 # Other global variables
162 # TODO: Move these to more apropriate sections.
165 RESTCONFPORT = '8181'
167 CONTAINER = 'default'
168 PREFIX = 'http://' + ODL_SYSTEM_IP + ':' + PORT # TODO: determine where this is used; create a better named variable
169 USER = 'admin' # TODO: who is using this? Can we make it more specific? (e.g. RESTCONF_USER)
172 AUTH = [u'admin', u'admin']
174 HEADERS = {'Content-Type': 'application/json'}
175 HEADERS_YANG_JSON = {'Content-Type': 'application/yang.data+json'}
176 HEADERS_XML = {'Content-Type': 'application/xml'}
177 ACCEPT_XML = {'Accept': 'application/xml'}
178 ACCEPT_JSON = {'Accept': 'application/json'}
179 ODL_CONTROLLER_SESSION = None
185 CONTROLLER_STOP_TIMEOUT = 120 # Max number of seconds test will wait for a controller to stop
186 TOPOLOGY_URL = 'network-topology:network-topology/topology'
187 SEND_ACCEPT_XML_HEADERS = {'Content-Type': 'application/xml', 'Accept': 'application/xml'}
189 # Test deadlines global control
190 ENABLE_GLOBAL_TEST_DEADLINES = True
192 # Deprecated old variables, to be removed once all tests that need them are
193 # updated to use the new names.
194 CONTROLLER = ODL_SYSTEM_IP
195 CONTROLLERS = ['CONTROLLER', 'CONTROLLER1', 'CONTROLLER2']
196 CONTROLLER_PASSWORD = ODL_SYSTEM_PASSWORD
197 CONTROLLER_PROMPT = ODL_SYSTEM_PROMPT
198 MININET = TOOLS_SYSTEM_IP
199 MININET_USER = TOOLS_SYSTEM_USER
200 MININET_PASSWORD = TOOLS_SYSTEM_PASSWORD
201 MININET_PROMPT = TOOLS_SYSTEM_PROMPT
202 PROMPT = '>' # TODO: remove this as it's vague. need to fix any occurances of it first.