693be26b2aa47871129cb73e4850422a3b29da71
[csit.git] / tests / suites / dhcp / dhcp_client.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 | Resource | resources/libraries/robot/default.robot
16 | Resource | resources/libraries/robot/testing_path.robot
17 | Resource | resources/libraries/robot/dhcp_client.robot
18 | Library | resources.libraries.python.Trace
19 | Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO
20 | Test Setup | Run Keywords | Setup all DUTs before test
21 | ...        | AND          | Setup all TGs before traffic script
22 | Documentation | *DHCP Client related test cases*
23
24 *** Variables ***
25 | ${client_hostname}= | dhcp-client
26
27 *** Test Cases ***
28 | VPP sends a DHCP DISCOVER
29 | | [Documentation] | Configure DHCP client on interface to TG without hostname
30 | | ...             | and check if DHCP DISCOVER message contains all required
31 | | ...             | fields with expected values.
32 | | ...
33 | | Given Path for 2-node testing is set
34 | |       ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
35 | | And   Interfaces in 2-node path are up
36 | | When  Set DHCP client on Interface | ${dut_node} | ${dut_to_tg_if1}
37 | | Then  Check DHCP DISCOVER header | ${tg_node}
38 | |       ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac}
39
40 | VPP sends a DHCP DISCOVER with hostname
41 | | [Documentation] | Configure DHCP client on interface to TG with hostname
42 | | ...             | and check if DHCP DISCOVER message contains all required
43 | | ...             | fields with expected values.
44 | | ...
45 | | Given Path for 2-node testing is set
46 | |       ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
47 | | And   Interfaces in 2-node path are up
48 | | When  Set DHCP client on Interface | ${dut_node} | ${dut_to_tg_if1}
49 | |       ... | ${client_hostname}
50 | | Then  Check DHCP DISCOVER header | ${tg_node}
51 | |       ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} | ${client_hostname}