aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/onboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/onaptests/steps/onboard')
-rw-r--r--src/onaptests/steps/onboard/clamp.py1
-rw-r--r--src/onaptests/steps/onboard/msb_k8s.py9
-rw-r--r--src/onaptests/steps/onboard/service.py9
-rw-r--r--src/onaptests/steps/onboard/vsp.py8
4 files changed, 17 insertions, 10 deletions
diff --git a/src/onaptests/steps/onboard/clamp.py b/src/onaptests/steps/onboard/clamp.py
index 72daba2..c8984ba 100644
--- a/src/onaptests/steps/onboard/clamp.py
+++ b/src/onaptests/steps/onboard/clamp.py
@@ -10,6 +10,7 @@ from onapsdk.configuration import settings
from ..base import YamlTemplateBaseStep
from .service import YamlTemplateVfOnboardStep
+
class OnboardClampStep(YamlTemplateBaseStep):
"""Onboard class to create CLAMP templates."""
diff --git a/src/onaptests/steps/onboard/msb_k8s.py b/src/onaptests/steps/onboard/msb_k8s.py
index 3605c29..666de33 100644
--- a/src/onaptests/steps/onboard/msb_k8s.py
+++ b/src/onaptests/steps/onboard/msb_k8s.py
@@ -69,11 +69,12 @@ class CreateProfileStep(BaseStep):
def execute(self) -> None:
"""Create profile."""
super().execute()
- definition: Definition = Definition.get_definition_by_name_version(\
+ definition: Definition = Definition.get_definition_by_name_version(
rb_name=settings.MSB_K8S_RB_NAME,
rb_version=settings.MSB_K8S_RB_VERSION)
with open(settings.MSB_K8S_PROFILE_ARTIFACT_FILE_PATH, "rb") as profile_file:
- self.profile = definition.create_profile(profile_name=settings.MSB_K8S_PROFILE_NAME,
- namespace=settings.K8S_ADDITIONAL_RESOURCES_NAMESPACE,
- kubernetes_version=settings.K8S_VERSION)
+ self.profile = definition.create_profile(
+ profile_name=settings.MSB_K8S_PROFILE_NAME,
+ namespace=settings.K8S_ADDITIONAL_RESOURCES_NAMESPACE,
+ kubernetes_version=settings.K8S_VERSION)
self.profile.upload_artifact(profile_file.read())
diff --git a/src/onaptests/steps/onboard/service.py b/src/onaptests/steps/onboard/service.py
index b1e7d4d..c0bec0d 100644
--- a/src/onaptests/steps/onboard/service.py
+++ b/src/onaptests/steps/onboard/service.py
@@ -55,7 +55,8 @@ class ServiceOnboardStep(BaseStep):
"""
super().execute()
- service: Service = Service(name=settings.SERVICE_NAME, instantiation_type=settings.SERVICE_INSTANTIATION_TYPE)
+ service: Service = Service(name=settings.SERVICE_NAME,
+ instantiation_type=settings.SERVICE_INSTANTIATION_TYPE)
if not service.created():
service.create()
if settings.VL_NAME != "":
@@ -70,7 +71,8 @@ class ServiceOnboardStep(BaseStep):
# If the service is already distributed, do not try to checkin/onboard (replay of tests)
# checkin is done if needed
# If service is replayed, no need to try to re-onboard the model
- # Double check because of: https://gitlab.com/Orange-OpenSource/lfn/onap/python-onapsdk/-/issues/176
+ # Double check because of:
+ # https://gitlab.com/Orange-OpenSource/lfn/onap/python-onapsdk/-/issues/176
if not service.distributed and service.status != onapsdk_const.DISTRIBUTED:
if service.status == onapsdk_const.DRAFT:
try:
@@ -186,7 +188,8 @@ class YamlTemplateServiceOnboardStep(YamlTemplateBaseStep):
# If the service is already distributed, do not try to checkin/onboard (replay of tests)
# checkin is done if needed
# If service is replayed, no need to try to re-onboard the model
- # Double check because of: https://gitlab.com/Orange-OpenSource/lfn/onap/python-onapsdk/-/issues/176
+ # Double check because of:
+ # https://gitlab.com/Orange-OpenSource/lfn/onap/python-onapsdk/-/issues/176
if not service.distributed and service.status != onapsdk_const.DISTRIBUTED:
if service.status == onapsdk_const.DRAFT:
try:
diff --git a/src/onaptests/steps/onboard/vsp.py b/src/onaptests/steps/onboard/vsp.py
index 49b766b..577b1cf 100644
--- a/src/onaptests/steps/onboard/vsp.py
+++ b/src/onaptests/steps/onboard/vsp.py
@@ -41,7 +41,9 @@ class VspOnboardStep(BaseStep):
"""
super().execute()
vendor: Vendor = Vendor(name=settings.VENDOR_NAME)
- vsp: Vsp = Vsp(name=settings.VSP_NAME, vendor=vendor, package=open(settings.VSP_FILE_PATH, "rb"))
+ vsp: Vsp = Vsp(name=settings.VSP_NAME,
+ vendor=vendor,
+ package=open(settings.VSP_FILE_PATH, "rb"))
vsp.onboard()
@BaseStep.store_state(cleanup=True)
@@ -123,8 +125,8 @@ class YamlTemplateVspOnboardStep(YamlTemplateBaseStep):
if "heat_files_to_upload" in pnf:
with open(get_resource_location(pnf["heat_files_to_upload"]), "rb") as package:
vsp: Vsp = Vsp(name=f"{pnf['pnf_name']}_VSP",
- vendor=vendor,
- package=package)
+ vendor=vendor,
+ package=package)
vsp.onboard()
@YamlTemplateBaseStep.store_state(cleanup=True)