a646240efeb80f48a27ec5c1104c656e3ee64f3c
[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 ACCEPT_JSON = {'Accept': 'application/json'}
24 ODL_CONTROLLER_SESSION = None
25 TOPO_TREE_LEVEL = 2
26 TOPO_TREE_DEPTH = 3
27 TOPO_TREE_FANOUT = 2
28 CONTROLLERS = ['CONTROLLER', 'CONTROLLER1', 'CONTROLLER2']
29 CONTROLLER_PASSWORD = ''  # empty means use keys
30 MININET_PASSWORD = ''  # empty means use keys
31 KEYFILE_PASS = 'any'
32 SSH_KEY = 'id_rsa'
33 CONTROLLER_STOP_TIMEOUT = 120  # Max number of seconds test will wait for a controller to stop
34
35 # KARAF Variaable
36 KARAF_SHELL_PORT = '8101'
37 KARAF_PROMPT = 'opendaylight-user'
38 KARAF_USER = 'karaf'
39 KARAF_PASSWORD = 'karaf'
40
41 # VM Environment Variables
42 DEFAULT_LINUX_PROMPT = '>'
43
44 # VTN Coordinator Variables
45 VTNC = '127.0.0.1'
46 VTNCPORT = '8083'
47 VTNC_PREFIX = 'http://' + VTNC + ':' + VTNCPORT
48 VTNC_HEADERS = {'Content-Type': 'application/json',
49                 'username': 'admin', 'password': 'adminpass'}
50
51 VTNWEBAPI = '/vtn-webapi'
52 # controllers URL
53 CTRLS_CREATE = 'controllers.json'
54 CTRLS = 'controllers'
55 SW = 'switches'
56
57 # vtn URL
58 VTNS_CREATE = 'vtns.json'
59 VTNS = 'vtns'
60
61 # vbridge URL
62 VBRS_CREATE = 'vbridges.json'
63 VBRS = 'vbridges'
64
65 # interfaces URL
66 VBRIFS_CREATE = 'interfaces.json'
67 VBRIFS = 'interfaces'
68
69 # portmap URL
70 PORTMAP_CREATE = 'portmap.json'
71
72 # vlanmap URL
73 VLANMAP_CREATE = 'vlanmaps.json'
74
75 # ports URL
76 PORTS = 'ports/detail.json'
77
78 # flowlist URL
79 FLOWLISTS_CREATE = 'flowlists.json'
80
81 # flowlistentry_URL
82 FLOWLISTENTRIES_CREATE = 'flowlistentries.json'
83 FLOWLISTS = 'flowlists'
84
85 # flowfilter_URL
86 FLOWFILTERS_CREATE = 'flowfilters.json'
87 FLOWFILTERENTRIES_CREATE = 'flowfilterentries.json'
88 FLOWFILTERS = 'flowfilters/in'
89 FLOWFILTERS_UPDATE = 'flowfilterentries'
90
91
92 # Common APIs
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:' \
97                        '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
106 # TOKEN
107 AUTH_TOKEN_API = '/oauth2/token'
108 REVOKE_TOKEN_API = '/oauth2/revoke'
109
110 # Base Mininet Mac address. DPID of mininet switches will be derived from this.
111 BASE_MAC_1 = '00:4b:00:00:00:00'
112 # Base IP of mininet hosts
113 BASE_IP_1 = '75.75.0.0'
114
115 # Mininet Custom Topology Path and File
116 CREATE_FULLYMESH_TOPOLOGY_FILE = "create_fullymesh.py"
117 CREATE_FULLYMESH_TOPOLOGY_FILE_PATH = "libraries/MininetTopo/" +\
118                                       CREATE_FULLYMESH_TOPOLOGY_FILE
119
120 GBP_REGEP_API = "/restconf/operations/endpoint:register-endpoint"
121 GBP_UNREGEP_API = "/restconf/operations/endpoint:unregister-endpoint"
122 GBP_TENANTS_API = "/restconf/config/policy:tenants"
123 GBP_TUNNELS_API = "/restconf/config/opendaylight-inventory:nodes"