Remove obsolete L2 KW
[csit.git] / resources / libraries / robot / ip / ip4.robot
1 # Copyright (c) 2019 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.InterfaceUtil
16 | Library | resources.libraries.python.IPUtil
17 | ...
18 | Resource | resources/libraries/robot/shared/default.robot
19 | ...
20 | Documentation | IPv4 keywords
21
22 *** Keywords ***
23 | Configure IP addresses on interfaces
24 | | [Documentation] | Iterates through @{args} list and set interface IP address
25 | | ... | for every (${dut_node}, ${interface}, ${address},
26 | | ... | ${prefix}) tuple.
27 | | ...
28 | | ... | *Arguments:*
29 | | ... | - dut_node - Node where IP address should be set to.
30 | | ... | Type: dictionary
31 | | ... | - interface - Interface name. Type: string
32 | | ... | - address - IP address. Type: string
33 | | ... | - prefix - Prefix length. Type: integer
34 | | ...
35 | | ... | *Example:*
36 | | ...
37 | | ... | \| Configure IP addresses on interfaces \
38 | | ... | \| ${dut1_node} \| ${dut1_to_dut2} \| 192.168.1.1 \| 24 \|
39 | | ... | \| ... \| ${dut1_node} \| ${dut1_to_tg} \| 192.168.2.1 \| 24 \|
40 | | ...
41 | | [Arguments] | @{args}
42 | | :FOR | ${dut_node} | ${interface} | ${address} | ${prefix} | IN | @{args}
43 | | | VPP Interface Set IP Address
44 | | | ... | ${dut_node} | ${interface} | ${address} | ${prefix}