79e26c5dc95912246a4668ab34dd5779c5f69151
[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
23 *** Keywords ***
24 | Set up Lisp topology
25 | | [Documentation] | Set up Lisp static adjacency topology.
26 | | ...
27 | | ... | *Arguments:*
28 | | ... | - dut1_node - DUT1 node. Type: dictionary
29 | | ... | - dut1_int_name - DUT1 node interface name. Type: string
30 | | ... | - dut1_int_index - DUT1 node interface index. Type: integer
31 | | ... | - dut2_node - DUT2 node. Type: dictionary
32 | | ... | - dut2_int_name - DUT2 node interface name. Type: string
33 | | ... | - dut2_int_index - DUT2 node interface index. Type: integer
34 | | ... | - locator_set - Locator set values. Type: dictionary
35 | | ... | - dut1_eid - Dut1 node eid address. Type: dictionary
36 | | ... | - dut2_eid - Dut2 node eid address. Type: dictionary
37 | | ... | - dut1_static_adjacency - Dut1 static adjacency. Type: dictionary
38 | | ... | - dut2_static_adjacency - Dut2 static address. Type: dictionary
39 | | ...
40 | | ... | *Return:*
41 | | ... | - No value returned
42 | | ...
43 | | ... | *Example:*
44 | | ... | \| Set up Lisp topology \| ${dut1_node} \| ${interface_name} \
45 | | ... | \| None \| ${dut2_node} \| ${interface_name} \| None \
46 | | ... | \| ${locator_set} \| ${dut1_eid} \| ${dut2_eid} \
47 | | ... | \| ${dut1_static_adjacency} \| ${dut2_static_adjacency} \|
48 | | ...
49 | | [Arguments] | ${dut1_node} | ${dut1_int_name} | ${dut1_int_index}
50 | | ...         | ${dut2_node} | ${dut2_int_name} | ${dut2_int_index}
51 | | ...         | ${locator_set} | ${dut1_eid} | ${dut2_eid}
52 | | ...         | ${dut1_static_adjacency} | ${dut2_static_adjacency}
53 | | ${dut1_int_index}= | Run Keyword If | ${dut1_int_index} is None
54 | |                    | ... | Get Interface Sw Index | ${dut1_node}
55 | |                    | ...                          | ${dut1_int_name}
56 | |                    | ... | ELSE | Set Variable | ${dut1_int_index}
57 | | ${dut2_int_index}= | Run Keyword If | ${dut2_int_index} is None
58 | |                    | ... | Get Interface Sw Index | ${dut2_node}
59 | |                    | ...                          | ${dut2_int_name}
60 | |                    | ... | ELSE | Set Variable | ${dut2_int_index}
61 | | Enable Lisp | ${dut1_node}
62 | | Vpp Add Lisp Locator Set | ${dut1_node} | ${locator_set['locator_name']}
63 | | Vpp Add Lisp Locator | ${dut1_node} | ${locator_set['locator_name']}
64 | | ...                  | ${dut1_int_index} | ${locator_set['priority']}
65 | | ...                  | ${locator_set['weight']}
66 | | Vpp Add Lisp Local Eid | ${dut1_node} | ${dut1_eid['locator_name']}
67 | | ...                    | ${dut1_eid['vni']} | ${dut1_eid['eid']}
68 | | ...                    | ${dut1_eid['prefix']}
69 | | Vpp Add Lisp Remote Mapping | ${dut1_node} | ${dut1_static_adjacency['vni']}
70 | | ...                         | ${dut1_static_adjacency['deid']}
71 | | ...                         | ${dut1_static_adjacency['prefix']}
72 | | ...                         | ${dut1_static_adjacency['seid']}
73 | | ...                         | ${dut1_static_adjacency['prefix']}
74 | | ...                         | ${dut1_static_adjacency['rloc']}
75 | | Vpp Add Lisp Adjacency | ${dut1_node} | ${dut1_static_adjacency['vni']}
76 | | ...                    | ${dut1_static_adjacency['deid']}
77 | | ...                    | ${dut1_static_adjacency['prefix']}
78 | | ...                    | ${dut1_static_adjacency['seid']}
79 | | ...                    | ${dut1_static_adjacency['prefix']}
80 | | Enable Lisp | ${dut2_node}
81 | | Vpp Add Lisp Locator Set | ${dut2_node} | ${locator_set['locator_name']}
82 | | Vpp Add Lisp Locator | ${dut2_node} | ${locator_set['locator_name']}
83 | | ...                  | ${dut2_int_index} | ${locator_set['priority']}
84 | | ...                  | ${locator_set['weight']}
85 | | Vpp Add Lisp Local Eid | ${dut2_node} | ${dut2_eid['locator_name']}
86 | | ...                    | ${dut2_eid['vni']} | ${dut2_eid['eid']}
87 | | ...                    | ${dut2_eid['prefix']}
88 | | Vpp Add Lisp Remote Mapping | ${dut2_node} | ${dut2_static_adjacency['vni']}
89 | | ...                         | ${dut2_static_adjacency['deid']}
90 | | ...                         | ${dut2_static_adjacency['prefix']}
91 | | ...                         | ${dut2_static_adjacency['seid']}
92 | | ...                         | ${dut2_static_adjacency['prefix']}
93 | | ...                         | ${dut2_static_adjacency['rloc']}
94 | | Vpp Add Lisp Adjacency | ${dut2_node} | ${dut2_static_adjacency['vni']}
95 | | ...                    | ${dut2_static_adjacency['deid']}
96 | | ...                    | ${dut2_static_adjacency['prefix']}
97 | | ...                    | ${dut2_static_adjacency['seid']}
98 | | ...                    | ${dut2_static_adjacency['prefix']}