8769b17e1856d5d502f8c5b3d61abe527323860d
[csit.git] / tests / suites / lisp / lisp_api_untagged.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 API test.
16 | Library | resources.libraries.python.topology.Topology
17 | Library | resources.libraries.python.NodePath
18 | Library | resources.libraries.python.Trace
19 | Library | resources.libraries.python.LispUtil
20 | Resource | resources/libraries/robot/default.robot
21 | Resource | resources/libraries/robot/interfaces.robot
22 | Resource | resources/libraries/robot/lisp/lisp_api.robot
23 # import additional Lisp settings from resource file
24 | Variables | tests/suites/lisp/resources/lisp_api_resources.py
25 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO
26 | ... | VM_ENV | HW_ENV
27 | Test Setup | Run Keywords | Setup all DUTs before test
28 | ...        | AND          | Setup all TGs before traffic script
29 | ...        | AND          | Update All Interface Data On All Nodes | ${nodes}
30 | Test Teardown | Show Packet Trace on All DUTs | ${nodes}
31
32 *** Variables ***
33 | ${locator_set_num}= | 3
34
35 *** Test Cases ***
36
37 Vpp can enable and disable Lisp
38 | | [Documentation] | Test lisp enable/disable API.
39 | | ...             | Enable lisp on the VPP node,
40 | | ...             | check if the lisp on the vpp node is enabled.
41 | | ...             | Then disable lisp on the vpp node and check if
42 | | ...             | the lisp is disabled on the vpp node.
43 | | When Enable lisp | ${nodes['DUT1']}
44 | | Then Check if lisp is enabled | ${nodes['DUT1']} | ${lisp_status}
45 | | When Disable lisp | ${nodes['DUT1']}
46 | | Then Check if lisp is disabled | ${nodes['DUT1']} | ${lisp_status}
47
48 | VPP can add and delete locator_set
49 | | [Documentation] | Test lisp locator_set API
50 | | ...             | Set locator_set and locator on the VPP node,
51 | | ...             | check the configured data and then remove it.
52 | | ...             | Check if all locator_set and locators was unset
53 | | ...             | from the VPP node.
54 | | ...
55 | | Given Lisp locator_set data is prepared
56 | | ... | ${nodes['DUT1']} | ${locator_set_num}
57 | | And   Enable lisp | ${nodes['DUT1']}
58 | | When Lisp locator_set data is set | ${nodes['DUT1']}
59 | | Then Lisp locator_set is set correctly | ${nodes['DUT1']}
60 | | When Delete all lisp locator_set from VPP | ${nodes['DUT1']}
61 | | Then Lisp locator_set should be unset | ${nodes['DUT1']}
62
63 | VPP can add, reset and delete locator_set
64 | | [Documentation] | Test lisp locator_set API
65 | | ...             | Set locator_set and locator on the VPP node,
66 | | ...             | then reset locator_set and set it again.
67 | | ...             | Check the configured data and then remove it.
68 | | ...             | Check if all locator_set and locators was unset
69 | | ...             | from the VPP node.
70 | | ...
71 | | Given Lisp locator_set data use for test reset locator_set are prepared
72 | | ... | ${nodes['DUT1']} | ${locator_set_num}
73 | | And   Enable lisp | ${nodes['DUT1']}
74 | | When Lisp locator_set data is set | ${nodes['DUT1']}
75 | | Then Lisp locator_set is set correctly | ${nodes['DUT1']}
76 | | When Delete all lisp locator_set from VPP | ${nodes['DUT1']}
77 | | Then Lisp locator_set should be unset | ${nodes['DUT1']}
78
79 | Vpp can add and delete eid address
80 | | [Documentation] | Test lisp eid API
81 | | ...             | Set lisp eid IP address on the VPP node,
82 | | ...             | check the configured data and then remove it.
83 | | ...             | Check if all eid IP address was unset
84 | | ...             | from the VPP node.
85 | | ...
86 | | Given Enable lisp | ${nodes['DUT1']}
87 | | When Lisp eid address is set | ${nodes['DUT1']} | ${eid_table}
88 | | Then Lisp eid address is set correctly to eid table | ${nodes['DUT1']}
89 | | ...                                                 | ${eid_table}
90 | | When Delete all lisp eid address from VPP | ${nodes['DUT1']} | ${eid_table}
91 | | Then Lisp eid table should be empty | ${nodes['DUT1']}
92
93 | Vpp can add and delete lisp map resolver address
94 | | [Documentation] | Test lisp map resolver address API
95 | | ...             | Set lisp map resolver address on the VPP node,
96 | | ...             | check the configured data and then remove it.
97 | | ...             | Check if all map resolver address was unset
98 | | ...             | from the VPP node.
99 | | ...
100 | | Given Enable lisp | ${nodes['DUT1']}
101 | | When Lisp map resolver address is set | ${nodes['DUT1']} | ${map_resolver}
102 | | Then Lisp map resolver address is set correctly | ${nodes['DUT1']}
103 | | ...                                             | ${map_resolver}
104 | | When Delete all lisp map resolver address from VPP | ${nodes['DUT1']}
105 | | ...                                                | ${map_resolver}
106 | | Then Lip map resolver address should be empty | ${nodes['DUT1']}