aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
authorJan Gelety <jgelety@cisco.com>2019-05-30 16:13:25 +0200
committerJan Gelety <jgelety@cisco.com>2019-06-18 21:07:12 +0200
commit0e28406b43bf4ce145f1530f15dbb00957edf945 (patch)
treeb9f76fe6f1b92165962a82cb4bf850f0cf4c491d /resources/libraries
parent92fbe3b8d880f9a3dd63e1309d76772b1685a037 (diff)
CSIT-1459: Migrate IP libraries from VAT to PAPI
Change-Id: Id84cf9c3afd53260b5bbf658a6a3870aa0c91333 Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'resources/libraries')
-rw-r--r--resources/libraries/python/IPUtil.py433
-rw-r--r--resources/libraries/python/IPv4NodeAddress.py102
-rw-r--r--resources/libraries/python/IPv4Setup.py363
-rw-r--r--resources/libraries/python/IPv4Util.py240
-rw-r--r--resources/libraries/python/IPv6NodesAddr.py68
-rw-r--r--resources/libraries/python/IPv6Setup.py297
-rw-r--r--resources/libraries/python/IPv6Util.py152
-rw-r--r--resources/libraries/python/InterfaceUtil.py144
-rw-r--r--resources/libraries/python/Routing.py123
-rw-r--r--resources/libraries/python/ssh.py1
-rw-r--r--resources/libraries/robot/crypto/ipsec.robot32
-rw-r--r--resources/libraries/robot/features/policer.robot55
-rw-r--r--resources/libraries/robot/honeycomb/interfaces.robot8
-rw-r--r--resources/libraries/robot/honeycomb/persistence.robot3
-rw-r--r--resources/libraries/robot/honeycomb/port_mirroring.robot3
-rw-r--r--resources/libraries/robot/honeycomb/sub_interface.robot1
-rw-r--r--resources/libraries/robot/ip/ip4.robot118
-rw-r--r--resources/libraries/robot/ip/ip6.robot233
-rw-r--r--resources/libraries/robot/overlay/lisp_static_adjacency.robot156
-rw-r--r--resources/libraries/robot/overlay/vxlan.robot27
-rw-r--r--resources/libraries/robot/performance/performance_configuration.robot356
-rw-r--r--resources/libraries/robot/shared/traffic.robot9
-rw-r--r--resources/libraries/robot/tcp/tcp_setup.robot21
23 files changed, 795 insertions, 2150 deletions
diff --git a/resources/libraries/python/IPUtil.py b/resources/libraries/python/IPUtil.py
index cf7034c0fd..52640d1658 100644
--- a/resources/libraries/python/IPUtil.py
+++ b/resources/libraries/python/IPUtil.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2018 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -15,12 +15,17 @@
import re
-from ipaddress import IPv4Network, ip_address
+from socket import AF_INET, AF_INET6, inet_ntop, inet_pton
+
+from ipaddress import ip_address
+from ipaddress import IPv4Network, IPv6Network, IPv4Address, IPv6Address
+from ipaddress import AddressValueError, NetmaskValueError
-from resources.libraries.python.ssh import SSH
from resources.libraries.python.Constants import Constants
+from resources.libraries.python.InterfaceUtil import InterfaceUtil
+from resources.libraries.python.PapiExecutor import PapiExecutor
from resources.libraries.python.ssh import exec_cmd_no_error, exec_cmd
-from resources.libraries.python.topology import Topology
+from resources.libraries.python.topology import NodeType, Topology
class IPUtil(object):
@@ -51,36 +56,128 @@ class IPUtil(object):
return str(ip_address(ip_int))
@staticmethod
- def vpp_ip_probe(node, interface, addr, if_type="key"):
+ def vpp_get_interface_ip_addresses(node, interface, ip_version):
+ """Get list of IP addresses from an interface on a VPP node.
+
+ :param node: VPP node.
+ :param interface: Name of an interface on the VPP node.
+ :param ip_version: IP protocol version (ipv4 or ipv6).
+ :type node: dict
+ :type interface: str
+ :type ip_version: str
+ :returns: List of dictionaries, each containing IP address, subnet
+ prefix length and also the subnet mask for ipv4 addresses.
+ Note: A single interface may have multiple IP addresses assigned.
+ :rtype: list
+ """
+ try:
+ sw_if_index = Topology.convert_interface_reference(
+ node, interface, 'sw_if_index')
+ except RuntimeError:
+ if isinstance(interface, basestring):
+ sw_if_index = InterfaceUtil.get_sw_if_index(node, interface)
+ else:
+ raise
+
+ is_ipv6 = 1 if ip_version == 'ipv6' else 0
+
+ cmd = 'ip_address_dump'
+ cmd_reply = 'ip_address_details'
+ args = dict(sw_if_index=sw_if_index,
+ is_ipv6=is_ipv6)
+ err_msg = 'Failed to get L2FIB dump on host {host}'.format(
+ host=node['host'])
+
+ with PapiExecutor(node) as papi_exec:
+ papi_resp = papi_exec.add(cmd, **args).get_dump(err_msg)
+
+ data = list()
+ for item in papi_resp.reply[0]['api_reply']:
+ item[cmd_reply]['ip'] = inet_ntop(AF_INET6, item[cmd_reply]['ip']) \
+ if is_ipv6 else inet_ntop(AF_INET, item[cmd_reply]['ip'][0:4])
+ item[cmd_reply]['netmask'] = str(
+ IPv6Network(unicode('::/{pl}'.format(
+ pl=item[cmd_reply]['prefix_length']))).netmask) if is_ipv6 \
+ else str(IPv4Network(unicode('0.0.0.0/{pl}'.format(
+ pl=item[cmd_reply]['prefix_length']))).netmask)
+ data.append(item[cmd_reply])
+
+ return data
+
+ @staticmethod
+ def get_interface_vrf_table(node, interface, ip_version='ipv4'):
+ """Get vrf ID for the given interface.
+
+ :param node: VPP node.
+ :param interface: Name or sw_if_index of a specific interface.
+ :type node: dict
+ :param ip_version: IP protocol version (ipv4 or ipv6).
+ :type interface: str or int
+ :type ip_version: str
+ :returns: vrf ID of the specified interface.
+ :rtype: int
+ """
+ if isinstance(interface, basestring):
+ sw_if_index = InterfaceUtil.get_sw_if_index(node, interface)
+ else:
+ sw_if_index = interface
+
+ is_ipv6 = 1 if ip_version == 'ipv6' else 0
+
+ cmd = 'sw_interface_get_table'
+ args = dict(sw_if_index=sw_if_index,
+ is_ipv6=is_ipv6)
+ err_msg = 'Failed to get VRF id assigned to interface {ifc}'.format(
+ ifc=interface)
+
+ with PapiExecutor(node) as papi_exec:
+ papi_resp = papi_exec.add(cmd, **args).get_replies(err_msg). \
+ verify_reply(err_msg=err_msg)
+
+ return papi_resp['vrf_id']
+
+ @staticmethod
+ def vpp_ip_source_check_setup(node, if_name):
+ """Setup Reverse Path Forwarding source check on interface.
+
+ :param node: VPP node.
+ :param if_name: Interface name to setup RPF source check.
+ :type node: dict
+ :type if_name: str
+ """
+ cmd = 'ip_source_check_interface_add_del'
+ args = dict(
+ sw_if_index=InterfaceUtil.get_interface_index(node, if_name),
+ is_add=1,
+ loose=0)
+ err_msg = 'Failed to enable source check on interface {ifc}'.format(
+ ifc=if_name)
+ with PapiExecutor(node) as papi_exec:
+ papi_exec.add(cmd, **args).get_replies(err_msg). \
+ verify_reply(err_msg=err_msg)
+
+ @staticmethod
+ def vpp_ip_probe(node, interface, addr):
"""Run ip probe on VPP node.
:param node: VPP node.
:param interface: Interface key or name.
:param addr: IPv4/IPv6 address.
- :param if_type: Interface type
:type node: dict
:type interface: str
:type addr: str
- :type if_type: str
- :raises ValueError: If the if_type is unknown.
- :raises Exception: If vpp probe fails.
"""
- ssh = SSH()
- ssh.connect(node)
-
- if if_type == "key":
- iface_name = Topology.get_interface_name(node, interface)
- elif if_type == "name":
- iface_name = interface
- else:
- raise ValueError("if_type unknown: {0}".format(if_type))
-
- cmd = "{c}".format(c=Constants.VAT_BIN_NAME)
- cmd_input = 'exec ip probe {dev} {ip}'.format(dev=iface_name, ip=addr)
- (ret_code, _, _) = ssh.exec_command_sudo(cmd, cmd_input)
- if int(ret_code) != 0:
- raise Exception('VPP ip probe {dev} {ip} failed on {h}'.format(
- dev=iface_name, ip=addr, h=node['host']))
+ cmd = 'ip_probe_neighbor'
+ cmd_reply = 'proxy_arp_intfc_enable_disable_reply'
+ args = dict(
+ sw_if_index=InterfaceUtil.get_interface_index(node, interface),
+ dst=str(addr))
+ err_msg = 'VPP ip probe {dev} {ip} failed on {h}'.format(
+ dev=interface, ip=addr, h=node['host'])
+
+ with PapiExecutor(node) as papi_exec:
+ papi_exec.add(cmd, **args).get_replies(err_msg). \
+ verify_reply(cmd_reply=cmd_reply, err_msg=err_msg)
@staticmethod
def ip_addresses_should_be_equal(ip1, ip2):
@@ -91,7 +188,6 @@ class IPUtil(object):
:type ip1: str
:type ip2: str
"""
-
addr1 = ip_address(unicode(ip1))
addr2 = ip_address(unicode(ip2))
@@ -105,14 +201,14 @@ class IPUtil(object):
"""Setup namespace on given node and attach interface and IP to
this namespace. Applicable also on TG node.
- :param node: Node to set namespace on.
+ :param node: VPP node.
:param namespace_name: Namespace name.
:param interface_name: Interface name.
:param ip_addr: IP address of namespace's interface.
:param prefix: IP address prefix length.
:type node: dict
:type namespace_name: str
- :type vhost_if: str
+ :type interface_name: str
:type ip_addr: str
:type prefix: int
"""
@@ -131,7 +227,7 @@ class IPUtil(object):
def linux_enable_forwarding(node, ip_ver='ipv4'):
"""Enable forwarding on a Linux node, e.g. VM.
- :param node: Node to enable forwarding on.
+ :param node: VPP node.
:param ip_ver: IP version, 'ipv4' or 'ipv6'.
:type node: dict
:type ip_ver: str
@@ -143,7 +239,7 @@ class IPUtil(object):
def get_linux_interface_name(node, pci_addr):
"""Get the interface name.
- :param node: Node where to execute command.
+ :param node: VPP/TG node.
:param pci_addr: PCI address
:type node: dict
:type pci_addr: str
@@ -151,7 +247,6 @@ class IPUtil(object):
:rtype: str
:raises RuntimeError: If cannot get the information about interfaces.
"""
-
regex_intf_info = r"pci@" \
r"([0-9a-f]{4}:[0-9a-f]{2}:[0-9a-f]{2}.[0-9a-f])\s*" \
r"([a-zA-Z0-9]*)\s*network"
@@ -159,8 +254,8 @@ class IPUtil(object):
cmd = "lshw -class network -businfo"
ret_code, stdout, stderr = exec_cmd(node, cmd, timeout=30, sudo=True)
if ret_code != 0:
- raise RuntimeError('Could not get information about interfaces, '
- 'reason:{0}'.format(stderr))
+ raise RuntimeError('Could not get information about interfaces:\n'
+ '{err}'.format(err=stderr))
for line in stdout.splitlines()[2:]:
try:
@@ -174,25 +269,21 @@ class IPUtil(object):
def set_linux_interface_up(node, interface):
"""Set the specified interface up.
- :param node: Node where to execute command.
+ :param node: VPP/TG node.
:param interface: Interface in namespace.
:type node: dict
:type interface: str
:raises RuntimeError: If the interface could not be set up.
"""
-
cmd = "ip link set {0} up".format(interface)
- ret_code, _, stderr = exec_cmd(node, cmd, timeout=30, sudo=True)
- if ret_code != 0:
- raise RuntimeError('Could not set the interface up, reason:{0}'.
- format(stderr))
+ exec_cmd_no_error(node, cmd, timeout=30, sudo=True)
@staticmethod
def set_linux_interface_ip(node, interface, ip_addr, prefix,
namespace=None):
"""Set IP address to interface in linux.
- :param node: Node where to execute command.
+ :param node: VPP/TG node.
:param interface: Interface in namespace.
:param ip_addr: IP to be set on interface.
:param prefix: IP prefix.
@@ -205,52 +296,242 @@ class IPUtil(object):
:raises RuntimeError: IP could not be set.
"""
if namespace is not None:
- cmd = 'ip netns exec {} ip addr add {}/{} dev {}'.format(
- namespace, ip_addr, prefix, interface)
+ cmd = 'ip netns exec {ns} ip addr add {ip}/{p} dev {dev}'.format(
+ ns=namespace, ip=ip_addr, p=prefix, dev=interface)
else:
- cmd = 'ip addr add {}/{} dev {}'.format(ip_addr, prefix, interface)
- (ret_code, _, stderr) = exec_cmd(node, cmd, timeout=5, sudo=True)
- if ret_code != 0:
- raise RuntimeError(
- 'Could not set IP for interface, reason:{}'.format(stderr))
+ cmd = 'ip addr add {ip}/{p} dev {dev}'.format(
+ ip=ip_addr, p=prefix, dev=interface)
+
+ exec_cmd_no_error(node, cmd, timeout=5, sudo=True)
@staticmethod
- def set_linux_interface_route(node, interface, route, namespace=None):
- """Set route via interface in linux.
+ def add_linux_route(node, ip_addr, prefix, gateway, namespace=None):
+ """Add linux route in namespace.
:param node: Node where to execute command.
- :param interface: Interface in namespace.
- :param route: Route to be added via interface.
- :param namespace: Execute command in namespace. Optional parameter.
+ :param ip_addr: Route destination IP address.
+ :param prefix: IP prefix.
+ :param namespace: Execute command in namespace. Optional.
+ :param gateway: Gateway address.
:type node: dict
- :type interface: str
- :type route: str
+ :type ip_addr: str
+ :type prefix: int
+ :type gateway: str
:type namespace: str
"""
if namespace is not None:
- cmd = 'ip netns exec {} ip route add {} dev {}'.format(
- namespace, route, interface)
+ cmd = 'ip netns exec {} ip route add {}/{} via {}'.format(
+ namespace, ip_addr, prefix, gateway)
else:
- cmd = 'ip route add {} dev {}'.format(route, interface)
+ cmd = 'ip route add {}/{} via {}'.format(ip_addr, prefix, gateway)
exec_cmd_no_error(node, cmd, sudo=True)
+ @staticmethod
+ def vpp_interface_set_ip_address(node, interface, address,
+ prefix_length=None):
+ """Set IP address to VPP interface.
+
+ :param node: VPP node.
+ :param interface: Interface name.
+ :param address: IP address.
+ :param prefix_length: Prefix length.
+ :type node: dict
+ :type interface: str
+ :type address: str
+ :type prefix_length: int
+ """
+ try:
+ ip_addr = IPv6Address(unicode(address))
+ af_inet = AF_INET6
+ is_ipv6 = 1
+ except (AddressValueError, NetmaskValueError):
+ ip_addr = IPv4Address(unicode(address))
+ af_inet = AF_INET
+ is_ipv6 = 0
+
+ cmd = 'sw_interface_add_del_address'
+ args = dict(
+ sw_if_index=InterfaceUtil.get_interface_index(node, interface),
+ is_add=1,
+ is_ipv6=is_ipv6,
+ del_all=0,
+ address_length=int(prefix_length) if prefix_length else 128
+ if is_ipv6 else 32,
+ address=inet_pton(af_inet, str(ip_addr)))
+ err_msg = 'Failed to add IP address on interface {ifc}'.format(
+ ifc=interface)
+ with PapiExecutor(node) as papi_exec:
+ papi_exec.add(cmd, **args).get_replies(err_msg). \
+ verify_reply(err_msg=err_msg)
+
+ @staticmethod
+ def vpp_add_ip_neighbor(node, iface_key, ip_addr, mac_address):
+ """Add IP neighbor on DUT node.
+
+ :param node: VPP node.
+ :param iface_key: Interface key.
+ :param ip_addr: IP address of the interface.
+ :param mac_address: MAC address of the interface.
+ :type node: dict
+ :type iface_key: str
+ :type ip_addr: str
+ :type mac_address: str
+ """
+ try:
+ dst_ip = IPv6Address(unicode(ip_addr))
+ except (AddressValueError, NetmaskValueError):
+ dst_ip = IPv4Address(unicode(ip_addr))
+
+ neighbor = dict(
+ sw_if_index=Topology.get_interface_sw_index(
+ node, iface_key),
+ flags=0,
+ mac_address=str(mac_address),
+ ip_address=str(dst_ip))
+ cmd = 'ip_neighbor_add_del'
+ args = dict(
+ is_add=1,
+ neighbor=neighbor)
+ err_msg = 'Failed to add IP neighbor on interface {ifc}'.format(
+ ifc=iface_key)
+ with PapiExecutor(node) as papi_exec:
+ papi_exec.add(cmd, **args).get_replies(err_msg). \
+ verify_reply(err_msg=err_msg)
+
+ @staticmethod
+ def vpp_route_add(node, network, prefix_len, **kwargs):
+ """Add route to the VPP node.
+
+ :param node: VPP node.
+ :param network: Route destination network address.
+ :param prefix_len: Route destination network prefix length.
+ :param kwargs: Optional key-value arguments:
+
+ gateway: Route gateway address. (str)
+ interface: Route interface. (str)
+ vrf: VRF table ID. (int)
+ count: number of IP addresses to add starting from network IP (int)
+ local: The route is local with same prefix (increment is 1).
+ If None, then is not used. (bool)
+ lookup_vrf: VRF table ID for lookup. (int)
+ multipath: Enable multipath routing. (bool)
+ weight: Weight value for unequal cost multipath routing. (int)
+
+ :type node: dict
+ :type network: str
+ :type prefix_len: int
+ :type kwargs: dict
+ """
+ interface = kwargs.get('interface', None)
+ gateway = kwargs.get('gateway', None)
+
+ try:
+ net_addr = IPv6Address(unicode(network))
+ af_inet = AF_INET6
+ is_ipv6 = 1
+ except (AddressValueError, NetmaskValueError):
+ net_addr = IPv4Address(unicode(network))
+ af_inet = AF_INET
+ is_ipv6 = 0
+
+ if gateway:
+ try:
+ gt_addr = IPv6Address(unicode(gateway))
+ af_inet_gt = AF_INET6
+ except (AddressValueError, NetmaskValueError):
+ gt_addr = IPv4Address(unicode(gateway))
+ af_inet_gt = AF_INET
+
+ cmd = 'ip_add_del_route'
+ args = dict(
+ next_hop_sw_if_index=InterfaceUtil.get_interface_index(
+ node, interface) if interface else Constants.BITWISE_NON_ZERO,
+ table_id=int(kwargs.get('vrf', 0)),
+ is_add=1,
+ is_ipv6=is_ipv6,
+ is_local=int(kwargs.get('local', False)),
+ is_multipath=int(kwargs.get('multipath', False)),
+ next_hop_weight=int(kwargs.get('weight', 1)),
+ next_hop_proto=1 if is_ipv6 else 0,
+ dst_address_length=int(prefix_len),
+ next_hop_address=inet_pton(af_inet_gt, str(gt_addr)) if gateway
+ else 0,
+ next_hop_table_id=int(kwargs.get('lookup_vrf', 0)))
+ err_msg = 'Failed to add route(s) on host {host}'.format(
+ host=node['host'])
+ with PapiExecutor(node) as papi_exec:
+ for i in xrange(kwargs.get('count', 1)):
+ papi_exec.add(cmd, dst_address=inet_pton(
+ af_inet, str(net_addr+i)), **args)
+ papi_exec.get_replies(err_msg).verify_replies(err_msg=err_msg)
+
+ @staticmethod
+ def vpp_nodes_set_ipv4_addresses(nodes, nodes_addr):
+ """Set IPv4 addresses on all VPP nodes in topology.
+
+ :param nodes: Nodes of the test topology.
+ :param nodes_addr: Available nodes IPv4 addresses.
+ :type nodes: dict
+ :type nodes_addr: dict
+ :returns: Affected interfaces as list of (node, interface) tuples.
+ :rtype: list
+ """
+ interfaces = []
+ for net in nodes_addr.values():
+ for port in net['ports'].values():
+ host = port.get('node')
+ if host is None:
+ continue
+ topo = Topology()
+ node = topo.get_node_by_hostname(nodes, host)
+ if node is None:
+ continue
+ if node['type'] != NodeType.DUT:
+ continue
+ iface_key = topo.get_interface_by_name(node, port['if'])
+ IPUtil.vpp_interface_set_ip_address(
+ node, iface_key, port['addr'], net['prefix'])
+ interfaces.append((node, port['if']))
+
+ return interfaces
+
+ @staticmethod
+ def flush_ip_addresses(node, interface):
+ """Flush all IPv4addresses from specified interface.
+
+ :param node: VPP node.
+ :param interface: Interface name.
+ :type node: dict
+ :type interface: str
+ """
+ cmd = 'sw_interface_add_del_address'
+ args = dict(
+ sw_if_index=InterfaceUtil.get_interface_index(node, interface),
+ del_all=1)
+ err_msg = 'Failed to flush IP address on interface {ifc}'.format(
+ ifc=interface)
+ with PapiExecutor(node) as papi_exec:
+ papi_exec.add(cmd, **args).get_replies(err_msg). \
+ verify_reply(err_msg=err_msg)
+
+ @staticmethod
+ def add_fib_table(node, table_id, ipv6=False):
+ """Create new FIB table according to ID.
-def convert_ipv4_netmask_prefix(network):
- """Convert network mask to equivalent network prefix length or vice versa.
-
- Example: mask 255.255.0.0 -> prefix length 16
- :param network: Network mask or network prefix length.
- :type network: str or int
- :returns: Network mask or network prefix length.
- :rtype: str or int
- """
- temp_address = "0.0.0.0"
- net = IPv4Network(u"{0}/{1}".format(temp_address, network), False)
-
- if isinstance(network, int) and (0 < network < 33):
- return str(net.netmask)
- elif isinstance(network, basestring):
- return int(net.prefixlen)
- else:
- raise Exception("Value {0} is not a valid ipv4 netmask or network"
- " prefix length".format(network))
+ :param node: Node to add FIB on.
+ :param table_id: FIB table ID.
+ :param ipv6: Is this an IPv6 table
+ :type node: dict
+ :type table_id: int
+ :type ipv6: bool
+ """
+ cmd = 'ip_table_add_del'
+ args = dict(
+ table_id=int(table_id),
+ is_ipv6=int(ipv6),
+ is_add=1)
+ err_msg = 'Failed to add FIB table on host {host}'.format(
+ host=node['host'])
+ with PapiExecutor(node) as papi_exec:
+ papi_exec.add(cmd, **args).get_replies(err_msg). \
+ verify_reply(err_msg=err_msg)
diff --git a/resources/libraries/python/IPv4NodeAddress.py b/resources/libraries/python/IPv4NodeAddress.py
deleted file mode 100644
index de96c189e5..0000000000
--- a/resources/libraries/python/IPv4NodeAddress.py
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright (c) 2018 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Robot framework variable file.
-
-Create dictionary variable nodes_ipv4_addr of IPv4 addresses from
-available networks.
-"""
-
-from ipaddress import IPv4Network
-
-from resources.libraries.python.topology import Topology
-
-# Default list of IPv4 subnets
-IPV4_NETWORKS = ['192.168.{}.0/24'.format(i) for i in range(1, 100)]
-
-
-class IPv4NetworkGenerator(object):
- """IPv4 network generator.
-
- TODO: Conform to https://docs.python.org/2/library/stdtypes.html#typeiter
- """
-
- def __init__(self, networks):
- """Populate internal list of valid networks.
-
- :param networks: List of strings containing IPv4 subnet
- with prefix length.
- :type networks: list
- :raise RuntimeError: If no IPv4 networks are added.
- """
- self._networks = []
- for network in networks:
- net = IPv4Network(unicode(network))
- self._networks.append(net)
- if not self._networks:
- raise RuntimeError("No IPv4 networks")
-
- def next_network(self):
- """Pop and return network from internal list.
-
- :returns: Next network in form (IPv4Network, subnet).
- :raises StopIteration: If there are no more elements.
- """
- if self._networks:
- return self._networks.pop()
- else:
- raise StopIteration()
-
-
-def get_variables(nodes, networks=IPV4_NETWORKS[:]):
- """Special robot framework method that returns dictionary nodes_ipv4_addr,
- mapping of node and interface name to IPv4 address.
-
- :param nodes: Nodes of the test topology.
- :param networks: List of available IPv4 networks.
- :type nodes: dict
- :type networks: list
-
- .. note::
- Robot framework calls it automatically.
- """
- topo = Topology()
- links = topo.get_links(nodes)
-
- if len(links) > len(networks):
- raise Exception('Not enough available IPv4 networks for topology.')
-
- ip4_n = IPv4NetworkGenerator(networks)
-
- nets = {}
-
- for link in links:
- ip4_net = ip4_n.next_network()
- net_hosts = ip4_net.hosts()
- port_idx = 0
- ports = {}
- for node in nodes.values():
- if_key = topo.get_interface_by_link_name(node, link)
- if_name = topo.get_interface_name(node, if_key)
- if if_name is not None:
- port = {'addr': str(next(net_hosts)),
- 'node': node['host'],
- 'if': if_name}
- port_idx += 1
- port_id = 'port{0}'.format(port_idx)
- ports.update({port_id: port})
- nets.update({link: {'net_addr': str(ip4_net.network_address),
- 'prefix': ip4_net.prefixlen,
- 'ports': ports}})
-
- return {'DICT__nodes_ipv4_addr': nets}
diff --git a/resources/libraries/python/IPv4Setup.py b/resources/libraries/python/IPv4Setup.py
deleted file mode 100644
index b018bceacf..0000000000
--- a/resources/libraries/python/IPv4Setup.py
+++ /dev/null
@@ -1,363 +0,0 @@
-# Copyright (c) 2018 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""IPv4 setup library"""
-
-from socket import inet_ntoa
-from struct import pack
-from abc import ABCMeta, abstractmethod
-
-from robot.api.deco import keyword
-
-from resources.libraries.python.ssh import exec_cmd_no_error
-from resources.libraries.python.Routing import Routing
-from resources.libraries.python.topology import NodeType, Topology
-from resources.libraries.python.VatExecutor import VatExecutor
-
-
-class IPv4Node(object):
- """Abstract class of a node in a topology."""
- __metaclass__ = ABCMeta
-
- def __init__(self, node_info):
- self.node_info = node_info
-
- @staticmethod
- def _get_netmask(prefix_length):
- """Convert IPv4 network prefix length into IPV4 network mask.
-
- :param prefix_length: Length of network prefix.
- :type prefix_length: int
- :returns: Network mask.
- :rtype: str
- """
-
- bits = 0xffffffff ^ (1 << 32 - prefix_length) - 1
- return inet_ntoa(pack('>I', bits))
-
- @abstractmethod
- def set_ip(self, interface, address, prefix_length):
- """Configure IPv4 address on interface.
-
- :param interface: Interface name.
- :param address: IPv4 address.
- :param prefix_length: IPv4 prefix length.
- :type interface: str
- :type address: str
- :type prefix_length: int
- :returns: nothing
- """
- pass
-
- @abstractmethod
- def set_route(self, network, prefix_length, gateway, interface, count=1):
- """Configure IPv4 route.
-
- :param network: Network IPv4 address.
- :param prefix_length: IPv4 prefix length.
- :param gateway: IPv4 address of the gateway.
- :param interface: Interface name.
- :param count: Number of consecutive routes to add.
- :type network: str
- :type prefix_length: int
- :type gateway: str
- :type interface: str
- :type route: int
- :returns: nothing
- """
- pass
-
- @abstractmethod
- def unset_route(self, network, prefix_length, gateway, interface):
- """Remove specified IPv4 route.
-
- :param network: Network IPv4 address.
- :param prefix_length: IPv4 prefix length.
- :param gateway: IPv4 address of the gateway.
- :param interface: Interface name.
- :type network: str
- :type prefix_length: int
- :type gateway: str
- :type interface: str
- :returns: nothing
- """
- pass
-
- @abstractmethod
- def flush_ip_addresses(self, interface):
- """Flush all IPv4 addresses from specified interface.
-
- :param interface: Interface name.
- :type interface: str
- :returns: nothing
- """
- pass
-
- @abstractmethod
- def ping(self, destination_address, source_interface):
- """Send an ICMP request to destination node.
-
- :param destination_address: Address to send the ICMP request.
- :param source_interface: Source interface name.
- :type destination_address: str
- :type source_interface: str
- :returns: nothing
- """
- pass
-
-
-class Tg(IPv4Node):
- """Traffic generator node"""
-
- # Implicit constructor is inherited.
-
- def _execute(self, cmd):
- """Executes the specified command on TG using SSH.
-
- :param cmd: Command to be executed.
- :type cmd: str
- :returns: Content of stdout and stderr returned by command.
- :rtype: tuple
- """
- return exec_cmd_no_error(self.node_info, cmd)
-
- def _sudo_execute(self, cmd):
- """Executes the specified command with sudo on TG using SSH.
-
- :param cmd: Command to be executed.
- :type cmd: str
- :returns: Content of stdout and stderr returned by command.
- :rtype: tuple
- """
- return exec_cmd_no_error(self.node_info, cmd, sudo=True)
-
- def set_ip(self, interface, address, prefix_length):
- cmd = 'ip -4 addr flush dev {}'.format(interface)
- self._sudo_execute(cmd)
- cmd = 'ip addr add {}/{} dev {}'.format(address, prefix_length,
- interface)
- self._sudo_execute(cmd)
-
- def set_route(self, network, prefix_length, gateway, interface, count=1):
- netmask = self._get_netmask(prefix_length)
- cmd = 'route add -net {} netmask {} gw {}'.\
- format(network, netmask, gateway)
- self._sudo_execute(cmd)
-
- def unset_route(self, network, prefix_length, gateway, interface):
- self._sudo_execute('ip route delete {}/{}'.
- format(network, prefix_length))
-
- def arp_ping(self, destination_address, source_interface):
- """Execute 'arping' command to send one ARP packet from the TG node.
-
- :param destination_address: Destination IP address for the ARP packet.
- :param source_interface: Name of an interface to send ARP packet from.
- :type destination_address: str
- :type source_interface: str
- """
- self._sudo_execute('arping -c 1 -I {} {}'.format(source_interface,
- destination_address))
-
- def ping(self, destination_address, source_interface):
- self._execute('ping -c 1 -w 5 -I {} {}'.format(source_interface,
- destination_address))
-
- def flush_ip_addresses(self, interface):
- self._sudo_execute('ip addr flush dev {}'.format(interface))
-
-
-class Dut(IPv4Node):
- """Device under test"""
-
- # Implicit contructor is inherited.
-
- def get_sw_if_index(self, interface):
- """Get sw_if_index of specified interface from current node.
-
- :param interface: Interface name.
- :type interface: str
- :returns: sw_if_index of the interface or None.
- :rtype: int
- """
- return Topology().get_interface_sw_index(self.node_info, interface)
-
- def exec_vat(self, script, **args):
- """Wrapper for VAT executor.
-
- :param script: Script to execute.
- :param args: Parameters to the script.
- :type script: str
- :type args: dict
- :returns: nothing
- """
- # TODO: check return value
- VatExecutor.cmd_from_template(self.node_info, script, **args)
-
- def set_arp(self, iface_key, ip_address, mac_address):
- """Set entry in ARP cache.
-
- :param iface_key: Interface key.
- :param ip_address: IP address.
- :param mac_address: MAC address.
- :type iface_key: str
- :type ip_address: str
- :type mac_address: str
- """
- self.exec_vat('add_ip_neighbor.vat',
- sw_if_index=self.get_sw_if_index(iface_key),
- ip_address=ip_address, mac_address=mac_address)
-
- def set_ip(self, interface, address, prefix_length):
- self.exec_vat('add_ip_address.vat',
- sw_if_index=self.get_sw_if_index(interface),
- address=address, prefix_length=prefix_length)
-
- def set_route(self, network, prefix_length, gateway, interface, count=1):
- Routing.vpp_route_add(self.node_info,
- network=network, prefix_len=prefix_length,
- gateway=gateway, interface=interface, count=count)
-
- def unset_route(self, network, prefix_length, gateway, interface):
- self.exec_vat('del_route.vat', network=network,
- prefix_length=prefix_length, gateway=gateway,
- sw_if_index=self.get_sw_if_index(interface))
-
- def arp_ping(self, destination_address, source_interface):
- """Does nothing."""
- pass
-
- def flush_ip_addresses(self, interface):
- self.exec_vat('flush_ip_addresses.vat',
- sw_if_index=self.get_sw_if_index(interface))
-
- def ping(self, destination_address, source_interface):
- pass
-
-
-def get_node(node_info):
- """Creates a class instance derived from Node based on type.
-
- :param node_info: Dictionary containing information on nodes in topology.
- :type node_info: dict
- :returns: Class instance that is derived from Node.
- """
- if node_info['type'] == NodeType.TG:
- return Tg(node_info)
- elif node_info['type'] == NodeType.DUT:
- return Dut(node_info)
- else:
- raise NotImplementedError('Node type "{}" unsupported!'.
- format(node_info['type']))
-
-
-class IPv4Setup(object):
- """IPv4 setup in topology."""
-
- @staticmethod
- def vpp_nodes_set_ipv4_addresses(nodes, nodes_addr):
- """Set IPv4 addresses on all VPP nodes in topology.
-
- :param nodes: Nodes of the test topology.
- :param nodes_addr: Available nodes IPv4 addresses.
- :type nodes: dict
- :type nodes_addr: dict
- :returns: Affected interfaces as list of (node, interface) tuples.
- :rtype: list
- """
- interfaces = []
- for net in nodes_addr.values():
- for port in net['ports'].values():
- host = port.get('node')
- if host is None:
- continue
- topo = Topology()
- node = topo.get_node_by_hostname(nodes, host)
- if node is None:
- continue
- if node['type'] != NodeType.DUT:
- continue
- iface_key = topo.get_interface_by_name(node, port['if'])
- get_node(node).set_ip(iface_key, port['addr'], net['prefix'])
- interfaces.append((node, port['if']))
-
- return interfaces
-
- @staticmethod
- @keyword('Get IPv4 address of node "${node}" interface "${port}" '
- 'from "${nodes_addr}"')
- def get_ip_addr(node, iface_key, nodes_addr):
- """Return IPv4 address of the node port.
-
- :param node: Node in the topology.
- :param iface_key: Interface key of the node.
- :param nodes_addr: Nodes IPv4 addresses.
- :type node: dict
- :type iface_key: str
- :type nodes_addr: dict
- :returns: IPv4 address.
- :rtype: str
- """
- interface = Topology.get_interface_name(node, iface_key)
- for net in nodes_addr.values():
- for port in net['ports'].values():
- host = port.get('node')
- dev = port.get('if')
- if host == node['host'] and dev == interface:
- ip_addr = port.get('addr')
- if ip_addr is not None:
- return ip_addr
- else:
- raise Exception(
- 'Node {n} port {p} IPv4 address is not set'.format(
- n=node['host'], p=interface))
-
- raise Exception('Node {n} port {p} IPv4 address not found.'.format(
- n=node['host'], p=interface))
-
- @staticmethod
- def setup_arp_on_all_duts(nodes_info, nodes_addr):
- """For all DUT nodes extract MAC and IP addresses of adjacent
- interfaces from topology and use them to setup ARP entries.
-
- :param nodes_info: Dictionary containing information on all nodes
- in topology.
- :param nodes_addr: Nodes IPv4 addresses.
- :type nodes_info: dict
- :type nodes_addr: dict
- """
- for node in nodes_info.values():
- if node['type'] == NodeType.TG:
- continue
- for iface_key in node['interfaces'].keys():
- adj_node, adj_int = Topology.\
- get_adjacent_node_and_interface(nodes_info, node, iface_key)
- ip_address = IPv4Setup.get_ip_addr(adj_node, adj_int,
- nodes_addr)
- mac_address = Topology.get_interface_mac(adj_node, adj_int)
- get_node(node).set_arp(iface_key, ip_address, mac_address)
-
- @staticmethod
- def add_arp_on_dut(node, iface_key, ip_address, mac_address):
- """Set ARP cache entree on DUT node.
-
- :param node: VPP Node in the topology.
- :param iface_key: Interface key.
- :param ip_address: IP address of the interface.
- :param mac_address: MAC address of the interface.
- :type node: dict
- :type iface_key: str
- :type ip_address: str
- :type mac_address: str
- """
- get_node(node).set_arp(iface_key, ip_address, mac_address)
diff --git a/resources/libraries/python/IPv4Util.py b/resources/libraries/python/IPv4Util.py
deleted file mode 100644
index c40e391c36..0000000000
--- a/resources/libraries/python/IPv4Util.py
+++ /dev/null
@@ -1,240 +0,0 @@
-# Copyright (c) 2018 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Implements IPv4 RobotFramework keywords"""
-
-from robot.api import logger as log
-from robot.api.deco import keyword
-
-from resources.libraries.python.topology import Topology
-from resources.libraries.python.IPv4Setup import get_node
-from resources.libraries.python.VatExecutor import VatTerminal
-from resources.libraries.python.ssh import exec_cmd
-
-
-class IPv4Util(object):
- """Implements keywords for IPv4 tests."""
-
- @staticmethod
- @keyword('From node "${node}" interface "${port}" ARP-ping '
- 'IPv4 address "${ip_address}"')
- def arp_ping(node, interface, ip_address):
- """Send an ARP ping from the specified node.
-
- :param node: Node in topology.
- :param ip_address: Destination IP address for the ARP packet.
- :param interface: Name of an interface to send the ARP packet from.
- :type node: dict
- :type ip_address: str
- :type interface: str
- """
- log.debug('From node {} interface {} ARP-ping IPv4 address {}'.
- format(Topology.get_node_hostname(node),
- interface, ip_address))
- get_node(node).arp_ping(ip_address, interface)
-
- @staticmethod
- def set_interface_address(node, interface, address, prefix_length):
- """See IPv4Node.set_ip for more information.
-
- :param node: Node where IP address should be set to.
- :param interface: Interface name.
- :param address: IP address.
- :param prefix_length: Prefix length.
- :type node: dict
- :type interface: str
- :type address: str
- :type prefix_length: int
- """
- log.debug('Node {} interface {} has IPv4 address {} with prefix '
- 'length {}'.format(Topology.get_node_hostname(node),
- interface, address, prefix_length))
- get_node(node).set_ip(interface, address, int(prefix_length))
-
- @staticmethod
- def set_route(node, network, prefix_length, interface, gateway):
- """See IPv4Node.set_route for more information.
-
- :param node: Node where IP address should be set to.
- :param network: IP network.
- :param prefix_length: Prefix length.
- :param interface: Interface name.
- :param gateway: Gateway.
- :type node: dict
- :type network: str
- :type prefix_length: int
- :type interface: str
- :type gateway: str
- """
- log.debug('Node {} routes to network {} with prefix length {} '
- 'via {} interface {}'.format(Topology.get_node_hostname(node),
- network, prefix_length,
- gateway, interface))
- get_node(node).set_route(network, int(prefix_length),
- gateway, interface)
-
- @staticmethod
- @keyword('Get IPv4 address prefix of node "${node}" interface "${port}" '
- 'from "${nodes_addr}"')
- def get_ip_addr_prefix_length(node, port, nodes_addr):
- """ Get IPv4 address prefix for specified interface.
-
- :param node: Node dictionary.
- :param port: Interface name.
- :param nodes_addr: Available nodes IPv4 addresses.
- :type node: dict
- :type port: str
- :type nodes_addr: dict
- :returns: IPv4 prefix length.
- :rtype: int
- """
- for net in nodes_addr.values():
- for net_port in net['ports'].values():
- if net_port['node'] == node['host'] and net_port['if'] == port:
- return net['prefix']
-
- raise Exception('Subnet not found for node {n} port {p}'.
- format(n=node['host'], p=port))
-
- @staticmethod
- @keyword('Get IPv4 subnet of node "${node}" interface "${port}" from '
- '"${nodes_addr}"')
- def get_ip_addr_subnet(node, port, nodes_addr):
- """ Get IPv4 subnet of specified interface.
-
- :param node: Node dictionary.
- :param port: Interface name.
- :param nodes_addr: Available nodes IPv4 addresses.
- :type node: dict
- :type port: int
- :type nodes_addr: dict
- :returns: IPv4 subnet.
- :rtype: str
- """
- for net in nodes_addr.values():
- for net_port in net['ports'].values():
- if net_port['node'] == node['host'] and net_port['if'] == port:
- return net['net_addr']
-
- raise Exception('Subnet not found for node {n} port {p}'.
- format(n=node['host'], p=port))
-
- @staticmethod
- @keyword('Flush IPv4 addresses "${port}" "${node}"')
- def flush_ip_addresses(port, node):
- """See IPv4Node.flush_ip_addresses for more information.
-
- :param port: FIXME
- :param node: FIXME
- :returns: FIXME
- """
- get_node(node).flush_ip_addresses(port)
-
- @staticmethod
- def get_link_address(link, nodes_addr):
- """Get link IPv4 address.
-
- :param link: Link name.
- :param nodes_addr: Available nodes IPv4 addresses.
- :type link: str
- :type nodes_addr: dict
- :returns: Link IPv4 address.
- :rtype: str
- """
- net = nodes_addr.get(link)
- if net is None:
- raise ValueError('Link "{0}" not found'.format(link))
- return net.get('net_addr')
-
- @staticmethod
- def get_link_prefix(link, nodes_addr):
- """Get link IPv4 address prefix.
-
- :param link: Link name.
- :param nodes_addr: Available nodes IPv4 addresses.
- :type link: str
- :type nodes_addr: dict
- :returns: Link IPv4 address prefix.
- :rtype: int
- """
- net = nodes_addr.get(link)
- if net is None:
- raise ValueError('Link "{0}" not found'.format(link))
- return net.get('prefix')
-
- @staticmethod
- def send_ping_from_node_to_dst(node, destination, namespace=None,
- ping_count=3, interface=None):
- """Send a ping from node to destination. Optionally, you can define a
- namespace and interface from where to send a ping.
-
- :param node: Node to start ping on.
- :param destination: IPv4 address where to send ping.
- :param namespace: Namespace to send ping from. Optional
- :param ping_count: Number of pings to send. Default 3
- :param interface: Interface from where to send ping. Optional
- :type node: dict
- :type destination: str
- :type namespace: str
- :type ping_count: int
- :type interface: str
- :raises RuntimeError: If no response for ping, raise error
- """
- cmd = ''
- if namespace is not None:
- cmd = 'ip netns exec {0} ping -c{1} {2}'.format(
- namespace, ping_count, destination)
- elif interface is not None:
- cmd = 'ping -I {0} -c{1} {2}'.format(
- interface, ping_count, destination)
- else:
- cmd = 'ping -c{0} {1}'.format(ping_count, destination)
- ret_code, _, _ = exec_cmd(node, cmd, sudo=True)
- if ret_code != 0:
- raise RuntimeError("Ping Not Successful")
-
- @staticmethod
- def set_linux_interface_arp(node, interface, ip_addr, mac, namespace=None):
- """Set arp on interface in linux.
-
- :param node: Node where to execute command.
- :param interface: Interface in namespace.
- :param ip_addr: IP address for ARP entry.
- :param mac: MAC address.
- :param namespace: Execute command in namespace. Optional
- :type node: dict
- :type interface: str
- :type ip_addr: str
- :type mac: str
- :type namespace: str
- :raises RuntimeError: Could not set ARP properly.
- """
- if namespace is not None:
- cmd = 'ip netns exec {} arp -i {} -s {} {}'.format(
- namespace, interface, ip_addr, mac)
- else:
- cmd = 'arp -i {} -s {} {}'.format(interface, ip_addr, mac)
- ret_code, _, stderr = exec_cmd(node, cmd, sudo=True)
- if ret_code != 0:
- raise RuntimeError("Arp set not successful, reason:{}".
- format(stderr))
-
- @staticmethod
- def vpp_show_ip_table(node):
- """Get IP FIB table data from a VPP node.
-
- :param node: VPP node.
- :type node: dict
- """
- with VatTerminal(node, json_param=False) as vat:
- vat.vat_terminal_exec_cmd_from_template("show_ip_fib.vat")
diff --git a/resources/libraries/python/IPv6NodesAddr.py b/resources/libraries/python/IPv6NodesAddr.py
deleted file mode 100644
index 0482cf3cf4..0000000000
--- a/resources/libraries/python/IPv6NodesAddr.py
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright (c) 2016 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Robot framework variable file.
-
-Create dictionary variable nodes_ipv6_addr with IPv6 addresses from available
-networks.
-"""
-
-from resources.libraries.python.IPv6Setup import IPv6Networks
-from resources.libraries.python.topology import Topology
-
-# Default list of available IPv6 networks
-IPV6_NETWORKS = ['3ffe:{0:04x}::/64'.format(i) for i in range(1, 100)]
-
-
-def get_variables(nodes, networks=IPV6_NETWORKS):
- """Special robot framework method that returns dictionary nodes_ipv6_addr,
- mapping of node and interface name to IPv6 address.
-
- :param nodes: Nodes of the test topology.
- :param networks: List of available IPv6 networks.
- :type nodes: dict
- :type networks: list
-
- .. note::
- Robot framework calls it automatically.
- """
- topo = Topology()
- links = topo.get_links(nodes)
-
- if len(links) > len(networks):
- raise Exception('Not enough available IPv6 networks for topology.')
-
- ip6_n = IPv6Networks(networks)
-
- nets = {}
-
- for link in links:
- ip6_net = ip6_n.next_network()
- net_hosts = ip6_net.hosts()
- port_idx = 0
- ports = {}
- for node in nodes.values():
- if_key = topo.get_interface_by_link_name(node, link)
- if_name = topo.get_interface_name(node, if_key)
- if if_name is not None:
- port = {'addr': str(next(net_hosts)),
- 'node': node['host'],
- 'if': if_name}
- port_idx += 1
- port_id = 'port{0}'.format(port_idx)
- ports.update({port_id: port})
- nets.update({link: {'net_addr': str(ip6_net.network_address),
- 'prefix': ip6_net.prefixlen,
- 'ports': ports}})
-
- return {'DICT__nodes_ipv6_addr': nets}
diff --git a/resources/libraries/python/IPv6Setup.py b/resources/libraries/python/IPv6Setup.py
deleted file mode 100644
index 72aeb305a2..0000000000
--- a/resources/libraries/python/IPv6Setup.py
+++ /dev/null
@@ -1,297 +0,0 @@
-# Copyright (c) 2018 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Library to set up IPv6 in topology."""
-
-from ipaddress import IPv6Network
-from robot.api import logger
-
-from resources.libraries.python.ssh import SSH
-from resources.libraries.python.topology import NodeType, Topology
-from resources.libraries.python.Constants import Constants
-from resources.libraries.python.VatExecutor import VatTerminal, VatExecutor
-
-
-class IPv6Networks(object):
- """IPv6 network iterator.
-
- TODO: Conform to https://docs.python.org/2/library/stdtypes.html#typeiter
- """
-
- def __init__(self, networks):
- """Initialize internal list of valid networks.
-
- :param networks: List of the available IPv6 networks.
- :type networks: list
- :raise RuntimeError: If no networks were added.
- """
- self._networks = []
- for network in networks:
- net = IPv6Network(unicode(network))
- self._networks.append(net)
- if not self._networks:
- raise RuntimeError('No IPv6 networks')
-
- def next_network(self):
- """Get the next element of the iterator.
-
- :returns: IPv6 network.
- :rtype: IPv6Network object
- :raises StopIteration: If there is no more elements.
- """
- if self._networks:
- return self._networks.pop()
- else:
- raise StopIteration()
-
-
-class IPv6Setup(object):
- """IPv6 setup in topology."""
-
- def __init__(self):
- pass
-
- def nodes_set_ipv6_addresses(self, nodes, nodes_addr):
- """Set IPv6 addresses on all VPP nodes in topology.
-
- :param nodes: Nodes of the test topology.
- :param nodes_addr: Available nodes IPv6 addresses.
- :type nodes: dict
- :type nodes_addr: dict
- :returns: Affected interfaces as list of (node, interface) tuples.
- :rtype: list
- """
- interfaces = []
-
- for net in nodes_addr.values():
- for port in net['ports'].values():
- host = port.get('node')
- if host is None:
- continue
- topo = Topology()
- node = topo.get_node_by_hostname(nodes, host)
- if node is None:
- continue
- if node['type'] == NodeType.DUT:
- port_key = topo.get_interface_by_name(node, port['if'])
- self.vpp_set_if_ipv6_addr(node, port_key, port['addr'],
- net['prefix'])
-
- interfaces.append((node, port['if']))
- return interfaces
-
- def nodes_clear_ipv6_addresses(self, nodes, nodes_addr):
- """Remove IPv6 addresses from all VPP nodes in topology.
-
- :param nodes: Nodes of the test topology.
- :param nodes_addr: Available nodes IPv6 addresses.
- :type nodes: dict
- :type nodes_addr: dict
- """
- for net in nodes_addr.values():
- for port in net['ports'].values():
- host = port.get('node')
- if host is None:
- continue
- topo = Topology()
- node = topo.get_node_by_hostname(nodes, host)
- if node is None:
- continue
- if node['type'] == NodeType.DUT:
- self.vpp_del_if_ipv6_addr(node, port['if'], port['addr'],
- net['prefix'])
-
- @staticmethod
- def linux_set_if_ipv6_addr(node, interface, addr, prefix):
- """Set IPv6 address on linux host.
-
- :param node: Linux node.
- :param interface: Node interface.
- :param addr: IPv6 address.
- :param prefix: IPv6 address prefix.
- :type node: dict
- :type interface: str
- :type addr: str
- :type prefix: str
- """
- ssh = SSH()
- ssh.connect(node)
-
- cmd = "ifconfig {dev} inet6 add {ip}/{p} up".format(dev=interface,
- ip=addr, p=prefix)
- (ret_code, _, _) = ssh.exec_command_sudo(cmd)
- if int(ret_code) != 0:
- raise Exception('TG ifconfig failed')
-
- @staticmethod
- def linux_del_if_ipv6_addr(node, interface, addr, prefix):
- """Delete IPv6 address on linux host.
-
- :param node: Linux node.
- :param interface: Node interface.
- :param addr: IPv6 address.
- :param prefix: IPv6 address prefix.
- :type node: dict
- :type interface: str
- :type addr: str
- :type prefix: str
- """
- ssh = SSH()
- ssh.connect(node)
-
- cmd = "ifconfig {dev} inet6 del {ip}/{p}".format(dev=interface,
- ip=addr,
- p=prefix)
- (ret_code, _, _) = ssh.exec_command_sudo(cmd)
- if int(ret_code) != 0:
- raise Exception('TG ifconfig failed')
-
- cmd = "ifconfig {dev} down".format(dev=interface)
- (ret_code, _, _) = ssh.exec_command_sudo(cmd)
- if int(ret_code) != 0:
- raise Exception('TG ifconfig failed')
-
- @staticmethod
- def vpp_set_if_ipv6_addr(node, iface_key, addr, prefix):
- """Set IPv6 address on VPP.
-
- :param node: VPP node.
- :param iface_key: Node interface key.
- :param addr: IPv6 address.
- :param prefix: IPv6 address prefix.
- :type node: dict
- :type iface_key: str
- :type addr: str
- :type prefix: str
- """
- sw_if_index = Topology.get_interface_sw_index(node, iface_key)
- with VatTerminal(node) as vat:
- vat.vat_terminal_exec_cmd_from_template('add_ip_address.vat',
- sw_if_index=sw_if_index,
- address=addr,
- prefix_length=prefix)
- vat.vat_terminal_exec_cmd_from_template('set_if_state.vat',
- sw_if_index=sw_if_index,
- state='admin-up')
-
- ssh = SSH()
- ssh.connect(node)
- cmd_input = 'exec show int'
- (ret_code, stdout, stderr) = ssh.exec_command_sudo(
- Constants.VAT_BIN_NAME, cmd_input)
- logger.debug('ret: {0}'.format(ret_code))
- logger.debug('stdout: {0}'.format(stdout))
- logger.debug('stderr: {0}'.format(stderr))
-
- @staticmethod
- def vpp_del_if_ipv6_addr(node, interface, addr, prefix):
- """Delete IPv6 address on VPP.
-
- :param node: VPP node.
- :param interface: Node interface.
- :param addr: IPv6 address.
- :param prefix: IPv6 address prefix.
- :type node: dict
- :type interface: str
- :type addr: str
- :type prefix: str
- """
- sw_if_index = Topology.get_interface_sw_index(node, interface)
- with VatTerminal(node) as vat:
- vat.vat_terminal_exec_cmd_from_template('del_ip_address.vat',
- sw_if_index=sw_if_index,
- address=addr,
- prefix_length=prefix)
- vat.vat_terminal_exec_cmd_from_template('set_if_state.vat',
- sw_if_index=sw_if_index,
- state='admin-down')
-
- @staticmethod
- def vpp_ra_suppress_link_layer(node, interface):
- """Suppress ICMPv6 router advertisement message for link scope address.
-
- :param node: VPP node.
- :param interface: Interface name.
- :type node: dict
- :type interface: str
- """
- sw_if_index = Topology.get_interface_sw_index(node, interface)
- if sw_if_index:
- VatExecutor.cmd_from_template(node,
- 'sw_interface_ip6nd_ra_config.vat',
- 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)
- if sw_if_index:
- 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.
-
- :param nodes: Nodes of the test topology.
- :type nodes: dict
- """
- for node in nodes.values():
- if node['type'] == NodeType.TG:
- continue
- for port_k in node['interfaces'].keys():
- self.vpp_ra_suppress_link_layer(node, port_k)
-
- @staticmethod
- def get_link_address(link, nodes_addr):
- """Get link IPv6 address.
-
- :param link: Link name.
- :param nodes_addr: Available nodes IPv6 addresses.
- :type link: str
- :type nodes_addr: dict
- :returns: Link IPv6 address.
- :rtype: str
- """
- net = nodes_addr.get(link)
- if net is None:
- raise ValueError('Link "{0}" address not found'.format(link))
- return net.get('net_addr')
-
- @staticmethod
- def get_link_prefix(link, nodes_addr):
- """Get link IPv6 address prefix.
-
- :param link: Link name.
- :param nodes_addr: Available nodes IPv6 addresses.
- :type link: str
- :type nodes_addr: dict
- :returns: Link IPv6 address prefix.
- :rtype: int
- """
- net = nodes_addr.get(link)
- if net is None:
- raise ValueError('Link "{0}" address not found'.format(link))
- return net.get('prefix')
diff --git a/resources/libraries/python/IPv6Util.py b/resources/libraries/python/IPv6Util.py
index f89d17169b..28e5f7d2fb 100644
--- a/resources/libraries/python/IPv6Util.py
+++ b/resources/libraries/python/IPv6Util.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2018 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -13,123 +13,71 @@
"""IPv6 utilities library."""
-import re
-
-from resources.libraries.python.ssh import SSH
-from resources.libraries.python.VatExecutor import VatTerminal
-from resources.libraries.python.topology import Topology
+from resources.libraries.python.InterfaceUtil import InterfaceUtil
+from resources.libraries.python.IPUtil import IPUtil
+from resources.libraries.python.PapiExecutor import PapiExecutor
+from resources.libraries.python.topology import NodeType
class IPv6Util(object):
"""IPv6 utilities"""
@staticmethod
- def ipv6_ping(src_node, dst_addr, count=3, data_size=56, timeout=1):
- """IPv6 ping.
+ def vpp_ra_suppress_link_layer(node, interface):
+ """Suppress ICMPv6 router advertisement message for link scope address.
- :param src_node: Node where ping run.
- :param dst_addr: Destination IPv6 address.
- :param count: Number of echo requests. (Optional)
- :param data_size: Number of the data bytes. (Optional)
- :param timeout: Time to wait for a response, in seconds. (Optional)
- :type src_node: dict
- :type dst_addr: str
- :type count: int
- :type data_size: int
- :type timeout: int
- :returns: Number of lost packets.
- :rtype: int
+ :param node: VPP node.
+ :param interface: Interface name.
+ :type node: dict
+ :type interface: str
"""
- ssh = SSH()
- ssh.connect(src_node)
-
- cmd = "ping6 -c {c} -s {s} -W {W} {dst}".format(c=count, s=data_size,
- W=timeout,
- dst=dst_addr)
- (_, stdout, _) = ssh.exec_command(cmd)
-
- regex = re.compile(r'(\d+) packets transmitted, (\d+) received')
- match = regex.search(stdout)
- sent, received = match.groups()
- packet_lost = int(sent) - int(received)
-
- return packet_lost
+ cmd = 'sw_interface_ip6nd_ra_config'
+ args = dict(
+ sw_if_index=InterfaceUtil.get_interface_index(node, interface),
+ suppress=1)
+ err_msg = 'Failed to suppress ICMPv6 router advertisement message on ' \
+ 'interface {ifc}'.format(ifc=interface)
- @staticmethod
- def ipv6_ping_port(nodes_ip, src_node, dst_node, port, cnt=3,
- size=56, timeout=1):
- """Send IPv6 ping to the node port.
-
- :param nodes_ip: Nodes IPv6 addresses.
- :param src_node: Node where ping run.
- :param dst_node: Destination node.
- :param port: Port on the destination node.
- :param cnt: Number of echo requests. (Optional)
- :param size: Number of the data bytes. (Optional)
- :param timeout: Time to wait for a response, in seconds. (Optional)
- :type nodes_ip: dict
- :type src_node: dict
- :type dst_node: dict
- :type port: str
- :type cnt: int
- :type size: int
- :type timeout: int
- :returns: Number of lost packets.
- :rtype: int
- """
- dst_ip = IPv6Util.get_node_port_ipv6_address(dst_node, port, nodes_ip)
- return IPv6Util.ipv6_ping(src_node, dst_ip, cnt, size, timeout)
+ with PapiExecutor(node) as papi_exec:
+ papi_exec.add(cmd, **args).get_replies(err_msg). \
+ verify_reply(err_msg=err_msg)
@staticmethod
- def get_node_port_ipv6_address(node, iface_key, nodes_addr):
- """Return IPv6 address of the node port.
+ def vpp_ra_send_after_interval(node, interface, interval=2):
+ """Setup vpp router advertisement(RA) in such way it sends RA packet
+ after every interval value.
- :param node: Node in the topology.
- :param iface_key: Interface key of the node.
- :param nodes_addr: Nodes IPv6 addresses.
+ :param node: VPP node.
+ :param interface: Interface name.
+ :param interval: Interval in seconds for RA resend.
:type node: dict
- :type iface_key: str
- :type nodes_addr: dict
- :returns: IPv6 address string.
- :rtype: str
+ :type interface: str
+ :type interval: int
"""
- interface = Topology.get_interface_name(node, iface_key)
- for net in nodes_addr.values():
- for port in net['ports'].values():
- host = port.get('node')
- dev = port.get('if')
- if host == node['host'] and dev == interface:
- ip_addr = port.get('addr')
- if ip_addr is not None:
- return ip_addr
- else:
- raise Exception(
- 'Node {n} port {p} IPv6 address is not set'.format(
- n=node['host'], p=interface))
+ cmd = 'sw_interface_ip6nd_ra_config'
+ args = dict(
+ sw_if_index=InterfaceUtil.get_interface_index(node, interface),
+ initial_interval=int(interval))
+ err_msg = 'Failed to set router advertisement interval on ' \
+ 'interface {ifc}'.format(ifc=interface)
- raise Exception('Node {n} port {p} IPv6 address not found.'.format(
- n=node['host'], p=interface))
+ with PapiExecutor(node) as papi_exec:
+ papi_exec.add(cmd, **args).get_replies(err_msg). \
+ verify_reply(err_msg=err_msg)
@staticmethod
- def add_ip_neighbor(node, interface, ip_address, mac_address):
- """Add IP neighbor.
+ def vpp_all_ra_suppress_link_layer(nodes):
+ """Suppress ICMPv6 router advertisement message for link scope address
+ on all VPP nodes in the topology.
- :param node: VPP node to add ip neighbor.
- :param interface: Interface name or sw_if_index.
- :param ip_address: IP address.
- :param mac_address: MAC address.
- :type node: dict
- :type interface: str or int
- :type ip_address: str
- :type mac_address: str
+ :param nodes: Nodes of the test topology.
+ :type nodes: dict
"""
- if isinstance(interface, basestring):
- sw_if_index = Topology.get_interface_sw_index(node, interface)
- else:
- sw_if_index = interface
-
- with VatTerminal(node) as vat:
- vat.vat_terminal_exec_cmd_from_template("add_ip_neighbor.vat",
- sw_if_index=sw_if_index,
- ip_address=ip_address,
- mac_address=mac_address)
+ for node in nodes.values():
+ if node['type'] == NodeType.TG:
+ continue
+ for port_k in node['interfaces'].keys():
+ ip6_addr_list = IPUtil.vpp_get_interface_ip_addresses(
+ node, port_k, 'ipv6')
+ if ip6_addr_list:
+ IPv6Util.vpp_ra_suppress_link_layer(node, port_k)
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py
index 6e001243db..46b1ffb034 100644
--- a/resources/libraries/python/InterfaceUtil.py
+++ b/resources/libraries/python/InterfaceUtil.py
@@ -24,7 +24,6 @@ from robot.api import logger
from resources.libraries.python.Constants import Constants
from resources.libraries.python.CpuUtils import CpuUtils
from resources.libraries.python.DUTSetup import DUTSetup
-from resources.libraries.python.IPUtil import convert_ipv4_netmask_prefix
from resources.libraries.python.L2Util import L2Util
from resources.libraries.python.PapiExecutor import PapiExecutor
from resources.libraries.python.parsers.JsonParser import JsonParser
@@ -64,7 +63,6 @@ class InterfaceUtil(object):
:returns: Integer representation of PCI address.
:rtype: int
"""
-
pci = list(pci_str.split(':')[0:2])
pci.extend(pci_str.split(':')[2].split('.'))
@@ -82,7 +80,6 @@ class InterfaceUtil(object):
:returns: SW interface index.
:rtype: int
"""
-
try:
sw_if_index = int(interface)
except ValueError:
@@ -115,7 +112,6 @@ class InterfaceUtil(object):
:raises ValueError: If the state of interface is unexpected.
:raises ValueError: If the node has an unknown node type.
"""
-
if if_type == 'key':
if isinstance(interface, basestring):
sw_if_index = Topology.get_interface_sw_index(node, interface)
@@ -170,7 +166,6 @@ class InterfaceUtil(object):
:raises ValueError: If the node type is "DUT".
:raises ValueError: If the node has an unknown node type.
"""
-
if node['type'] == NodeType.DUT:
raise ValueError('Node {}: Setting Ethernet MTU for interface '
'on DUT nodes not supported', node['host'])
@@ -192,7 +187,6 @@ class InterfaceUtil(object):
:type node: dict
:returns: Nothing.
"""
-
for ifc in node['interfaces']:
InterfaceUtil.set_interface_ethernet_mtu(node, ifc, 1500)
@@ -207,7 +201,6 @@ class InterfaceUtil(object):
:type interface: str or int
:type mtu: int
"""
-
if isinstance(interface, basestring):
sw_if_index = Topology.get_interface_sw_index(node, interface)
else:
@@ -231,7 +224,6 @@ class InterfaceUtil(object):
:type node: dict
:type mtu: int
"""
-
for interface in node['interfaces']:
InterfaceUtil.vpp_set_interface_mtu(node, interface, mtu)
@@ -244,7 +236,6 @@ class InterfaceUtil(object):
:type nodes: dict
:type mtu: int
"""
-
for node in nodes.values():
if node['type'] == NodeType.DUT:
InterfaceUtil.vpp_set_interfaces_mtu_on_node(node, mtu)
@@ -262,7 +253,6 @@ class InterfaceUtil(object):
:raises RuntimeError: If any interface is not in link-up state after
defined number of retries.
"""
-
for _ in xrange(0, retries):
not_ready = list()
out = InterfaceUtil.vpp_get_interface_data(node)
@@ -293,7 +283,6 @@ class InterfaceUtil(object):
:type retries: int
:returns: Nothing.
"""
-
for node in nodes.values():
if node['type'] == NodeType.DUT:
InterfaceUtil.vpp_node_interfaces_ready_wait(node, retries)
@@ -314,7 +303,6 @@ class InterfaceUtil(object):
:raises TypeError: if the data type of interface is neither basestring
nor int.
"""
-
if interface is not None:
if isinstance(interface, basestring):
param = 'interface_name'
@@ -376,7 +364,6 @@ class InterfaceUtil(object):
:returns: Name of the given interface.
:rtype: str
"""
-
if_data = InterfaceUtil.vpp_get_interface_data(node, sw_if_index)
if if_data['sup_sw_if_index'] != if_data['sw_if_index']:
if_data = InterfaceUtil.vpp_get_interface_data(
@@ -396,7 +383,6 @@ class InterfaceUtil(object):
:returns: Name of the given interface.
:rtype: str
"""
-
if_data = InterfaceUtil.vpp_get_interface_data(node, interface_name)
return if_data.get('sw_if_index')
@@ -412,7 +398,6 @@ class InterfaceUtil(object):
:returns: MAC address.
:rtype: str
"""
-
if_data = InterfaceUtil.vpp_get_interface_data(node, interface)
if if_data['sup_sw_if_index'] != if_data['sw_if_index']:
if_data = InterfaceUtil.vpp_get_interface_data(
@@ -421,56 +406,6 @@ class InterfaceUtil(object):
return if_data.get('l2_address')
@staticmethod
- def vpp_get_interface_ip_addresses(node, interface, ip_version):
- """Get list of IP addresses from an interface on a VPP node.
-
- TODO: Move to IPUtils
-
- :param node: VPP node to get data from.
- :param interface: Name of an interface on the VPP node.
- :param ip_version: IP protocol version (ipv4 or ipv6).
- :type node: dict
- :type interface: str
- :type ip_version: str
- :returns: List of dictionaries, each containing IP address, subnet
- prefix length and also the subnet mask for ipv4 addresses.
- Note: A single interface may have multiple IP addresses assigned.
- :rtype: list
- """
-
- try:
- sw_if_index = Topology.convert_interface_reference(
- node, interface, 'sw_if_index')
- except RuntimeError:
- if isinstance(interface, basestring):
- sw_if_index = InterfaceUtil.get_sw_if_index(node, interface)
- else:
- raise
-
- is_ipv6 = 1 if ip_version == 'ipv6' else 0
-
- cmd = 'ip_address_dump'
- cmd_reply = 'ip_address_details'
- args = dict(sw_if_index=sw_if_index,
- is_ipv6=is_ipv6)
- err_msg = 'Failed to get L2FIB dump on host {host}'.format(
- host=node['host'])
- with PapiExecutor(node) as papi_exec:
- papi_resp = papi_exec.add(cmd, **args).get_dump(err_msg)
-
- data = list()
- for item in papi_resp.reply[0]['api_reply']:
- item[cmd_reply]['ip'] = inet_ntop(AF_INET6, item[cmd_reply]['ip']) \
- if is_ipv6 else inet_ntop(AF_INET, item[cmd_reply]['ip'][0:4])
- data.append(item[cmd_reply])
-
- if ip_version == 'ipv4':
- for item in data:
- item['netmask'] = convert_ipv4_netmask_prefix(
- item['prefix_length'])
- return data
-
- @staticmethod
def tg_set_interface_driver(node, pci_addr, driver):
"""Set interface driver on the TG node.
@@ -586,7 +521,6 @@ class InterfaceUtil(object):
:param node: Node selected from DICT__nodes.
:type node: dict
"""
-
interface_list = InterfaceUtil.vpp_get_interface_data(node)
interface_dict = dict()
for ifc in interface_list:
@@ -789,7 +723,6 @@ class InterfaceUtil(object):
:raises RuntimeError: if it is unable to create VLAN subinterface on the
node.
"""
-
iface_key = Topology.get_interface_by_name(node, interface)
sw_if_index = Topology.get_interface_sw_index(node, iface_key)
@@ -827,7 +760,6 @@ class InterfaceUtil(object):
:raises RuntimeError: if it is unable to create VxLAN interface on the
node.
"""
-
try:
src_address = IPv6Address(unicode(source_ip))
dst_address = IPv6Address(unicode(destination_ip))
@@ -878,7 +810,6 @@ class InterfaceUtil(object):
:raises TypeError: if the data type of interface is neither basestring
nor int.
"""
-
if interface is not None:
sw_if_index = InterfaceUtil.get_interface_index(node, interface)
else:
@@ -936,7 +867,6 @@ class InterfaceUtil(object):
:returns: List of dictionaries with all vhost-user interfaces.
:rtype: list
"""
-
cmd = 'sw_interface_vhost_user_dump'
cmd_reply = 'sw_interface_vhost_user_details'
err_msg = 'Failed to get vhost-user dump on host {host}'.format(
@@ -982,7 +912,6 @@ class InterfaceUtil(object):
a List of dictionaries containing all TAP data for the given node.
:rtype: dict or list
"""
-
cmd = 'sw_interface_tap_v2_dump'
cmd_reply = 'sw_interface_tap_v2_details'
err_msg = 'Failed to get TAP dump on host {host}'.format(
@@ -1047,7 +976,6 @@ class InterfaceUtil(object):
:rtype: tuple
:raises RuntimeError: If it is not possible to create sub-interface.
"""
-
subif_types = type_subif.split()
cmd = 'create_subif'
@@ -1092,7 +1020,6 @@ class InterfaceUtil(object):
:rtype: tuple
:raises RuntimeError: If unable to create GRE tunnel interface.
"""
-
cmd = 'gre_tunnel_add_del'
tunnel = dict(type=0,
instance=Constants.BITWISE_NON_ZERO,
@@ -1127,7 +1054,6 @@ class InterfaceUtil(object):
:raises RuntimeError: If it is not possible to create loopback on the
node.
"""
-
cmd = 'create_loopback'
args = dict(mac_address=0)
err_msg = 'Failed to create loopback interface on host {host}'.format(
@@ -1162,7 +1088,6 @@ class InterfaceUtil(object):
:raises RuntimeError: If it is not possible to create bond interface on
the node.
"""
-
cmd = 'bond_create'
args = dict(id=int(Constants.BITWISE_NON_ZERO),
use_custom_mac=0 if mac is None else 1,
@@ -1198,7 +1123,6 @@ class InterfaceUtil(object):
:type sw_if_idx: int
:type ifc_pfx: str
"""
-
if_key = Topology.add_new_port(node, ifc_pfx)
if ifc_name and sw_if_idx is None:
@@ -1225,7 +1149,6 @@ class InterfaceUtil(object):
:raises RuntimeError: If it is not possible to create AVF interface on
the node.
"""
-
cmd = 'avf_create'
args = dict(pci_addr=InterfaceUtil.pci_to_int(vf_pci_addr),
enable_elog=0,
@@ -1258,7 +1181,6 @@ class InterfaceUtil(object):
:raises RuntimeError: If it is not possible to enslave physical
interface to bond interface on the node.
"""
-
cmd = 'bond_enslave'
args = dict(
sw_if_index=Topology.get_interface_sw_index(node, interface),
@@ -1282,7 +1204,6 @@ class InterfaceUtil(object):
:type node: dict
:type details: bool
"""
-
cmd = 'sw_interface_bond_dump'
cmd_reply = 'sw_interface_bond_details'
err_msg = 'Failed to get bond interface dump on host {host}'.format(
@@ -1391,7 +1312,6 @@ class InterfaceUtil(object):
:type ip_version: str
:type table_index: int
"""
-
cmd = 'input_acl_set_interface'
args = dict(
sw_if_index=InterfaceUtil.get_interface_index(node, interface),
@@ -1437,39 +1357,6 @@ class InterfaceUtil(object):
return papi_resp
@staticmethod
- def get_interface_vrf_table(node, interface, ip_version='ipv4'):
- """Get vrf ID for the given interface.
-
- TODO: Move to proper IP library when implementing CSIT-1459.
-
- :param node: VPP node.
- :param interface: Name or sw_if_index of a specific interface.
- :type node: dict
- :param ip_version: IP protocol version (ipv4 or ipv6).
- :type interface: str or int
- :type ip_version: str
- :returns: vrf ID of the specified interface.
- :rtype: int
- """
- if isinstance(interface, basestring):
- sw_if_index = InterfaceUtil.get_sw_if_index(node, interface)
- else:
- sw_if_index = interface
-
- is_ipv6 = 1 if ip_version == 'ipv6' else 0
-
- cmd = 'sw_interface_get_table'
- args = dict(sw_if_index=sw_if_index,
- is_ipv6=is_ipv6)
- err_msg = 'Failed to get VRF id assigned to interface {ifc}'.format(
- ifc=interface)
- with PapiExecutor(node) as papi_exec:
- papi_resp = papi_exec.add(cmd, **args).get_replies(err_msg). \
- verify_reply(err_msg=err_msg)
-
- return papi_resp['vrf_id']
-
- @staticmethod
def get_sw_if_index(node, interface_name):
"""Get sw_if_index for the given interface from actual interface dump.
@@ -1480,7 +1367,6 @@ class InterfaceUtil(object):
:returns: sw_if_index of the given interface.
:rtype: str
"""
-
interface_data = InterfaceUtil.vpp_get_interface_data(
node, interface=interface_name)
return interface_data.get('sw_if_index')
@@ -1499,7 +1385,6 @@ class InterfaceUtil(object):
interfaces.
:rtype: dict or list
"""
-
if interface_name is not None:
sw_if_index = InterfaceUtil.get_interface_index(
node, interface_name)
@@ -1549,29 +1434,6 @@ class InterfaceUtil(object):
return data
@staticmethod
- def vpp_ip_source_check_setup(node, if_name):
- """Setup Reverse Path Forwarding source check on interface.
-
- TODO: Move to proper IP library when implementing CSIT-1459.
-
- :param node: Node to setup RPF source check.
- :param if_name: Interface name to setup RPF source check.
- :type node: dict
- :type if_name: str
- """
-
- cmd = 'ip_source_check_interface_add_del'
- args = dict(
- sw_if_index=InterfaceUtil.get_interface_index(node, if_name),
- is_add=1,
- loose=0)
- err_msg = 'Failed to enable source check on interface {ifc}'.format(
- ifc=if_name)
- with PapiExecutor(node) as papi_exec:
- papi_exec.add(cmd, **args).get_replies(err_msg). \
- verify_reply(err_msg=err_msg)
-
- @staticmethod
def assign_interface_to_fib_table(node, interface, table_id, ipv6=False):
"""Assign VPP interface to specific VRF/FIB table.
@@ -1584,7 +1446,6 @@ class InterfaceUtil(object):
:type table_id: int
:type ipv6: bool
"""
-
cmd = 'sw_interface_set_table'
args = dict(
sw_if_index=InterfaceUtil.get_interface_index(node, interface),
@@ -1827,7 +1688,6 @@ class InterfaceUtil(object):
:returns: Number of created VXLAN interfaces.
:rtype: int
"""
-
try:
src_address_start = IPv6Address(unicode(src_ip_start))
dst_address_start = IPv6Address(unicode(dst_ip_start))
@@ -1896,7 +1756,6 @@ class InterfaceUtil(object):
:type vxlan_count: int
:type node_vlan_if: str
"""
-
if_data = InterfaceUtil.vpp_get_interface_data(node)
with PapiExecutor(node) as papi_exec:
@@ -1965,7 +1824,6 @@ class InterfaceUtil(object):
:type ip_step: int
:type bd_id_start: int
"""
-
try:
dst_address_start = IPv6Address(unicode(dst_ip_start))
af_inet = AF_INET6
@@ -2031,7 +1889,6 @@ class InterfaceUtil(object):
:returns: Thread mapping information as a list of dictionaries.
:rtype: list
"""
-
cmd = 'sw_interface_rx_placement_dump'
cmd_reply = 'sw_interface_rx_placement_details'
err_msg = "Failed to run '{cmd}' PAPI command on host {host}!".format(
@@ -2061,7 +1918,6 @@ class InterfaceUtil(object):
:raises RuntimeError: If failed to run command on host or if no API
reply received.
"""
-
cmd = 'sw_interface_set_rx_placement'
err_msg = "Failed to set interface RX placement to worker on host " \
"{host}!".format(host=node['host'])
diff --git a/resources/libraries/python/Routing.py b/resources/libraries/python/Routing.py
deleted file mode 100644
index a682c90102..0000000000
--- a/resources/libraries/python/Routing.py
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright (c) 2018 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Routing utilities library."""
-
-from resources.libraries.python.VatExecutor import VatTerminal
-from resources.libraries.python.topology import Topology
-from resources.libraries.python.ssh import exec_cmd_no_error
-
-
-class Routing(object):
- """Routing utilities."""
-
- @staticmethod
- def vpp_route_add(node, network, prefix_len, **kwargs):
- """Add route to the VPP node.
-
- :param node: Node to add route on.
- :param network: Route destination network address.
- :param prefix_len: Route destination network prefix length.
- :param kwargs: Optional key-value arguments:
-
- gateway: Route gateway address. (str)
- interface: Route interface. (str)
- vrf: VRF table ID. (int)
- use_sw_index: Use sw_if_index in VAT command. (bool)
- resolve_attempts: Resolve attempts IP route add parameter. (int)
- count: number of IP addresses to add starting from network IP (int)
- local: The route is local with same prefix (increment is 1).
- If None, then is not used. (bool)
- lookup_vrf: VRF table ID for lookup. (int)
- multipath: Enable multipath routing. (bool)
- weight: Weight value for unequal cost multipath routing. (int)
-
- :type node: dict
- :type network: str
- :type prefix_len: int
- :type kwargs: dict
- """
-
- gateway = kwargs.get("gateway", '')
- intf = kwargs.get("interface", '')
- use_sw_index = kwargs.get("use_sw_index", True)
- resolve_attempts = kwargs.get("resolve_attempts", 10)
- count = kwargs.get("count", 1)
- vrf = kwargs.get("vrf", None)
- l_vrf = kwargs.get("lookup_vrf", None)
- multipath = kwargs.get("multipath", False)
- weight = kwargs.get("weight", None)
- local = kwargs.get("local", False)
-
- if intf:
- if use_sw_index:
- int_cmd = ('sw_if_index {}'.
- format(Topology.get_interface_sw_index(node, intf)))
- else:
- int_cmd = intf
- else:
- int_cmd = ''
-
- with VatTerminal(node, json_param=False) as vat:
- vat.vat_terminal_exec_cmd_from_template(
- 'add_route.vat',
- network=network,
- prefix_length=prefix_len,
- via='via {}'.format(gateway) if gateway else '',
- vrf='vrf {}'.format(vrf) if vrf else '',
- interface=int_cmd,
- resolve_attempts='resolve-attempts {}'.
- format(resolve_attempts) if resolve_attempts else '',
- count='count {}'.format(count) if count else '',
- lookup_vrf='lookup-in-vrf {}'.format(l_vrf) if l_vrf else '',
- multipath='multipath' if multipath else '',
- weight='weight {}'.format(weight) if weight else '',
- local='local' if local else '')
-
- @staticmethod
- def add_fib_table(node, table_id, ipv6=False):
- """Create new FIB table according to ID.
-
- :param node: Node to add FIB on.
- :param table_id: FIB table ID.
- :param ipv6: Is this an IPv6 table
- :type node: dict
- :type table_id: int
- :type ipv6: bool
- """
- with VatTerminal(node) as vat:
- vat.vat_terminal_exec_cmd_from_template('add_fib_table.vat',
- table_id=table_id,
- ipv6="ipv6" if ipv6 else "")
-
- @staticmethod
- def add_route(node, ip_addr, prefix, gateway, namespace=None):
- """Add route in namespace.
-
- :param node: Node where to execute command.
- :param ip_addr: Route destination IP address.
- :param prefix: IP prefix.
- :param namespace: Execute command in namespace. Optional.
- :param gateway: Gateway address.
- :type node: dict
- :type ip_addr: str
- :type prefix: int
- :type gateway: str
- :type namespace: str
- """
- if namespace is not None:
- cmd = 'ip netns exec {} ip route add {}/{} via {}'.format(
- namespace, ip_addr, prefix, gateway)
- else:
- cmd = 'ip route add {}/{} via {}'.format(ip_addr, prefix, gateway)
- exec_cmd_no_error(node, cmd, sudo=True)
diff --git a/resources/libraries/python/ssh.py b/resources/libraries/python/ssh.py
index e89daf2915..3523d57302 100644
--- a/resources/libraries/python/ssh.py
+++ b/resources/libraries/python/ssh.py
@@ -507,6 +507,7 @@ def exec_cmd_no_error(
return stdout, stderr
+
def scp_node(
node, local_path, remote_path, get=False, timeout=30, disconnect=False):
"""Copy files from local_path to remote_path or vice versa.
diff --git a/resources/libraries/robot/crypto/ipsec.robot b/resources/libraries/robot/crypto/ipsec.robot
index 5c0fc863a6..b571fcd6ca 100644
--- a/resources/libraries/robot/crypto/ipsec.robot
+++ b/resources/libraries/robot/crypto/ipsec.robot
@@ -12,19 +12,17 @@
# limitations under the License.
*** Settings ***
-| Resource | resources/libraries/robot/shared/default.robot
+| Library | String
+| Library | resources.libraries.python.InterfaceUtil
| Library | resources.libraries.python.IPsecUtil
+| Library | resources.libraries.python.IPUtil
+| Library | resources.libraries.python.IPv6Util
| Library | resources.libraries.python.NodePath
| Library | resources.libraries.python.TrafficScriptExecutor
-| Library | resources.libraries.python.IPv4Util.IPv4Util
-| Library | resources.libraries.python.InterfaceUtil
-| Library | resources.libraries.python.Routing
-| Library | String
-| Library | resources.libraries.python.IPv6Util
-| Library | resources.libraries.python.IPv6Setup
-| Library | resources.libraries.python.IPv4Setup.Dut | ${nodes['DUT1']}
-| ... | WITH NAME | dut1_v4
-| Documentation | *IPsec keywords.*
+| ...
+| Resource | resources/libraries/robot/shared/default.robot
+| ...
+| Documentation | IPsec keywords
*** Keywords ***
| Generate keys for IPSec
@@ -94,11 +92,11 @@
| | ... | *Example:*
| | ... | \| Configure topology for IPv4 IPsec testing \|
| | Configure path for IPSec test
-| | Set Interface Address | ${dut_node} | ${dut_if} | ${dut_if_ip4}
+| | VPP Interface Set IP Address | ${dut_node} | ${dut_if} | ${dut_if_ip4}
| | ... | ${ip4_plen}
-| | Set Interface Address | ${dut_node} | ${dut_lo} | ${dut_lo_ip4}
+| | VPP Interface Set IP Address | ${dut_node} | ${dut_lo} | ${dut_lo_ip4}
| | ... | ${ip4_plen}
-| | dut1_v4.Set Arp | ${dut_if} | ${tg_if_ip4} | ${tg_if_mac}
+| | VPP Add IP Neighbor | ${dut_node} | ${dut_if} | ${tg_if_ip4} | ${tg_if_mac}
| | Vpp Route Add | ${dut_node} | ${tg_lo_ip4} | ${ip4_plen}
| | ... | gateway=${tg_if_ip4} | interface=${dut_if}
| | Set Test Variable | ${dut_tun_ip} | ${dut_if_ip4}
@@ -118,9 +116,11 @@
| | ... | *Example:*
| | ... | \| Configure topology for IPv6 IPsec testing \|
| | Configure path for IPSec test
-| | VPP Set If IPv6 Addr | ${dut_node} | ${dut_if} | ${dut_if_ip6} | ${ip6_plen}
-| | VPP Set If IPv6 Addr | ${dut_node} | ${dut_lo} | ${dut_lo_ip6} | ${ip6_plen}
-| | Add IP Neighbor | ${dut_node} | ${dut_if} | ${tg_if_ip6} | ${tg_if_mac}
+| | VPP Interface Set IP Address
+| | ... | ${dut_node} | ${dut_if} | ${dut_if_ip6} | ${ip6_plen}
+| | VPP Interface Set IP Address
+| | ... | ${dut_node} | ${dut_lo} | ${dut_lo_ip6} | ${ip6_plen}
+| | VPP Add IP Neighbor | ${dut_node} | ${dut_if} | ${tg_if_ip6} | ${tg_if_mac}
| | Vpp All RA Suppress Link Layer | ${nodes}
| | Vpp Route Add | ${dut_node} | ${tg_lo_ip6} | ${ip6_plen_rt}
| | ... | gateway=${tg_if_ip6} | interface=${dut_if}
diff --git a/resources/libraries/robot/features/policer.robot b/resources/libraries/robot/features/policer.robot
index 321488b8c5..8fdfa39d18 100644
--- a/resources/libraries/robot/features/policer.robot
+++ b/resources/libraries/robot/features/policer.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2016 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -12,17 +12,16 @@
# limitations under the License.
*** Settings ***
-| Resource | resources/libraries/robot/shared/default.robot
-| Resource | resources/libraries/robot/shared/testing_path.robot
-| Library | resources.libraries.python.Policer
| Library | resources.libraries.python.InterfaceUtil
-| Library | resources.libraries.python.IPv4Util
-| Library | resources.libraries.python.TrafficScriptExecutor
+| Library | resources.libraries.python.IPUtil
| Library | resources.libraries.python.IPv6Util
-| Library | resources.libraries.python.IPv6Setup
-| Library | resources.libraries.python.IPv4Setup.Dut | ${nodes['DUT1']}
-| ... | WITH NAME | dut1_v4
-| Documentation | *Policer keywords*
+| Library | resources.libraries.python.Policer
+| Library | resources.libraries.python.TrafficScriptExecutor
+| ...
+| Resource | resources/libraries/robot/shared/default.robot
+| Resource | resources/libraries/robot/shared/testing_path.robot
+| ...
+| Documentation | Policer keywords
*** Keywords ***
| Configure topology for IPv4 policer test
@@ -33,15 +32,15 @@
| | ... | - dut_to_tg_if2_ip - DUT second interface IP address. Type: string
| | ... | - tg_to_dut_if1_ip - TG first interface IP address. Type: string
| | ... | - tg_to_dut_if2_ip - TG second interface IP address. Type: string
-| | Configure path in 2-node circular topology | ${nodes['TG']} | ${nodes['DUT1']}
-| | ... | ${nodes['TG']}
+| | Configure path in 2-node circular topology | ${nodes['TG']}
+| | ... | ${nodes['DUT1']} | ${nodes['TG']}
| | Set interfaces in 2-node circular topology up
-| | Set Interface Address | ${dut_node} | ${dut_to_tg_if1}
-| | ... | ${dut_to_tg_if1_ip4} | ${ip4_plen}
-| | Set Interface Address | ${dut_node} | ${dut_to_tg_if2}
-| | ... | ${dut_to_tg_if2_ip4} | ${ip4_plen}
-| | dut1_v4.Set ARP | ${dut_to_tg_if2} | ${tg_to_dut_if2_ip4}
-| | ... | ${tg_to_dut_if2_mac}
+| | VPP Interface Set IP Address | ${dut_node} | ${dut_to_tg_if1}
+| | ... | ${dut_to_tg_if1_ip4} | ${ip4_plen}
+| | VPP Interface Set IP Address | ${dut_node} | ${dut_to_tg_if2}
+| | ... | ${dut_to_tg_if2_ip4} | ${ip4_plen}
+| | VPP Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${tg_to_dut_if2_ip4}
+| | ... | ${tg_to_dut_if2_mac}
| | Set Test Variable | ${dut_to_tg_if1_ip} | ${dut_to_tg_if1_ip4}
| | Set Test Variable | ${dut_to_tg_if2_ip} | ${dut_to_tg_if2_ip4}
| | Set Test Variable | ${tg_to_dut_if1_ip} | ${tg_to_dut_if1_ip4}
@@ -55,15 +54,15 @@
| | ... | - dut_to_tg_if2_ip - DUT second interface IP address. Type: string
| | ... | - tg_to_dut_if1_ip - TG first interface IP address. Type: string
| | ... | - tg_to_dut_if2_ip - TG second interface IP address. Type: string
-| | Configure path in 2-node circular topology | ${nodes['TG']} | ${nodes['DUT1']}
-| | ... | ${nodes['TG']}
+| | Configure path in 2-node circular topology | ${nodes['TG']}
+| | ... | ${nodes['DUT1']} | ${nodes['TG']}
| | Set interfaces in 2-node circular topology up
-| | Vpp Set If IPv6 Addr | ${dut_node} | ${dut_to_tg_if1}
-| | ... | ${dut_to_tg_if1_ip6} | ${ip6_plen}
-| | Vpp Set If IPv6 Addr | ${dut_node} | ${dut_to_tg_if2}
-| | ... | ${dut_to_tg_if2_ip6} | ${ip6_plen}
-| | Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${tg_to_dut_if2_ip6}
-| | ... | ${tg_to_dut_if2_mac}
+| | VPP Interface Set IP Address
+| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip6} | ${ip6_plen}
+| | VPP Interface Set IP Address
+| | ... | ${dut_node} | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip6} | ${ip6_plen}
+| | VPP Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${tg_to_dut_if2_ip6}
+| | ... | ${tg_to_dut_if2_mac}
| | Vpp All RA Suppress Link Layer | ${nodes}
| | Set Test Variable | ${dut_to_tg_if1_ip} | ${dut_to_tg_if1_ip6}
| | Set Test Variable | ${dut_to_tg_if2_ip} | ${dut_to_tg_if2_ip6}
@@ -89,11 +88,11 @@
| | ... | \| 08:00:27:87:4d:f7 \| 52:54:00:d4:d8:22 \| 192.168.122.2 \
| | ... | \| 192.168.122.1 \| ${dscp} \|
| | [Arguments] | ${node} | ${tx_if} | ${rx_if} | ${src_mac} | ${dst_mac}
-| | ... | ${src_ip} | ${dst_ip} | ${dscp}
+| | ... | ${src_ip} | ${dst_ip} | ${dscp}
| | ${tx_if_name}= | Get Interface Name | ${node} | ${tx_if}
| | ${rx_if_name}= | Get Interface Name | ${node} | ${rx_if}
| | ${args}= | Traffic Script Gen Arg | ${rx_if_name} | ${tx_if_name}
-| | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
+| | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
| | ${dscp_num}= | Get DSCP Num Value | ${dscp}
| | ${args}= | Set Variable | ${args} --dscp ${dscp_num}
| | Run Traffic Script On Node | policer.py | ${node} | ${args}
diff --git a/resources/libraries/robot/honeycomb/interfaces.robot b/resources/libraries/robot/honeycomb/interfaces.robot
index 7159124242..06428c0c96 100644
--- a/resources/libraries/robot/honeycomb/interfaces.robot
+++ b/resources/libraries/robot/honeycomb/interfaces.robot
@@ -14,7 +14,7 @@
*** Settings ***
| Library | resources.libraries.python.InterfaceUtil
| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords
-| Library | resources.libraries.python.IPv4Util
+| Library | resources.libraries.python.IPUtil
| Library | resources.libraries.python.TrafficScriptExecutor
*** Keywords ***
@@ -401,13 +401,13 @@
| | ...
| | ... | \| IPv6 address from VAT should contain \| ${nodes['DUT1']} \
| | ... | \| GigabitEthernet0/8/0 \| 10::10 \| 64 \|
-| | [Arguments] | ${node} | ${interface} | ${address} | ${prefix}
+| | [Arguments] | ${node} | ${interface} | ${address} | ${prefix} | ${netmask}
| | ${sw_if_index}= | Vpp Get Interface Sw Index | ${node} | ${interface}
| | ${vpp_data}= | VPP get interface ip addresses
| | ... | ${node} | ${interface} | ipv6
| | ${settings}= | Create Dictionary
-| | ... | ip=${address} | sw_if_index=${sw_if_index} | prefix_length=${prefix}
-| | ... | is_ipv6=${1}
+| | ... | ip=${address} | netmask=${netmask} | sw_if_index=${sw_if_index}
+| | ... | prefix_length=${prefix} | is_ipv6=${1}
| | Should contain | ${vpp_data} | ${settings}
| Honeycomb removes interface IPv6 addresses
diff --git a/resources/libraries/robot/honeycomb/persistence.robot b/resources/libraries/robot/honeycomb/persistence.robot
index 01336f3a48..bc2b167f28 100644
--- a/resources/libraries/robot/honeycomb/persistence.robot
+++ b/resources/libraries/robot/honeycomb/persistence.robot
@@ -281,7 +281,8 @@
| | IPv6 address from Honeycomb should contain
| | ... | ${node} | ${interface} | ${ipv6_address} | ${ipv6_prefix}
| | IPv6 address from VAT should contain
-| | ... | ${node} | ${interface} | ${ipv6_address} | ${ipv6_prefix}
+| | ... | ${node} | ${interface} | ${ipv6_address}
+| | ... | ${ipv6_prefix} | ${ipv6_mask}
| | IPv6 neighbor from Honeycomb should be
| | ... | ${node} | ${interface} | ${ipv6_neighbor} | ${neighbor_mac}
diff --git a/resources/libraries/robot/honeycomb/port_mirroring.robot b/resources/libraries/robot/honeycomb/port_mirroring.robot
index 1ce233f57d..5ae0c46ae1 100644
--- a/resources/libraries/robot/honeycomb/port_mirroring.robot
+++ b/resources/libraries/robot/honeycomb/port_mirroring.robot
@@ -15,8 +15,7 @@
| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords
| Library | resources.libraries.python.telemetry.SPAN
| Library | resources.libraries.python.InterfaceUtil
-| Library | resources.libraries.python.IPv4Util
-| Library | resources.libraries.python.IPv4Setup
+| Library | resources.libraries.python.IPUtil
| Library | resources.libraries.python.Trace
*** Keywords ***
diff --git a/resources/libraries/robot/honeycomb/sub_interface.robot b/resources/libraries/robot/honeycomb/sub_interface.robot
index 6e60b23c37..8bb95f51b8 100644
--- a/resources/libraries/robot/honeycomb/sub_interface.robot
+++ b/resources/libraries/robot/honeycomb/sub_interface.robot
@@ -13,6 +13,7 @@
*** Settings ***
| Library | resources.libraries.python.InterfaceUtil
+| Library | resources.libraries.python.IPUtil
| Library | resources.libraries.python.L2Util
| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords
| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
diff --git a/resources/libraries/robot/ip/ip4.robot b/resources/libraries/robot/ip/ip4.robot
index bb0ae5be4c..1307eb89a9 100644
--- a/resources/libraries/robot/ip/ip4.robot
+++ b/resources/libraries/robot/ip/ip4.robot
@@ -13,33 +13,17 @@
*** Settings ***
| Library | resources.libraries.python.InterfaceUtil
-| Library | resources.libraries.python.IPv4Util.IPv4Util
-| Library | resources.libraries.python.IPv4Setup.IPv4Setup
+| Library | resources.libraries.python.IPUtil
| Library | resources.libraries.python.NodePath
-| Library | resources.libraries.python.Routing
| Library | resources.libraries.python.TrafficScriptExecutor
+| ...
| Resource | resources/libraries/robot/shared/counters.robot
| Resource | resources/libraries/robot/shared/default.robot
| Resource | resources/libraries/robot/shared/testing_path.robot
-| Variables | resources/libraries/python/IPv4NodeAddress.py | ${nodes}
| ...
| Documentation | IPv4 keywords
*** Keywords ***
-| Show IP FIB On All DUTs
-| | [Documentation] | Show IP FIB on all DUTs.
-| | ...
-| | ${duts}= | Get Matches | ${nodes} | DUT*
-| | :FOR | ${dut} | IN | @{duts}
-| | | VPP Show IP Table | ${nodes['${dut}']}
-
-| Configure IPv4 addresses on all DUTs
-| | [Documentation] | Setup IPv4 address on all DUTs in topology
-| | [Arguments] | ${nodes} | ${nodes_addr}
-| | ${interfaces}= | VPP nodes set ipv4 addresses | ${nodes} | ${nodes_addr}
-| | :FOR | ${interface} | IN | @{interfaces}
-| | | Set Interface State | @{interface} | up | if_type=name
-
| Get interface Ipv4 addresses
| | [Documentation] | Get IPv4 address for the given interface of the node.
| | ...
@@ -54,88 +38,8 @@
| | ${ip_data}= | VPP get interface ip addresses
| | ... | ${node} | ${interface} | ipv4
-| Configure routes for IPv4 test
-| | [Documentation] | Setup routing on all VPP nodes required for IPv4 tests
-| | [Arguments] | ${nodes} | ${nodes_addr}
-| | Append Nodes | ${nodes['DUT1']} | ${nodes['DUT2']}
-| | Compute Path
-| | ${tg}= | Set Variable | ${nodes['TG']}
-| | ${dut1_if} | ${dut1}= | First Interface
-| | ${dut2_if} | ${dut2}= | Last Interface
-| | ${dut1_if_addr}= | Get IPv4 address of node "${dut1}" interface "${dut1_if}" from "${nodes_addr}"
-| | ${dut2_if_addr}= | Get IPv4 address of node "${dut2}" interface "${dut2_if}" from "${nodes_addr}"
-| | @{tg_dut1_links}= | Get active links connecting "${tg}" and "${dut1}"
-| | @{tg_dut2_links}= | Get active links connecting "${tg}" and "${dut2}"
-| | :FOR | ${link} | IN | @{tg_dut1_links}
-| | | ${net}= | Get Link Address | ${link} | ${nodes_addr}
-| | | ${prefix}= | Get Link Prefix | ${link} | ${nodes_addr}
-| | | Vpp Route Add | ${dut2} | ${net} | ${prefix}
-| | | ... | gateway=${dut1_if_addr} | interface=${dut2_if}
-| | :FOR | ${link} | IN | @{tg_dut2_links}
-| | | ${net}= | Get Link Address | ${link} | ${nodes_addr}
-| | | ${prefix}= | Get Link Prefix | ${link} | ${nodes_addr}
-| | | Vpp Route Add | ${dut1} | ${net} | ${prefix}
-| | | ... | gateway=${dut2_if_addr} | interface=${dut1_if}
-
-| Configure DUT nodes for IPv4 testing
-| | Configure IPv4 addresses on all DUTs | ${nodes} | ${nodes_ipv4_addr}
-| | Setup ARP on all DUTs | ${nodes} | ${nodes_ipv4_addr}
-| | Configure routes for IPv4 test | ${nodes} | ${nodes_ipv4_addr}
-| | All Vpp Interfaces Ready Wait | ${nodes}
-
-| Route traffic from interface '${from_port}' on node '${from_node}' to interface '${to_port}' on node '${to_node}' '${hops}' hops away using IPv4
-| | ${src_ip}= | Get IPv4 address of node "${from_node}" interface "${from_port}" from "${nodes_ipv4_addr}"
-| | ${dst_ip}= | Get IPv4 address of node "${to_node}" interface "${to_port}" from "${nodes_ipv4_addr}"
-| | ${src_mac}= | Get interface mac | ${from_node} | ${from_port}
-| | ${dst_mac}= | Get interface mac | ${to_node} | ${to_port}
-| | ${is_dst_tg}= | Is TG node | ${to_node}
-| | ${adj_node} | ${adj_int}= | Get adjacent node and interface | ${nodes}
-| | ... | ${from_node} | ${from_port}
-| | ${from_port_name}= | Get interface name | ${from_node} | ${from_port}
-| | ${to_port_name}= | Get interface name | ${to_node} | ${to_port}
-| | ${adj_int_mac}= | Get interface MAC | ${adj_node} | ${adj_int}
-| | ${args}= | Traffic Script Gen Arg | ${to_port_name} | ${from_port_name}
-| | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
-| | ${args}= | Catenate | ${args} | --hops ${hops}
-| | ... | --first_hop_mac ${adj_int_mac} | --is_dst_tg ${is_dst_tg}
-| | Run Traffic Script On Node | ipv4_ping_ttl_check.py | ${from_node} | ${args}
-
-| Execute IPv4 ICMP echo sweep
-| | [Documentation] | Type of the src_node must be TG and dst_node must be DUT
-| | [Arguments] | ${src_node} | ${dst_node} | ${start_size} | ${end_size}
-| | ... | ${step}
-| | Append Nodes | ${src_node} | ${dst_node}
-| | Compute Path
-| | ${src_port} | ${src_node}= | First Interface
-| | ${dst_port} | ${dst_node}= | Last Interface
-| | ${src_ip}= | Get IPv4 address of node "${src_node}" interface "${src_port}" from "${nodes_ipv4_addr}"
-| | ${dst_ip}= | Get IPv4 address of node "${dst_node}" interface "${dst_port}" from "${nodes_ipv4_addr}"
-| | ${src_mac}= | Get Interface Mac | ${src_node} | ${src_port}
-| | ${dst_mac}= | Get Interface Mac | ${dst_node} | ${dst_port}
-| | ${src_port_name}= | Get interface name | ${src_node} | ${src_port}
-| | ${args}= | Traffic Script Gen Arg | ${src_port_name} | ${src_port_name}
-| | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
-| | ${args}= | Catenate | ${args} | --start_size ${start_size}
-| | ... | --end_size ${end_size} | --step ${step}
-| | Run Traffic Script On Node | ipv4_sweep_ping.py | ${src_node} | ${args}
-| | ... | timeout=${180}
-
-| Send ARP request and verify response
-| | [Arguments] | ${tg_node} | ${vpp_node}
-| | ${link_name}= | Get first active connecting link between node "${tg_node}" and "${vpp_node}"
-| | ${src_if}= | Get interface by link name | ${tg_node} | ${link_name}
-| | ${dst_if}= | Get interface by link name | ${vpp_node} | ${link_name}
-| | ${src_ip}= | Get IPv4 address of node "${tg_node}" interface "${src_if}" from "${nodes_ipv4_addr}"
-| | ${dst_ip}= | Get IPv4 address of node "${vpp_node}" interface "${dst_if}" from "${nodes_ipv4_addr}"
-| | ${src_mac}= | Get node link mac | ${tg_node} | ${link_name}
-| | ${dst_mac}= | Get node link mac | ${vpp_node} | ${link_name}
-| | ${src_if_name}= | Get interface name | ${tg_node} | ${src_if}
-| | ${args}= | Traffic Script Gen Arg | ${src_if_name} | ${src_if_name}
-| | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
-| | Run Traffic Script On Node | arp_request.py | ${tg_node} | ${args}
-
| Configure IP addresses on interfaces
-| | [Documentation] | Iterates through @{args} list and Set Interface Address
+| | [Documentation] | Iterates through @{args} list and set interface IP address
| | ... | for every (${dut_node}, ${interface}, ${address},
| | ... | ${prefix}) tuple.
| | ...
@@ -154,8 +58,8 @@
| | ...
| | [Arguments] | @{args}
| | :FOR | ${dut_node} | ${interface} | ${address} | ${prefix} | IN | @{args}
-| | | Set Interface Address | ${dut_node} | ${interface} | ${address}
-| | | ... | ${prefix}
+| | | VPP Interface Set IP Address
+| | | ... | ${dut_node} | ${interface} | ${address} | ${prefix}
| Send ICMP echo request and verify answer
| | [Documentation] | Run traffic script that waits for ICMP reply and ignores
@@ -287,9 +191,9 @@
| | ...
| | ${dut_tg_ip4_prefix}= | Set Variable | 24
| | ...
-| | Add arp on dut | ${dut_node} | ${dut_to_tg_if1} | ${tg_if1_ip4}
+| | VPP Add IP Neighbor | ${dut_node} | ${dut_to_tg_if1} | ${tg_if1_ip4}
| | ... | ${tg_to_dut_if1_mac}
-| | Add arp on dut | ${dut_node} | ${dut_to_tg_if2} | ${tg_if2_ip4}
+| | VPP Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${tg_if2_ip4}
| | ... | ${tg_to_dut_if2_mac}
| | ...
| | Configure IP addresses on interfaces | ${dut_node} | ${dut_to_tg_if1}
@@ -347,13 +251,13 @@
| | ${dut_tg_ip4_prefix}= | Set Variable | 24
| | ${dut_link_ip4_prefix}= | Set Variable | 30
| | ...
-| | Add arp on dut | ${dut1_node} | ${dut1_to_tg} | ${tg_if1_ip4}
+| | VPP Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg_if1_ip4}
| | ... | ${tg_to_dut1_mac}
-| | Add arp on dut | ${dut1_node} | ${dut1_to_dut2} | ${dut2_if1_ip4}
+| | VPP Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_if1_ip4}
| | ... | ${dut2_to_dut1_mac}
-| | Add arp on dut | ${dut2_node} | ${dut2_to_dut1} | ${dut1_if2_ip4}
+| | VPP Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_if2_ip4}
| | ... | ${dut1_to_dut2_mac}
-| | Add arp on dut | ${dut2_node} | ${dut2_to_tg} | ${tg_if2_ip4}
+| | VPP Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg_if2_ip4}
| | ... | ${tg_to_dut2_mac}
| | ...
| | Configure IP addresses on interfaces | ${dut1_node} | ${dut1_to_tg}
diff --git a/resources/libraries/robot/ip/ip6.robot b/resources/libraries/robot/ip/ip6.robot
index 6ef781f07e..8de302197e 100644
--- a/resources/libraries/robot/ip/ip6.robot
+++ b/resources/libraries/robot/ip/ip6.robot
@@ -13,12 +13,12 @@
*** Settings ***
| Library | resources.libraries.python.InterfaceUtil
+| Library | resources.libraries.python.IPUtil
| Library | resources.libraries.python.IPv6Util
-| Library | resources.libraries.python.IPv6Setup
| Library | resources.libraries.python.NodePath
-| Library | resources.libraries.python.Routing
| Library | resources.libraries.python.topology.Topology
| Library | resources.libraries.python.TrafficScriptExecutor
+| ...
| Resource | resources/libraries/robot/shared/counters.robot
| Resource | resources/libraries/robot/shared/default.robot
| Resource | resources/libraries/robot/shared/testing_path.robot
@@ -40,191 +40,12 @@
| | ${ip_data}= | VPP get interface ip addresses
| | ... | ${node} | ${interface} | ipv6
-| Send IPv6 icmp echo request to DUT1 ingress inteface and verify answer
-| | [Documentation] | Type of the src_node must be TG and dst_node must be DUT
-| | [Arguments] | ${tg_node} | ${dut_node} | ${nodes_addr}
-| | Append Nodes | ${tg_node} | ${dut_node}
-| | Compute Path
-| | ${src_port} | ${src_node}= | First Interface
-| | ${dst_port} | ${dst_node}= | Last Interface
-| | ${src_ip}= | Get Node Port Ipv6 Address | ${src_node} | ${src_port}
-| | ... | ${nodes_addr}
-| | ${dst_ip}= | Get Node Port Ipv6 Address | ${dst_node} | ${dst_port}
-| | ... | ${nodes_addr}
-| | ${src_mac}= | Get Interface Mac | ${src_node} | ${src_port}
-| | ${dst_mac}= | Get Interface Mac | ${dst_node} | ${dst_port}
-| | ${src_port_name}= | Get interface name | ${src_node} | ${src_port}
-| | ${args}= | Traffic Script Gen Arg | ${src_port_name} | ${src_port_name}
-| | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
-| | Run Traffic Script On Node | icmpv6_echo.py | ${tg_node} | ${args}
-
-| Execute IPv6 ICMP echo sweep
-| | [Documentation] | Type of the src_node must be TG and dst_node must be DUT
-| | [Arguments] | ${src_node} | ${dst_node} | ${start_size} | ${end_size}
-| | ... | ${step} | ${nodes_addr}
-| | Append Nodes | ${src_node} | ${dst_node}
-| | Compute Path
-| | ${src_port} | ${src_node}= | First Interface
-| | ${dst_port} | ${dst_node}= | Last Interface
-| | ${src_ip}= | Get Node Port Ipv6 Address | ${src_node} | ${src_port}
-| | ... | ${nodes_addr}
-| | ${dst_ip}= | Get Node Port Ipv6 Address | ${dst_node} | ${dst_port}
-| | ... | ${nodes_addr}
-| | ${src_mac}= | Get Interface Mac | ${src_node} | ${src_port}
-| | ${dst_mac}= | Get Interface Mac | ${dst_node} | ${dst_port}
-| | ${src_port_name}= | Get interface name | ${src_node} | ${src_port}
-| | ${args}= | Traffic Script Gen Arg | ${src_port_name} | ${src_port_name}
-| | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
-| | ${args}= | Catenate | ${args} | --start_size ${start_size}
-| | ... | --end_size ${end_size} | --step ${step}
-| | Run Traffic Script On Node | ipv6_sweep_ping.py | ${src_node} | ${args}
-| | ... | timeout=${180}
-
-| Send IPv6 ICMP echo request to DUT1 egress interface and verify answer
-| | [Documentation] | Send traffic from TG to first DUT egress interface
-| | [Arguments] | ${tg_node} | ${first_dut} | ${second_dut} | ${nodes_addr}
-| | Append Nodes | ${tg_node} | ${first_dut} | ${second_dut}
-| | Compute Path
-| | ${src_port} | ${src_node}= | First Interface
-| | ${dst_port} | ${dst_node}= | Last Egress Interface
-| | ${hop_port} | ${hop_node}= | First Ingress Interface
-| | ${src_ip}= | Get Node Port Ipv6 Address | ${src_node} | ${src_port}
-| | ... | ${nodes_addr}
-| | ${dst_ip}= | Get Node Port Ipv6 Address | ${dst_node} | ${dst_port}
-| | ... | ${nodes_addr}
-| | ${src_mac}= | Get Interface Mac | ${src_node} | ${src_port}
-| | ${dst_mac}= | Get Interface Mac | ${hop_node} | ${hop_port}
-| | ${src_port_name}= | Get interface name | ${src_node} | ${src_port}
-| | ${args}= | Traffic Script Gen Arg | ${src_port_name} | ${src_port_name}
-| | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
-| | Run Traffic Script On Node | icmpv6_echo.py | ${tg_node} | ${args}
-
-
-| Send IPv6 ICMP echo request to DUT2 via DUT1 and verify answer
-| | [Documentation] | Send traffic from TG to second DUT through first DUT
-| | [Arguments] | ${tg_node} | ${first_dut} | ${second_dut} | ${nodes_addr}
-| | Append Nodes | ${tg_node} | ${first_dut} | ${second_dut}
-| | Compute Path
-| | ${src_port} | ${src_node}= | First Interface
-| | ${dst_port} | ${dst_node}= | Last Interface
-| | ${hop_port} | ${hop_node}= | First Ingress Interface
-| | ${src_ip}= | Get Node Port Ipv6 Address | ${src_node} | ${src_port}
-| | ... | ${nodes_addr}
-| | ${dst_ip}= | Get Node Port Ipv6 Address | ${dst_node} | ${dst_port}
-| | ... | ${nodes_addr}
-| | ${src_mac}= | Get Interface Mac | ${src_node} | ${src_port}
-| | ${dst_mac}= | Get Interface Mac | ${hop_node} | ${hop_port}
-| | ${src_port_name}= | Get interface name | ${src_node} | ${src_port}
-| | ${args}= | Traffic Script Gen Arg | ${src_port_name} | ${src_port_name}
-| | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
-| | Run Traffic Script On Node | icmpv6_echo.py | ${tg_node} | ${args}
-
-| Send IPv6 ICMP echo request to DUT2 egress interface via DUT1 and verify answer
-| | [Documentation] | Send traffic from TG to second DUT egress interface
-| | ... | through first DUT
-| | [Arguments] | ${tg_node} | ${first_dut} | ${second_dut} | ${nodes_addr}
-| | Append Nodes | ${tg_node} | ${first_dut} | ${second_dut} | ${tg_node}
-| | Compute Path
-| | ${src_port} | ${src_node}= | First Interface
-| | ${dst_port} | ${dst_node}= | Last Egress Interface
-| | ${hop_port} | ${hop_node}= | First Ingress Interface
-| | ${src_ip}= | Get Node Port Ipv6 Address | ${src_node} | ${src_port}
-| | ... | ${nodes_addr}
-| | ${dst_ip}= | Get Node Port Ipv6 Address | ${dst_node} | ${dst_port}
-| | ... | ${nodes_addr}
-| | ${src_mac}= | Get Interface Mac | ${src_node} | ${src_port}
-| | ${dst_mac}= | Get Interface Mac | ${hop_node} | ${hop_port}
-| | ${src_port_name}= | Get interface name | ${src_node} | ${src_port}
-| | ${args}= | Traffic Script Gen Arg | ${src_port_name} | ${src_port_name}
-| | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
-| | Run Traffic Script On Node | icmpv6_echo.py | ${tg_node} | ${args}
-
-| Ipv6 tg to tg routed
-| | [Documentation] | Send traffic from one TG port to another through DUT nodes
-| | ... | and send reply back, also verify hop limit processing
-| | [Arguments] | ${tg_node} | ${first_dut} | ${second_dut} | ${nodes_addr}
-| | Append Nodes | ${tg_node} | ${first_dut} | ${second_dut} | ${tg_node}
-| | Compute Path
-| | ${src_port} | ${src_node}= | First Interface
-| | ${dst_port} | ${dst_node}= | Last Interface
-| | ${src_nh_port} | ${src_nh_node}= | First Ingress Interface
-| | ${dst_nh_port} | ${dst_nh_node}= | Last Egress Interface
-| | ${src_ip}= | Get Node Port Ipv6 Address | ${src_node} | ${src_port}
-| | ... | ${nodes_addr}
-| | ${dst_ip}= | Get Node Port Ipv6 Address | ${dst_node} | ${dst_port}
-| | ... | ${nodes_addr}
-| | ${src_mac}= | Get Interface Mac | ${src_node} | ${src_port}
-| | ${dst_mac}= | Get Interface Mac | ${src_node} | ${dst_port}
-| | ${src_nh_mac}= | Get Interface Mac | ${src_nh_node} | ${src_nh_port}
-| | ${dst_nh_mac}= | Get Interface Mac | ${dst_nh_node} | ${dst_nh_port}
-| | ${src_port_name}= | Get interface name | ${src_node} | ${src_port}
-| | ${dst_port_name}= | Get interface name | ${dst_node} | ${dst_port}
-| | ${args}= | Traffic Script Gen Arg | ${dst_port_name} | ${src_port_name}
-| | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
-| | ${args}= | Catenate | ${args} | --src_nh_mac ${src_nh_mac}
-| | ... | --dst_nh_mac ${dst_nh_mac} | --h_num 2
-| | Run Traffic Script On Node | icmpv6_echo_req_resp.py | ${tg_node} | ${args}
-
-| Send IPv6 neighbor solicitation and verify answer
-| | [Documentation] | Send IPv6 neighbor solicitation from TG to DUT
-| | [Arguments] | ${tg_node} | ${dut_node} | ${nodes_addr}
-| | Append Nodes | ${tg_node} | ${dut_node}
-| | Compute Path
-| | ${src_port} | ${src_node}= | First Interface
-| | ${dst_port} | ${dst_node}= | Last Interface
-| | ${src_ip}= | Get Node Port Ipv6 Address | ${src_node} | ${src_port}
-| | ... | ${nodes_addr}
-| | ${dst_ip}= | Get Node Port Ipv6 Address | ${dst_node} | ${dst_port}
-| | ... | ${nodes_addr}
-| | ${src_mac}= | Get Interface Mac | ${src_node} | ${src_port}
-| | ${dst_mac}= | Get Interface Mac | ${dst_node} | ${dst_port}
-| | ${src_port_name}= | Get interface name | ${src_node} | ${src_port}
-| | ${args}= | Traffic Script Gen Arg | ${src_port_name} | ${src_port_name}
-| | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
-| | Run Traffic Script On Node | ipv6_ns.py | ${src_node} | ${args}
-
-| Configure IPv6 on all DUTs in topology
-| | [Documentation] | Setup IPv6 address on all DUTs
-| | [Arguments] | ${nodes} | ${nodes_addr}
-| | Restart Vpp Service On All Duts | ${nodes}
-| | Verify Vpp On All Duts | ${nodes}
-| | VPP Enable Traces On All Duts | ${nodes}
-| | ${interfaces}= | Nodes Set Ipv6 Addresses | ${nodes} | ${nodes_addr}
-| | :FOR | ${interface} | IN | @{interfaces}
-| | | Set Interface State | @{interface} | up | if_type=name
-| | All Vpp Interfaces Ready Wait | ${nodes}
-
| Suppress ICMPv6 router advertisement message
| | [Documentation] | Suppress ICMPv6 router advertisement message for link
| | ... | scope address
| | [Arguments] | ${nodes}
| | Vpp All Ra Suppress Link Layer | ${nodes}
-| Configure IPv6 routing on all DUTs
-| | [Documentation] | Setup routing on all VPP nodes required for IPv6 tests
-| | [Arguments] | ${nodes} | ${nodes_addr}
-| | Append Nodes | ${nodes['DUT1']} | ${nodes['DUT2']}
-| | Compute Path
-| | ${tg}= | Set Variable | ${nodes['TG']}
-| | ${dut1_if} | ${dut1}= | First Interface
-| | ${dut2_if} | ${dut2}= | Last Interface
-| | ${dut1_if_addr}= | Get Node Port Ipv6 Address | ${dut1} | ${dut1_if}
-| | ... | ${nodes_addr}
-| | ${dut2_if_addr}= | Get Node Port Ipv6 Address | ${dut2} | ${dut2_if}
-| | ... | ${nodes_addr}
-| | @{tg_dut1_links}= | Get active links connecting "${tg}" and "${dut1}"
-| | @{tg_dut2_links}= | Get active links connecting "${tg}" and "${dut2}"
-| | :FOR | ${link} | IN | @{tg_dut1_links}
-| | | ${net}= | Get Link Address | ${link} | ${nodes_addr}
-| | | ${prefix}= | Get Link Prefix | ${link} | ${nodes_addr}
-| | | Vpp Route Add | ${dut2} | ${net} | ${prefix} | gateway=${dut1_if_addr}
-| | | ... | interface=${dut2_if}
-| | :FOR | ${link} | IN | @{tg_dut2_links}
-| | | ${net}= | Get Link Address | ${link} | ${nodes_addr}
-| | | ${prefix}= | Get Link Prefix | ${link} | ${nodes_addr}
-| | | Vpp Route Add | ${dut1} | ${net} | ${prefix} | gateway=${dut2_if_addr}
-| | | ... | interface=${dut1_if}
-
| Configure IPv6 forwarding in circular topology
| | [Documentation]
| | ... | Set UP state on VPP interfaces in path on nodes in 2-node / 3-node
@@ -325,15 +146,15 @@
| | ...
| | ${dut_tg_ip6_prefix}= | Set Variable | 64
| | ...
-| | Add IP neighbor | ${dut_node} | ${dut_to_tg_if1} | ${tg_if1_ip6}
-| | ... | ${tg_to_dut_if1_mac}
-| | Add IP neighbor | ${dut_node} | ${dut_to_tg_if2} | ${tg_if2_ip6}
-| | ... | ${tg_to_dut_if2_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut_node} | ${dut_to_tg_if1} | ${tg_if1_ip6} | ${tg_to_dut_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut_node} | ${dut_to_tg_if2} | ${tg_if2_ip6} | ${tg_to_dut_if2_mac}
| | ...
-| | VPP set If IPv6 addr | ${dut_node} | ${dut_to_tg_if1} | ${dut1_if1_ip6}
-| | ... | ${dut_tg_ip6_prefix}
-| | VPP set If IPv6 addr | ${dut_node} | ${dut_to_tg_if2} | ${dut1_if2_ip6}
-| | ... | ${dut_tg_ip6_prefix}
+| | VPP Interface Set IP Address | ${dut_node}
+| | ... | ${dut_to_tg_if1} | ${dut1_if1_ip6} | ${dut_tg_ip6_prefix}
+| | VPP Interface Set IP Address | ${dut_node}
+| | ... | ${dut_to_tg_if2} | ${dut1_if2_ip6} | ${dut_tg_ip6_prefix}
| | ...
| | Run Keyword Unless | '${remote_host1_ip6}' == '${NONE}'
| | ... | Vpp Route Add | ${dut_node} | ${remote_host1_ip6}
@@ -386,23 +207,23 @@
| | ${dut_tg_ip6_prefix}= | Set Variable | 64
| | ${dut_link_ip6_prefix}= | Set Variable | 96
| | ...
-| | Add IP neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg_if1_ip6}
-| | ... | ${tg_to_dut1_mac}
-| | Add IP neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_if1_ip6}
-| | ... | ${dut2_to_dut1_mac}
-| | Add IP neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_if2_ip6}
-| | ... | ${dut1_to_dut2_mac}
-| | Add IP neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg_if2_ip6}
-| | ... | ${tg_to_dut2_mac}
-| | ...
-| | VPP set If IPv6 addr | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip6}
-| | ... | ${dut_tg_ip6_prefix}
-| | VPP set If IPv6 addr | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip6}
-| | ... | ${dut_link_ip6_prefix}
-| | VPP set If IPv6 addr | ${dut2_node} | ${dut2_to_dut1} | ${dut2_if1_ip6}
-| | ... | ${dut_link_ip6_prefix}
-| | VPP set If IPv6 addr | ${dut2_node} | ${dut2_to_tg} | ${dut2_if2_ip6}
-| | ... | ${dut_tg_ip6_prefix}
+| | VPP Add IP Neighbor
+| | ... | ${dut1_node} | ${dut1_to_tg} | ${tg_if1_ip6} | ${tg_to_dut1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut2_if1_ip6} | ${dut2_to_dut1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut1_if2_ip6} | ${dut1_to_dut2_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut2_node} | ${dut2_to_tg} | ${tg_if2_ip6} | ${tg_to_dut2_mac}
+| | ...
+| | VPP Interface Set IP Address
+| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip6} | ${dut_tg_ip6_prefix}
+| | VPP Interface Set IP Address | ${dut1_node}
+| | ... | ${dut1_to_dut2} | ${dut1_if2_ip6} | ${dut_link_ip6_prefix}
+| | VPP Interface Set IP Address | ${dut2_node}
+| | ... | ${dut2_to_dut1} | ${dut2_if1_ip6} | ${dut_link_ip6_prefix}
+| | VPP Interface Set IP Address
+| | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_if2_ip6} | ${dut_tg_ip6_prefix}
| | ...
| | Vpp Route Add | ${dut1_node} | ${tg_if2_ip6} | ${dut_tg_ip6_prefix}
| | ... | gateway=${dut2_if1_ip6} | interface=${dut1_to_dut2}
diff --git a/resources/libraries/robot/overlay/lisp_static_adjacency.robot b/resources/libraries/robot/overlay/lisp_static_adjacency.robot
index 389b1bfb40..55dab37d10 100644
--- a/resources/libraries/robot/overlay/lisp_static_adjacency.robot
+++ b/resources/libraries/robot/overlay/lisp_static_adjacency.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2016 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -12,14 +12,16 @@
# limitations under the License.
*** Settings ***
-| Documentation | Lisp static adjacency suite keywords
-| Resource | resources/libraries/robot/overlay/lisp_api.robot
-| Library | resources.libraries.python.LispSetup.LispLocatorSet
+| Library | resources.libraries.python.IPUtil
+| Library | resources.libraries.python.LispSetup.LispAdjacency
| Library | resources.libraries.python.LispSetup.LispLocator
| Library | resources.libraries.python.LispSetup.LispLocalEid
-| Library | resources.libraries.python.LispSetup.LispAdjacency
+| Library | resources.libraries.python.LispSetup.LispLocatorSet
| Library | resources.libraries.python.LispSetup.LispRemoteMapping
-| Library | resources.libraries.python.IPv4Util.IPv4Util
+| ...
+| Resource | resources/libraries/robot/overlay/lisp_api.robot
+| ...
+| Documentation | Lisp static adjacency suite keywords
*** Keywords ***
| Configure LISP topology in 3-node circular topology
@@ -49,55 +51,51 @@
| | ... | \| ${dut1_static_adjacency} \| ${dut2_static_adjacency} \|
| | ...
| | [Arguments] | ${dut1_node} | ${dut1_int_name} | ${dut1_int_index}
-| | ... | ${dut2_node} | ${dut2_int_name} | ${dut2_int_index}
-| | ... | ${locator_set} | ${dut1_eid} | ${dut2_eid}
-| | ... | ${dut1_static_adjacency} | ${dut2_static_adjacency}
+| | ... | ${dut2_node} | ${dut2_int_name} | ${dut2_int_index}
+| | ... | ${locator_set} | ${dut1_eid} | ${dut2_eid}
+| | ... | ${dut1_static_adjacency} | ${dut2_static_adjacency}
| | ${dut1_int_index}= | Run Keyword If | ${dut1_int_index} is None
-| | | ... | Get Interface Sw Index | ${dut1_node}
-| | | ... | ${dut1_int_name}
-| | | ... | ELSE | Set Variable | ${dut1_int_index}
+| | ... | Get Interface Sw Index | ${dut1_node} | ${dut1_int_name}
+| | ... | ELSE | Set Variable | ${dut1_int_index}
| | ${dut2_int_index}= | Run Keyword If | ${dut2_int_index} is None
-| | | ... | Get Interface Sw Index | ${dut2_node}
-| | | ... | ${dut2_int_name}
-| | | ... | ELSE | Set Variable | ${dut2_int_index}
+| | ... | Get Interface Sw Index | ${dut2_node} | ${dut2_int_name}
+| | ... | ELSE | Set Variable | ${dut2_int_index}
| | Enable Lisp | ${dut1_node}
| | Vpp Add Lisp Locator Set | ${dut1_node} | ${locator_set['locator_name']}
| | Vpp Add Lisp Locator | ${dut1_node} | ${locator_set['locator_name']}
-| | ... | ${dut1_int_index} | ${locator_set['priority']}
-| | ... | ${locator_set['weight']}
+| | ... | ${dut1_int_index} | ${locator_set['priority']}
+| | ... | ${locator_set['weight']}
| | Vpp Add Lisp Local Eid | ${dut1_node} | ${dut1_eid['locator_name']}
-| | ... | ${dut1_eid['vni']} | ${dut1_eid['eid']}
-| | ... | ${dut1_eid['prefix']}
+| | ... | ${dut1_eid['vni']} | ${dut1_eid['eid']} | ${dut1_eid['prefix']}
| | Vpp Add Lisp Remote Mapping | ${dut1_node} | ${dut1_static_adjacency['vni']}
-| | ... | ${dut1_static_adjacency['deid']}
-| | ... | ${dut1_static_adjacency['prefix']}
-| | ... | ${dut1_static_adjacency['seid']}
-| | ... | ${dut1_static_adjacency['prefix']}
-| | ... | ${dut1_static_adjacency['rloc']}
+| | ... | ${dut1_static_adjacency['deid']}
+| | ... | ${dut1_static_adjacency['prefix']}
+| | ... | ${dut1_static_adjacency['seid']}
+| | ... | ${dut1_static_adjacency['prefix']}
+| | ... | ${dut1_static_adjacency['rloc']}
| | Vpp Add Lisp Adjacency | ${dut1_node} | ${dut1_static_adjacency['vni']}
-| | ... | ${dut1_static_adjacency['deid']}
-| | ... | ${dut1_static_adjacency['prefix']}
-| | ... | ${dut1_static_adjacency['seid']}
-| | ... | ${dut1_static_adjacency['prefix']}
+| | ... | ${dut1_static_adjacency['deid']}
+| | ... | ${dut1_static_adjacency['prefix']}
+| | ... | ${dut1_static_adjacency['seid']}
+| | ... | ${dut1_static_adjacency['prefix']}
| | Enable Lisp | ${dut2_node}
| | Vpp Add Lisp Locator Set | ${dut2_node} | ${locator_set['locator_name']}
| | Vpp Add Lisp Locator | ${dut2_node} | ${locator_set['locator_name']}
-| | ... | ${dut2_int_index} | ${locator_set['priority']}
-| | ... | ${locator_set['weight']}
+| | ... | ${dut2_int_index} | ${locator_set['priority']}
+| | ... | ${locator_set['weight']}
| | Vpp Add Lisp Local Eid | ${dut2_node} | ${dut2_eid['locator_name']}
-| | ... | ${dut2_eid['vni']} | ${dut2_eid['eid']}
-| | ... | ${dut2_eid['prefix']}
+| | ... | ${dut2_eid['vni']} | ${dut2_eid['eid']} | ${dut2_eid['prefix']}
| | Vpp Add Lisp Remote Mapping | ${dut2_node} | ${dut2_static_adjacency['vni']}
-| | ... | ${dut2_static_adjacency['deid']}
-| | ... | ${dut2_static_adjacency['prefix']}
-| | ... | ${dut2_static_adjacency['seid']}
-| | ... | ${dut2_static_adjacency['prefix']}
-| | ... | ${dut2_static_adjacency['rloc']}
+| | ... | ${dut2_static_adjacency['deid']}
+| | ... | ${dut2_static_adjacency['prefix']}
+| | ... | ${dut2_static_adjacency['seid']}
+| | ... | ${dut2_static_adjacency['prefix']}
+| | ... | ${dut2_static_adjacency['rloc']}
| | Vpp Add Lisp Adjacency | ${dut2_node} | ${dut2_static_adjacency['vni']}
-| | ... | ${dut2_static_adjacency['deid']}
-| | ... | ${dut2_static_adjacency['prefix']}
-| | ... | ${dut2_static_adjacency['seid']}
-| | ... | ${dut2_static_adjacency['prefix']}
+| | ... | ${dut2_static_adjacency['deid']}
+| | ... | ${dut2_static_adjacency['prefix']}
+| | ... | ${dut2_static_adjacency['seid']}
+| | ... | ${dut2_static_adjacency['prefix']}
| Change LISP Configuration
| | [Documentation] | Change configuration of the Lisp protocol.
@@ -108,18 +106,18 @@
| | ... | - dut1_to_dut2 - DUT1 towards DUT2 interface name. Type: string
| | ... | - dut2_to_dut1 - DUT2 towards DUT1 interface name. Type: string
| | ... | - dut1_to_dut2_mac - DUT1 towards DUT2 interface mac address.
-| | ... | Type: string
+| | ... | Type: string
| | ... | - dut2_to_dut1_mac - DUT2 towards DUT1 interface mac address.
-| | ... | Type: string
+| | ... | Type: string
| | ... | - new_dut1_ip - New DUT1 towards DUT2 interface IP address.
-| | ... | Type: string
+| | ... | Type: string
| | ... | - new_dut2_ip - New DUT2 towards DUT1 interface IP address.
-| | ... | Type: string
+| | ... | Type: string
| | ... | - prefix - Prefix of the DUT nodes. Type: integer
| | ... | - old_dut1_static_adjacency - Old DUT1 static adjacency.
-| | ... | Type: dictionary
+| | ... | Type: dictionary
| | ... | - new_dut1_static_adjacency - New DUT1 static adjacency.
-| | ... | Type: dictionary
+| | ... | Type: dictionary
| | ...
| | ... | *Return:*
| | ... | - No value returned
@@ -131,39 +129,39 @@
| | ... | \| ${old_dut1_static_adjacency} \| ${new_dut1_static_adjacency} \|
| | ...
| | [Arguments] | ${dut1_node} | ${dut2_node} | ${dut1_to_dut2}
-| | ... | ${dut2_to_dut1} | ${dut1_to_dut2_mac} | ${dut2_to_dut1_mac}
-| | ... | ${new_dut1_ip} | ${new_dut2_ip} | ${prefix}
-| | ... | ${old_dut1_static_adjacency} | ${new_dut1_static_adjacency}
-| | Flush IPv4 Addresses "${dut2_to_dut1}" "${dut2_node}"
+| | ... | ${dut2_to_dut1} | ${dut1_to_dut2_mac} | ${dut2_to_dut1_mac}
+| | ... | ${new_dut1_ip} | ${new_dut2_ip} | ${prefix}
+| | ... | ${old_dut1_static_adjacency} | ${new_dut1_static_adjacency}
+| | Flush IP Addresses | ${dut2_node} | ${dut2_to_dut1}
| | Vpp Del Lisp Remote Mapping | ${dut1_node}
-| | ... | ${old_dut1_static_adjacency['vni']}
-| | ... | ${old_dut1_static_adjacency['deid']}
-| | ... | ${old_dut1_static_adjacency['prefix']}
-| | ... | ${old_dut1_static_adjacency['seid']}
-| | ... | ${old_dut1_static_adjacency['prefix']}
-| | ... | ${old_dut1_static_adjacency['rloc']}
+| | ... | ${old_dut1_static_adjacency['vni']}
+| | ... | ${old_dut1_static_adjacency['deid']}
+| | ... | ${old_dut1_static_adjacency['prefix']}
+| | ... | ${old_dut1_static_adjacency['seid']}
+| | ... | ${old_dut1_static_adjacency['prefix']}
+| | ... | ${old_dut1_static_adjacency['rloc']}
| | Vpp Del Lisp Adjacency | ${dut1_node}
-| | ... | ${old_dut1_static_adjacency['vni']}
-| | ... | ${old_dut1_static_adjacency['deid']}
-| | ... | ${old_dut1_static_adjacency['prefix']}
-| | ... | ${old_dut1_static_adjacency['seid']}
-| | ... | ${old_dut1_static_adjacency['prefix']}
-| | Set Interface Address | ${dut2_node} | ${dut2_to_dut1}
-| | ... | ${new_dut2_ip} | ${prefix}
-| | Add Arp On Dut | ${dut1_node} | ${dut1_to_dut2} | ${new_dut2_ip}
-| | ... | ${dut2_to_dut1_mac}
-| | Add Arp On Dut | ${dut2_node} | ${dut2_to_dut1} | ${new_dut1_ip}
-| | ... | ${dut1_to_dut2_mac}
+| | ... | ${old_dut1_static_adjacency['vni']}
+| | ... | ${old_dut1_static_adjacency['deid']}
+| | ... | ${old_dut1_static_adjacency['prefix']}
+| | ... | ${old_dut1_static_adjacency['seid']}
+| | ... | ${old_dut1_static_adjacency['prefix']}
+| | VPP Interface Set IP Address | ${dut2_node} | ${dut2_to_dut1}
+| | ... | ${new_dut2_ip} | ${prefix}
+| | VPP Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${new_dut2_ip}
+| | ... | ${dut2_to_dut1_mac}
+| | VPP Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${new_dut1_ip}
+| | ... | ${dut1_to_dut2_mac}
| | Vpp Add Lisp Remote Mapping | ${dut1_node}
-| | ... | ${new_dut1_static_adjacency['vni']}
-| | ... | ${new_dut1_static_adjacency['deid']}
-| | ... | ${new_dut1_static_adjacency['prefix']}
-| | ... | ${new_dut1_static_adjacency['seid']}
-| | ... | ${new_dut1_static_adjacency['prefix']}
-| | ... | ${new_dut1_static_adjacency['rloc']}
+| | ... | ${new_dut1_static_adjacency['vni']}
+| | ... | ${new_dut1_static_adjacency['deid']}
+| | ... | ${new_dut1_static_adjacency['prefix']}
+| | ... | ${new_dut1_static_adjacency['seid']}
+| | ... | ${new_dut1_static_adjacency['prefix']}
+| | ... | ${new_dut1_static_adjacency['rloc']}
| | Vpp Add Lisp Adjacency | ${dut1_node}
-| | ... | ${new_dut1_static_adjacency['vni']}
-| | ... | ${new_dut1_static_adjacency['deid']}
-| | ... | ${new_dut1_static_adjacency['prefix']}
-| | ... | ${new_dut1_static_adjacency['seid']}
-| | ... | ${new_dut1_static_adjacency['prefix']}
+| | ... | ${new_dut1_static_adjacency['vni']}
+| | ... | ${new_dut1_static_adjacency['deid']}
+| | ... | ${new_dut1_static_adjacency['prefix']}
+| | ... | ${new_dut1_static_adjacency['seid']}
+| | ... | ${new_dut1_static_adjacency['prefix']}
diff --git a/resources/libraries/robot/overlay/vxlan.robot b/resources/libraries/robot/overlay/vxlan.robot
index 66ffa3dfa1..5e9fa3ddef 100644
--- a/resources/libraries/robot/overlay/vxlan.robot
+++ b/resources/libraries/robot/overlay/vxlan.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2016 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -13,17 +13,18 @@
*** Settings ***
| Library | Collections
-| Resource | resources/libraries/robot/shared/default.robot
-| Resource | resources/libraries/robot/shared/interfaces.robot
-| Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
-| Resource | resources/libraries/robot/l2/l2_xconnect.robot
| Library | resources.libraries.python.InterfaceUtil
| Library | resources.libraries.python.IPUtil
-| Library | resources.libraries.python.IPv4Util
| Library | resources.libraries.python.IPv6Util
-| Library | resources.libraries.python.IPv4Setup
| Library | resources.libraries.python.L2Util
| Library | resources.libraries.python.NodePath
+| ...
+| Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
+| Resource | resources/libraries/robot/l2/l2_xconnect.robot
+| Resource | resources/libraries/robot/shared/default.robot
+| Resource | resources/libraries/robot/shared/interfaces.robot
+| ...
+| Documentation | VXLAN keywords
*** Keywords ***
| Configure IP addresses and neighbors on interfaces
@@ -55,14 +56,14 @@
| | ... | ELSE | Set Variable | ${DUT2_INT_INDEX}
| | ${DUT1_INT_MAC}= | Vpp Get Interface Mac | ${DUT1} | ${DUT1_INT_INDEX}
| | ${DUT2_INT_MAC}= | Vpp Get Interface Mac | ${DUT2} | ${DUT2_INT_INDEX}
-| | Set Interface Address | ${DUT1} | ${DUT1_INT_INDEX}
+| | VPP Interface Set IP Address | ${DUT1} | ${DUT1_INT_INDEX}
| | ... | ${dut1s_ip_address} | ${duts_ip_address_prefix}
-| | Set Interface Address | ${DUT2} | ${DUT2_INT_INDEX}
+| | VPP Interface Set IP Address | ${DUT2} | ${DUT2_INT_INDEX}
| | ... | ${dut2s_ip_address} | ${duts_ip_address_prefix}
-| | Add IP Neighbor | ${DUT1} | ${DUT1_INT_INDEX} | ${dut2s_ip_address}
-| | ... | ${DUT2_INT_MAC}
-| | Add IP Neighbor | ${DUT2} | ${DUT2_INT_INDEX} | ${dut1s_ip_address}
-| | ... | ${DUT1_INT_MAC}
+| | VPP Add IP Neighbor
+| | ... | ${DUT1} | ${DUT1_INT_INDEX} | ${dut2s_ip_address} | ${DUT2_INT_MAC}
+| | VPP Add IP Neighbor
+| | ... | ${DUT2} | ${DUT2_INT_INDEX} | ${dut1s_ip_address} | ${DUT1_INT_MAC}
| Add interfaces to L2BD
| | [Arguments] | ${DUT} | ${BID} | ${INTERFACE_1} | ${INTERFACE_2}
diff --git a/resources/libraries/robot/performance/performance_configuration.robot b/resources/libraries/robot/performance/performance_configuration.robot
index 2aa2dc4898..0f13730c66 100644
--- a/resources/libraries/robot/performance/performance_configuration.robot
+++ b/resources/libraries/robot/performance/performance_configuration.robot
@@ -14,27 +14,29 @@
*** Settings ***
| Library | Collections
| Library | String
-| Library | resources.libraries.python.topology.Topology
-| Library | resources.libraries.python.NodePath
+| Library | resources.libraries.python.Classify
| Library | resources.libraries.python.DpdkUtil
| Library | resources.libraries.python.InterfaceUtil
-| Library | resources.libraries.python.VhostUser
-| Library | resources.libraries.python.TrafficGenerator
-| Library | resources.libraries.python.TrafficGenerator.TGDropRateSearchImpl
-| Library | resources.libraries.python.Classify
| Library | resources.libraries.python.IPUtil
| Library | resources.libraries.python.L2Util
-| Resource | resources/libraries/robot/shared/default.robot
-| Resource | resources/libraries/robot/shared/interfaces.robot
-| Resource | resources/libraries/robot/shared/counters.robot
-| Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
-| Resource | resources/libraries/robot/l2/l2_xconnect.robot
-| Resource | resources/libraries/robot/l2/l2_patch.robot
+| Library | resources.libraries.python.NodePath
+| Library | resources.libraries.python.topology.Topology
+| Library | resources.libraries.python.TrafficGenerator
+| Library | resources.libraries.python.TrafficGenerator.TGDropRateSearchImpl
+| Library | resources.libraries.python.VhostUser
+| ...
| Resource | resources/libraries/robot/ip/ip4.robot
| Resource | resources/libraries/robot/ip/ip6.robot
+| Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
+| Resource | resources/libraries/robot/l2/l2_patch.robot
+| Resource | resources/libraries/robot/l2/l2_xconnect.robot
| Resource | resources/libraries/robot/l2/tagging.robot
| Resource | resources/libraries/robot/overlay/srv6.robot
-| Documentation | Performance suite keywords - configuration.
+| Resource | resources/libraries/robot/shared/counters.robot
+| Resource | resources/libraries/robot/shared/default.robot
+| Resource | resources/libraries/robot/shared/interfaces.robot
+| ...
+| Documentation | Performance suite keywords - configuration
*** Keywords ***
| Set interfaces in path up
@@ -161,8 +163,8 @@
| | ... | ${dut1_if1_ip4} | 24
| | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2}
| | ... | ${dut2_if2_ip4} | 24
-| | Add arp on dut | ${dut1} | ${dut1_if1} | ${tg_if1_ip4} | ${tg_if1_mac}
-| | Add arp on dut | ${dut2} | ${dut2_if2} | ${tg_if2_ip4} | ${tg_if2_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | ${tg_if1_ip4} | ${tg_if1_mac}
+| | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | ${tg_if2_ip4} | ${tg_if2_mac}
| | Vpp Route Add | ${dut1} | ${laddr_ip4} | 8 | gateway=${tg_if1_ip4}
| | ... | interface=${dut1_if1}
| | Vpp Route Add | ${dut2} | ${raddr_ip4} | 8 | gateway=${tg_if2_ip4}
@@ -189,18 +191,20 @@
| | ${dut2_if1_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Get Interface MAC | ${dut2} | ${dut2_if1}
| | ...
-| | Add arp on dut | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Add arp on dut | ${dut1} | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
+| | ... | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Add arp on dut | ${dut2} | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
+| | ... | VPP Add IP Neighbor
+| | ... | ${dut2} | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
| | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Set Variable | ${dut2}
| | ... | ELSE | Set Variable | ${dut1}
| | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Set Variable | ${dut2_if2}
| | ... | ELSE | Set Variable | ${dut1_if2}
-| | Add arp on dut | ${dut} | ${dut_if2} | 20.20.20.2 | ${tg1_if2_mac}
+| | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 20.20.20.2 | ${tg1_if2_mac}
| | ...
| | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1}
| | ... | 10.10.10.1 | 24
@@ -249,18 +253,20 @@
| | ... | Get Interface MAC | ${dut1} | ${dut1_if2}
| | ${dut2_if1_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Get Interface MAC | ${dut2} | ${dut2_if1}
-| | Add arp on dut | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Add arp on dut | ${dut1} | ${dut1_if2} | 2.2.2.2 | ${dut2_if1_mac}
+| | ... | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if2} | 2.2.2.2 | ${dut2_if1_mac}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Add arp on dut | ${dut2} | ${dut2_if1} | 2.2.2.1 | ${dut1_if2_mac}
+| | ... | VPP Add IP Neighbor
+| | ... | ${dut2} | ${dut2_if1} | 2.2.2.1 | ${dut1_if2_mac}
| | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Set Variable | ${dut2}
| | ... | ELSE | Set Variable | ${dut1}
| | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Set Variable | ${dut2_if2}
| | ... | ELSE | Set Variable | ${dut1_if2}
-| | Add arp on dut | ${dut} | ${dut_if2} | 3.3.3.1 | ${tg1_if2_mac}
+| | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 3.3.3.1 | ${tg1_if2_mac}
| | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 2.2.2.1
@@ -319,8 +325,8 @@
| | ... | ${dut1} | ${dut1_if2} | 200.0.0.1 | 30
| | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
| | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
-| | Add arp on dut | ${dut1} | ${dut1_if1} | 100.0.0.2 | ${tg1_if1_mac}
-| | Add arp on dut | ${dut1} | ${dut1_if2} | 200.0.0.2 | ${tg1_if2_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 100.0.0.2 | ${tg1_if1_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 200.0.0.2 | ${tg1_if2_mac}
| | Vpp Route Add | ${dut1} | 10.0.0.0 | 8 | gateway=100.0.0.2
| | ... | interface=${dut1_if1} | vrf=${fib_table_1}
| | Vpp Route Add | ${dut1} | 20.0.0.0 | 8 | gateway=200.0.0.2
@@ -392,8 +398,8 @@
| | ... | ${dut2} | ${dut2_if1} | 150.0.0.2 | 30
| | Configure IP addresses on interfaces
| | ... | ${dut2} | ${dut2_if2} | 200.0.0.1 | 30
-| | Add arp on dut | ${dut1} | ${dut1_if1} | 100.0.0.2 | ${tg_if1_mac}
-| | Add arp on dut | ${dut2} | ${dut2_if2} | 200.0.0.2 | ${tg_if2_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 100.0.0.2 | ${tg_if1_mac}
+| | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 200.0.0.2 | ${tg_if2_mac}
| | Vpp Route Add | ${dut1} | 10.0.0.0 | 8 | gateway=100.0.0.2
| | ... | interface=${dut1_if1} | vrf=${fib_table_1}
| | Vpp Route Add | ${dut1} | 20.0.0.0 | 8 | gateway=150.0.0.2
@@ -496,20 +502,20 @@
| | ... | Get Interface MAC | ${dut1} | ${dut1_if2}
| | ${dut2_if1_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Get Interface MAC | ${dut2} | ${dut2_if1}
-| | Add arp on dut | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Add arp on dut | ${dut1} | ${subif_index_1} | 2.2.2.2
-| | ... | ${dut2_if1_mac}
+| | ... | VPP Add IP Neighbor
+| | ... | ${dut1} | ${subif_index_1} | 2.2.2.2 | ${dut2_if1_mac}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Add arp on dut | ${dut2} | ${subif_index_2} | 2.2.2.1
-| | ... | ${dut1_if2_mac}
+| | ... | VPP Add IP Neighbor
+| | ... | ${dut2} | ${subif_index_2} | 2.2.2.1 | ${dut1_if2_mac}
| | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Set Variable | ${dut2}
| | ... | ELSE | Set Variable | ${dut1}
| | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Set Variable | ${dut2_if2}
| | ... | ELSE | Set Variable | ${subif_index_1}
-| | Add arp on dut | ${dut} | ${dut_if2} | 3.3.3.1 | ${tg1_if2_mac}
+| | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 3.3.3.1 | ${tg1_if2_mac}
| | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Configure IP addresses on interfaces | ${dut1} | ${subif_index_1}
@@ -580,11 +586,11 @@
| | ${prefix}= | Set Variable | 64
| | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
| | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
-| | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:1::1 | ${prefix}
-| | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:2::1 | ${prefix}
+| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 2001:1::1 | ${prefix}
+| | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 2001:2::1 | ${prefix}
| | Suppress ICMPv6 router advertisement message | ${nodes}
-| | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
-| | Add Ip Neighbor | ${dut1} | ${dut1_if2} | 2001:2::2 | ${tg1_if2_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 2001:2::2 | ${tg1_if2_mac}
| Initialize IPv6 forwarding in 3-node circular topology
| | [Documentation]
@@ -600,15 +606,15 @@
| | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
| | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
| | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
-| | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:1::1 | ${prefix}
-| | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:3::1 | ${prefix}
-| | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | 2001:3::2 | ${prefix}
-| | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | 2001:2::1 | ${prefix}
+| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 2001:1::1 | ${prefix}
+| | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 2001:3::1 | ${prefix}
+| | VPP Interface Set IP Address | ${dut2} | ${dut2_if1} | 2001:3::2 | ${prefix}
+| | VPP Interface Set IP Address | ${dut2} | ${dut2_if2} | 2001:2::1 | ${prefix}
| | Suppress ICMPv6 router advertisement message | ${nodes}
-| | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
-| | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
-| | Add Ip Neighbor | ${dut1} | ${dut1_if2} | 2001:3::2 | ${dut2_if1_mac}
-| | Add Ip Neighbor | ${dut2} | ${dut2_if1} | 2001:3::1 | ${dut1_if2_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
+| | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 2001:3::2 | ${dut2_if1_mac}
+| | VPP Add IP Neighbor | ${dut2} | ${dut2_if1} | 2001:3::1 | ${dut1_if2_mac}
| | Vpp Route Add | ${dut1} | 2001:2::0 | ${prefix} | gateway=2001:3::2
| | ... | interface=${dut1_if2}
| | Vpp Route Add | ${dut2} | 2001:1::0 | ${prefix} | gateway=2001:3::1
@@ -645,25 +651,29 @@
| | ... | Get Interface MAC | ${dut2} | ${dut2_if1}
| | ${prefix}= | Set Variable | 64
| | ${host_prefix}= | Set Variable | 128
-| | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:3::1 | ${prefix}
+| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 2001:3::1 | ${prefix}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:4::1 | ${prefix}
+| | ... | VPP Interface Set IP Address
+| | ... | ${dut1} | ${dut1_if2} | 2001:4::1 | ${prefix}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | 2001:4::2 | ${prefix}
+| | ... | VPP Interface Set IP Address
+| | ... | ${dut2} | ${dut2_if1} | 2001:4::2 | ${prefix}
| | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Set Variable | ${dut2}
| | ... | ELSE | Set Variable | ${dut1}
| | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Set Variable | ${dut2_if2}
| | ... | ELSE | Set Variable | ${dut1_if2}
-| | VPP Set If IPv6 Addr | ${dut} | ${dut_if2} | 2001:5::1 | ${prefix}
+| | VPP Interface Set IP Address | ${dut} | ${dut_if2} | 2001:5::1 | ${prefix}
| | Suppress ICMPv6 router advertisement message | ${nodes}
-| | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:3::2 | ${tg1_if1_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:3::2 | ${tg1_if1_mac}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Add Ip Neighbor | ${dut1} | ${dut1_if2} | 2001:4::2 | ${dut2_if1_mac}
+| | ... | VPP Add Ip Neighbor
+| | ... | ${dut1} | ${dut1_if2} | 2001:4::2 | ${dut2_if1_mac}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Add Ip Neighbor | ${dut2} | ${dut2_if1} | 2001:4::1 | ${dut1_if2_mac}
-| | Add Ip Neighbor | ${dut} | ${dut_if2} | 2001:5::2 | ${tg1_if2_mac}
+| | ... | VPP Add Ip Neighbor
+| | ... | ${dut2} | ${dut2_if1} | 2001:4::1 | ${dut1_if2_mac}
+| | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 2001:5::2 | ${tg1_if2_mac}
| | Vpp Route Add | ${dut1} | 2001:1::0 | ${host_prefix} | gateway=2001:3::2
| | ... | interface=${dut1_if1} | count=${count}
| | Run Keyword If | '${dut2_status}' == 'PASS'
@@ -732,28 +742,28 @@
| | ... | Get Interface MAC | ${dut1} | ${dut1_if2}
| | ${dut2_if1_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Get Interface MAC | ${dut2} | ${dut2_if1}
-| | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2002:1::1 | ${tg1_if1_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2002:1::1 | ${tg1_if1_mac}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Add Ip Neighbor | ${dut1} | ${subif_index_1} | 2002:2::2
-| | ... | ${dut2_if1_mac}
+| | ... | VPP Add Ip Neighbor
+| | ... | ${dut1} | ${subif_index_1} | 2002:2::2 | ${dut2_if1_mac}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Add Ip Neighbor | ${dut2} | ${subif_index_2} | 2002:2::1
-| | ... | ${dut1_if2_mac}
+| | ... | VPP Add Ip Neighbor
+| | ... | ${dut2} | ${subif_index_2} | 2002:2::1 | ${dut1_if2_mac}
| | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Set Variable | ${dut2}
| | ... | ELSE | Set Variable | ${dut1}
| | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Set Variable | ${dut2_if2}
| | ... | ELSE | Set Variable | ${subif_index_1}
-| | Add Ip Neighbor | ${dut} | ${dut_if2} | 2002:3::1 | ${tg1_if2_mac}
-| | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2002:1::2 | ${prefix}
+| | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 2002:3::1 | ${tg1_if2_mac}
+| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 2002:1::2 | ${prefix}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | VPP Set If IPv6 Addr | ${dut1} | ${subif_index_1} | 2002:2::1
+| | ... | VPP Interface Set IP Address | ${dut1} | ${subif_index_1} | 2002:2::1
| | ... | ${prefix}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | VPP Set If IPv6 Addr | ${dut2} | ${subif_index_2} | 2002:2::2
+| | ... | VPP Interface Set IP Address | ${dut2} | ${subif_index_2} | 2002:2::2
| | ... | ${prefix}
-| | VPP Set If IPv6 Addr | ${dut} | ${dut_if2} | 2002:3::2 | ${prefix}
+| | VPP Interface Set IP Address | ${dut} | ${dut_if2} | 2002:3::2 | ${prefix}
| | Suppress ICMPv6 router advertisement message | ${nodes}
| | Vpp Route Add | ${dut1} | ${tg_if1_net} | ${host_prefix}
| | ... | gateway=2002:1::1 | interface=${dut1_if1}
@@ -798,19 +808,25 @@
| | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
| | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
| | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
-| | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_if1_ip6} | ${prefix}
-| | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_if2_ip6} | ${prefix}
-| | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_if1_ip6} | ${prefix}
-| | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_if2_ip6} | ${prefix}
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${dut1_if1} | ${dut1_if1_ip6} | ${prefix}
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${dut1_if2} | ${dut1_if2_ip6} | ${prefix}
+| | VPP Interface Set IP Address
+| | ... | ${dut2} | ${dut2_if1} | ${dut2_if1_ip6} | ${prefix}
+| | VPP Interface Set IP Address
+| | ... | ${dut2} | ${dut2_if2} | ${dut2_if2_ip6} | ${prefix}
| | Suppress ICMPv6 router advertisement message | ${nodes}
| | :FOR | ${number} | IN RANGE | 2 | ${dst_addr_nr}+2
| | | ${hexa_nr}= | Convert To Hex | ${number}
-| | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | ${tg_if1_ip6_subnet}${hexa_nr}
-| | | ... | ${tg1_if1_mac}
-| | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | ${tg_if2_ip6_subnet}${hexa_nr}
-| | | ... | ${tg1_if2_mac}
-| | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_if1_ip6} | ${dut2_if1_mac}
-| | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_if2_ip6} | ${dut1_if2_mac}
+| | | VPP Add IP Neighbor | ${dut1}
+| | | ... | ${dut1_if1} | ${tg_if1_ip6_subnet}${hexa_nr} | ${tg1_if1_mac}
+| | | VPP Add IP Neighbor | ${dut2}
+| | | ... | ${dut2_if2} | ${tg_if2_ip6_subnet}${hexa_nr} | ${tg1_if2_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if2} | ${dut2_if1_ip6} | ${dut2_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut2} | ${dut2_if1} | ${dut1_if2_ip6} | ${dut1_if2_mac}
| | ${sid1}= | Set Variable If
| | ... | "${n}" == "1" | ${dut2_sid1}
| | ... | "${n}" == "2" | ${dut2_sid1_1}
@@ -897,31 +913,37 @@
| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | Show Memif | ${nodes['${dut}']}
-| | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_if1_ip6} | ${prefix}
-| | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_if2_ip6} | ${prefix}
-| | VPP Set If IPv6 Addr | ${dut1} | ${dut1-memif-1-if1}
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${dut1_if1} | ${dut1_if1_ip6} | ${prefix}
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${dut1_if2} | ${dut1_if2_ip6} | ${prefix}
+| | VPP Interface Set IP Address | ${dut1} | ${dut1-memif-1-if1}
| | ... | ${dut1-memif-1-if1_ip6} | ${prefix}
-| | VPP Set If IPv6 Addr | ${dut1} | ${dut1-memif-1-if2}
+| | VPP Interface Set IP Address | ${dut1} | ${dut1-memif-1-if2}
| | ... | ${dut1-memif-1-if2_ip6} | ${prefix}
-| | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_if1_ip6} | ${prefix}
-| | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_if2_ip6} | ${prefix}
-| | VPP Set If IPv6 Addr | ${dut2} | ${dut2-memif-1-if1}
+| | VPP Interface Set IP Address
+| | ... | ${dut2} | ${dut2_if1} | ${dut2_if1_ip6} | ${prefix}
+| | VPP Interface Set IP Address
+| | ... | ${dut2} | ${dut2_if2} | ${dut2_if2_ip6} | ${prefix}
+| | VPP Interface Set IP Address | ${dut2} | ${dut2-memif-1-if1}
| | ... | ${dut2-memif-1-if1_ip6} | ${prefix}
-| | VPP Set If IPv6 Addr | ${dut2} | ${dut2-memif-1-if2}
+| | VPP Interface Set IP Address | ${dut2} | ${dut2-memif-1-if2}
| | ... | ${dut2-memif-1-if2_ip6} | ${prefix}
| | Suppress ICMPv6 router advertisement message | ${nodes}
-| | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_if1_ip6} | ${dut2_if1_mac}
-| | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_if2_ip6} | ${dut1_if2_mac}
-| | Add Ip Neighbor | ${dut1} | ${dut1_if1} | ${tg_if1_ip6_subnet}2
-| | ... | ${tg1_if1_mac}
-| | Add Ip Neighbor | ${dut2} | ${dut2_if2} | ${tg_if2_ip6_subnet}2
-| | ... | ${tg1_if2_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if2} | ${dut2_if1_ip6} | ${dut2_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut2} | ${dut2_if1} | ${dut1_if2_ip6} | ${dut1_if2_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if1} | ${tg_if1_ip6_subnet}2 | ${tg1_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut2} | ${dut2_if2} | ${tg_if2_ip6_subnet}2 | ${tg1_if2_mac}
| | ${dut1-memif-1-if2_mac}= | Get Interface MAC | ${dut1} | memif2
| | ${dut2-memif-1-if2_mac}= | Get Interface MAC | ${dut2} | memif2
-| | Add Ip Neighbor | ${dut1} | ${dut1-memif-1-if1} | ${dut1_nh}
-| | ... | ${dut1-memif-1-if2_mac}
-| | Add Ip Neighbor | ${dut2} | ${dut2-memif-1-if1} | ${dut2_nh}
-| | ... | ${dut2-memif-1-if2_mac}
+| | VPP Add IP Neighbor | ${dut1}
+| | ... | ${dut1-memif-1-if1} | ${dut1_nh} | ${dut1-memif-1-if2_mac}
+| | VPP Add IP Neighbor | ${dut2}
+| | ... | ${dut2-memif-1-if1} | ${dut2_nh} | ${dut2-memif-1-if2_mac}
| | Vpp Route Add | ${dut1} | ${dut2_sid1} | ${sid_prefix}
| | ... | gateway=${dut2_if1_ip6} | interface=${dut1_if2}
| | Vpp Route Add | ${dut1} | ${out_sid2_1} | ${sid_prefix}
@@ -1014,12 +1036,12 @@
| | ... | interfaces.
| | ...
| | Set interfaces in path up
-| | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 172.16.0.1 | 24
-| | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} | 172.16.0.2 | 24
+| | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 172.16.0.1 | 24
+| | VPP Interface Set IP Address | ${dut2} | ${dut2_if1} | 172.16.0.2 | 24
| | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
| | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
-| | Add arp on dut | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
-| | Add arp on dut | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
+| | VPP Add IP Neighbor | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
| | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
| | ... | 172.16.0.1 | 172.16.0.2
| | Configure L2XC | ${dut1} | ${dut1_if1} | ${dut1s_vxlan}
@@ -1422,14 +1444,16 @@
| | ... | Get Interface MAC | ${dut2} | ${dut2_if1}
| | ...
| | :FOR | ${number} | IN RANGE | 2 | ${ip_nr}+2
-| | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.10.10.${number}
-| | | ... | ${tg1_if1_mac}
-| | | Add arp on dut | ${dut} | ${dut_if2} | 20.20.20.${number}
-| | | ... | ${tg1_if2_mac}
+| | | VPP Add IP Neighbor
+| | | ... | ${dut1} | ${dut1_if1} | 10.10.10.${number} | ${tg1_if1_mac}
+| | | VPP Add IP Neighbor
+| | | ... | ${dut} | ${dut_if2} | 20.20.20.${number} | ${tg1_if2_mac}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Add arp on dut | ${dut1} | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
+| | ... | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Add arp on dut | ${dut2} | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
+| | ... | VPP Add IP Neighbor
+| | ... | ${dut2} | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
| | ...
| | Configure IP addresses on interfaces
| | ... | ${dut1} | ${dut1_if1} | 10.10.10.1 | 24
@@ -1671,8 +1695,8 @@
| | ... | 24
| | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
| | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
-| | Add arp on dut | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
-| | Add arp on dut | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
+| | VPP Add IP Neighbor | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
| | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
| | ... | 172.16.0.1 | 172.16.0.2
| | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
@@ -1826,8 +1850,8 @@
| | | Add interface to bridge domain | ${dut2} | ${dut2s_vxlan} | ${dut2_bd_id1}
| | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
| | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
-| | Add arp on dut | ${dut1} | ${dut1_if1} | ${dut1_gw} | ${tg_if1_mac}
-| | Add arp on dut | ${dut2} | ${dut2_if2} | ${dut2_gw} | ${tg_if2_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | ${dut1_gw} | ${tg_if1_mac}
+| | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | ${dut2_gw} | ${tg_if2_mac}
| | Vpp Route Add | ${dut1} | ${dut1_route_subnet} | ${dut1_route_mask}
| | ... | gateway=${dut1_gw} | interface=${dut1_if1}
| | Vpp Route Add | ${dut2} | ${dut2_route_subnet} | ${dut2_route_mask}
@@ -2123,7 +2147,7 @@
| | ...
| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
-| | | ${if1_pci}= | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1}
+| | | ${if1_pci}= | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1}
| | | Run keyword | ${dut}.Add DPDK Dev | ${if1_pci}
| | | Set Test Variable | ${${dut}_if1_pci} | ${if1_pci}
@@ -2271,12 +2295,12 @@
| | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
| | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
| | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
-| | Add arp on dut | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
-| | Add arp on dut | ${dut1} | ${dut1_if2} | ${dut2_dut1_address}
-| | ... | ${dut2_if1_mac}
-| | Add arp on dut | ${dut2} | ${dut2_if1} | ${dut1_dut2_address}
-| | ... | ${dut1_if2_mac}
-| | Add arp on dut | ${dut2} | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if2} | ${dut2_dut1_address} | ${dut2_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut2} | ${dut2_if1} | ${dut1_dut2_address} | ${dut1_if2_mac}
+| | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
| | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1}
| | ... | ${dut1_tg_address} | ${duts_prefix}
| | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2}
@@ -2347,21 +2371,21 @@
| | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
| | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
| | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
-| | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_tg_address}
-| | ... | ${prefix}
-| | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_dut2_address}
-| | ... | ${prefix}
-| | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_dut1_address}
-| | ... | ${prefix}
-| | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_tg_address}
-| | ... | ${prefix}
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${dut1_if1} | ${dut1_tg_address} | ${prefix}
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${dut1_if2} | ${dut1_dut2_address} | ${prefix}
+| | VPP Interface Set IP Address
+| | ... | ${dut2} | ${dut2_if1} | ${dut2_dut1_address} | ${prefix}
+| | VPP Interface Set IP Address
+| | ... | ${dut2} | ${dut2_if2} | ${dut2_tg_address} | ${prefix}
| | Suppress ICMPv6 router advertisement message | ${nodes}
-| | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
-| | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
-| | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_dut1_address}
-| | ... | ${dut2_if1_mac}
-| | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_dut2_address}
-| | ... | ${dut1_if2_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
+| | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if2} | ${dut2_dut1_address} | ${dut2_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut2} | ${dut2_if1} | ${dut1_dut2_address} | ${dut1_if2_mac}
| Initialize LISP IPv4 over IPv6 forwarding in 3-node circular topology
| | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
@@ -2397,19 +2421,19 @@
| | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
| | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1}
| | ... | ${dut1_tg_ip4_address} | ${prefix4}
-| | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_dut2_ip6_address}
-| | ... | ${prefix6}
-| | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_dut1_ip6_address}
-| | ... | ${prefix6}
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${dut1_if2} | ${dut1_dut2_ip6_address} | ${prefix6}
+| | VPP Interface Set IP Address
+| | ... | ${dut2} | ${dut2_if1} | ${dut2_dut1_ip6_address} | ${prefix6}
| | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2}
| | ... | ${dut2_tg_ip4_address} | ${prefix4}
| | Suppress ICMPv6 router advertisement message | ${nodes}
-| | Add arp on dut | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
-| | Add arp on dut | ${dut2} | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
-| | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip6_address}
-| | ... | ${dut2_if1_mac}
-| | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip6_address}
-| | ... | ${dut1_if2_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
+| | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip6_address} | ${dut2_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip6_address} | ${dut1_if2_mac}
| Initialize LISP IPv6 over IPv4 forwarding in 3-node circular topology
| | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
@@ -2443,21 +2467,21 @@
| | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
| | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
| | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
-| | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_tg_ip6_address}
-| | ... | ${prefix6}
-| | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2}
-| | ... | ${dut1_dut2_ip4_address} | ${prefix4}
-| | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1}
-| | ... | ${dut2_dut1_ip4_address} | ${prefix4}
-| | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_tg_ip6_address}
-| | ... | ${prefix6}
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${dut1_if1} | ${dut1_tg_ip6_address} | ${prefix6}
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${dut1_if2} | ${dut1_dut2_ip4_address} | ${prefix4}
+| | VPP Interface Set IP Address
+| | ... | ${dut2} | ${dut2_if1} | ${dut2_dut1_ip4_address} | ${prefix4}
+| | VPP Interface Set IP Address
+| | ... | ${dut2} | ${dut2_if2} | ${dut2_tg_ip6_address} | ${prefix6}
| | Suppress ICMPv6 router advertisement message | ${nodes}
-| | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
-| | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
-| | Add arp on dut | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip4_address}
-| | ... | ${dut2_if1_mac}
-| | Add arp on dut | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip4_address}
-| | ... | ${dut1_if2_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
+| | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip4_address} | ${dut2_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip4_address} | ${dut1_if2_mac}
| Initialize NAT44 in circular topology
| | [Documentation] | Initialization of 2-node / 3-node topology with NAT44
@@ -2475,9 +2499,11 @@
| | ...
| | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1} | 10.0.0.1 | 20
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 11.0.0.1 | 20
+| | ... | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2}
+| | ... | 11.0.0.1 | 20
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} | 11.0.0.2 | 20
+| | ... | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1}
+| | ... | 11.0.0.2 | 20
| | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Set Variable | ${dut2}
| | ... | ELSE | Set Variable | ${dut1}
@@ -2493,12 +2519,14 @@
| | ${dut2_if1_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Get Interface MAC | ${dut2} | ${dut2_if1}
| | ...
-| | Add arp on dut | ${dut1} | ${dut1_if1} | 10.0.0.2 | ${tg_if1_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 10.0.0.2 | ${tg_if1_mac}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Add arp on dut | ${dut1} | ${dut1_if2} | 11.0.0.2 | ${dut2_if1_mac}
+| | ... | VPP Add IP Neighbor
+| | ... | ${dut1} | ${dut1_if2} | 11.0.0.2 | ${dut2_if1_mac}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Add arp on dut | ${dut2} | ${dut2_if1} | 11.0.0.1 | ${dut1_if2_mac}
-| | Add arp on dut | ${dut} | ${dut_if2} | 12.0.0.2 | ${tg_if2_mac}
+| | ... | VPP Add IP Neighbor
+| | ... | ${dut2} | ${dut2_if1} | 11.0.0.1 | ${dut1_if2_mac}
+| | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 12.0.0.2 | ${tg_if2_mac}
| | ...
| | Vpp Route Add | ${dut1} | 20.0.0.0 | 18 | gateway=10.0.0.2
| | ... | interface=${dut1_if1}
@@ -2871,8 +2899,8 @@
| | ... | ELSE | Set Variable | if2
| | ${prev_if_mac}= | Get Interface MAC | ${nodes['${prev_node}']}
| | ... | ${${prev_node}_${prev_if}}
-| | Add ARP on DUT | ${nodes['${dut}']} | ${${dut}_if1} | ${ip_net_if1}.1
-| | ... | ${prev_if_mac}
+| | VPP Add IP Neighbor
+| | ... | ${nodes['${dut}']} | ${${dut}_if1} | ${ip_net_if1}.1 | ${prev_if_mac}
| | ...
| | ${fib_table_2}= | Evaluate | ${fib_table_1} + ${count}
| | Add Fib Table | ${nodes['${dut}']} | ${fib_table_2}
@@ -2894,8 +2922,8 @@
| | ... | ELSE | Set Variable | if1
| | ${next_if_mac}= | Get Interface MAC | ${nodes['${next_node}']}
| | ... | ${${next_node}_${next_if}}
-| | Add ARP on DUT | ${nodes['${dut}']} | ${${dut}_if2} | ${ip_net_if2}.2
-| | ... | ${next_if_mac}
+| | VPP Add IP Neighbor
+| | ... | ${nodes['${dut}']} | ${${dut}_if2} | ${ip_net_if2}.2 | ${next_if_mac}
| | ...
| | ${fib_table_1}= | Evaluate | ${fib_table_1} - ${1}
| | ${ip_base_start}= | Set Variable | ${31}
@@ -2939,10 +2967,10 @@
| | | ... | ${memif2}
| | | ${memif_if2_mac}= | Get interface mac | ${nodes['${dut}']}
| | | ... | ${memif_if2_key}
-| | | Add arp on dut | ${nodes['${dut}']} | ${memif1} | ${ip_net_memif2}.1
-| | | ... | ${memif_if2_mac}
-| | | Add arp on dut | ${nodes['${dut}']} | ${memif2} | ${ip_net_memif1}.1
-| | | ... | ${memif_if1_mac}
+| | | VPP Add IP Neighbor | ${nodes['${dut}']}
+| | | ... | ${memif1} | ${ip_net_memif2}.1 | ${memif_if2_mac}
+| | | VPP Add IP Neighbor | ${nodes['${dut}']}
+| | | ... | ${memif2} | ${ip_net_memif1}.1 | ${memif_if1_mac}
| Initialize IPv4 routing with memif pairs
| | [Documentation]
diff --git a/resources/libraries/robot/shared/traffic.robot b/resources/libraries/robot/shared/traffic.robot
index f002850071..4ec5496e84 100644
--- a/resources/libraries/robot/shared/traffic.robot
+++ b/resources/libraries/robot/shared/traffic.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2016 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -14,13 +14,12 @@
"""Traffic keywords"""
*** Settings ***
+| Library | resources.libraries.python.InterfaceUtil
| Library | resources.libraries.python.IPv6Util
-| Library | resources.libraries.python.IPv6Setup
-| Library | resources.libraries.python.TrafficScriptExecutor
| Library | resources.libraries.python.NodePath
-| Library | resources.libraries.python.Routing
-| Library | resources.libraries.python.InterfaceUtil
| Library | resources.libraries.python.topology.Topology
+| Library | resources.libraries.python.TrafficScriptExecutor
+| ...
| Resource | resources/libraries/robot/shared/default.robot
| Resource | resources/libraries/robot/shared/counters.robot
| ...
diff --git a/resources/libraries/robot/tcp/tcp_setup.robot b/resources/libraries/robot/tcp/tcp_setup.robot
index d2bc41fce0..8a39a0bc4a 100644
--- a/resources/libraries/robot/tcp/tcp_setup.robot
+++ b/resources/libraries/robot/tcp/tcp_setup.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2018 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -12,9 +12,10 @@
# limitations under the License.
*** Settings ***
-| Library | resources.libraries.python.IPv4Util.IPv4Util
| Library | resources.libraries.python.InterfaceUtil
+| Library | resources.libraries.python.IPUtil
| Library | resources.libraries.python.tcp.TCPUtils
+| ...
| Resource | resources/libraries/robot/ip/ip4.robot
| ...
| Documentation | L2 keywords to set up VPP to test tcp.
@@ -62,14 +63,14 @@
| | [Arguments] | ${prealloc_fifos} | ${fifo_size} | ${private_segment_size}
| | ...
| | Set Interface State | ${dut1} | ${dut1_if1} | up
-| | Set Interface Address | ${dut1} | ${dut1_if1} | 192.168.10.2 | 24
-| | Set Interface Address | ${dut1} | ${dut1_if1} | 192.168.20.2 | 24
-| | Set Interface Address | ${dut1} | ${dut1_if1} | 192.168.30.2 | 24
-| | Set Interface Address | ${dut1} | ${dut1_if1} | 192.168.40.2 | 24
-| | Set Interface Address | ${dut1} | ${dut1_if1} | 192.168.50.2 | 24
-| | Set Interface Address | ${dut1} | ${dut1_if1} | 192.168.60.2 | 24
-| | Set Interface Address | ${dut1} | ${dut1_if1} | 192.168.70.2 | 24
-| | Set Interface Address | ${dut1} | ${dut1_if1} | 192.168.80.2 | 24
+| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 192.168.10.2 | 24
+| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 192.168.20.2 | 24
+| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 192.168.30.2 | 24
+| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 192.168.40.2 | 24
+| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 192.168.50.2 | 24
+| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 192.168.60.2 | 24
+| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 192.168.70.2 | 24
+| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 192.168.80.2 | 24
| | Vpp Node Interfaces Ready Wait | ${dut1}
| | Start HTTP server params | ${dut1} | ${prealloc_fifos} | ${fifo_size}
| | ... | ${private_segment_size}