From 671771d2d5f6217a57cb5e90ca32d79f06f5aaad Mon Sep 17 00:00:00 2001 From: Mohammad Torkashvand <mohammad.torkashvand@geant.org> Date: Thu, 3 Apr 2025 10:41:54 +0200 Subject: [PATCH] make L3CoreServiceBlockInactive required in all L3 services --- gso/products/product_blocks/copernicus.py | 2 +- gso/products/product_blocks/geant_ip.py | 2 +- gso/products/product_blocks/ias.py | 2 +- gso/products/product_blocks/lhcone.py | 2 +- gso/products/product_types/copernicus.py | 4 ++-- gso/products/product_types/geant_ip.py | 4 ++-- gso/products/product_types/ias.py | 4 ++-- gso/products/product_types/l3_core_service.py | 2 +- gso/products/product_types/lhcone.py | 4 ++-- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/gso/products/product_blocks/copernicus.py b/gso/products/product_blocks/copernicus.py index e98263a48..d62d39000 100644 --- a/gso/products/product_blocks/copernicus.py +++ b/gso/products/product_blocks/copernicus.py @@ -15,7 +15,7 @@ class CopernicusBlockInactive( ): """An inactive Copernicus product block. See `CopernicusBlock`.""" - l3_core: L3CoreServiceBlockInactive | None = None + l3_core: L3CoreServiceBlockInactive class CopernicusBlockProvisioning(CopernicusBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): diff --git a/gso/products/product_blocks/geant_ip.py b/gso/products/product_blocks/geant_ip.py index 2050794d1..742566298 100644 --- a/gso/products/product_blocks/geant_ip.py +++ b/gso/products/product_blocks/geant_ip.py @@ -15,7 +15,7 @@ class GeantIPBlockInactive( ): """An inactive GeantIP product block. See `GeantIPBlock`.""" - l3_core: L3CoreServiceBlockInactive | None = None + l3_core: L3CoreServiceBlockInactive class GeantIPBlockProvisioning(GeantIPBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): diff --git a/gso/products/product_blocks/ias.py b/gso/products/product_blocks/ias.py index fdf26d324..f57d76fcb 100644 --- a/gso/products/product_blocks/ias.py +++ b/gso/products/product_blocks/ias.py @@ -22,7 +22,7 @@ class IASFlavor(strEnum): class IASBlockInactive(ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="IASBlock"): """An inactive IAS product block. See `IASBlock`.""" - l3_core: L3CoreServiceBlockInactive | None = None + l3_core: L3CoreServiceBlockInactive ias_flavor: IASFlavor = IASFlavor.IAS_PS_OPT_OUT diff --git a/gso/products/product_blocks/lhcone.py b/gso/products/product_blocks/lhcone.py index 48292a5aa..016a2a8f4 100644 --- a/gso/products/product_blocks/lhcone.py +++ b/gso/products/product_blocks/lhcone.py @@ -15,7 +15,7 @@ class LHCOneBlockInactive( ): """An inactive LHCOne product block. See `LHCOneBlock`.""" - l3_core: L3CoreServiceBlockInactive | None = None + l3_core: L3CoreServiceBlockInactive class LHCOneBlockProvisioning(LHCOneBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): diff --git a/gso/products/product_types/copernicus.py b/gso/products/product_types/copernicus.py index cb6c2e687..570938b7a 100644 --- a/gso/products/product_types/copernicus.py +++ b/gso/products/product_types/copernicus.py @@ -23,7 +23,7 @@ class CopernicusInactive(BaseL3SubscriptionModel, is_base=True): copernicus: CopernicusBlockInactive @property - def l3_core(self) -> L3CoreServiceBlockInactive | None: + def l3_core(self) -> L3CoreServiceBlockInactive: """Getter: Retrieve the l3_core from the copernicus attribute.""" return self.copernicus.l3_core @@ -56,7 +56,7 @@ class ImportedCopernicusInactive(BaseL3SubscriptionModel, is_base=True): copernicus: CopernicusBlockInactive @property - def l3_core(self) -> L3CoreServiceBlockInactive | None: + def l3_core(self) -> L3CoreServiceBlockInactive: """Getter: Retrieve the l3_core from the copernicus attribute.""" return self.copernicus.l3_core diff --git a/gso/products/product_types/geant_ip.py b/gso/products/product_types/geant_ip.py index d5e07325d..2710f1afe 100644 --- a/gso/products/product_types/geant_ip.py +++ b/gso/products/product_types/geant_ip.py @@ -25,7 +25,7 @@ class GeantIPInactive(BaseL3SubscriptionModel, is_base=True): geant_ip: GeantIPBlockInactive @property - def l3_core(self) -> L3CoreServiceBlockInactive | None: + def l3_core(self) -> L3CoreServiceBlockInactive: """Getter: Retrieve the l3_core from the geant_ip attribute.""" return self.geant_ip.l3_core @@ -58,7 +58,7 @@ class ImportedGeantIPInactive(BaseL3SubscriptionModel, is_base=True): geant_ip: GeantIPBlockInactive @property - def l3_core(self) -> L3CoreServiceBlockInactive | None: + def l3_core(self) -> L3CoreServiceBlockInactive: """Getter: Retrieve the l3_core from the geant_ip attribute.""" return self.geant_ip.l3_core diff --git a/gso/products/product_types/ias.py b/gso/products/product_types/ias.py index 6eb6193fe..693ad644e 100644 --- a/gso/products/product_types/ias.py +++ b/gso/products/product_types/ias.py @@ -25,7 +25,7 @@ class IASInactive(BaseL3SubscriptionModel, is_base=True): ias: IASBlockInactive @property - def l3_core(self) -> L3CoreServiceBlockInactive | None: + def l3_core(self) -> L3CoreServiceBlockInactive: """Getter: Retrieve the l3_core from the 'ias' attribute.""" return self.ias.l3_core @@ -58,7 +58,7 @@ class ImportedIASInactive(BaseL3SubscriptionModel, is_base=True): ias: IASBlockInactive @property - def l3_core(self) -> L3CoreServiceBlockInactive | None: + def l3_core(self) -> L3CoreServiceBlockInactive: """Getter: Retrieve the l3_core from the 'ias' attribute.""" return self.ias.l3_core diff --git a/gso/products/product_types/l3_core_service.py b/gso/products/product_types/l3_core_service.py index b7b6937b9..5026060ec 100644 --- a/gso/products/product_types/l3_core_service.py +++ b/gso/products/product_types/l3_core_service.py @@ -16,7 +16,7 @@ class BaseL3SubscriptionModel(SubscriptionModel, ABC): @property @abstractmethod - def l3_core(self) -> L3CoreServiceBlockInactive | None: + def l3_core(self) -> L3CoreServiceBlockInactive: """Getter: Should be implemented by subclasses.""" @l3_core.setter diff --git a/gso/products/product_types/lhcone.py b/gso/products/product_types/lhcone.py index ad48086a2..6e130a2ed 100644 --- a/gso/products/product_types/lhcone.py +++ b/gso/products/product_types/lhcone.py @@ -25,7 +25,7 @@ class LHCOneInactive(BaseL3SubscriptionModel, is_base=True): lhcone: LHCOneBlockInactive @property - def l3_core(self) -> L3CoreServiceBlockInactive | None: + def l3_core(self) -> L3CoreServiceBlockInactive: """Getter: Retrieve the l3_core from the lhcone attribute.""" return self.lhcone.l3_core @@ -58,7 +58,7 @@ class ImportedLHCOneInactive(BaseL3SubscriptionModel, is_base=True): lhcone: LHCOneBlockInactive @property - def l3_core(self) -> L3CoreServiceBlockInactive | None: + def l3_core(self) -> L3CoreServiceBlockInactive: """Getter: Retrieve the l3_core from the lhcone attribute.""" return self.lhcone.l3_core -- GitLab