aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/wrapper/helm_charts.py
diff options
context:
space:
mode:
authorMichal Jagiello <michal.jagiello@t-mobile.pl>2023-07-17 13:30:55 +0000
committerMichal Jagiello <michal.jagiello@t-mobile.pl>2023-07-17 13:50:59 +0000
commit939f1933c8635a18de428c696c97cc5d8600abff (patch)
treea58cb9342f1a9d2cec80fc6a792eae0daae7bc49 /src/onaptests/steps/wrapper/helm_charts.py
parentb1e1a5fa99e29b3ffc2bc48d11b163e28cbb7744 (diff)
Add pylama into checks
Checks code with pylama Issue-ID: INT-2222 Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl> Change-Id: If275ef90f21e3049abe72bcf373473b40846005c
Diffstat (limited to 'src/onaptests/steps/wrapper/helm_charts.py')
-rw-r--r--src/onaptests/steps/wrapper/helm_charts.py25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/onaptests/steps/wrapper/helm_charts.py b/src/onaptests/steps/wrapper/helm_charts.py
index b8a6b21..f745150 100644
--- a/src/onaptests/steps/wrapper/helm_charts.py
+++ b/src/onaptests/steps/wrapper/helm_charts.py
@@ -4,12 +4,11 @@ from avionix import ChartBuilder, ChartDependency, ChartInfo
from avionix.errors import HelmError
from onaptests.steps.base import BaseStep
from onaptests.utils.resources import get_local_dir
-from onaptests.utils.exceptions import (
+from onaptests.utils.exceptions import (
EnvironmentPreparationException,
EnvironmentCleanupException)
-
class HelmChartStep(BaseStep):
"""Basic operations on a docker container."""
@@ -36,7 +35,6 @@ class HelmChartStep(BaseStep):
msg = f"{chart_info_file} not found."
raise EnvironmentPreparationException(msg) from err
-
try:
for dependency in chart_info["dependencies"]:
dep = ChartDependency(
@@ -48,16 +46,16 @@ class HelmChartStep(BaseStep):
dependencies.append(dep)
self.builder = ChartBuilder(
- chart_info=ChartInfo(
- api_version=chart_info["api_version"],
- name=chart_info["chart_name"],
- version=chart_info["version"], # SemVer 2 version
- app_version=chart_info["app_version"],
- dependencies=dependencies
- ),
- kubernetes_objects=[],
- keep_chart=False
- )
+ chart_info=ChartInfo(
+ api_version=chart_info["api_version"],
+ name=chart_info["chart_name"],
+ version=chart_info["version"], # SemVer 2 version
+ app_version=chart_info["app_version"],
+ dependencies=dependencies
+ ),
+ kubernetes_objects=[],
+ keep_chart=False
+ )
except KeyError as err:
msg = f"{chart_info_file} does not contain required keys."
raise EnvironmentPreparationException(msg) from err
@@ -82,7 +80,6 @@ class HelmChartStep(BaseStep):
msg = "Error during helm release installation."
raise EnvironmentPreparationException(msg) from err
-
def cleanup(self) -> None:
"""Uninstall helm release."""
try: