LISP - implement changes done in VPP-376
[csit.git] / resources / test_data / lisp / api / lisp_api_resources.py
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 """Test variables for Lisp API test suite."""
15
16 # Lisp status example test data.
17 lisp_status = [{"gpe_status":"disabled",
18                 "feature_status":"disabled"},
19                {"gpe_status":"enabled",
20                 "feature_status":"enabled"}]
21
22 # Example lisp local eid we want set to VPP
23 # and then check if it is set correctly.
24 eid_table = [{'eid': '192.168.0.0',
25               'vni': 0,
26               'eid-prefix-len': 24,
27               'locator': [],
28               'locator-set': 'ls1',
29               'ttl': 0,
30               'authoritative': 0},
31              {'eid': '192.168.1.0',
32               'vni': 0,
33               'eid-prefix-len': 24,
34               'locator': [],
35               'locator-set': 'ls1',
36               'ttl': 0,
37               'authoritative': 0},
38              {'eid': '192.168.2.0',
39               'vni': 0,
40               'eid-prefix-len': 24,
41               'locator': [],
42               'locator-set': 'ls1',
43               'ttl': 0,
44               'authoritative': 0},
45              {'eid': '192.168.3.0',
46               'vni': 0,
47               'eid-prefix-len': 24,
48               'locator': [],
49               'locator-set': 'ls1',
50               'ttl': 0,
51               'authoritative': 0},
52              {'eid': '10:1::',
53               'vni': 0,
54               'eid-prefix-len': 64,
55               'locator': [],
56               'locator-set': 'ls1',
57               'ttl': 0,
58               'authoritative': 0},
59              {'eid': '10:2::',
60               'vni': 0,
61               'eid-prefix-len': 64,
62               'locator': [],
63               'locator-set': 'ls1',
64               'ttl': 0,
65               'authoritative': 0},
66              {'eid': '10:3::',
67               'vni': 0,
68               'eid-prefix-len': 64,
69               'locator': [],
70               'locator-set': 'ls1',
71               'ttl': 0,
72               'authoritative': 0}]
73
74 # Expected data from VPP via VAT
75 eid_table_vat = [
76     {
77         "action": 0,
78         "is_local": 1,
79         "eid": "192.168.0.0/24",
80         "vni": 0,
81         "ttl": 0,
82         "authoritative": 0
83     },
84     {
85         "action": 0,
86         "is_local": 1,
87         "eid": "192.168.1.0/24",
88         "vni": 0,
89         "ttl": 0,
90         "authoritative": 0
91     },
92     {
93         "action": 0,
94         "is_local": 1,
95         "eid": "192.168.2.0/24",
96         "vni": 0,
97         "ttl": 0,
98         "authoritative": 0
99     },
100     {
101         "action": 0,
102         "is_local": 1,
103         "eid": "192.168.3.0/24",
104         "vni": 0,
105         "ttl": 0,
106         "authoritative": 0
107     },
108     {
109         "action": 0,
110         "is_local": 1,
111         "eid": "10:1::/64",
112         "vni": 0,
113         "ttl": 0,
114         "authoritative": 0
115     },
116     {
117         "action": 0,
118         "is_local": 1,
119         "eid": "10:2::/64",
120         "vni": 0,
121         "ttl": 0,
122         "authoritative": 0
123     },
124     {
125         "action": 0,
126         "is_local": 1,
127         "eid": "10:3::/64",
128         "vni": 0,
129         "ttl": 0,
130         "authoritative": 0
131     }
132 ]
133
134 # Example lisp map resolvers data we want set to VPP
135 # and then check if it is set correctly.
136 map_resolver = [{'map resolver': '192.169.0.1'},
137                 {'map resolver': '192.169.1.1'},
138                 {'map resolver': '192.169.2.1'},
139                 {'map resolver': '12:1::1'},
140                 {'map resolver': '12:2::1'}]