aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorselias <samelias@cisco.com>2017-03-31 11:47:53 +0200
committerTibor Frank <tifrank@cisco.com>2017-04-03 07:33:36 +0000
commitfdb655956844979145ef8cf1c455ee336c41b437 (patch)
tree430aa5002e46888e4154207ddc2fff63d731b38c
parentb2f75ec0f52110c267b90372e657b664417c1f4b (diff)
HC Test: revert to using restconf over http
- use http instead of https for restconf connection - add missing import to proxyARP robot library - use VAT interface dump to identify interfaces in VAT ip address dump Change-Id: Ic381ff3f9b56a6c633382450559134f5389956c2 Signed-off-by: selias <samelias@cisco.com>
-rw-r--r--resources/libraries/python/HTTPRequest.py9
-rw-r--r--resources/libraries/python/InterfaceUtil.py10
-rw-r--r--resources/libraries/python/honeycomb/HoneycombSetup.py6
-rw-r--r--resources/libraries/robot/honeycomb/proxyarp.robot1
-rw-r--r--tests/func/honeycomb/mgmt-cfg-proxynd6-apihc-func.robot2
5 files changed, 15 insertions, 13 deletions
diff --git a/resources/libraries/python/HTTPRequest.py b/resources/libraries/python/HTTPRequest.py
index 5f87484fa2..d553c6641f 100644
--- a/resources/libraries/python/HTTPRequest.py
+++ b/resources/libraries/python/HTTPRequest.py
@@ -27,8 +27,6 @@ from robot.libraries.BuiltIn import BuiltIn
from requests import request, RequestException, Timeout, TooManyRedirects, \
HTTPError, ConnectionError
-from requests.packages.urllib3 import disable_warnings
-from requests.packages.urllib3.exceptions import InsecureRequestWarning
from requests.auth import HTTPBasicAuth
@@ -78,9 +76,6 @@ class HTTPRequestError(Exception):
logger.error(self._msg)
logger.debug(self._details)
- # suppress warnings about disabled SSL verification
- disable_warnings(InsecureRequestWarning)
-
def __repr__(self):
return repr(self._msg)
@@ -129,8 +124,8 @@ class HTTPRequest(object):
except (AttributeError, AddressValueError):
pass
- return "https://{ip}:{port}{path}".format(ip=ip_addr, port=port,
- path=path)
+ return "http://{ip}:{port}{path}".format(ip=ip_addr, port=port,
+ path=path)
@staticmethod
def _http_request(method, node, path, enable_logging=True, **kwargs):
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py
index 793f908a7a..ff9ecdede5 100644
--- a/resources/libraries/python/InterfaceUtil.py
+++ b/resources/libraries/python/InterfaceUtil.py
@@ -261,8 +261,14 @@ class InterfaceUtil(object):
:rtype: list
"""
- sw_if_index = Topology.convert_interface_reference(
- node, interface, "sw_if_index")
+ 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
with VatTerminal(node) as vat:
response = vat.vat_terminal_exec_cmd_from_template(
diff --git a/resources/libraries/python/honeycomb/HoneycombSetup.py b/resources/libraries/python/honeycomb/HoneycombSetup.py
index 858aa21344..52257bf1d0 100644
--- a/resources/libraries/python/honeycomb/HoneycombSetup.py
+++ b/resources/libraries/python/honeycomb/HoneycombSetup.py
@@ -239,13 +239,13 @@ class HoneycombSetup(object):
:raises HoneycombError: If the configuration could not be changed.
"""
- find = "restconf-https-binding-address"
+ find = "restconf-http-binding-address"
try:
IPv6Address(unicode(node["host"]))
# if management IP of the node is in IPv6 format
- replace = '\\"restconf-https-binding-address\\": \\"0::0\\",'
+ replace = '\\"restconf-binding-address\\": \\"0::0\\",'
except (AttributeError, AddressValueError):
- replace = '\\"restconf-https-binding-address\\": \\"0.0.0.0\\",'
+ replace = '\\"restconf-binding-address\\": \\"0.0.0.0\\",'
argument = '"/{0}/c\\ {1}"'.format(find, replace)
path = "{0}/config/honeycomb.json".format(Const.REMOTE_HC_DIR)
diff --git a/resources/libraries/robot/honeycomb/proxyarp.robot b/resources/libraries/robot/honeycomb/proxyarp.robot
index b9e9b81215..745507a4c3 100644
--- a/resources/libraries/robot/honeycomb/proxyarp.robot
+++ b/resources/libraries/robot/honeycomb/proxyarp.robot
@@ -12,6 +12,7 @@
# limitations under the License.
*** Settings ***
+| Library | resources.libraries.python.honeycomb.proxyARP.ProxyARPKeywords
| Library | resources.libraries.python.honeycomb.proxyARP.IPv6NDProxyKeywords
| Documentation | Keywords used to test Honeycomb ARP proxy and IPv6ND proxy.
diff --git a/tests/func/honeycomb/mgmt-cfg-proxynd6-apihc-func.robot b/tests/func/honeycomb/mgmt-cfg-proxynd6-apihc-func.robot
index 2e2f06244a..423c7885ec 100644
--- a/tests/func/honeycomb/mgmt-cfg-proxynd6-apihc-func.robot
+++ b/tests/func/honeycomb/mgmt-cfg-proxynd6-apihc-func.robot
@@ -36,7 +36,7 @@
| Library | resources.libraries.python.Trace
| Test Setup | Clear Packet Trace on All DUTs | ${nodes}
| Suite Teardown | Restart Honeycomb And VPP | ${node}
-| Force Tags | honeycomb_sanity | honeycomb_test
+| Force Tags | honeycomb_sanity | honeycomb_odl
| Documentation | *Honeycomb IPv6 neighbor discovery proxy test suite.*
*** Test Cases ***