From 0ac711d81336fbe88ccb338ea77d5dd2f1a69c16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20F=2E=20D=C3=BCllmann?= Date: Fri, 10 Jul 2020 20:44:21 +0200 Subject: [PATCH] The environment variable for enabling the FAAS-mode has now preference over the configuration file setting. --- ctt-server/models/deployment.py | 9 ++++++++- ctt-server/util/configuration.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ctt-server/models/deployment.py b/ctt-server/models/deployment.py index 2210f77..4512924 100644 --- a/ctt-server/models/deployment.py +++ b/ctt-server/models/deployment.py @@ -91,7 +91,14 @@ def deploy(self): time.sleep(30) envFaasScenario = os.getenv('CTT_FAAS_ENABLED') - if (envFaasScenario and envFaasScenario == "1") or FaasScenario: + faas_mode = False + if envFaasScenario: + if envFaasScenario == "1": + faas_mode = True + elif FaasScenario: + faas_mode = True + + if faas_mode: # FaaS scenario deployed_systems = Deployment.deployment_workaround(exclude_sut=True) self.sut_hostname = self.__test_artifact.policy_yaml['properties']['hostname'] diff --git a/ctt-server/util/configuration.py b/ctt-server/util/configuration.py index 08963d8..0374d36 100644 --- a/ctt-server/util/configuration.py +++ b/ctt-server/util/configuration.py @@ -3,4 +3,4 @@ SUTFile = 'sut_tosca.yaml' TIFile = 'ti_tosca.yaml' DropPolicies = True -FaasScenario = True \ No newline at end of file +FaasScenario = False \ No newline at end of file