aboutsummaryrefslogtreecommitdiffstats
path: root/functest/core
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2019-09-12 10:22:49 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2019-09-14 10:24:17 +0200
commitc1b25e9a487436c75d2f0fd625b95c6c59563e64 (patch)
tree749df2e322aee5f48ae9e0730939124a3614c38a /functest/core
parentfe79a7a341bf99d33853ce49ad5536df5ce10a62 (diff)
Select python 3.6 as default
It switches to Python3 as default due to new OPNFV iruya release date (December) which is very closed to Python2 EOL. Functest Iruya (first release published in April) has supported both Python2 and Python3. Change-Id: I4c1294a5361e591fc7a8a88b3d067fc3b39e00c4 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/core')
-rw-r--r--functest/core/cloudify.py7
-rw-r--r--functest/core/singlevm.py9
-rw-r--r--functest/core/tenantnetwork.py2
3 files changed, 8 insertions, 10 deletions
diff --git a/functest/core/cloudify.py b/functest/core/cloudify.py
index 21bfc937e..b5bd1b3c2 100644
--- a/functest/core/cloudify.py
+++ b/functest/core/cloudify.py
@@ -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)
diff --git a/functest/core/singlevm.py b/functest/core/singlevm.py
index 1da30de34..0473a21da 100644
--- a/functest/core/singlevm.py
+++ b/functest/core/singlevm.py
@@ -230,11 +230,10 @@ class VmReady1(tenantnetwork.TenantNetwork1):
self.__logger.debug(
"regex found: '%s' in console\n%s", regex, console)
return True
- else:
- self.__logger.debug(
- "try %s: cannot find regex '%s' in console\n%s",
- iloop + 1, regex, console)
- time.sleep(10)
+ self.__logger.debug(
+ "try %s: cannot find regex '%s' in console\n%s",
+ iloop + 1, regex, console)
+ time.sleep(10)
self.__logger.error("cannot find regex '%s' in console", regex)
return False
diff --git a/functest/core/tenantnetwork.py b/functest/core/tenantnetwork.py
index ae739ac36..604e49ae5 100644
--- a/functest/core/tenantnetwork.py
+++ b/functest/core/tenantnetwork.py
@@ -33,7 +33,7 @@ from functest.utils import config
from functest.utils import env
-class NewProject(object):
+class NewProject():
"""Ease creating new projects/users"""
# pylint: disable=too-many-instance-attributes