673990a2f386f1d9fdc2c5fde10a6425b8ef7fda
[integration/test.git] / csit / variables / Variables.py
1 """
2 Library for the robot based system test tool of the OpenDaylight project.
3 Authors: Baohua Yang@IBM, Denghui Huang@IBM
4 Updated: 2013-11-14
5 """
6
7 # Global variables
8 ODL_SYSTEM_IP = '127.0.0.1'
9 CONTROLLER = ODL_SYSTEM_IP
10 PORT = '8080'
11 RESTPORT = '8282'
12 RESTCONFPORT = '8181'
13 PREFIX = 'http://' + CONTROLLER + ':' + PORT
14 PROMPT = '>'  # TODO: remove this as it's vague.  need to fix any occurances of it first.
15 CONTAINER = 'default'
16 USER = 'admin'  # TODO: who is using this?  Can we make it more specific? (e.g.  RESTCONF_USER)
17 PWD = 'admin'
18 PASSWORD = 'EMPTY'
19 AUTH = [u'admin', u'admin']
20 SCOPE = 'sdn'
21 HEADERS = {'Content-Type': 'application/json'}
22 HEADERS_XML = {'Content-Type': 'application/xml'}
23 ACCEPT_XML = {'Accept': 'application/xml'}
24 ACCEPT_JSON = {'Accept': 'application/json'}
25 ODL_CONTROLLER_SESSION = None
26 TOPO_TREE_LEVEL = 2
27 TOPO_TREE_DEPTH = 3
28 TOPO_TREE_FANOUT = 2
29 ODL_SYSTEM_IP_LIST = ['ODL_SYSTEM_1_IP', 'ODL_SYSTEM_2_IP', 'ODL_SYSTEM_3_IP']
30 CONTROLLERS = ['CONTROLLER', 'CONTROLLER1', 'CONTROLLER2']
31 ODL_SYSTEM_PASSWORD = ''  # empty means use keys
32 CONTROLLER_PASSWORD = ODL_SYSTEM_PASSWORD
33 TOOLS_SYSTEM_PASSWORD = ''  # empty means use keys
34 MININET_PASSWORD = TOOLS_SYSTEM_PASSWORD
35 KEYFILE_PASS = 'any'
36 SSH_KEY = 'id_rsa'
37 CONTROLLER_STOP_TIMEOUT = 120  # Max number of seconds test will wait for a controller to stop
38 TOPOLOGY_URL = 'network-topology:network-topology/topology'
39 SEND_ACCEPT_XML_HEADERS = {'Content-Type': 'application/xml', 'Accept': 'application/xml'}
40
41 # KARAF Variaable
42 KARAF_SHELL_PORT = '8101'
43 ESCAPE_CHARACTER = chr(int(27))
44 KARAF_DETAILED_PROMPT = '@' + ESCAPE_CHARACTER + '[0m' + ESCAPE_CHARACTER + '[34mroot' + ESCAPE_CHARACTER + '[0m>'
45 KARAF_PROMPT = 'opendaylight-user'
46 KARAF_USER = 'karaf'
47 KARAF_PASSWORD = 'karaf'
48
49 # BGP variables
50 ODL_BGP_PORT = '1790'
51 BGP_TOOL_PORT = '17900'
52
53 # VM Environment Variables
54 DEFAULT_LINUX_PROMPT = '>'
55 ODL_SYSTEM_PROMPT = DEFAULT_LINUX_PROMPT
56 CONTROLLER_PROMPT = ODL_SYSTEM_PROMPT
57 TOOLS_SYSTEM_PROMPT = DEFAULT_LINUX_PROMPT
58 MININET_PROMPT = TOOLS_SYSTEM_PROMPT
59
60 # Netconf variables
61 ODL_NETCONF_PORT = '2830'
62 ODL_NETCONF_USER = 'admin'
63 ODL_NETCONF_PASSWORD = 'admin'
64 ODL_NETCONF_PROMPT = ']]>]]>'
65 ODL_NETCONF_NAMESPACE = 'urn:ietf:params:xml:ns:netconf:base:1.0'
66
67 # VTN Coordinator Variables
68 VTNC = '127.0.0.1'
69 VTNCPORT = '8083'
70 VTNC_PREFIX = 'http://' + VTNC + ':' + VTNCPORT
71 VTNC_HEADERS = {'Content-Type': 'application/json',
72                 'username': 'admin', 'password': 'adminpass'}
73
74 VTNWEBAPI = '/vtn-webapi'
75 # controllers URL
76 CTRLS_CREATE = 'controllers.json'
77 CTRLS = 'controllers'
78 SW = 'switches'
79
80 # vtn URL
81 VTNS_CREATE = 'vtns.json'
82 VTNS = 'vtns'
83
84 # vbridge URL
85 VBRS_CREATE = 'vbridges.json'
86 VBRS = 'vbridges'
87
88 # interfaces URL
89 VBRIFS_CREATE = 'interfaces.json'
90 VBRIFS = 'interfaces'
91
92 # portmap URL
93 PORTMAP_CREATE = 'portmap.json'
94
95 # vlanmap URL
96 VLANMAP_CREATE = 'vlanmaps.json'
97
98 # ports URL
99 PORTS = 'ports/detail.json'
100
101 # flowlist URL
102 FLOWLISTS_CREATE = 'flowlists.json'
103
104 # flowlistentry_URL
105 FLOWLISTENTRIES_CREATE = 'flowlistentries.json'
106 FLOWLISTS = 'flowlists'
107
108 # flowfilter_URL
109 FLOWFILTERS_CREATE = 'flowfilters.json'
110 FLOWFILTERENTRIES_CREATE = 'flowfilterentries.json'
111 FLOWFILTERS = 'flowfilters/in'
112 FLOWFILTERS_UPDATE = 'flowfilterentries'
113
114
115 # Common APIs
116 CONFIG_NODES_API = '/restconf/config/opendaylight-inventory:nodes'
117 OPERATIONAL_NODES_API = '/restconf/operational/opendaylight-inventory:nodes'
118 OPERATIONAL_NODES_NETVIRT = '/restconf/operational/network-topology:network-topology/topology/netvirt:1'
119 OPERATIONAL_TOPO_API = '/restconf/operational/network-topology:' \
120                        'network-topology'
121 CONFIG_TOPO_API = '/restconf/config/network-topology:network-topology'
122 CONTROLLER_CONFIG_MOUNT = ('/restconf/config/network-topology:'
123                            'network-topology/topology'
124                            '/topology-netconf/node/'
125                            'controller-config/yang-ext:mount')
126 CONFIG_API = '/restconf/config'
127 OPERATIONAL_API = '/restconf/operational'
128 MODULES_API = '/restconf/modules'
129
130 # TOKEN
131 AUTH_TOKEN_API = '/oauth2/token'
132 REVOKE_TOKEN_API = '/oauth2/revoke'
133
134 # Base Mininet Mac address. DPID of mininet switches will be derived from this.
135 BASE_MAC_1 = '00:4b:00:00:00:00'
136 # Base IP of mininet hosts
137 BASE_IP_1 = '75.75.0.0'
138
139 # Vlan Custom Topology Path and File
140 CREATE_VLAN_TOPOLOGY_FILE = "vlan_vtn_test.py"
141 CREATE_VLAN_TOPOLOGY_FILE_PATH = "MininetTopo/" +\
142                                  CREATE_VLAN_TOPOLOGY_FILE
143
144 # Mininet Custom Topology Path and File
145 CREATE_FULLYMESH_TOPOLOGY_FILE = "create_fullymesh.py"
146 CREATE_FULLYMESH_TOPOLOGY_FILE_PATH = "libraries/MininetTopo/" +\
147                                       CREATE_FULLYMESH_TOPOLOGY_FILE
148
149 # Mininet Custom Topology Path and File for Path Policy
150 CREATE_PATHPOLICY_TOPOLOGY_FILE = "topo-3sw-2host_multipath.py"
151 CREATE_PATHPOLICY_TOPOLOGY_FILE_PATH = "MininetTopo/" +\
152                                        CREATE_PATHPOLICY_TOPOLOGY_FILE
153
154 GBP_REGEP_API = "/restconf/operations/endpoint:register-endpoint"
155 GBP_UNREGEP_API = "/restconf/operations/endpoint:unregister-endpoint"
156 GBP_TENANTS_API = "/restconf/config/policy:tenants"
157 GBP_TUNNELS_API = "/restconf/config/opendaylight-inventory:nodes"
158
159 # LISP Flow Mapping variables
160 LFM_RPC_API = "/restconf/operations/mappingservice"
161 LFM_RPC_API_LI = "/restconf/operations/lfm-mapping-database"
162 LFM_SB_RPC_API = "/restconf/operations/lisp-sb"