aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests
diff options
context:
space:
mode:
authorpawel.denst <pawel.denst@external.t-mobile.pl>2023-05-09 12:44:23 +0000
committerMicha? Jagie??o <michal.jagiello@t-mobile.pl>2023-05-11 12:07:58 +0000
commit33b2b348ec495346e946cde6bb9edd2372b47eb4 (patch)
treeaa810acf9dc8d1000fed7f938944ea1e02345521 /src/onaptests
parent5027f6f3eed3e20fb84950267c625dff693de3b6 (diff)
Configure ONAP Python tests to not expose services
Changed name of setting value Issue-ID: INT-2234 Signed-off-by: pawel.denst <pawel.denst@external.t-mobile.pl> Change-Id: I7c66789753f54e76217f16f9b9bc4ac5b89bd7e7
Diffstat (limited to 'src/onaptests')
-rw-r--r--src/onaptests/configuration/settings.py1
-rw-r--r--src/onaptests/steps/onboard/cds.py9
2 files changed, 7 insertions, 3 deletions
diff --git a/src/onaptests/configuration/settings.py b/src/onaptests/configuration/settings.py
index 7561ebc..74bc840 100644
--- a/src/onaptests/configuration/settings.py
+++ b/src/onaptests/configuration/settings.py
@@ -51,3 +51,4 @@ K8S_ADDITIONAL_RESOURCES_NAMESPACE = K8S_ONAP_NAMESPACE # Resources created on
ORCHESTRATION_REQUEST_TIMEOUT = 60.0 * 15 # 15 minutes in seconds
SERVICE_DISTRIBUTION_NUMBER_OF_TRIES = 30
SERVICE_DISTRIBUTION_SLEEP_TIME = 60
+EXPOSE_SERVICES_NODE_PORTS = True \ No newline at end of file
diff --git a/src/onaptests/steps/onboard/cds.py b/src/onaptests/steps/onboard/cds.py
index 13e6203..0bad0cb 100644
--- a/src/onaptests/steps/onboard/cds.py
+++ b/src/onaptests/steps/onboard/cds.py
@@ -13,7 +13,8 @@ from onapsdk.cds.blueprint_processor import Blueprintprocessor
from onapsdk.configuration import settings
import urllib3
-from ..base import BaseStep
+from onaptests.steps.base import BaseStep
+
from onaptests.utils.exceptions import OnapTestException
@@ -68,6 +69,7 @@ class ExposeCDSBlueprintprocessorNodePortStep(CDSBaseStep):
Use settings values:
- K8S_CONFIG,
- K8S_ONAP_NAMESPACE.
+ - EXPOSE_SERVICES_NODE_PORTS
"""
super().execute()
@@ -131,7 +133,8 @@ class BootstrapBlueprintprocessor(CDSBaseStep):
- ExposeCDSBlueprintprocessorNodePortStep.
"""
super().__init__(cleanup=cleanup)
- self.add_step(ExposeCDSBlueprintprocessorNodePortStep(cleanup=cleanup))
+ if settings.EXPOSE_SERVICES_NODE_PORTS:
+ self.add_step(ExposeCDSBlueprintprocessorNodePortStep(cleanup=cleanup))
@property
def description(self) -> str:
@@ -217,7 +220,7 @@ class CbaPublishStep(CDSBaseStep):
"""Let's skip enrichment if enriched CBA is already present"""
if Path.is_file(settings.CDS_CBA_UNENRICHED):
self.add_step(CbaEnrichStep(cleanup=cleanup))
- else:
+ elif settings.EXPOSE_SERVICES_NODE_PORTS:
self.add_step(ExposeCDSBlueprintprocessorNodePortStep(cleanup=cleanup))
@property