8d85eb2a454656f71e2b3e2230c83d2cbffb319b
[csit.git] / tests / func / honeycomb / mgmt-cfg-slaac-apihc-func.robot
1 # Copyright (c) 2017 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 *** Variables ***
15 # Interface to run tests on.
16 | ${interface}= | ${node['interfaces']['port1']['name']}
17
18 *** Settings ***
19 | Resource | resources/libraries/robot/default.robot
20 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
21 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
22 | Resource | resources/libraries/robot/honeycomb/slaac.robot
23 | Resource | resources/libraries/robot/testing_path.robot
24 | Resource | resources/libraries/robot/traffic.robot
25 | Suite Teardown
26 | ... | Run Keyword If Any Tests Failed
27 | ... | Restart Honeycomb and VPP | ${node}
28 | Force Tags | honeycomb_sanity | honeycomb_odl
29 | Documentation | *Honeycomb SLAAC management test suite.*
30 | Variables | resources/test_data/honeycomb/slaac_variables.py
31
32 *** Test Cases ***
33 | TC01: Honeycomb can configure SLAAC
34 | | [Documentation] | Checks if Honeycomb can congigure SLAAC.
35 | | Given SLAAC configuration from Honeycomb should be empty | ${node}
36 | | ... | ${interface}
37 | | And InterfaceAPI.Set Interface State | ${node} | ${interface} | up
38 | | And Honeycomb sets interface ipv6 address | ${node} | ${interface}
39 | | ... | ${address} | ${prefix}
40 | | When Honeycomb configures SLAAC | ${node} | ${interface} | ${slaac_data}
41 | | Then SLAAC configuration from Honeycomb should be | ${node}
42 | | ... | ${interface} | ${slaac_data}
43
44 | TC02: Honeycomb can disable SLAAC
45 | | [Documentation] | Checks if Honeycomb can disable SLAAC.
46 | | Given SLAAC configuration from Honeycomb should be | ${node}
47 | | ... | ${interface} | ${slaac_data}
48 | | When Honeycomb removes SLAAC configuration | ${node} | ${interface}
49 | | Then SLAAC configuration from Honeycomb should be empty | ${node}
50 | | ... | ${interface}
51
52 | TC03: Honeycomb can configure SLAAC with suppress link layer disabled
53 | | [Documentation] | Checks if Honeycomb can congigure SLAAC.
54 | | [Teardown] | SLAAC test teardown | ${node} | ${interface}
55 | | Given SLAAC configuration from Honeycomb should be empty | ${node}
56 | | ... | ${interface}
57 | | And InterfaceAPI.Set Interface State | ${node} | ${interface} | up
58 | | And Honeycomb sets interface ipv6 address | ${node} | ${interface}
59 | | ... | ${address} | ${prefix}
60 | | When Honeycomb configures SLAAC | ${node} | ${interface} | ${slaac_data}
61 | | Then SLAAC configuration from Honeycomb should be | ${node}
62 | | ... | ${interface} | ${slaac_data}
63
64 | TC04: Honeycomb can configure SLAAC with sending RA packets disabled
65 | | [Documentation] | Checks if Honeycomb can configure SLAAC\
66 | | ... | with given settings.
67 | | [Teardown] | SLAAC test teardown | ${node} | ${interface}
68 | | Given SLAAC configuration from Honeycomb should be empty | ${node}
69 | | ... | ${interface}
70 | | And InterfaceAPI.Set Interface State | ${node} | ${interface} | up
71 | | And Honeycomb sets interface ipv6 address | ${node} | ${interface}
72 | | ... | ${address} | ${prefix}
73 | | When Honeycomb configures SLAAC | ${node} | ${interface} | ${slaac_data_01}
74 | | Then SLAAC configuration from Honeycomb should be | ${node} | ${interface}
75 | | ... | ${slaac_data_01}
76
77 | TC05: Honeycomb can configure SLAAC with min interval values
78 | | [Documentation] | Checks if Honeycomb can configure SLAAC\
79 | | ... | with given settings.
80 | | [Teardown] | SLAAC test teardown | ${node} | ${interface}
81 | | Given SLAAC configuration from Honeycomb should be empty | ${node}
82 | | ... | ${interface}
83 | | And InterfaceAPI.Set Interface State | ${node} | ${interface} | up
84 | | And Honeycomb sets interface ipv6 address | ${node} | ${interface}
85 | | ... | ${address} | ${prefix}
86 | | When Honeycomb configures SLAAC | ${node} | ${interface} | ${slaac_data_02}
87 | | Then SLAAC configuration from Honeycomb should be | ${node} | ${interface}
88 | | ... | ${slaac_data_02}
89
90 | TC06: Honeycomb can configure SLAAC with max interval values
91 | | [Documentation] | Checks if Honeycomb can configure SLAAC\
92 | | ... | with given settings.
93 | | [Teardown] | SLAAC test teardown | ${node} | ${interface}
94 | | Given SLAAC configuration from Honeycomb should be empty | ${node}
95 | | ... | ${interface}
96 | | And InterfaceAPI.Set Interface State | ${node} | ${interface} | up
97 | | And Honeycomb sets interface ipv6 address | ${node} | ${interface}
98 | | ... | ${address} | ${prefix}
99 | | When Honeycomb configures SLAAC | ${node} | ${interface} | ${slaac_data_03}
100 | | Then SLAAC configuration from Honeycomb should be | ${node} | ${interface}
101 | | ... | ${slaac_data_03}
102
103 | TC07: DUT retransmits RA on IPv6 enabled interface after a set interval
104 | | [Documentation]
105 | | ... | [Top] TG-DUT1-DUT2-TG.
106 | | ... | [Cfg] On DUT1 configure IPv6 interface on the link to TG.
107 | | ... | [Ver] Make TG wait for two IPv6 Router Advertisement packets\
108 | | ... | to be sent by DUT1 and verify the received RA packets are correct.
109 | | [Teardown] | SLAAC test teardown | ${dut_node} | ${dut_to_tg_if1}
110 | | Given Path for 2-node testing is set
111 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
112 | | And Honeycomb sets interface ipv6 address
113 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${address} | ${prefix}
114 | | And Honeycomb sets interface state | ${dut_node} | ${dut_to_tg_if1} | up
115 | | When Honeycomb configures SLAAC | ${dut_node} | ${dut_to_tg_if1}
116 | | ... | ${slaac_data}
117 | | :FOR | ${n} | IN RANGE | ${2}
118 | | | Then Receive And Check Router Advertisement Packet
119 | | | ... | ${tg_node} | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} | ${20}