Add Honeycomb interface management tests (ipv4, ipv6, ethernet, routing)
[csit.git] / tests / suites / honeycomb / interface_management.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 *** Variables ***
15 # Node and interface to run tests on.
16 | ${node}= | ${nodes['DUT1']}
17 | ${interface}= | ${node['interfaces'].values()[0]['name']}
18 # Configuration which will be set and verified during tests.
19 | @{ipv4_address}= | 192.168.0.2 | 255.255.255.0
20 | @{ipv4_neighbor}= | 192.168.0.3 | 08:00:27:c0:5d:37
21 | &{ipv4_settings}= | enabled=${True} | forwarding=${True} | mtu=9000
22 | @{ipv6_address}= | 10::10 | 64
23 | @{ipv6_neighbor}= | 10::11 | 08:00:27:c0:5d:37
24 | &{ipv6_settings}= | enabled=${True} | forwarding=${True} | mtu=9000
25 | ... | dup-addr-detect-transmits=5
26 | &{ethernet}= | mtu=9000
27 | &{routing}= | vrf-id=27
28
29 *** Settings ***
30 | Resource | resources/libraries/robot/default.robot
31 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
32 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
33 | Suite Setup | Run keywords | Setup all DUTs before test | AND
34 | ... | Setup Honeycomb service on DUTs | ${node}
35 | Suite Teardown | Stop Honeycomb service on DUTs | ${node}
36 | Documentation | *Honeycomb interface management test suite.*
37 | ...
38 | ... | Test suite uses the first interface of the first DUT node.
39
40 *** Test Cases ***
41 | Honeycomb configures and reads interface state
42 | | [Documentation] | Check if Honeycomb API can modify the admin state of\
43 | | ... | VPP interfaces.
44 | | [Tags] | honeycomb_sanity
45 | | Given Interface state is | ${node} | ${interface} | down
46 | | When Honeycomb sets interface state | ${node} | ${interface} | up
47 | | Then Interface state from Honeycomb should be
48 | | ... | ${node} | ${interface} | up
49 | | And Interface state from VAT should be | ${node} | ${interface} | up
50 | | When Honeycomb sets interface state | ${node} | ${interface} | down
51 | | Then Interface state from Honeycomb should be
52 | | ... | ${node} | ${interface} | down
53 | | And Interface state from VAT should be | ${node} | ${interface} | down
54
55 | Honeycomb modifies interface configuration - ipv4
56 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4.
57 | | [Tags] | honeycomb_sanity
58 | | When Honeycomb sets interface ipv4 configuration
59 | | ... | ${node} | ${interface} | @{ipv4_address} | @{ipv4_neighbor}
60 | | ... | ${ipv4_settings}
61 | | Then IPv4 config from Honeycomb should be
62 | | ... | ${node} | ${interface} | @{ipv4_address} | @{ipv4_neighbor}
63 | | ... | ${ipv4_settings}
64 | | And IPv4 config from VAT should be
65 | | ... | ${node} | ${interface} | @{ipv4_address}
66
67 | Honeycomb modifies interface configuration - ipv6
68 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv6.
69 | | [Tags] | honeycomb_sanity
70 | | When Honeycomb sets interface ipv6 configuration
71 | | ... | ${node} | ${interface} | @{ipv6_address} | @{ipv6_neighbor}
72 | | ... | ${ipv6_settings}
73 | | Then IPv6 config from Honeycomb should be
74 | | ... | ${node} | ${interface} | @{ipv6_address} | @{ipv6_neighbor}
75 | | ... | ${ipv6_settings}
76 | | And IPv6 config from VAT should be
77 | | ... | ${node} | ${interface} | @{ipv6_address}
78
79 | Honeycomb modifies interface configuration - ethernet,routing
80 | | [Documentation] | Check if Honeycomb API can configure interface ethernet\
81 | | ... | and routing settings.
82 | | [Tags] | honeycomb_sanity
83 | | When Honeycomb sets interface ethernet and routing configuration
84 | | ... | ${node} | ${interface} | ${ethernet} | ${routing}
85 | | Then Interface ethernet and routing configuration from Honeycomb should be
86 | | ... | ${node} | ${interface} | ${ethernet} | ${routing}
87 | | And Interface ethernet and routing configuration from VAT should be
88 | | ... | ${node} | ${interface} | ${ethernet['mtu']} | ${routing['vrf-id']}