17e6f3adf3bcfcdf5eb4681db6dde4b81d1be868
[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 CONTROLLER = '127.0.0.1'
9 PORT = '8080'
10 RESTPORT = '8282'
11 RESTCONFPORT = '8181'
12 PREFIX = 'http://' + CONTROLLER + ':' + PORT
13 PROMPT = '>'  # TODO: remove this as it's vague.  need to fix any occurances of it first.
14 CONTAINER = 'default'
15 USER = 'admin'  # TODO: who is using this?  Can we make it more specific? (e.g.  RESTCONF_USER)
16 PWD = 'admin'
17 PASSWORD = 'EMPTY'
18 AUTH = [u'admin', u'admin']
19 SCOPE = 'sdn'
20 HEADERS = {'Content-Type': 'application/json'}
21 HEADERS_XML = {'Content-Type': 'application/xml'}
22 ACCEPT_XML = {'Accept': 'application/xml'}
23 ODL_CONTROLLER_SESSION = None
24 TOPO_TREE_LEVEL = 2
25 TOPO_TREE_DEPTH = 3
26 TOPO_TREE_FANOUT = 2
27 CONTROLLERS = ['CONTROLLER', 'CONTROLLER1', 'CONTROLLER2']
28 CONTROLLER_PASSWORD = ''  # empty means use keys
29 MININET_PASSWORD = ''  # empty means use keys
30 KEYFILE_PASS = 'any'
31 SSH_KEY = 'id_rsa'
32 CONTROLLER_STOP_TIMEOUT = 120  # Max number of seconds test will wait for a controller to stop
33
34 # KARAF Variaable
35 KARAF_SHELL_PORT = '8101'
36 KARAF_PROMPT = 'opendaylight-user'
37 KARAF_USER = 'karaf'
38 KARAF_PASSWORD = 'karaf'
39
40 # VM Environment Variables
41 DEFAULT_LINUX_PROMPT = '>'
42
43 # VTN Coordinator Variables
44 VTNC = '127.0.0.1'
45 VTNCPORT = '8083'
46 VTNC_PREFIX = 'http://' + VTNC + ':' + VTNCPORT
47 VTNC_HEADERS = {'Content-Type': 'application/json',
48                 'username': 'admin', 'password': 'adminpass'}
49
50 VTNWEBAPI = '/vtn-webapi'
51 # controllers URL
52 CTRLS_CREATE = 'controllers.json'
53 CTRLS = 'controllers'
54 SW = 'switches'
55
56 # vtn URL
57 VTNS_CREATE = 'vtns.json'
58 VTNS = 'vtns'
59
60 # vbridge URL
61 VBRS_CREATE = 'vbridges.json'
62 VBRS = 'vbridges'
63
64 # interfaces URL
65 VBRIFS_CREATE = 'interfaces.json'
66 VBRIFS = 'interfaces'
67
68 # portmap URL
69 PORTMAP_CREATE = 'portmap.json'
70
71 # vlanmap URL
72 VLANMAP_CREATE = 'vlanmaps.json'
73
74 # ports URL
75 PORTS = 'ports/detail.json'
76
77 # Common APIs
78 CONFIG_NODES_API = '/restconf/config/opendaylight-inventory:nodes'
79 OPERATIONAL_NODES_API = '/restconf/operational/opendaylight-inventory:nodes'
80 OPERATIONAL_NODES_NETVIRT = '/restconf/operational/network-topology:network-topology/topology/netvirt:1'
81 OPERATIONAL_TOPO_API = '/restconf/operational/network-topology:' \
82                        'network-topology'
83 CONFIG_TOPO_API = '/restconf/config/network-topology:network-topology'
84 CONTROLLER_CONFIG_MOUNT = ('/restconf/config/network-topology:'
85                            'network-topology/topology'
86                            '/topology-netconf/node/'
87                            'controller-config/yang-ext:mount')
88 CONFIG_API = '/restconf/config'
89 OPERATIONAL_API = '/restconf/operational'
90
91 # TOKEN
92 AUTH_TOKEN_API = '/oauth2/token'
93 REVOKE_TOKEN_API = '/oauth2/revoke'
94
95 # Base Mininet Mac address. DPID of mininet switches will be derived from this.
96 BASE_MAC_1 = '00:4b:00:00:00:00'
97 # Base IP of mininet hosts
98 BASE_IP_1 = '75.75.0.0'
99
100 # Mininet Custom Topology Path and File
101 CREATE_FULLYMESH_TOPOLOGY_FILE = "create_fullymesh.py"
102 CREATE_FULLYMESH_TOPOLOGY_FILE_PATH = "libraries/MininetTopo/" +\
103                                       CREATE_FULLYMESH_TOPOLOGY_FILE
104
105 GBP_REGEP_API = "/restconf/operations/endpoint:register-endpoint"
106 GBP_UNREGEP_API = "/restconf/operations/endpoint:unregister-endpoint"
107 GBP_TENANTS_API = "/restconf/config/policy:tenants"
108 GBP_TUNNELS_API = "/restconf/config/opendaylight-inventory:nodes"