diff --git a/geant_service_orchestrator/main.py b/geant_service_orchestrator/main.py index 0ec8aae0a920f97b0f4a4c44491718196c419288..9ea59ed79b973e8cb0d4dd20d43865f58e9a2f6f 100644 --- a/geant_service_orchestrator/main.py +++ b/geant_service_orchestrator/main.py @@ -2,7 +2,7 @@ from orchestrator import OrchestratorCore from orchestrator.cli.main import app as core_cli from orchestrator.settings import AppSettings import geant_service_orchestrator.products # noqa: F401 -import geant_service_orchestrator.workflows # noqa: F401 +import geant_service_orchestrator.workflows # noqa: F401 app = OrchestratorCore(base_settings=AppSettings()) diff --git a/geant_service_orchestrator/services/ipam.py b/geant_service_orchestrator/services/ipam.py index 7c02a4488d66500e0062e224c27a4da7fae636fb..3314bce4ed21d4cc1633a75a7cf10d77b54e94e1 100644 --- a/geant_service_orchestrator/services/ipam.py +++ b/geant_service_orchestrator/services/ipam.py @@ -2,7 +2,6 @@ import ipaddress from pydantic import BaseSettings from geant_service_orchestrator import settings - class ServiceNetworks(BaseSettings): v4: ipaddress.IPv4Network v6: ipaddress.IPv6Network @@ -14,8 +13,9 @@ class HostAddresses(BaseSettings): def new_service_networks( - ipam: settings.IPAMParams, service_params: settings.ServiceNetworkParams) -> ServiceNetworks: + oss = settings.load_oss_params() + assert oss.IPAM.INFOBLOX # TODO: load from ipam # cf. https://gitlab.geant.org/goat/gap-jenkins/-/blob/development/service-editor/gap_service_editor/ipam.py#L35-66 # noqa: E501 return ServiceNetworks( @@ -23,7 +23,9 @@ def new_service_networks( v6=ipaddress.IPv6Network('dead:beef::/120')) -def new_device_lo_address(fqdn: str, networks: ServiceNetworks) -> HostAddresses: +def new_device_lo_address() -> HostAddresses: + oss = settings.load_oss_params() + assert oss.IPAM.INFOBLOX # TODO: load from ipam return HostAddresses( v4=ipaddress.IPv4Address('10.10.10.10'), diff --git a/geant_service_orchestrator/workflows/device/create_device.py b/geant_service_orchestrator/workflows/device/create_device.py index d3fe7af8c214f158c978345cf575bbd66a2b1abd..02eedfa7626b740258aba1cedec4ae478b3a9a25 100644 --- a/geant_service_orchestrator/workflows/device/create_device.py +++ b/geant_service_orchestrator/workflows/device/create_device.py @@ -45,7 +45,7 @@ def get_info_from_ipam(subscription: device.DeviceInactive) -> State: lo = ipam.new_device_lo_address() subscription.device.lo_ipv4_address = lo.v4 subscription.device.lo_ipv6_address = lo.v6 - # TODO: get info about how these are to be generated + # TODO: get info about how these should be generated subscription.device.lo_iso_address = "49.51e5.0001.0620.4009.6047.00" subscription.device.si_ipv4_network = "192.168.0.0/31" subscription.device.ias_lt_ipv4_network = "192.168.1.0/31" diff --git a/geant_service_orchestrator/workflows/device/terminate_device.py b/geant_service_orchestrator/workflows/device/terminate_device.py index 2ea80d0e5b9ad407bb66c3ce00e5c95710208459..5c175778ca3e302dd13bf809001087e698fe6d27 100644 --- a/geant_service_orchestrator/workflows/device/terminate_device.py +++ b/geant_service_orchestrator/workflows/device/terminate_device.py @@ -11,7 +11,7 @@ from orchestrator.workflows.steps import ( ) from orchestrator.workflows.utils import wrap_modify_initial_input_form -from products import Device +from geant_service_orchestrator.products.product_types.device import Device def initial_input_form_generator(subscription_id: UUIDstr) -> InputForm: