aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/python/InterfaceUtil.py4
-rw-r--r--resources/libraries/python/honeycomb/HcAPIKwACL.py79
-rw-r--r--resources/libraries/python/honeycomb/HcAPIKwInterfaces.py13
-rw-r--r--resources/libraries/robot/honeycomb/access_control_lists.robot2
-rw-r--r--resources/libraries/robot/honeycomb/lisp.robot7
-rw-r--r--resources/test_data/honeycomb/netconf/triggers.py8
-rw-r--r--resources/test_data/honeycomb/persistence.py4
-rw-r--r--resources/test_data/honeycomb/plugin_acl.py1
-rwxr-xr-xresources/tools/download_hc_build_pkgs.sh4
9 files changed, 60 insertions, 62 deletions
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py
index 558e99b4e7..793f908a7a 100644
--- a/resources/libraries/python/InterfaceUtil.py
+++ b/resources/libraries/python/InterfaceUtil.py
@@ -260,7 +260,9 @@ class InterfaceUtil(object):
Note: A single interface may have multiple IP addresses assigned.
:rtype: list
"""
- sw_if_index = InterfaceUtil.get_sw_if_index(node, interface)
+
+ sw_if_index = Topology.convert_interface_reference(
+ node, interface, "sw_if_index")
with VatTerminal(node) as vat:
response = vat.vat_terminal_exec_cmd_from_template(
diff --git a/resources/libraries/python/honeycomb/HcAPIKwACL.py b/resources/libraries/python/honeycomb/HcAPIKwACL.py
index 565ed486d8..556c39644f 100644
--- a/resources/libraries/python/honeycomb/HcAPIKwACL.py
+++ b/resources/libraries/python/honeycomb/HcAPIKwACL.py
@@ -47,7 +47,7 @@ class ACLKeywords(object):
:type node: dict
:type path: str
:type data: dict
- :return: Content of response.
+ :returns: Content of response.
:rtype: bytearray
:raises HoneycombError: If the status code in response to PUT is not
200 = OK.
@@ -79,7 +79,7 @@ class ACLKeywords(object):
:param table: Classify table to be added.
:type node: dict
:type table: dict
- :return: Content of response.
+ :returns: Content of response.
:rtype: bytearray
"""
@@ -93,7 +93,7 @@ class ACLKeywords(object):
:param node: Honeycomb node.
:type node: dict
- :return: Content of response.
+ :returns: Content of response.
:rtype: bytearray
"""
@@ -107,7 +107,7 @@ class ACLKeywords(object):
:param table_name: Name of the classify table to be removed.
:type node: dict
:type table_name: str
- :return: Content of response.
+ :returns: Content of response.
:rtype: bytearray
"""
@@ -120,7 +120,7 @@ class ACLKeywords(object):
:param node: Honeycomb node.
:type node: dict
- :return: List of classify tables.
+ :returns: List of classify tables.
:rtype: list
"""
@@ -131,10 +131,8 @@ class ACLKeywords(object):
raise HoneycombError(
"Not possible to get operational information about the "
"classify tables. Status code: {0}.".format(status_code))
- try:
- return resp["vpp-classifier"]["classify-table"]
- except (KeyError, TypeError):
- return []
+
+ return resp["vpp-classifier-state"]["classify-table"]
@staticmethod
def get_classify_table_oper_data(node, table_name):
@@ -144,22 +142,16 @@ class ACLKeywords(object):
:param table_name: Name of the classify table.
:type node: dict
:type table_name: str
- :return: Operational data about the given classify table.
+ :returns: Operational data about the given classify table.
:rtype: dict
"""
- path = "/classify-table/" + table_name
- status_code, resp = HcUtil.\
- get_honeycomb_data(node, "oper_classify_table", path)
-
- if status_code != HTTPCodes.OK:
- raise HoneycombError(
- "Not possible to get operational information about the "
- "classify tables. Status code: {0}.".format(status_code))
- try:
- return resp["classify-table"][0]
- except (KeyError, TypeError):
- return []
+ tables = ACLKeywords.get_all_classify_tables_oper_data(node)
+ for table in tables:
+ if table["name"] == table_name:
+ return table
+ raise HoneycombError("Table {0} not found in ACL table list.".format(
+ table_name))
@staticmethod
def get_all_classify_tables_cfg_data(node):
@@ -167,7 +159,7 @@ class ACLKeywords(object):
:param node: Honeycomb node.
:type node: dict
- :return: List of classify tables.
+ :returns: List of classify tables.
:rtype: list
"""
@@ -193,7 +185,7 @@ class ACLKeywords(object):
:type node: dict
:type table_name: str
:type session: dict
- :return: Content of response.
+ :returns: Content of response.
:rtype: bytearray
"""
@@ -212,7 +204,7 @@ class ACLKeywords(object):
:type node: dict
:type table_name: str
:type session_match: str
- :return: Content of response.
+ :returns: Content of response.
:rtype: bytearray
"""
@@ -229,15 +221,13 @@ class ACLKeywords(object):
:param table_name: Name of the classify table.
:type node: dict
:type table_name: str
- :return: List of classify sessions present in the classify table.
+ :returns: List of classify sessions present in the classify table.
:rtype: list
"""
table_data = ACLKeywords.get_classify_table_oper_data(node, table_name)
- try:
- return table_data["classify-table"][0]["classify-session"]
- except (KeyError, TypeError):
- return []
+
+ return table_data["classify-session"]
@staticmethod
def get_classify_session_oper_data(node, table_name, session_match):
@@ -250,23 +240,19 @@ class ACLKeywords(object):
:type node: dict
:type table_name: str
:type session_match: str
- :return: Classify session operational data.
+ :returns: Classify session operational data.
:rtype: dict
+ :raises HoneycombError: If no session the specified match Id is found.
"""
- path = "/classify-table/" + table_name + \
- "/classify-session/" + session_match
- status_code, resp = HcUtil.\
- get_honeycomb_data(node, "oper_classify_table", path)
-
- if status_code != HTTPCodes.OK:
- raise HoneycombError(
- "Not possible to get operational information about the "
- "classify tables. Status code: {0}.".format(status_code))
- try:
- return resp["classify-session"][0]
- except (KeyError, TypeError):
- return {}
+ sessions = ACLKeywords.get_all_classify_sessions_oper_data(
+ node, table_name)
+ for session in sessions:
+ if session["match"] == session_match:
+ return session
+ raise HoneycombError(
+ "Session with match value \"{0}\" not found"
+ " under ACL table {1}.".format(session_match, table_name))
@staticmethod
def create_acl_plugin_classify_chain(node, list_name, data, macip=False):
@@ -281,7 +267,7 @@ class ACLKeywords(object):
:type data: dict
:type macip: bool
- :return: Content of response.
+ :returns: Content of response.
:rtype: bytearray
:raises HoneycombError: If the operation fails.
"""
@@ -318,8 +304,9 @@ class ACLKeywords(object):
:type direction: str
:type macip: bool
- :return: Content of response.
+ :returns: Content of response.
:rtype: bytearray
+ :raises ValueError: If the direction argument is incorrect.
:raises HoneycombError: If the operation fails.
"""
diff --git a/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py b/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py
index b4746e2118..f317d06a69 100644
--- a/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py
+++ b/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py
@@ -201,6 +201,16 @@ class InterfaceKeywords(object):
:rtype: dict
"""
+ try:
+ interface = Topology.convert_interface_reference(
+ node, interface, "name")
+ except RuntimeError:
+ if isinstance(interface, basestring):
+ # Probably name of a custom interface (TAP, VxLAN, Vhost, ...)
+ pass
+ else:
+ raise
+
intfs = InterfaceKeywords.get_all_interfaces_oper_data(node)
for intf in intfs:
if intf["name"] == interface:
@@ -653,6 +663,9 @@ class InterfaceKeywords(object):
:rtype: bytearray
"""
+ interface = Topology.convert_interface_reference(
+ node, interface, "name")
+
path = ("interfaces", ("interface", "name", interface), "ietf-ip:ipv6",
"address")
address = [{"ip": ip_addr, "prefix-length": prefix_len}, ]
diff --git a/resources/libraries/robot/honeycomb/access_control_lists.robot b/resources/libraries/robot/honeycomb/access_control_lists.robot
index a62ea0f2e8..e35cc92952 100644
--- a/resources/libraries/robot/honeycomb/access_control_lists.robot
+++ b/resources/libraries/robot/honeycomb/access_control_lists.robot
@@ -225,7 +225,7 @@
| | ... | \| ACL session from Honeycomb should not exist \| ${nodes['DUT1']} \
| | ... | \| table0 \| 00:00:00:00:00:00:01:02:03:04:05:06:00:00:00:00 \|
| | [Arguments] | ${node} | ${table_name} | ${session_match}
-| | Run keyword and expect error | *HoneycombError: *Status code: 404.
+| | Run keyword and expect error | *KeyError:*
| | ... | Get classify session oper data
| | ... | ${node} | ${table_name} | ${session_match}
diff --git a/resources/libraries/robot/honeycomb/lisp.robot b/resources/libraries/robot/honeycomb/lisp.robot
index f490769c6f..e1d69ed316 100644
--- a/resources/libraries/robot/honeycomb/lisp.robot
+++ b/resources/libraries/robot/honeycomb/lisp.robot
@@ -77,11 +77,8 @@
| | ... | \| Lisp should not be configured \| ${nodes['DUT1']} \|
| | [Arguments] | ${node}
| | ...
-| | ${data}= | Get Lisp operational data | ${node}
-| | Should be equal as strings | ${data['lisp-state']['enable']} | False
-| | ${data}= | Set Variable | ${data['lisp-state']['lisp-feature-data']}
-| | Should match | ${data['pitr-cfg']['locator-set']} | N/A
-| | Variable should not exist | ${data['eid-table']['vni-table'][0]}
+| | Run keyword and Expect Error | KeyError: 'lisp-feature-data'
+| | ... | Get Lisp operational data | ${node}
| Lisp state From Honeycomb Should Be
| | [Documentation] | Retrieves Lisp state from Honeycomb operational\
diff --git a/resources/test_data/honeycomb/netconf/triggers.py b/resources/test_data/honeycomb/netconf/triggers.py
index 51a6ab6967..5d47853352 100644
--- a/resources/test_data/honeycomb/netconf/triggers.py
+++ b/resources/test_data/honeycomb/netconf/triggers.py
@@ -285,10 +285,9 @@ a:operation="replace">
</target>
<default-operation>none</default-operation>
<config>
-<vpp xmlns="urn:opendaylight:params:xml:ns:yang:v3po">
-<bridge-domains>
-<bridge-domain xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0"
-a:operation="replace">
+<bridge-domains xmlns="urn:opendaylight:params:xml:ns:yang:v3po"
+xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="replace">
+<bridge-domain>
<name>e86740a2-042c-4e64-a43b-cc224e0d5240</name>
<unknown-unicast-flood>true</unknown-unicast-flood>
<forward>true</forward>
@@ -297,7 +296,6 @@ a:operation="replace">
<arp-termination>false</arp-termination>
</bridge-domain>
</bridge-domains>
-</vpp>
</config>
</edit-config>
</rpc>
diff --git a/resources/test_data/honeycomb/persistence.py b/resources/test_data/honeycomb/persistence.py
index 216d4facef..131a3ef54f 100644
--- a/resources/test_data/honeycomb/persistence.py
+++ b/resources/test_data/honeycomb/persistence.py
@@ -102,7 +102,7 @@ def get_variables(interface):
},
"match": {
"vlan-tagged": {
- "match-exact-tags": False
+ "match-exact-tags": True
}
}
},
@@ -123,7 +123,7 @@ def get_variables(interface):
'tag_rewrite_pop_1_VAT': {
'sub_default': 0,
'sub_dot1ad': 0,
- 'sub_exact_match': 0,
+ 'sub_exact_match': 1,
'sub_inner_vlan_id': 0,
'sub_inner_vlan_id_any': 1,
'sub_number_of_tags': 2,
diff --git a/resources/test_data/honeycomb/plugin_acl.py b/resources/test_data/honeycomb/plugin_acl.py
index d9d2ecd90f..6bd673d8b0 100644
--- a/resources/test_data/honeycomb/plugin_acl.py
+++ b/resources/test_data/honeycomb/plugin_acl.py
@@ -34,6 +34,7 @@ def get_variables(test_case, name):
# Variables for control packet
"src_ip": "16.0.0.1",
"dst_ip": "16.0.1.1",
+ "src_net": "16.0.0.0",
"dst_net": "16.0.1.0",
"src_port": "1234",
"dst_port": "1234",
diff --git a/resources/tools/download_hc_build_pkgs.sh b/resources/tools/download_hc_build_pkgs.sh
index c83badaead..9bcaefb8d0 100755
--- a/resources/tools/download_hc_build_pkgs.sh
+++ b/resources/tools/download_hc_build_pkgs.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (c) 2016 Cisco and/or its affiliates.
+# Copyright (c) 2017 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:
@@ -22,7 +22,7 @@ OS=$2
# Download the latest VPP and VPP plugin .deb packages
URL="https://nexus.fd.io/service/local/artifact/maven/content"
-VER="LATEST"
+VER="RELEASE"
VPP_GROUP="io.fd.vpp"
NSH_GROUP="io.fd.nsh_sfc"
VPP_ARTIFACTS="vpp vpp-dbg vpp-dev vpp-dpdk-dev vpp-dpdk-dkms vpp-lib vpp-plugins vpp-api-java"