Interface VxLAN test
[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 | &{vxlan_settings}= | src=10.0.1.20 | dst=10.0.3.20 | vni=1000
29 | ... | encap-vrf-id=1000
30
31 *** Settings ***
32 | Resource | resources/libraries/robot/default.robot
33 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
34 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
35 | Suite Setup | Run keywords | Setup all DUTs before test | AND
36 | ... | Setup Honeycomb service on DUTs | ${node}
37 | Suite Teardown | Stop Honeycomb service on DUTs | ${node}
38 | Documentation | *Honeycomb interface management test suite.*
39 | ...
40 | ... | Test suite uses the first interface of the first DUT node.
41
42 *** Test Cases ***
43 | Honeycomb configures and reads interface state
44 | | [Documentation] | Check if Honeycomb API can modify the admin state of\
45 | | ... | VPP interfaces.
46 | | [Tags] | honeycomb_sanity
47 | | Given Interface state is | ${node} | ${interface} | down
48 | | When Honeycomb sets interface state | ${node} | ${interface} | up
49 | | Then Interface state from Honeycomb should be
50 | | ... | ${node} | ${interface} | up
51 | | And Interface state from VAT should be | ${node} | ${interface} | up
52 | | When Honeycomb sets interface state | ${node} | ${interface} | down
53 | | Then Interface state from Honeycomb should be
54 | | ... | ${node} | ${interface} | down
55 | | And Interface state from VAT should be | ${node} | ${interface} | down
56
57 | Honeycomb modifies interface configuration - ipv4
58 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4.
59 | | [Tags] | honeycomb_sanity
60 | | When Honeycomb sets interface ipv4 configuration
61 | | ... | ${node} | ${interface} | @{ipv4_address} | @{ipv4_neighbor}
62 | | ... | ${ipv4_settings}
63 | | Then IPv4 config from Honeycomb should be
64 | | ... | ${node} | ${interface} | @{ipv4_address} | @{ipv4_neighbor}
65 | | ... | ${ipv4_settings}
66 | | And IPv4 config from VAT should be
67 | | ... | ${node} | ${interface} | @{ipv4_address}
68
69 | Honeycomb modifies interface configuration - ipv6
70 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv6.
71 | | [Tags] | honeycomb_sanity
72 | | When Honeycomb sets interface ipv6 configuration
73 | | ... | ${node} | ${interface} | @{ipv6_address} | @{ipv6_neighbor}
74 | | ... | ${ipv6_settings}
75 | | Then IPv6 config from Honeycomb should be
76 | | ... | ${node} | ${interface} | @{ipv6_address} | @{ipv6_neighbor}
77 | | ... | ${ipv6_settings}
78 | | And IPv6 config from VAT should be
79 | | ... | ${node} | ${interface} | @{ipv6_address}
80
81 | Honeycomb modifies interface configuration - ethernet,routing
82 | | [Documentation] | Check if Honeycomb API can configure interface ethernet\
83 | | ... | and routing settings.
84 | | [Tags] | honeycomb_sanity
85 | | When Honeycomb sets interface ethernet and routing configuration
86 | | ... | ${node} | ${interface} | ${ethernet} | ${routing}
87 | | Then Interface ethernet and routing configuration from Honeycomb should be
88 | | ... | ${node} | ${interface} | ${ethernet} | ${routing}
89 | | And Interface ethernet and routing configuration from VAT should be
90 | | ... | ${node} | ${interface} | ${ethernet['mtu']} | ${routing['vrf-id']}
91
92 | Honeycomb modifies interface configuration - VxLAN
93 | | [Documentation] | Check if Honeycomb API can configure interface VxLAN \
94 | | ... | settings.
95 | | [Tags] | honeycomb_sanity
96 | | When Honeycomb sets interface VxLAN configuration
97 | | ... | ${node} | ${interface} | &{vxlan_settings}
98 | | Then VxLAN configuration from Honeycomb should be
99 | | ... | ${node} | ${interface} | &{vxlan_settings}
100 | | And VxLAN configuration from VAT should be
101 | | ... | ${node} | ${interface} | &{vxlan_settings}