aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2016-05-16 18:20:30 +0200
committerMatej Klotton <mklotton@cisco.com>2016-05-20 11:30:44 +0000
commit95bf11e637855dc91e490f526406fa7538a21ac6 (patch)
tree26602cc2fc8baf7fd9bdcf5928c2ee7efb61c1a9 /resources/libraries/python
parentc2f8b62e978c4f5f29fa3ad3ccba6683a9f3ea85 (diff)
Tests for vhost-user interface configuration
JIRA: CSIT-76 - add tests for vhost-user interface manipulation: - create, modify, delete - add negative tests: - wrong interface type - wrong configuration Change-Id: I09239ef099a6f9672895f9540762e5044123f7ec Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/libraries/python')
-rw-r--r--resources/libraries/python/InterfaceUtil.py15
-rw-r--r--resources/libraries/python/honeycomb/HcAPIKwInterfaces.py1
2 files changed, 16 insertions, 0 deletions
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py
index 94250fba28..1c1ada8f6c 100644
--- a/resources/libraries/python/InterfaceUtil.py
+++ b/resources/libraries/python/InterfaceUtil.py
@@ -529,6 +529,21 @@ class InterfaceUtil(object):
return response[0]
@staticmethod
+ def vhost_user_dump(node):
+ """Get vhost-user data for the given node.
+
+ :param node: VPP node to get interface data from.
+ :type node: dict
+ :return: List of dictionaries with all vhost-user interfaces.
+ :rtype: list
+ """
+ with VatTerminal(node) as vat:
+ response = vat.vat_terminal_exec_cmd_from_template(
+ "vhost_user_dump.vat")
+
+ return response[0]
+
+ @staticmethod
def create_subinterface(node, interface, sub_id, outer_vlan_id,
inner_vlan_id, type_subif):
"""Create sub-interface on node.
diff --git a/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py b/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py
index 04800a24b5..3f9e9d16a5 100644
--- a/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py
+++ b/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py
@@ -25,6 +25,7 @@ from resources.libraries.python.honeycomb.HoneycombUtil \
import HoneycombUtil as HcUtil
+# pylint: disable=too-many-public-methods
class InterfaceKeywords(object):
"""Keywords for Interface manipulation.