Commit c261c490 authored by Adrian Pino's avatar Adrian Pino
Browse files

Update format: apply Flake8 linter

parent 0c3f6b81
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -20,13 +20,16 @@ from src.network.clients.open5gcore.client import Open5GCoreClient
if TYPE_CHECKING:
    from .network_interface import NetworkManagementInterface


class NetworkClientFactory:
    """
    Factory class for creating Network Management Clients.
    """

    @staticmethod
    def create_network_client(client_name: str, base_url: str) -> NetworkManagementInterface:
    def create_network_client(
        client_name: str, base_url: str
    ) -> NetworkManagementInterface:
        """
        Creates and returns an instance of the specified Network Client.
        """
@@ -36,12 +39,16 @@ class NetworkClientFactory:
            return network_client_instance
        except KeyError:
            # Get the list of supported client names
            supported_clients = list(NetworkClientFactory.network_client_constructors.keys())
            supported_clients = list(
                NetworkClientFactory.network_client_constructors.keys()
            )
            raise ValueError(
                f"Invalid network client name: '{client_name}'. "
                f"Supported clients are: {', '.join(supported_clients)}"
                "Supported clients are: "
                f"{', '.join(supported_clients)}"
            )


class NetworkClientTypes:
    """
    Class for creating Network Clients.
+7 −7
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
from abc import ABC, abstractmethod
from typing import Dict


class NetworkManagementInterface(ABC):
    """
    Abstract Base Class for Network Resource Management.
@@ -30,14 +31,14 @@ class NetworkManagementInterface(ABC):
        Creates a QoS session based on CAMARA QoD API input.

        args:
            session_info: Dictionary containing session details conforming to the CAMARA QoD session creation parameters.
            session_info: Dictionary containing session details conforming to
                          the CAMARA QoD session creation parameters.

        returns:
            dictionary containing the created session details, including its ID.
        """
        pass


    @abstractmethod
    def get_qod_session(self, session_id: str) -> Dict:
        """
@@ -51,7 +52,6 @@ class NetworkManagementInterface(ABC):
        """
        pass


    @abstractmethod
    def delete_qod_session(self, session_id: str) -> None:
        """
@@ -65,5 +65,5 @@ class NetworkManagementInterface(ABC):
        """
        pass

    # Placeholder for other CAMARA APIs (e.g., Traffic Influence, Location-retrieval, etc.)
    # Placeholder for other CAMARA APIs (e.g., Traffic Influence,
    # Location-retrieval, etc.)