Fix host status grep bug and Remove connection_pool argument 81/37381/1
authorUmar Farooq <umar.farooq@neclab.eu>
Thu, 13 Jul 2017 12:51:51 +0000 (14:51 +0200)
committerUmar Farooq <umar.farooq@neclab.eu>
Thu, 13 Jul 2017 12:51:51 +0000 (14:51 +0200)
Host status returned the wrong output as the "OS-EXT-SRV-ATTR:host"
pattern appears twice in the "openstack server show" output.
The argument connection_pool is deprecated and is not needed.

Change-Id: Ib107e0bad8084bdf6f77689f112bde04bdb97543
Signed-off-by: Umar Farooq <umar.farooq@neclab.eu>
tests/inspector.py
tests/run.sh

index d11da29..a61051f 100644 (file)
@@ -54,8 +54,7 @@ class DoctorInspectorSample(object):
         # Pool of novaclients for redundant usage
         for i in range(self.NUMBER_OF_CLIENTS):
             self.novaclients.append(
-                novaclient.Client(self.NOVA_API_VERSION, session=sess,
-                                  connection_pool=True))
+                novaclient.Client(self.NOVA_API_VERSION, session=sess))
         # Normally we use this client for non redundant API calls
         self.nova=self.novaclients[0]
         self.nova.servers.list(detailed=False)
index fda1e75..b838ada 100755 (executable)
@@ -48,7 +48,7 @@ as_admin_user="--os-username admin --os-project-name $DOCTOR_PROJECT
 get_compute_host_info() {
     # get computer host info which first VM boot in as admin user
     COMPUTE_HOST=$(openstack $as_admin_user server show ${VM_BASENAME}1 |
-                   grep "OS-EXT-SRV-ATTR:host" | awk '{ print $4 }')
+                   grep "OS-EXT-SRV-ATTR:host " | awk '{ print $4 }')
     compute_host_in_undercloud=${COMPUTE_HOST%%.*}
     die_if_not_set $LINENO COMPUTE_HOST "Failed to get compute hostname"