Enable back Patrole volume testing
[functest.git] / functest / core / cloudify.py
index 21bfc93..0fb4f6e 100644 (file)
@@ -74,8 +74,8 @@ class Cloudify(singlevm.SingleVm2):
             "--cap-add SYS_ADMIN --network=host {}".format(
                 os.path.basename(self.cloudify_archive),
                 self.cloudify_container))
-        self.__logger.debug("output:\n%s", stdout.read())
-        self.__logger.debug("error:\n%s", stderr.read())
+        self.__logger.debug("output:\n%s", stdout.read().decode("utf-8"))
+        self.__logger.debug("error:\n%s", stderr.read().decode("utf-8"))
         self.cfy_client = CloudifyClient(
             host=self.fip.floating_ip_address,
             username='admin', password='admin', tenant='default_tenant')
@@ -124,8 +124,8 @@ class Cloudify(singlevm.SingleVm2):
             "cfy_manager_local:/etc/cloudify/ && "
             "sudo docker exec cfy_manager_local "
             "chmod 444 /etc/cloudify/cloudify_ims.pem")
-        self.__logger.debug("output:\n%s", stdout.read())
-        self.__logger.debug("error:\n%s", stderr.read())
+        self.__logger.debug("output:\n%s", stdout.read().decode("utf-8"))
+        self.__logger.debug("error:\n%s", stderr.read().decode("utf-8"))
 
     def upload_cfy_plugins(self, yaml, wgn):
         """Upload Cloudify plugins"""
@@ -133,8 +133,8 @@ class Cloudify(singlevm.SingleVm2):
             "sudo docker exec cfy_manager_local "
             "cfy plugins upload -y {} {} && "
             "sudo docker exec cfy_manager_local cfy status".format(yaml, wgn))
-        self.__logger.debug("output:\n%s", stdout.read())
-        self.__logger.debug("error:\n%s", stderr.read())
+        self.__logger.debug("output:\n%s", stdout.read().decode("utf-8"))
+        self.__logger.debug("error:\n%s", stderr.read().decode("utf-8"))
 
     def kill_existing_execution(self, dep_name):
         """kill existing execution"""
@@ -147,7 +147,7 @@ class Cloudify(singlevm.SingleVm2):
                         self.cfy_client.executions.cancel(
                             execution['id'], force=True)
                     except Exception:  # pylint: disable=broad-except
-                        self.__logger.warn("Can't cancel the current exec")
+                        self.__logger.warning("Can't cancel the current exec")
             execution = self.cfy_client.executions.start(
                 dep_name, 'uninstall', parameters=dict(ignore_failure=True))
             wait_for_execution(self.cfy_client, execution, self.__logger)
@@ -191,9 +191,8 @@ def wait_for_execution(client, execution, logger, timeout=3600, ):
                     'execution of operation {0} for deployment {1} '
                     'timed out'.format(execution.workflow_id,
                                        execution.deployment_id))
-            else:
-                # update the remaining timeout
-                timeout = deadline - time.time()
+            # update the remaining timeout
+            timeout = deadline - time.time()
 
         if not execution_ended:
             execution = client.executions.get(execution.id)