Fix pylama errors 86/135686/1
authorMichal Jagiello <michal.jagiello@t-mobile.pl>
Tue, 8 Aug 2023 08:58:06 +0000 (08:58 +0000)
committerMichal Jagiello <michal.jagiello@t-mobile.pl>
Tue, 8 Aug 2023 08:58:06 +0000 (08:58 +0000)
Some new code was not checked by pylama and we have new errors

Issue-ID: TEST-404
Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl>
Change-Id: I5e92f0bbbafedc8852599eb3fb3423509c3e0d12

src/onaptests/configuration/pnf_macro_settings.py
src/onaptests/configuration/settings.py
src/onaptests/steps/base.py
src/onaptests/steps/cloud/expose_service_node_port.py
src/onaptests/steps/instantiate/pnf_register_ves.py
src/onaptests/steps/onboard/cds.py

index 2c83de0..d332763 100644 (file)
@@ -51,4 +51,4 @@ PNF_REGISTRATION_NUMBER_OF_TRIES = 20
 # Disable YAML SDC model definition which means all SDC config reside in SERVICE_YAML_TEMPLATE
 MODEL_YAML_TEMPLATE = None
 USE_SIMULATOR = True
-VES_NODE_PORT = 30417
\ No newline at end of file
+VES_NODE_PORT = 30417
index f8f389c..24b37ff 100644 (file)
@@ -56,4 +56,4 @@ SERVICE_DISTRIBUTION_NUMBER_OF_TRIES = 30
 SERVICE_DISTRIBUTION_SLEEP_TIME = 60
 EXPOSE_SERVICES_NODE_PORTS = True
 IN_CLUSTER = False
-VES_BASIC_AUTH = {'username': 'sample1', 'password': 'sample1'}
\ No newline at end of file
+VES_BASIC_AUTH = {'username': 'sample1', 'password': 'sample1'}
index 8737ac1..06064b4 100644 (file)
@@ -25,7 +25,7 @@ IF_VALIDATION = "PYTHON_SDK_TESTS_VALIDATION"
 class StoreStateHandler(ABC):
 
     @classmethod
-    def store_state(cls, fun=None, *, cleanup=False):
+    def store_state(cls, fun=None, *, cleanup=False):  # noqa
         if fun is None:
             return functools.partial(cls.store_state, cleanup=cleanup)
 
index ee820f7..1f43a65 100644 (file)
@@ -73,7 +73,9 @@ class ExposeServiceNodePortStep(BaseStep):
                 self.k8s_client.patch_namespaced_service(
                     self.service_name,
                     settings.K8S_ONAP_NAMESPACE,
-                    {"spec": {"ports": [{"port": self.port, "nodePort": self.node_port}], "type": "NodePort"}}
+                    {"spec": {"ports": [{"port": self.port,
+                                         "nodePort": self.node_port}],
+                              "type": "NodePort"}}
                 )
             except ApiException:
                 self._logger.exception("Kubernetes API exception")
index cc606ed..31c16d2 100644 (file)
@@ -22,7 +22,9 @@ class SendPnfRegisterVesEvent(BaseStep):
         super().__init__(cleanup=BaseStep.HAS_NO_CLEANUP)
         if settings.EXPOSE_SERVICES_NODE_PORTS:
             self.add_step(ExposeServiceNodePortStep(component="VES-Collector",
-                service_name="dcae-ves-collector", port=8080, node_port=settings.VES_NODE_PORT))
+                          service_name="dcae-ves-collector",
+                          port=8080,
+                          node_port=settings.VES_NODE_PORT))
 
     @property
     def description(self) -> str:
index c22ff4f..e489145 100644 (file)
@@ -29,7 +29,10 @@ class ExposeCDSBlueprintprocessorNodePortStep(CDSBaseStep, ExposeServiceNodePort
     """Expose CDS blueprintsprocessor port."""
     def __init__(self) -> None:
         """Initialize step."""
-        super().__init__(component = "CDS", service_name="cds-blueprints-processor-http", port=8080, node_port=settings.CDS_NODE_PORT)
+        super().__init__(component="CDS",
+                         service_name="cds-blueprints-processor-http",
+                         port=8080,
+                         node_port=settings.CDS_NODE_PORT)
 
 
 class BootstrapBlueprintprocessor(CDSBaseStep):