CSIT-195: Update LISP test
[csit.git] / resources / libraries / robot / lisp / lisp_static_mapping.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 State mapping 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.LispRemoteMapping
21
22 *** Keywords ***
23 | Set up Lisp topology
24 | | [Documentation] | Set up Lisp static remote mapping topology.
25 | | ...
26 | | ... | *Arguments:*
27 | | ... | - dut1_node - DUT1 node. Type: dictionary
28 | | ... | - dut1_int_name - DUT1 node interface name. Type: string
29 | | ... | - dut1_int_index - DUT1 node interface index. Type: integer
30 | | ... | - dut2_node - DUT2 node. Type: dictionary
31 | | ... | - dut2_int_name - DUT2 node interface name. Type: string
32 | | ... | - dut2_int_index - DUT2 node interface index. Type: integer
33 | | ... | - locator_set - Locator set values. Type: dict
34 | | ... | - dut1_eid - Dut1 node eid address. Type: dict
35 | | ... | - dut2_eid - Dut2 node eid address. Type: dict
36 | | ... | - dut1_static_mapping - Dut1 static mapping address. Type: dict
37 | | ... | - dut2_static_mapping - Dut2 static mapping address. Type: dict
38 | | ...
39 | | ... | *Return:*
40 | | ... | - No value returned
41 | | ...
42 | | ... | *Example:*
43 | | ... | \| Set up Lisp topology \| ${dut1_node} \| ${interface_name} \
44 | | ... | \| None \| ${dut2_node} \| ${interface_name} \| None \
45 | | ... | \| ${locator_set} \| ${dut1_eid} \| ${dut2_eid} \
46 | | ... | \| ${dut1_static_mapping} \| ${dut2_static_mapping} \|
47 | | ...
48 | | [Arguments] | ${dut1_node} | ${dut1_int_name} | ${dut1_int_index}
49 | | ...         | ${dut2_node} | ${dut2_int_name} | ${dut2_int_index}
50 | | ...         | ${locator_set} | ${dut1_eid} | ${dut2_eid}
51 | | ...         | ${dut1_static_mapping} | ${dut2_static_mapping}
52 | | ${dut1_int_index}= | Run Keyword If | ${dut1_int_index} is None
53 | |                    | ... | Get Interface Sw Index | ${dut1_node}
54 | |                    | ...                          | ${dut1_int_name}
55 | |                    | ... | ELSE | Set Variable | ${dut1_int_index}
56 | | ${dut2_int_index}= | Run Keyword If | ${dut2_int_index} is None
57 | |                    | ... | Get Interface Sw Index | ${dut2_node}
58 | |                    | ...                          | ${dut2_int_name}
59 | |                    | ... | ELSE | Set Variable | ${dut2_int_index}
60 | | Enable Lisp | ${dut1_node}
61 | | Vpp Add Lisp Locator Set | ${dut1_node} | ${locator_set['locator_name']}
62 | | Vpp Add Lisp Locator | ${dut1_node} | ${locator_set['locator_name']}
63 | | ...                  | ${dut1_int_index} | ${locator_set['priority']}
64 | | ...                  | ${locator_set['weight']}
65 | | Vpp Add Lisp Local Eid | ${dut1_node} | ${dut1_eid['locator_name']}
66 | | ...                    | ${dut1_eid['vni']} | ${dut1_eid['eid']}
67 | | ...                    | ${dut1_eid['prefix']}
68 | | Vpp Add Lisp Remote Mapping | ${dut1_node} | ${dut1_static_mapping['vni']}
69 | | ...                         | ${dut1_static_mapping['deid']}
70 | | ...                         | ${dut1_static_mapping['prefix']}
71 | | ...                         | ${dut1_static_mapping['seid']}
72 | | ...                         | ${dut1_static_mapping['prefix']}
73 | | ...                         | ${dut1_static_mapping['rloc']}
74 | | Enable Lisp | ${dut2_node}
75 | | Vpp Add Lisp Locator Set | ${dut2_node} | ${locator_set['locator_name']}
76 | | Vpp Add Lisp Locator | ${dut2_node} | ${locator_set['locator_name']}
77 | | ...                  | ${dut2_int_index} | ${locator_set['priority']}
78 | | ...                  | ${locator_set['weight']}
79 | | Vpp Add Lisp Local Eid | ${dut2_node} | ${dut2_eid['locator_name']}
80 | | ...                    | ${dut2_eid['vni']} | ${dut2_eid['eid']}
81 | | ...                    | ${dut2_eid['prefix']}
82 | | Vpp Add Lisp Remote Mapping | ${dut2_node} | ${dut2_static_mapping['vni']}
83 | | ...                         | ${dut2_static_mapping['deid']}
84 | | ...                         | ${dut2_static_mapping['prefix']}
85 | | ...                         | ${dut2_static_mapping['seid']}
86 | | ...                         | ${dut2_static_mapping['prefix']}
87 | | ...                         | ${dut2_static_mapping['rloc']}