CSIT-604: Bootstrap file for vpp-csit-verify-master-centos7-nightly
[csit.git] / resources / libraries / robot / lisp / lisp_static_adjacency.robot
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 *** Settings ***
15 | Documentation | Lisp static adjacency suite keywords
16 | Resource | resources/libraries/robot/lisp/lisp_api.robot
17 | Library  | resources.libraries.python.LispSetup.LispLocatorSet
18 | Library  | resources.libraries.python.LispSetup.LispLocator
19 | Library  | resources.libraries.python.LispSetup.LispLocalEid
20 | Library  | resources.libraries.python.LispSetup.LispAdjacency
21 | Library  | resources.libraries.python.LispSetup.LispRemoteMapping
22 | Library  | resources.libraries.python.IPv4Util.IPv4Util
23
24 *** Keywords ***
25 | Configure LISP topology in 3-node circular topology
26 | | [Documentation] | Set up Lisp static adjacency topology.
27 | | ...
28 | | ... | *Arguments:*
29 | | ... | - dut1_node - DUT1 node. Type: dictionary
30 | | ... | - dut1_int_name - DUT1 node interface name. Type: string
31 | | ... | - dut1_int_index - DUT1 node interface index. Type: integer
32 | | ... | - dut2_node - DUT2 node. Type: dictionary
33 | | ... | - dut2_int_name - DUT2 node interface name. Type: string
34 | | ... | - dut2_int_index - DUT2 node interface index. Type: integer
35 | | ... | - locator_set - Locator set values. Type: dictionary
36 | | ... | - dut1_eid - Dut1 node eid address. Type: dictionary
37 | | ... | - dut2_eid - Dut2 node eid address. Type: dictionary
38 | | ... | - dut1_static_adjacency - Dut1 static adjacency. Type: dictionary
39 | | ... | - dut2_static_adjacency - Dut2 static address. Type: dictionary
40 | | ...
41 | | ... | *Return:*
42 | | ... | - No value returned
43 | | ...
44 | | ... | *Example:*
45 | | ... | \| Configure LISP topology in 3-node circular topology \| ${dut1_node} \| ${interface_name} \
46 | | ... | \| None \| ${dut2_node} \| ${interface_name} \| None \
47 | | ... | \| ${locator_set} \| ${dut1_eid} \| ${dut2_eid} \
48 | | ... | \| ${dut1_static_adjacency} \| ${dut2_static_adjacency} \|
49 | | ...
50 | | [Arguments] | ${dut1_node} | ${dut1_int_name} | ${dut1_int_index}
51 | | ...         | ${dut2_node} | ${dut2_int_name} | ${dut2_int_index}
52 | | ...         | ${locator_set} | ${dut1_eid} | ${dut2_eid}
53 | | ...         | ${dut1_static_adjacency} | ${dut2_static_adjacency}
54 | | ${dut1_int_index}= | Run Keyword If | ${dut1_int_index} is None
55 | |                    | ... | Get Interface Sw Index | ${dut1_node}
56 | |                    | ...                          | ${dut1_int_name}
57 | |                    | ... | ELSE | Set Variable | ${dut1_int_index}
58 | | ${dut2_int_index}= | Run Keyword If | ${dut2_int_index} is None
59 | |                    | ... | Get Interface Sw Index | ${dut2_node}
60 | |                    | ...                          | ${dut2_int_name}
61 | |                    | ... | ELSE | Set Variable | ${dut2_int_index}
62 | | Enable Lisp | ${dut1_node}
63 | | Vpp Add Lisp Locator Set | ${dut1_node} | ${locator_set['locator_name']}
64 | | Vpp Add Lisp Locator | ${dut1_node} | ${locator_set['locator_name']}
65 | | ...                  | ${dut1_int_index} | ${locator_set['priority']}
66 | | ...                  | ${locator_set['weight']}
67 | | Vpp Add Lisp Local Eid | ${dut1_node} | ${dut1_eid['locator_name']}
68 | | ...                    | ${dut1_eid['vni']} | ${dut1_eid['eid']}
69 | | ...                    | ${dut1_eid['prefix']}
70 | | Vpp Add Lisp Remote Mapping | ${dut1_node} | ${dut1_static_adjacency['vni']}
71 | | ...                         | ${dut1_static_adjacency['deid']}
72 | | ...                         | ${dut1_static_adjacency['prefix']}
73 | | ...                         | ${dut1_static_adjacency['seid']}
74 | | ...                         | ${dut1_static_adjacency['prefix']}
75 | | ...                         | ${dut1_static_adjacency['rloc']}
76 | | Vpp Add Lisp Adjacency | ${dut1_node} | ${dut1_static_adjacency['vni']}
77 | | ...                    | ${dut1_static_adjacency['deid']}
78 | | ...                    | ${dut1_static_adjacency['prefix']}
79 | | ...                    | ${dut1_static_adjacency['seid']}
80 | | ...                    | ${dut1_static_adjacency['prefix']}
81 | | Enable Lisp | ${dut2_node}
82 | | Vpp Add Lisp Locator Set | ${dut2_node} | ${locator_set['locator_name']}
83 | | Vpp Add Lisp Locator | ${dut2_node} | ${locator_set['locator_name']}
84 | | ...                  | ${dut2_int_index} | ${locator_set['priority']}
85 | | ...                  | ${locator_set['weight']}
86 | | Vpp Add Lisp Local Eid | ${dut2_node} | ${dut2_eid['locator_name']}
87 | | ...                    | ${dut2_eid['vni']} | ${dut2_eid['eid']}
88 | | ...                    | ${dut2_eid['prefix']}
89 | | Vpp Add Lisp Remote Mapping | ${dut2_node} | ${dut2_static_adjacency['vni']}
90 | | ...                         | ${dut2_static_adjacency['deid']}
91 | | ...                         | ${dut2_static_adjacency['prefix']}
92 | | ...                         | ${dut2_static_adjacency['seid']}
93 | | ...                         | ${dut2_static_adjacency['prefix']}
94 | | ...                         | ${dut2_static_adjacency['rloc']}
95 | | Vpp Add Lisp Adjacency | ${dut2_node} | ${dut2_static_adjacency['vni']}
96 | | ...                    | ${dut2_static_adjacency['deid']}
97 | | ...                    | ${dut2_static_adjacency['prefix']}
98 | | ...                    | ${dut2_static_adjacency['seid']}
99 | | ...                    | ${dut2_static_adjacency['prefix']}
100
101 | Change LISP Configuration
102 | | [Documentation] | Change configuration of the Lisp protocol.
103 | | ...
104 | | ... | *Arguments:*
105 | | ... | - dut1_node - DUT1 node. Type: dictionary
106 | | ... | - dut2_node - DUT2 node. Type: dictionary
107 | | ... | - dut1_to_dut2 - DUT1 towards DUT2 interface name. Type: string
108 | | ... | - dut2_to_dut1 - DUT2 towards DUT1 interface name. Type: string
109 | | ... | - dut1_to_dut2_mac - DUT1 towards DUT2 interface mac address.
110 | | ... |                      Type: string
111 | | ... | - dut2_to_dut1_mac - DUT2 towards DUT1 interface mac address.
112 | | ... |                      Type: string
113 | | ... | - new_dut1_ip - New DUT1 towards DUT2 interface IP address.
114 | | ... |                 Type: string
115 | | ... | - new_dut2_ip - New DUT2 towards DUT1 interface IP address.
116 | | ... |                 Type: string
117 | | ... | - prefix - Prefix of the DUT nodes. Type: integer
118 | | ... | - old_dut1_static_adjacency - Old DUT1 static adjacency.
119 | | ... |                               Type: dictionary
120 | | ... | - new_dut1_static_adjacency - New DUT1 static adjacency.
121 | | ... |                               Type: dictionary
122 | | ...
123 | | ... | *Return:*
124 | | ... | - No value returned
125 | | ...
126 | | ... | *Example:*
127 | | ... | \| Change LISP Configuration \| ${dut1_node} \| ${dut2_node} \
128 | | ... | \| ${dut1_to_dut2} \| ${dut2_to_dut1} | "08:00:27:20:e0:0d" \
129 | | ... | \| "08:00:27:b1:94:b1" \| "6.3.0.1" \| "6.3.0.20" \| "24" \
130 | | ... | \| ${old_dut1_static_adjacency} \| ${new_dut1_static_adjacency} \|
131 | | ...
132 | | [Arguments] | ${dut1_node} | ${dut2_node} | ${dut1_to_dut2}
133 | | ...         | ${dut2_to_dut1} | ${dut1_to_dut2_mac} | ${dut2_to_dut1_mac}
134 | | ...         | ${new_dut1_ip} | ${new_dut2_ip} | ${prefix}
135 | | ...         | ${old_dut1_static_adjacency} | ${new_dut1_static_adjacency}
136 | | Flush IPv4 Addresses "${dut2_to_dut1}" "${dut2_node}"
137 | | Vpp Del Lisp Remote Mapping | ${dut1_node}
138 | | ...                         | ${old_dut1_static_adjacency['vni']}
139 | | ...                         | ${old_dut1_static_adjacency['deid']}
140 | | ...                         | ${old_dut1_static_adjacency['prefix']}
141 | | ...                         | ${old_dut1_static_adjacency['seid']}
142 | | ...                         | ${old_dut1_static_adjacency['prefix']}
143 | | ...                         | ${old_dut1_static_adjacency['rloc']}
144 | | Vpp Del Lisp Adjacency | ${dut1_node}
145 | | ...                    | ${old_dut1_static_adjacency['vni']}
146 | | ...                    | ${old_dut1_static_adjacency['deid']}
147 | | ...                    | ${old_dut1_static_adjacency['prefix']}
148 | | ...                    | ${old_dut1_static_adjacency['seid']}
149 | | ...                    | ${old_dut1_static_adjacency['prefix']}
150 | | Set Interface Address | ${dut2_node} | ${dut2_to_dut1}
151 | | ...                   | ${new_dut2_ip} | ${prefix}
152 | | Add Arp On Dut | ${dut1_node} | ${dut1_to_dut2} | ${new_dut2_ip}
153 | | ...            | ${dut2_to_dut1_mac}
154 | | Add Arp On Dut | ${dut2_node} | ${dut2_to_dut1} | ${new_dut1_ip}
155 | | ...            | ${dut1_to_dut2_mac}
156 | | Vpp Add Lisp Remote Mapping | ${dut1_node}
157 | | ...                         | ${new_dut1_static_adjacency['vni']}
158 | | ...                         | ${new_dut1_static_adjacency['deid']}
159 | | ...                         | ${new_dut1_static_adjacency['prefix']}
160 | | ...                         | ${new_dut1_static_adjacency['seid']}
161 | | ...                         | ${new_dut1_static_adjacency['prefix']}
162 | | ...                         | ${new_dut1_static_adjacency['rloc']}
163 | | Vpp Add Lisp Adjacency | ${dut1_node}
164 | | ...                    | ${new_dut1_static_adjacency['vni']}
165 | | ...                    | ${new_dut1_static_adjacency['deid']}
166 | | ...                    | ${new_dut1_static_adjacency['prefix']}
167 | | ...                    | ${new_dut1_static_adjacency['seid']}
168 | | ...                    | ${new_dut1_static_adjacency['prefix']}