diff options
author | Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> | 2024-01-28 19:45:44 +0100 |
---|---|---|
committer | Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> | 2024-01-29 22:24:42 +0100 |
commit | a7edeebc90bdd335361a7b36f5f5d12a14375554 (patch) | |
tree | 0e48ee456ef26471271c5412f3205aafcda41857 /src/onaptests/steps/onboard/vsp.py | |
parent | 2479155376b6142e97163a7903632015fed50815 (diff) |
Enhanced validation of configuration of all tests
Issue-ID: TEST-402
Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl>
Change-Id: I2e4ef6365b44c33f4c0b3e72886a83f92c63e2f3
Diffstat (limited to 'src/onaptests/steps/onboard/vsp.py')
-rw-r--r-- | src/onaptests/steps/onboard/vsp.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/onaptests/steps/onboard/vsp.py b/src/onaptests/steps/onboard/vsp.py index 06e0fa2..36e78df 100644 --- a/src/onaptests/steps/onboard/vsp.py +++ b/src/onaptests/steps/onboard/vsp.py @@ -48,10 +48,11 @@ 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.onboard() + with open(settings.VSP_FILE_PATH, "rb") as vsp_file: + vsp: Vsp = Vsp(name=settings.VSP_NAME, + vendor=vendor, + package=vsp_file) + vsp.onboard() @BaseStep.store_state(cleanup=True) def cleanup(self): @@ -103,8 +104,7 @@ class YamlTemplateVspOnboardStep(YamlTemplateBaseStep): """ if settings.MODEL_YAML_TEMPLATE: return self.model_yaml_template - else: - return self.parent.yaml_template + return self.parent.yaml_template @property def model_yaml_template(self) -> dict: |