Change ODL check url to be diagstatus 85/60185/1
authorTim Rozet <trozet@redhat.com>
Wed, 25 Jul 2018 19:58:14 +0000 (15:58 -0400)
committerTim Rozet <trozet@redhat.com>
Wed, 25 Jul 2018 19:58:14 +0000 (15:58 -0400)
With OOO the password is no longer hardcoded to 'admin' and is
dynamically generated a run time. This causes this curl check to fail.
Instead, use the diagstatus URL which is new in ODL and provides a more
accurate way (without authentication) to check if ODL is ready.

Change-Id: I7eb034cd3f20c5f5daa52a1e9b2d8e2a52118f6e
Signed-off-by: Tim Rozet <trozet@redhat.com>
odl-pipeline/lib/odl_reinstaller/odl_reinstaller.py

index 7e444a8..9a8973f 100644 (file)
@@ -28,8 +28,6 @@ ODL_AAA_JAR = '/opt/opendaylight/bin/aaa-cli-jar.jar'
 class ODLReInstaller(Service):
 
     def __init__(self):
-        self.netvirt_url = "restconf/operational/network-topology:" \
-                           "network-topology/topology/netvirt:1"
         self.nodes = None
         self.odl_node = None
 
@@ -80,12 +78,12 @@ class ODLReInstaller(Service):
         self.reinstall_odl(self.odl_node, odl_artifact)
 
         # Wait for ODL to come back up
-        full_netvirt_url = "http://{}:8081/{}".format(
-            self.odl_node.config['address'], self.netvirt_url)
+        full_netvirt_url = "http://{}:8081/diagstatus".format(
+            self.odl_node.config['address'])
         counter = 1
         while counter <= 10:
             try:
-                self.odl_node.execute("curl --fail -u admin:admin {}".format(
+                self.odl_node.execute("curl --fail {}".format(
                     full_netvirt_url))
                 LOG.info("New OpenDaylight NetVirt is Up")
                 break