Remove dependencies that are not used 33/143133/2
authorFiete Ostkamp <fiete.ostkamp@telekom.de>
Mon, 9 Feb 2026 09:59:28 +0000 (10:59 +0100)
committerFiete Ostkamp <fiete.ostkamp@telekom.de>
Mon, 9 Feb 2026 10:19:00 +0000 (11:19 +0100)
Remove:
- cryptography
- pandas
- matplotlib
- grpcio-health-checking

Issue-ID: INT-2347
Change-Id: I9e41e2025567217427704d767641188bb52c4d95
Signed-off-by: Fiete Ostkamp <fiete.ostkamp@telekom.de>
requirements.txt
setup.cfg
src/onaptests/configuration/settings.py
src/onaptests/utils/tracing.py

index 9d6a5a6..923310f 100644 (file)
@@ -1,4 +1,3 @@
-cryptography==38.0.4
 xtesting==0.91.0
 avionix>=0.4.5
 openstacksdk>=0.61.0
@@ -10,9 +9,6 @@ natural==0.2.0
 slack-sdk==3.21.3
 pg8000==1.30.1
 mysql-connector-python==8.3.0
-pandas==2.2.1
-matplotlib==3.8.3
-grpcio-health-checking==1.71.0
 opentelemetry-distro==0.51b0
 opentelemetry-instrumentation-requests==0.51b0
 opentelemetry-exporter-otlp==1.30.0
index 9012be5..59ce305 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -21,7 +21,6 @@ packages=find_namespace:
 setup_requires =
   pytest-runner==5.2
 install_requires =
-  cryptography==38.0.4
   xtesting==0.91.0
   avionix>=0.4.5
   openstacksdk>=0.61.0
@@ -33,8 +32,6 @@ install_requires =
   slack-sdk==3.21.3
   pg8000==1.30.1
   mysql-connector-python==8.3.0
-  pandas==2.2.1
-  matplotlib==3.8.3
 tests_require =
   mock
   pytest
index b0d1ad3..aed04ee 100644 (file)
@@ -19,27 +19,26 @@ LOG_CONFIG = {
     "formatters": {
         "default": {
             "class": "logging.Formatter",
-            "format": "%(asctime)s %(levelname)s %(lineno)d:%(filename)s(%(process)d) - %(message)s"
+            "format": (
+                "%(asctime)s %(levelname)s %(lineno)d:%(filename)s(%(process)d) - %(message)s"
+            ),
         }
     },
     "handlers": {
         "console": {
             "level": "DEBUG",
             "class": "logging.StreamHandler",
-            "formatter": "default"
+            "formatter": "default",
         },
         "file": {
             "level": "DEBUG",
             "class": "logging.FileHandler",
             "formatter": "default",
             "filename": "/tmp/pythonsdk.debug.log",
-            "mode": "w"
-        }
+            "mode": "w",
+        },
     },
-    "root": {
-        "level": "DEBUG",
-        "handlers": ["console", "file"]
-    }
+    "root": {"level": "DEBUG", "handlers": ["console", "file"]},
 }
 CLEANUP_FLAG = False
 CLEANUP_ACTIVITY_TIMER = 5
@@ -52,17 +51,19 @@ K8S_REGION_TYPE = "k8s"
 TILLER_HOST = "localhost"
 K8S_CONFIG = None  # None means it will use default config (~/.kube/config)
 K8S_TESTS_NAMESPACE = "onap"  # ONAP Kubernetes namespace
-K8S_ADDITIONAL_RESOURCES_NAMESPACE = K8S_TESTS_NAMESPACE  # Resources created on tests namespace
+K8S_ADDITIONAL_RESOURCES_NAMESPACE = (
+    K8S_TESTS_NAMESPACE  # Resources created on tests namespace
+)
 MSB_K8S_OVERRIDE_VALUES = None
 # SOCK_HTTP = "socks5h://127.0.0.1:8091"
 
 ORCHESTRATION_REQUEST_TIMEOUT = 60.0 * 15  # 15 minutes in seconds
 SERVICE_DISTRIBUTION_NUMBER_OF_TRIES = 30
-SERVICE_DISTRIBUTION_SLEEP_TIME = 60
+SERVICE_DISTRIBUTION_SLEEP_TIME = 45
 EXPOSE_SERVICES_NODE_PORTS = True
 CDS_NODE_PORT = 30449
 IN_CLUSTER = False
-VES_BASIC_AUTH = {'username': 'sample1', 'password': 'sample1'}
+VES_BASIC_AUTH = {"username": "sample1", "password": "sample1"}
 IF_VALIDATION = False
 SDNC_SECRET_NAME = "onap-sdnc-db-secret"
 SDNC_DB_PRIMARY_HOST = "mariadb-galera.onap.svc.cluster.local"
@@ -75,10 +76,12 @@ KUBERNETES_NAMESPACE = "onap"
 
 # We need to create a service file with a random service name,
 # to be sure that we force onboarding
-def generate_service_config_yaml_file(service_name: str,
-                                      service_template: str,
-                                      service_config: str,
-                                      generate_random_names: bool = False):
+def generate_service_config_yaml_file(
+    service_name: str,
+    service_template: str,
+    service_config: str,
+    generate_random_names: bool = False,
+):
     """Generate service config YAML file.
 
     Service configurations (both models and instances) are stored in YAML files
@@ -95,9 +98,8 @@ def generate_service_config_yaml_file(service_name: str,
             should have a random suffix or not. Defaults to False.
 
     """
-
     env = Environment(
-        loader=PackageLoader('onaptests', 'templates/vnf-services'),
+        loader=PackageLoader("onaptests", "templates/vnf-services"),
     )
     template = env.get_template(service_template)
 
@@ -105,10 +107,10 @@ def generate_service_config_yaml_file(service_name: str,
         # get a random string to randomize the vnf name
         # Random string with the combination of lower and upper case
         letters = string.ascii_letters
-        result_str = ''.join(random.choice(letters) for i in range(6))
+        result_str = "".join(random.choice(letters) for i in range(6))
         service_name = f"{service_name}_{result_str}"
 
     rendered_template = template.render(service_name=service_name)
 
-    with open(service_config, 'w+', encoding="utf-8") as file_to_write:
+    with open(service_config, "w+", encoding="utf-8") as file_to_write:
         file_to_write.write(rendered_template)
index 54c8c9a..515f60d 100644 (file)
@@ -19,6 +19,6 @@ def otel_expect_not_found() -> None:
             resource = SomeResource.create(...)
     """
     current_span = trace.get_current_span()
-    if current_span and current_span.is_recording():
+    if current_span:
         current_span.set_attribute("error", False)
         current_span.set_attribute("expected_404", True)