Moved the karaf logging keywords to KarafKeywords
[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 ESCAPE_CHARACTER = chr(int(27))
38 KARAF_DETAILED_PROMPT = '@' + ESCAPE_CHARACTER + '[0m' + ESCAPE_CHARACTER + '[34mroot' + ESCAPE_CHARACTER + '[0m>'
39 KARAF_PROMPT = 'opendaylight-user'
40 KARAF_USER = 'karaf'
41 KARAF_PASSWORD = 'karaf'
42
43 # BGP variables
44 ODL_BGP_PORT = '1790'
45 BGP_TOOL_PORT = '17900'
46
47 # VM Environment Variables
48 DEFAULT_LINUX_PROMPT = '>'
49
50 # VTN Coordinator Variables
51 VTNC = '127.0.0.1'
52 VTNCPORT = '8083'
53 VTNC_PREFIX = 'http://' + VTNC + ':' + VTNCPORT
54 VTNC_HEADERS = {'Content-Type': 'application/json',
55                 'username': 'admin', 'password': 'adminpass'}
56
57 VTNWEBAPI = '/vtn-webapi'
58 # controllers URL
59 CTRLS_CREATE = 'controllers.json'
60 CTRLS = 'controllers'
61 SW = 'switches'
62
63 # vtn URL
64 VTNS_CREATE = 'vtns.json'
65 VTNS = 'vtns'
66
67 # vbridge URL
68 VBRS_CREATE = 'vbridges.json'
69 VBRS = 'vbridges'
70
71 # interfaces URL
72 VBRIFS_CREATE = 'interfaces.json'
73 VBRIFS = 'interfaces'
74
75 # portmap URL
76 PORTMAP_CREATE = 'portmap.json'
77
78 # vlanmap URL
79 VLANMAP_CREATE = 'vlanmaps.json'
80
81 # ports URL
82 PORTS = 'ports/detail.json'
83
84 # flowlist URL
85 FLOWLISTS_CREATE = 'flowlists.json'
86
87 # flowlistentry_URL
88 FLOWLISTENTRIES_CREATE = 'flowlistentries.json'
89 FLOWLISTS = 'flowlists'
90
91 # flowfilter_URL
92 FLOWFILTERS_CREATE = 'flowfilters.json'
93 FLOWFILTERENTRIES_CREATE = 'flowfilterentries.json'
94 FLOWFILTERS = 'flowfilters/in'
95 FLOWFILTERS_UPDATE = 'flowfilterentries'
96
97
98 # Common APIs
99 CONFIG_NODES_API = '/restconf/config/opendaylight-inventory:nodes'
100 OPERATIONAL_NODES_API = '/restconf/operational/opendaylight-inventory:nodes'
101 OPERATIONAL_NODES_NETVIRT = '/restconf/operational/network-topology:network-topology/topology/netvirt:1'
102 OPERATIONAL_TOPO_API = '/restconf/operational/network-topology:' \
103                        'network-topology'
104 CONFIG_TOPO_API = '/restconf/config/network-topology:network-topology'
105 CONTROLLER_CONFIG_MOUNT = ('/restconf/config/network-topology:'
106                            'network-topology/topology'
107                            '/topology-netconf/node/'
108                            'controller-config/yang-ext:mount')
109 CONFIG_API = '/restconf/config'
110 OPERATIONAL_API = '/restconf/operational'
111
112 # TOKEN
113 AUTH_TOKEN_API = '/oauth2/token'
114 REVOKE_TOKEN_API = '/oauth2/revoke'
115
116 # Base Mininet Mac address. DPID of mininet switches will be derived from this.
117 BASE_MAC_1 = '00:4b:00:00:00:00'
118 # Base IP of mininet hosts
119 BASE_IP_1 = '75.75.0.0'
120
121 # Vlan Custom Topology Path and File
122 CREATE_VLAN_TOPOLOGY_FILE = "vlan_vtn_test.py"
123 CREATE_VLAN_TOPOLOGY_FILE_PATH = "MininetTopo/" +\
124                                  CREATE_VLAN_TOPOLOGY_FILE
125
126 # Mininet Custom Topology Path and File
127 CREATE_FULLYMESH_TOPOLOGY_FILE = "create_fullymesh.py"
128 CREATE_FULLYMESH_TOPOLOGY_FILE_PATH = "libraries/MininetTopo/" +\
129                                       CREATE_FULLYMESH_TOPOLOGY_FILE
130
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"
135
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"