aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
authorZdeno Olsovsky <zolsovsk@cisco.com>2016-06-01 13:41:09 +0200
committerJan Gelety <jgelety@cisco.com>2016-06-16 11:05:03 +0000
commit8be64446049878a0fb4a91a3a8b0481e75b20205 (patch)
treea45b8570f15d0594d49820c771a5a774133422ab /resources/libraries
parent8e014c373bdcd281475d83669122ba5eeefb96c1 (diff)
Router Advertisement Tests
-JIRA: CSIT-30 Change-Id: Iedb403d555284d36a81cc490a79e56b019ebeed0 Signed-off-by: Zdeno Olsovsky <zolsovsk@cisco.com>
Diffstat (limited to 'resources/libraries')
-rw-r--r--resources/libraries/python/IPv6Setup.py18
-rw-r--r--resources/libraries/robot/traffic.robot23
2 files changed, 41 insertions, 0 deletions
diff --git a/resources/libraries/python/IPv6Setup.py b/resources/libraries/python/IPv6Setup.py
index 6b5d8a5f66..12f6de7af9 100644
--- a/resources/libraries/python/IPv6Setup.py
+++ b/resources/libraries/python/IPv6Setup.py
@@ -246,6 +246,24 @@ class IPv6Setup(object):
sw_if_id=sw_if_index,
param='surpress')
+ @staticmethod
+ def vpp_ra_send_after_interval(node, interface, interval=2):
+ """Setup vpp router advertisement(RA) in such way it sends RA packet
+ after and every interval value.
+
+ :param node: VPP node.
+ :param interface: Interface name.
+ :param interval: Interval for RA resend
+ :type node: dict
+ :type interface: str
+ :type interval: int
+ """
+ sw_if_index = Topology.get_interface_sw_index(node, interface)
+ VatExecutor.cmd_from_template(node,
+ 'sw_interface_ip6nd_ra_config.vat',
+ sw_if_id=sw_if_index,
+ param='interval {0}'.format(interval))
+
def vpp_all_ra_suppress_link_layer(self, nodes):
"""Suppress ICMPv6 router advertisement message for link scope address
on all VPP nodes in the topology.
diff --git a/resources/libraries/robot/traffic.robot b/resources/libraries/robot/traffic.robot
index 7dba5efbe3..eb7dd7c6e1 100644
--- a/resources/libraries/robot/traffic.robot
+++ b/resources/libraries/robot/traffic.robot
@@ -239,3 +239,26 @@
| | Run Keyword And Expect Error | TCP/UDP Rx timeout
| | ... | Run Traffic Script On Node | send_tcp_udp.py
| | ... | ${tg_node} | ${args}
+
+| Receive And Check Router Advertisement Packet
+| | [Documentation] | Wait until RA packet is received and then check
+| | ... | specific packet fields whether they are correct.
+| | ...
+| | ... | *Arguments:*
+| | ...
+| | ... | - node - Node where to check for RA packet. Type: dictionary
+| | ... | - rx_port - Interface where the packet is received. Type: string
+| | ... | - src_mac - MAC address of source interface from which the link-local
+| | ... | IPv6 address is constructed and checked. Type: string
+| | ...
+| | ... | *Return:*
+| | ... | - No value returned
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Receive And Check Router Advertisement Packet \
+| | ... | \| ${nodes['DUT1']} \| eth2 \| 08:00:27:cc:4f:54 \|
+| | ...
+| | [Arguments] | ${node} | ${rx_port} | ${src_mac}
+| | ${args}= | Catenate | --rx_if | ${rx_port} | --src_mac | ${src_mac}
+| | Run Traffic Script On Node | check_ra_packet.py | ${node} | ${args}