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 = '>'
12 # ODL system variables
13 ODL_SYSTEM_IP = '127.0.0.1' # Override if ODL is not running locally to pybot
14 ODL_SYSTEM_IP_LIST = ['ODL_SYSTEM_1_IP', 'ODL_SYSTEM_2_IP', 'ODL_SYSTEM_3_IP']
15 ODL_SYSTEM_USER = 'jenkins'
16 ODL_SYSTEM_PASSWORD = '' # empty means use public key authentication
17 ODL_SYSTEM_PROMPT = DEFAULT_LINUX_PROMPT
19 # "Tools" system variables (mininet etc).
20 TOOLS_SYSTEM_IP = '127.0.0.1' # Override if tools are not run locally to pybot
21 TOOLS_SYSTEM_USER = 'jenkins'
22 TOOLS_SYSTEM_PASSWORD = '' # empty means use public key authentication
23 TOOLS_SYSTEM_PROMPT = DEFAULT_LINUX_PROMPT
26 KARAF_SHELL_PORT = '8101'
27 ESCAPE_CHARACTER = '\x1B'
28 KARAF_DETAILED_PROMPT = '@' + ESCAPE_CHARACTER + '[0m' + ESCAPE_CHARACTER + '[34mroot' + ESCAPE_CHARACTER + '[0m>'
30 KARAF_PASSWORD = 'karaf'
31 KARAF_PROMPT = 'opendaylight-user'
35 BGP_TOOL_PORT = '17900'
38 ODL_NETCONF_PORT = '2830'
39 ODL_NETCONF_USER = 'admin'
40 ODL_NETCONF_PASSWORD = 'admin'
41 ODL_NETCONF_PROMPT = ']]>]]>'
42 ODL_NETCONF_NAMESPACE = 'urn:ietf:params:xml:ns:netconf:base:1.0'
44 # VTN Coordinator Variables
47 VTNC_PREFIX = 'http://' + VTNC + ':' + VTNCPORT
48 VTNC_HEADERS = {'Content-Type': 'application/json',
49 'username': 'admin', 'password': 'adminpass'}
51 VTNWEBAPI = '/vtn-webapi'
53 CTRLS_CREATE = 'controllers.json'
58 VTNS_CREATE = 'vtns.json'
62 VBRS_CREATE = 'vbridges.json'
66 VBRIFS_CREATE = 'interfaces.json'
70 PORTMAP_CREATE = 'portmap.json'
73 VLANMAP_CREATE = 'vlanmaps.json'
76 PORTS = 'ports/detail.json'
79 FLOWLISTS_CREATE = 'flowlists.json'
82 FLOWLISTENTRIES_CREATE = 'flowlistentries.json'
83 FLOWLISTS = 'flowlists'
86 FLOWFILTERS_CREATE = 'flowfilters.json'
87 FLOWFILTERENTRIES_CREATE = 'flowfilterentries.json'
88 FLOWFILTERS = 'flowfilters/in'
89 FLOWFILTERS_UPDATE = 'flowfilterentries'
93 CONFIG_NODES_API = '/restconf/config/opendaylight-inventory:nodes'
94 OPERATIONAL_NODES_API = '/restconf/operational/opendaylight-inventory:nodes'
95 OPERATIONAL_NODES_NETVIRT = '/restconf/operational/network-topology:network-topology/topology/netvirt:1'
96 OPERATIONAL_TOPO_API = '/restconf/operational/network-topology:' \
98 CONFIG_TOPO_API = '/restconf/config/network-topology:network-topology'
99 CONTROLLER_CONFIG_MOUNT = ('/restconf/config/network-topology:'
100 'network-topology/topology'
101 '/topology-netconf/node/'
102 'controller-config/yang-ext:mount')
103 CONFIG_API = '/restconf/config'
104 OPERATIONAL_API = '/restconf/operational'
105 MODULES_API = '/restconf/modules'
108 AUTH_TOKEN_API = '/oauth2/token'
109 REVOKE_TOKEN_API = '/oauth2/revoke'
111 # Base Mininet Mac address. DPID of mininet switches will be derived from this.
112 BASE_MAC_1 = '00:4b:00:00:00:00'
113 # Base IP of mininet hosts
114 BASE_IP_1 = '75.75.0.0'
116 # Vlan Custom Topology Path and File
117 CREATE_VLAN_TOPOLOGY_FILE = "vlan_vtn_test.py"
118 CREATE_VLAN_TOPOLOGY_FILE_PATH = "MininetTopo/" +\
119 CREATE_VLAN_TOPOLOGY_FILE
121 # Mininet Custom Topology Path and File
122 CREATE_FULLYMESH_TOPOLOGY_FILE = "create_fullymesh.py"
123 CREATE_FULLYMESH_TOPOLOGY_FILE_PATH = "libraries/MininetTopo/" +\
124 CREATE_FULLYMESH_TOPOLOGY_FILE
126 # Mininet Custom Topology Path and File for Path Policy
127 CREATE_PATHPOLICY_TOPOLOGY_FILE = "topo-3sw-2host_multipath.py"
128 CREATE_PATHPOLICY_TOPOLOGY_FILE_PATH = "MininetTopo/" +\
129 CREATE_PATHPOLICY_TOPOLOGY_FILE
131 GBP_REGEP_API = "/restconf/operations/endpoint:register-endpoint"
132 GBP_UNREGEP_API = "/restconf/operations/endpoint:unregister-endpoint"
133 GBP_TENANTS_API = "/restconf/config/policy:tenants"
134 GBP_TUNNELS_API = "/restconf/config/opendaylight-inventory:nodes"
136 # LISP Flow Mapping variables
137 LFM_RPC_API = "/restconf/operations/mappingservice"
138 LFM_RPC_API_LI = "/restconf/operations/lfm-mapping-database"
139 LFM_SB_RPC_API = "/restconf/operations/lisp-sb"
141 # Other global variables
142 # TODO: Move these to more apropriate sections.
145 RESTCONFPORT = '8181'
146 CONTAINER = 'default'
147 PREFIX = 'http://' + ODL_SYSTEM_IP + ':' + PORT # TODO: determine where this is used; create a better named variable
148 USER = 'admin' # TODO: who is using this? Can we make it more specific? (e.g. RESTCONF_USER)
151 AUTH = [u'admin', u'admin']
153 HEADERS = {'Content-Type': 'application/json'}
154 HEADERS_XML = {'Content-Type': 'application/xml'}
155 ACCEPT_XML = {'Accept': 'application/xml'}
156 ACCEPT_JSON = {'Accept': 'application/json'}
157 ODL_CONTROLLER_SESSION = None
163 CONTROLLER_STOP_TIMEOUT = 120 # Max number of seconds test will wait for a controller to stop
164 TOPOLOGY_URL = 'network-topology:network-topology/topology'
165 SEND_ACCEPT_XML_HEADERS = {'Content-Type': 'application/xml', 'Accept': 'application/xml'}
167 # Deprecated old variables, to be removed once all tests that need them are
168 # updated to use the new names.
169 CONTROLLER = ODL_SYSTEM_IP
170 CONTROLLERS = ['CONTROLLER', 'CONTROLLER1', 'CONTROLLER2']
171 CONTROLLER_PASSWORD = ODL_SYSTEM_PASSWORD
172 CONTROLLER_PROMPT = ODL_SYSTEM_PROMPT
173 MININET_PASSWORD = TOOLS_SYSTEM_PASSWORD
174 MININET_PROMPT = TOOLS_SYSTEM_PROMPT
175 PROMPT = '>' # TODO: remove this as it's vague. need to fix any occurances of it first.