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'
53 # VTN Coordinator Variables
56 VTNC_PREFIX = 'http://' + VTNC + ':' + VTNCPORT
57 VTNC_HEADERS = {'Content-Type': 'application/json',
58 'username': 'admin', 'password': 'adminpass'}
60 VTNWEBAPI = '/vtn-webapi'
62 CTRLS_CREATE = 'controllers.json'
67 VTNS_CREATE = 'vtns.json'
71 VBRS_CREATE = 'vbridges.json'
75 VBRIFS_CREATE = 'interfaces.json'
79 PORTMAP_CREATE = 'portmap.json'
82 VLANMAP_CREATE = 'vlanmaps.json'
85 PORTS = 'ports/detail.json'
88 FLOWLISTS_CREATE = 'flowlists.json'
91 FLOWLISTENTRIES_CREATE = 'flowlistentries.json'
92 FLOWLISTS = 'flowlists'
95 FLOWFILTERS_CREATE = 'flowfilters.json'
96 FLOWFILTERENTRIES_CREATE = 'flowfilterentries.json'
97 FLOWFILTERS = 'flowfilters/in'
98 FLOWFILTERS_UPDATE = 'flowfilterentries'
102 CONFIG_NODES_API = '/restconf/config/opendaylight-inventory:nodes'
103 OPERATIONAL_NODES_API = '/restconf/operational/opendaylight-inventory:nodes'
104 OPERATIONAL_NODES_NETVIRT = '/restconf/operational/network-topology:network-topology/topology/netvirt:1'
105 OPERATIONAL_TOPO_API = '/restconf/operational/network-topology:' \
107 CONFIG_TOPO_API = '/restconf/config/network-topology:network-topology'
108 CONTROLLER_CONFIG_MOUNT = ('/restconf/config/network-topology:'
109 'network-topology/topology'
110 '/topology-netconf/node/'
111 'controller-config/yang-ext:mount')
112 CONFIG_API = '/restconf/config'
113 OPERATIONAL_API = '/restconf/operational'
114 MODULES_API = '/restconf/modules'
117 AUTH_TOKEN_API = '/oauth2/token'
118 REVOKE_TOKEN_API = '/oauth2/revoke'
120 # Base Mininet Mac address. DPID of mininet switches will be derived from this.
121 BASE_MAC_1 = '00:4b:00:00:00:00'
122 # Base IP of mininet hosts
123 BASE_IP_1 = '75.75.0.0'
125 # Vlan Custom Topology Path and File
126 CREATE_VLAN_TOPOLOGY_FILE = "vlan_vtn_test.py"
127 CREATE_VLAN_TOPOLOGY_FILE_PATH = "MininetTopo/" +\
128 CREATE_VLAN_TOPOLOGY_FILE
130 # Mininet Custom Topology Path and File
131 CREATE_FULLYMESH_TOPOLOGY_FILE = "create_fullymesh.py"
132 CREATE_FULLYMESH_TOPOLOGY_FILE_PATH = "libraries/MininetTopo/" +\
133 CREATE_FULLYMESH_TOPOLOGY_FILE
135 # Mininet Custom Topology Path and File for Path Policy
136 CREATE_PATHPOLICY_TOPOLOGY_FILE = "topo-3sw-2host_multipath.py"
137 CREATE_PATHPOLICY_TOPOLOGY_FILE_PATH = "MininetTopo/" +\
138 CREATE_PATHPOLICY_TOPOLOGY_FILE
140 GBP_REGEP_API = "/restconf/operations/endpoint:register-endpoint"
141 GBP_UNREGEP_API = "/restconf/operations/endpoint:unregister-endpoint"
142 GBP_TENANTS_API = "/restconf/config/policy:tenants"
143 GBP_TUNNELS_API = "/restconf/config/opendaylight-inventory:nodes"
145 # LISP Flow Mapping variables
146 LFM_RPC_API = "/restconf/operations/odl-mappingservice"
147 LFM_RPC_API_LI = "/restconf/operations/lfm-mapping-database"
148 LFM_SB_RPC_API = "/restconf/operations/odl-lisp-sb"
150 # Other global variables
151 # TODO: Move these to more apropriate sections.
154 RESTCONFPORT = '8181'
155 CONTAINER = 'default'
156 PREFIX = 'http://' + ODL_SYSTEM_IP + ':' + PORT # TODO: determine where this is used; create a better named variable
157 USER = 'admin' # TODO: who is using this? Can we make it more specific? (e.g. RESTCONF_USER)
160 AUTH = [u'admin', u'admin']
162 HEADERS = {'Content-Type': 'application/json'}
163 HEADERS_YANG_JSON = {'Content-Type': 'application/yang.data+json'}
164 HEADERS_XML = {'Content-Type': 'application/xml'}
165 ACCEPT_XML = {'Accept': 'application/xml'}
166 ACCEPT_JSON = {'Accept': 'application/json'}
167 ODL_CONTROLLER_SESSION = None
173 CONTROLLER_STOP_TIMEOUT = 120 # Max number of seconds test will wait for a controller to stop
174 TOPOLOGY_URL = 'network-topology:network-topology/topology'
175 SEND_ACCEPT_XML_HEADERS = {'Content-Type': 'application/xml', 'Accept': 'application/xml'}
177 # Deprecated old variables, to be removed once all tests that need them are
178 # updated to use the new names.
179 CONTROLLER = ODL_SYSTEM_IP
180 CONTROLLERS = ['CONTROLLER', 'CONTROLLER1', 'CONTROLLER2']
181 CONTROLLER_PASSWORD = ODL_SYSTEM_PASSWORD
182 CONTROLLER_PROMPT = ODL_SYSTEM_PROMPT
183 MININET = TOOLS_SYSTEM_IP
184 MININET_USER = TOOLS_SYSTEM_USER
185 MININET_PASSWORD = TOOLS_SYSTEM_PASSWORD
186 MININET_PROMPT = TOOLS_SYSTEM_PROMPT
187 PROMPT = '>' # TODO: remove this as it's vague. need to fix any occurances of it first.