1e9606157119d885e8e43b4a13259cd96b487d48
[csit.git] / resources / libraries / robot / map.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 | Variables | resources/libraries/python/topology.py
16 | Library | resources.libraries.python.topology.Topology
17 | Library | resources.libraries.python.DUTSetup
18 | Library | resources.libraries.python.TGSetup
19 | Library | resources.libraries.python.Map
20 | Documentation | Keywords for MAP feature in VPP.
21
22 *** Keywords ***
23 | Send IPv4 UDP and check headers for lightweight 4over6
24 | | [Documentation]
25 | | ... | Send empty UDP to given IPv4 dst and UDP port and check received \
26 | | ... | packets headers (Ethernet, IPv6, IPv4, UDP).
27 | | ...
28 | | ... | *Arguments:*
29 | | ... | - tg_node - Node where to run traffic script. Type: string
30 | | ... | - tx_if - Interface from where to send ICPMv4 packet. Type: string
31 | | ... | - rx_if - Interface where to receive IPinIP packet. Type: string
32 | | ... | - tx_dst_mac - Destination MAC address of IPv4 packet. Type: string
33 | | ... | - tx_dst_ipv4 - Destination IPv4 address. Type: string
34 | | ... | - tx_src_ipv4 - Source IPv4 address. Type: string
35 | | ... | - tx_dst_udp_port - Destination UDP port. Type: integer
36 | | ... | - rx_dst_mac - Expected destination MAC address. Type: string
37 | | ... | - rx_src_mac - Expected source MAC address. Type: string
38 | | ... | - dst_ipv6 - Expected destination IPv6 address. Type: string
39 | | ... | - src_ipv6 - Expected source IPv6 address. Type: string
40 | | ...
41 | | ... | *Return:*
42 | | ... | - No value returned
43 | | ...
44 | | ... | *Example:*
45 | | ...
46 | | ... | \| Send IPv4 UDP and check headers for lightweight 4over6 \
47 | | ... | \| ${tg_node} \| eth3 \| eth2 \| 08:00:27:66:b8:57 \| 20.0.0.1 \
48 | | ... | \| 20.0.0.2 \| 1232 \| 08:00:27:46:2b:4c \| 08:00:27:f3:be:f0 \
49 | | ... | \| 2001:1::2 \| 2001:1::1 \|
50 | | ...
51 | | [Arguments]
52 | | ... | ${tg_node} | ${tx_if} | ${rx_if} | ${tx_dst_mac} | ${tx_dst_ipv4}
53 | | ... | ${tx_src_ipv4} | ${tx_dst_udp_port} | ${rx_dst_mac} | ${rx_src_mac}
54 | | ... | ${dst_ipv6} | ${src_ipv6}
55 | | ...
56 | | ${tx_name}= | Get interface name | ${tg_node} | ${tx_if}
57 | | ${rx_name}= | Get interface name | ${tg_node} | ${rx_if}
58 | | ${args}= | Catenate
59 | | ... | --tx_if | ${tx_name} | --rx_if | ${rx_name}
60 | | ... | --tx_dst_mac | ${tx_dst_mac} | --tx_src_ipv4 | ${tx_src_ipv4}
61 | | ... | --tx_dst_ipv4 | ${tx_dst_ipv4}
62 | | ... | --tx_dst_udp_port | ${tx_dst_udp_port}
63 | | ... | --rx_dst_mac | ${rx_dst_mac} | --rx_src_mac | ${rx_src_mac}
64 | | ... | --src_ipv6 | ${src_ipv6} | --dst_ipv6 | ${dst_ipv6}
65 | | ...
66 | | Run Traffic Script On Node
67 | | ... | send_ipv4_check_lw_4o6.py | ${tg_node} | ${args}