From 0178d52384e0428368f1acf3163e664ecda7b64c Mon Sep 17 00:00:00 2001 From: Matej Klotton Date: Fri, 4 Nov 2016 11:11:44 +0100 Subject: Add IRB test - JIRA: CSIT-255 - create loopback interfaces - move pg-interface specific arp and neighbor discovery from vpp_interface to vpp_pg_interface - base configuration of IRB tests - IP test scenario Change-Id: I9945a188163652a4e22325877aef008c4d029557 Signed-off-by: Matej Klotton --- test/util.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'test/util.py') diff --git a/test/util.py b/test/util.py index 8d7c9202a41..6e7e275cddc 100644 --- a/test/util.py +++ b/test/util.py @@ -1,8 +1,7 @@ -from logging import * +import socket - -class TestHost(object): - """ Generic test host "connected" to VPP. """ +class Host(object): + """ Generic test host "connected" to VPPs interface. """ @property def mac(self): @@ -14,6 +13,11 @@ class TestHost(object): """ IPv4 address """ return self._ip4 + @property + def ip4n(self): + """ IPv4 address """ + return socket.inet_pton(socket.AF_INET, self._ip4) + @property def ip6(self): """ IPv6 address """ -- cgit 1.2.3-korg