HC Tests: fix authentication for ODL Oxygen jobs 32/11532/3
authorMarek Gradzki <mgradzki@cisco.com>
Thu, 5 Apr 2018 08:19:17 +0000 (10:19 +0200)
committerPeter Mikus <pmikus@cisco.com>
Thu, 5 Apr 2018 08:31:18 +0000 (08:31 +0000)
Change-Id: I05dcb5f35ae1bc2abc7ce5c34eaced218e0ebd35
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
resources/libraries/python/honeycomb/HoneycombSetup.py
resources/libraries/robot/honeycomb/honeycomb.robot

index d4175b1..a8a4f0e 100644 (file)
@@ -499,13 +499,15 @@ class HoneycombSetup(object):
                         "in progress ...".format(node['host']))
 
     @staticmethod
-    def install_odl_features(node, path, *features):
+    def install_odl_features(node, odl_name, path, *features):
         """Install required features on a running ODL client.
 
         :param node: Honeycomb node.
+        :param odl_name: Name of ODL client version to use.
         :param path: Path to ODL client on node.
         :param features: Optional, list of additional features to install.
         :type node: dict
+        :type odl_name: str
         :type path: str
         :type features: list
         """
@@ -513,10 +515,14 @@ class HoneycombSetup(object):
         ssh = SSH()
         ssh.connect(node)
 
-        cmd = "{path}/*karaf*/bin/client -u karaf feature:install " \
+        auth = "-u karaf"
+        if odl_name.lower() == "oxygen":
+            auth = "-u karaf -p karaf"
+
+        cmd = "{path}/*karaf*/bin/client {auth} feature:install " \
               "odl-restconf-all " \
               "odl-netconf-connector-all " \
-              "odl-netconf-topology".format(path=path)
+              "odl-netconf-topology".format(path=path, auth=auth)
         for feature in features:
             cmd += " {0}".format(feature)
 
index 165dbc0..88de12b 100644 (file)
 | | Copy ODL Client | ${node} | ${odl_name} | /mnt/common | /tmp
 | | Setup ODL Client | ${node} | /tmp
 | | Wait until keyword succeeds | 2min | 30sec
-| | ... | Install ODL Features | ${node} | /tmp
+| | ... | Install ODL Features | ${node} | ${odl_name} | /tmp
 | | Wait until keyword succeeds | 4min | 15sec
 | | ... | Mount Honeycomb on ODL | ${node}
 | | Wait until keyword succeeds | 2min | 15sec

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.