HC Test: bugfix for SLAAC and ODL tests
[csit.git] / resources / libraries / robot / honeycomb / slaac.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 *** Settings ***
15 | Library | resources.libraries.python.honeycomb.Routing.RoutingKeywords
16 | Library | resources.libraries.python.Trace
17 | Documentation | Keywords used to test SLAAC using Honeycomb.
18
19 *** Keywords ***
20 | Honeycomb configures SLAAC
21 | | [Documentation] | Uses Honeycomb API to configure SLAAC on the specified\
22 | | ... | interface.
23 | | ...
24 | | ... | *Arguments:*
25 | | ... | - node - information about a DUT node. Type: dictionary
26 | | ... | - interface - name of an interface on the node. Type: string
27 | | ... | - slaac_data - data needed to configure SLAAC. Type: dictionary
28 | | ...
29 | | ... | *Example:*
30 | | ...
31 | | ... | \| Honeycomb configures SLAAC \| ${node} \| ${interface} \
32 | | ... | \| ${slaac_data} \|
33 | | ...
34 | | [Arguments] | ${node} | ${interface} | ${slaac_data}
35 | | Configure interface SLAAC
36 | | ... | ${node} | ${interface} | ${slaac_data}
37
38 | SLAAC Operational Data From Honeycomb Should Be
39 | | [Documentation] | Retrieves SLAAC operational data and verifies that\
40 | | ... | SLAAC is configured with the provided interfaces.
41 | | ...
42 | | ... | *Arguments:*
43 | | ... | - node - information about a DUT node. Type: dictionary
44 | | ... | - interface - name of an interface on the node. Type: string
45 | | ... | - slaac_data - data to compare configuration SLAAC with.\
46 | | ... | Type: dictionary
47 | | ...
48 | | ... | *Example:*
49 | | ...
50 | | ... | \| SLAAC Operational Data From Honeycomb Should Be \
51 | | ... | \| ${node} \| ${interface} \| ${slaac_data} \|
52 | | ...
53 | | [Arguments] | ${node} | ${interface} | ${slaac_data}
54 | | ${data}= | Get interface SLAAC oper data | ${node} | ${interface}
55 | | Dictionaries should be equal | ${data} | ${slaac_data}
56
57 | SLAAC Operational Data From Honeycomb Should Be empty
58 | | [Documentation] | Checks whether SLAAC configuration from Honeycomb \
59 | | ... | is empty.
60 | | ...
61 | | ... | *Arguments:*
62 | | ... | - node - Information about a DUT node. Type: dictionary
63 | | ... | - interface - name of an interface on the node. Type: string
64 | | ...
65 | | ... | *Example:*
66 | | ...
67 | | ... | \| SLAAC Operational Data From Honeycomb Should Be empty \
68 | | ... | \| ${node} \| ${interface} \|
69 | | ...
70 | | [Arguments] | ${node} | ${interface}
71 | | Run keyword and expect error | HoneycombError*40*
72 | | ... | Get interface SLAAC oper data | ${node} | ${interface}
73
74 | Honeycomb removes SLAAC configuration
75 | | [Documentation] | Uses Honeycomb API to remove SLAAC confirugation\
76 | | ... | from the specified interface.
77 | | ...
78 | | ... | *Arguments:*
79 | | ... | - node - information about a DUT node. Type: dictionary
80 | | ... | - interface - name of an interface on the node. Type: string
81 | | ...
82 | | ... | *Example:*
83 | | ...
84 | | ... | \| Honeycomb removes SLAAC configuration \
85 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \|
86 | | ...
87 | | [Arguments] | ${node} | ${interface}
88 | | Configure interface SLAAC | ${node} | ${interface}
89
90 | SLAAC test teardown
91 | | [Documentation] | Uses Honeycomb API to remove SLAAC confirugation\
92 | | ... | and reset interface state.
93 | | ...
94 | | ... | *Arguments:*
95 | | ... | - node - information about a DUT node. Type: dictionary
96 | | ... | - interface - name of an interface on the node. Type: string
97 | | ...
98 | | ... | *Example:*
99 | | ...
100 | | ... | \| Honeycomb removes SLAAC configuration \
101 | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \|
102 | | ...
103 | | [Arguments] | ${node} | ${interface}
104 | | Honeycomb removes SLAAC configuration | ${node} | ${interface}
105 | | And Honeycomb configures interface state | ${node} | ${interface} | down
106 | | Honeycomb removes interface IPv6 addresses | ${node} | ${interface}