Skip to content
Snippets Groups Projects
Commit 671771d2 authored by Mohammad Torkashvand's avatar Mohammad Torkashvand Committed by Karel van Klink
Browse files

make L3CoreServiceBlockInactive required in all L3 services

parent 46256ad6
No related branches found
No related tags found
1 merge request!383Feature/refacture l3 core services
...@@ -15,7 +15,7 @@ class CopernicusBlockInactive( ...@@ -15,7 +15,7 @@ class CopernicusBlockInactive(
): ):
"""An inactive Copernicus product block. See `CopernicusBlock`.""" """An inactive Copernicus product block. See `CopernicusBlock`."""
l3_core: L3CoreServiceBlockInactive | None = None l3_core: L3CoreServiceBlockInactive
class CopernicusBlockProvisioning(CopernicusBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): class CopernicusBlockProvisioning(CopernicusBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
......
...@@ -15,7 +15,7 @@ class GeantIPBlockInactive( ...@@ -15,7 +15,7 @@ class GeantIPBlockInactive(
): ):
"""An inactive GeantIP product block. See `GeantIPBlock`.""" """An inactive GeantIP product block. See `GeantIPBlock`."""
l3_core: L3CoreServiceBlockInactive | None = None l3_core: L3CoreServiceBlockInactive
class GeantIPBlockProvisioning(GeantIPBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): class GeantIPBlockProvisioning(GeantIPBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
......
...@@ -22,7 +22,7 @@ class IASFlavor(strEnum): ...@@ -22,7 +22,7 @@ class IASFlavor(strEnum):
class IASBlockInactive(ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="IASBlock"): class IASBlockInactive(ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="IASBlock"):
"""An inactive IAS product block. See `IASBlock`.""" """An inactive IAS product block. See `IASBlock`."""
l3_core: L3CoreServiceBlockInactive | None = None l3_core: L3CoreServiceBlockInactive
ias_flavor: IASFlavor = IASFlavor.IAS_PS_OPT_OUT ias_flavor: IASFlavor = IASFlavor.IAS_PS_OPT_OUT
......
...@@ -15,7 +15,7 @@ class LHCOneBlockInactive( ...@@ -15,7 +15,7 @@ class LHCOneBlockInactive(
): ):
"""An inactive LHCOne product block. See `LHCOneBlock`.""" """An inactive LHCOne product block. See `LHCOneBlock`."""
l3_core: L3CoreServiceBlockInactive | None = None l3_core: L3CoreServiceBlockInactive
class LHCOneBlockProvisioning(LHCOneBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): class LHCOneBlockProvisioning(LHCOneBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
......
...@@ -23,7 +23,7 @@ class CopernicusInactive(BaseL3SubscriptionModel, is_base=True): ...@@ -23,7 +23,7 @@ class CopernicusInactive(BaseL3SubscriptionModel, is_base=True):
copernicus: CopernicusBlockInactive copernicus: CopernicusBlockInactive
@property @property
def l3_core(self) -> L3CoreServiceBlockInactive | None: def l3_core(self) -> L3CoreServiceBlockInactive:
"""Getter: Retrieve the l3_core from the copernicus attribute.""" """Getter: Retrieve the l3_core from the copernicus attribute."""
return self.copernicus.l3_core return self.copernicus.l3_core
...@@ -56,7 +56,7 @@ class ImportedCopernicusInactive(BaseL3SubscriptionModel, is_base=True): ...@@ -56,7 +56,7 @@ class ImportedCopernicusInactive(BaseL3SubscriptionModel, is_base=True):
copernicus: CopernicusBlockInactive copernicus: CopernicusBlockInactive
@property @property
def l3_core(self) -> L3CoreServiceBlockInactive | None: def l3_core(self) -> L3CoreServiceBlockInactive:
"""Getter: Retrieve the l3_core from the copernicus attribute.""" """Getter: Retrieve the l3_core from the copernicus attribute."""
return self.copernicus.l3_core return self.copernicus.l3_core
......
...@@ -25,7 +25,7 @@ class GeantIPInactive(BaseL3SubscriptionModel, is_base=True): ...@@ -25,7 +25,7 @@ class GeantIPInactive(BaseL3SubscriptionModel, is_base=True):
geant_ip: GeantIPBlockInactive geant_ip: GeantIPBlockInactive
@property @property
def l3_core(self) -> L3CoreServiceBlockInactive | None: def l3_core(self) -> L3CoreServiceBlockInactive:
"""Getter: Retrieve the l3_core from the geant_ip attribute.""" """Getter: Retrieve the l3_core from the geant_ip attribute."""
return self.geant_ip.l3_core return self.geant_ip.l3_core
...@@ -58,7 +58,7 @@ class ImportedGeantIPInactive(BaseL3SubscriptionModel, is_base=True): ...@@ -58,7 +58,7 @@ class ImportedGeantIPInactive(BaseL3SubscriptionModel, is_base=True):
geant_ip: GeantIPBlockInactive geant_ip: GeantIPBlockInactive
@property @property
def l3_core(self) -> L3CoreServiceBlockInactive | None: def l3_core(self) -> L3CoreServiceBlockInactive:
"""Getter: Retrieve the l3_core from the geant_ip attribute.""" """Getter: Retrieve the l3_core from the geant_ip attribute."""
return self.geant_ip.l3_core return self.geant_ip.l3_core
......
...@@ -25,7 +25,7 @@ class IASInactive(BaseL3SubscriptionModel, is_base=True): ...@@ -25,7 +25,7 @@ class IASInactive(BaseL3SubscriptionModel, is_base=True):
ias: IASBlockInactive ias: IASBlockInactive
@property @property
def l3_core(self) -> L3CoreServiceBlockInactive | None: def l3_core(self) -> L3CoreServiceBlockInactive:
"""Getter: Retrieve the l3_core from the 'ias' attribute.""" """Getter: Retrieve the l3_core from the 'ias' attribute."""
return self.ias.l3_core return self.ias.l3_core
...@@ -58,7 +58,7 @@ class ImportedIASInactive(BaseL3SubscriptionModel, is_base=True): ...@@ -58,7 +58,7 @@ class ImportedIASInactive(BaseL3SubscriptionModel, is_base=True):
ias: IASBlockInactive ias: IASBlockInactive
@property @property
def l3_core(self) -> L3CoreServiceBlockInactive | None: def l3_core(self) -> L3CoreServiceBlockInactive:
"""Getter: Retrieve the l3_core from the 'ias' attribute.""" """Getter: Retrieve the l3_core from the 'ias' attribute."""
return self.ias.l3_core return self.ias.l3_core
......
...@@ -16,7 +16,7 @@ class BaseL3SubscriptionModel(SubscriptionModel, ABC): ...@@ -16,7 +16,7 @@ class BaseL3SubscriptionModel(SubscriptionModel, ABC):
@property @property
@abstractmethod @abstractmethod
def l3_core(self) -> L3CoreServiceBlockInactive | None: def l3_core(self) -> L3CoreServiceBlockInactive:
"""Getter: Should be implemented by subclasses.""" """Getter: Should be implemented by subclasses."""
@l3_core.setter @l3_core.setter
......
...@@ -25,7 +25,7 @@ class LHCOneInactive(BaseL3SubscriptionModel, is_base=True): ...@@ -25,7 +25,7 @@ class LHCOneInactive(BaseL3SubscriptionModel, is_base=True):
lhcone: LHCOneBlockInactive lhcone: LHCOneBlockInactive
@property @property
def l3_core(self) -> L3CoreServiceBlockInactive | None: def l3_core(self) -> L3CoreServiceBlockInactive:
"""Getter: Retrieve the l3_core from the lhcone attribute.""" """Getter: Retrieve the l3_core from the lhcone attribute."""
return self.lhcone.l3_core return self.lhcone.l3_core
...@@ -58,7 +58,7 @@ class ImportedLHCOneInactive(BaseL3SubscriptionModel, is_base=True): ...@@ -58,7 +58,7 @@ class ImportedLHCOneInactive(BaseL3SubscriptionModel, is_base=True):
lhcone: LHCOneBlockInactive lhcone: LHCOneBlockInactive
@property @property
def l3_core(self) -> L3CoreServiceBlockInactive | None: def l3_core(self) -> L3CoreServiceBlockInactive:
"""Getter: Retrieve the l3_core from the lhcone attribute.""" """Getter: Retrieve the l3_core from the lhcone attribute."""
return self.lhcone.l3_core return self.lhcone.l3_core
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment