Loading src/network/core/network_factory.py +12 −5 Original line number Diff line number Diff line Loading @@ -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. """ Loading @@ -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. Loading src/network/core/network_interface.py +7 −7 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ from abc import ABC, abstractmethod from typing import Dict class NetworkManagementInterface(ABC): """ Abstract Base Class for Network Resource Management. Loading @@ -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: """ Loading @@ -51,7 +52,6 @@ class NetworkManagementInterface(ABC): """ pass @abstractmethod def delete_qod_session(self, session_id: str) -> None: """ Loading @@ -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.) Loading
src/network/core/network_factory.py +12 −5 Original line number Diff line number Diff line Loading @@ -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. """ Loading @@ -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. Loading
src/network/core/network_interface.py +7 −7 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ from abc import ABC, abstractmethod from typing import Dict class NetworkManagementInterface(ABC): """ Abstract Base Class for Network Resource Management. Loading @@ -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: """ Loading @@ -51,7 +52,6 @@ class NetworkManagementInterface(ABC): """ pass @abstractmethod def delete_qod_session(self, session_id: str) -> None: """ Loading @@ -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.)