b627cad8a96e60fba0ba74e9a1e7e4f335dae594
[csit.git] / tests / func / lisp / api-crud-lisp-func.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 | Library | resources.libraries.python.topology.Topology
16 | Library | resources.libraries.python.NodePath
17 | Library | resources.libraries.python.Trace
18 | Library | resources.libraries.python.LispUtil
19 | Resource | resources/libraries/robot/default.robot
20 | Resource | resources/libraries/robot/interfaces.robot
21 | Resource | resources/libraries/robot/lisp/lisp_api.robot
22 # import additional Lisp settings from resource file
23 | Variables | resources/test_data/lisp/api/lisp_api_resources.py
24 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO
25 | ... | VM_ENV | HW_ENV
26 | Test Setup | Set up functional test
27 | Test Teardown | Tear down functional test
28 | Documentation | *API test cases*
29 | ...
30 | ... | *[Top] Network Topologies:* DUT1 1-node topology.
31 | ... | *[Enc] Packet Encapsulations:* None.
32 | ... | *[Cfg] DUT configuration:* DUT1 gets configured with all LISP
33 | ... | parameters.
34 | ... | *[Ver] Verification:* DUT1 operational data gets verified following
35 | ... | configuration.
36 | ... | *[Ref] Applicable standard specifications:* RFC6830.
37
38 *** Variables ***
39 | ${locator_set_num}= | 3
40
41 *** Test Cases ***
42
43 | TC01: DUT can enable and disable LISP
44 | | [Documentation]
45 | | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP enable/disable API; On \
46 | | ... | DUT1 enable LISP. [Ver1] Check DUT1 if LISP is enabled. [Cfg2]
47 | | ... | Then disable LISP. [Ver2] Check DUT1 if LISP is disabled. [Ref]
48 | | ... | RFC6830.
49 | | When Enable LISP | ${nodes['DUT1']}
50 | | Then LISP should be enabled | ${nodes['DUT1']} | ${lisp_status}
51 | | When Disable LISP | ${nodes['DUT1']}
52 | | Then LISP Should be disabled | ${nodes['DUT1']} | ${lisp_status}
53
54 | TC02: DUT can add and delete locator_set
55 | | [Documentation]
56 | | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP locator_set API; on \
57 | | ... | DUT1 configure locator_set and locator. [Ver1] Check DUT1
58 | | ... | configured locator_set and locator are correct. [Cfg2] Then
59 | | ... | remove locator_set and locator. [Ver2] check DUT1 locator_set
60 | | ... | and locator are removed. [Ref] RFC6830.
61 | | Given Generate LISP locator_set data
62 | | ... | ${nodes['DUT1']} | ${locator_set_num}
63 | | And Enable LISP | ${nodes['DUT1']}
64 | | When Configure LISP locator_set data | ${nodes['DUT1']}
65 | | Then LISP locator_set shpuld be configured correctly | ${nodes['DUT1']}
66 | | When Delete all LISP locator_set from VPP | ${nodes['DUT1']}
67 | | Then LISP locator_set should be unset | ${nodes['DUT1']}
68
69 | TC03: DUT can add, reset and delete locator_set
70 | | [Documentation]
71 | | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP locator_set API; on \
72 | | ... | DUT1 configure locator_set and locator. [Ver1] Check DUT1
73 | | ... | locator_set and locator are correct. [Cfg2] Then reset
74 | | ... | locator_set and set it again. [Ver2] Check DUT1 locator_set and
75 | | ... | locator are correct. [Cfg3] Then remove locator_set and locator.
76 | | ... | [Ver3] Check DUT1 all locator_set and locators are removed.
77 | | ... | [Ref] RFC6830.
78 | | Given Lisp locator_set data use for test reset locator_set are prepared
79 | | ... | ${nodes['DUT1']} | ${locator_set_num}
80 | | And Enable LISP | ${nodes['DUT1']}
81 | | When Configure LISP locator_set data | ${nodes['DUT1']}
82 | | Then LISP locator_set shpuld be configured correctly | ${nodes['DUT1']}
83 | | When Delete all LISP locator_set from VPP | ${nodes['DUT1']}
84 | | Then LISP locator_set should be unset | ${nodes['DUT1']}
85
86 | TC04: DUT can add and delete eid address
87 | | [Documentation]
88 | | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP eid API; on DUT1 \
89 | | ... | configure LISP eid IP address. [Ver1] Check DUT1 configured data
90 | | ... | is correct. [Cfg2] Remove configured data. [Ver2] Check DUT1 all
91 | | ... | eid IP addresses are removed. [Ref] RFC6830.
92 | | Given Enable LISP | ${nodes['DUT1']}
93 | | When Configure LISP eid address | ${nodes['DUT1']} | ${eid_table}
94 | | Then LISP eid address should be set correctly to eid table
95 | | ... | ${nodes['DUT1']} | ${eid_table_vat}
96 | | When Delete all LISP eid address from VPP | ${nodes['DUT1']} | ${eid_table}
97 | | Then LISP eid table should be empty | ${nodes['DUT1']}
98
99 | TC05: DUT can add and delete LISP map resolver address
100 | | [Documentation]
101 | | ... | [Top] DUT1. [Enc] None. [Cfg1] Test LISP map resolver address \
102 | | ... | API; on DUT1 configure LISP map resolver address. [Ver1] Check
103 | | ... | DUT1 configured data is correct. [Cfg2] Remove configured data.
104 | | ... | [Ver2] Check DUT1 all map resolver addresses are removed. [Ref]
105 | | ... | RFC6830.
106 | | Given Enable LISP | ${nodes['DUT1']}
107 | | When Configure LISP map resolver address | ${nodes['DUT1']} | ${map_resolver}
108 | | Then LISP map resolver address should be configured correctly
109 | | ... | ${nodes['DUT1']} | ${map_resolver}
110 | | When Delete all LISP map resolver address from VPP
111 | | ... | ${nodes['DUT1']} | ${map_resolver}
112 | | Then LISP map resolver address should be empty | ${nodes['DUT1']}