Skip to content
Snippets Groups Projects
Verified Commit 895ee6d7 authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

Move all import workflows into separate product types

parent 516f5a6d
No related branches found
No related tags found
1 merge request!201Add imported products
Showing
with 145 additions and 24 deletions
...@@ -13,6 +13,7 @@ Subpackages ...@@ -13,6 +13,7 @@ Subpackages
:titlesonly: :titlesonly:
iptrunk/index iptrunk/index
office_router/index
router/index router/index
site/index site/index
tasks/index super_pop_switch/index
``gso.workflows.tasks.import_iptrunk`` ``gso.workflows.iptrunk.create_imported_iptrunk``
====================================== ======================================
.. automodule:: gso.workflows.tasks.import_iptrunk .. automodule:: gso.workflows.iptrunk.create_imported_iptrunk
:members: :members:
:show-inheritance: :show-inheritance:
...@@ -13,6 +13,7 @@ Submodules ...@@ -13,6 +13,7 @@ Submodules
:titlesonly: :titlesonly:
activate_iptrunk activate_iptrunk
create_imported_iptrunk
create_iptrunk create_iptrunk
migrate_iptrunk migrate_iptrunk
modify_isis_metric modify_isis_metric
......
``gso.workflows.office_router.create_imported_office_router``
=============================================================
.. automodule:: gso.workflows.office_router.create_imported_office_router
:members:
:show-inheritance:
``gso.workflows.tasks`` ``gso.workflows.office_router``
======================= ===============================
.. automodule:: gso.workflows.tasks .. automodule:: gso.workflows.office_router
:members: :members:
:show-inheritance: :show-inheritance:
...@@ -12,8 +12,4 @@ Submodules ...@@ -12,8 +12,4 @@ Submodules
:maxdepth: 2 :maxdepth: 2
:titlesonly: :titlesonly:
import_super_pop_switch create_imported_office_router
import_office_router
import_iptrunk
import_router
import_site
``gso.workflows.tasks.import_super_pop_switch`` ``gso.workflows.router.create_imported_router``
=============================================== ===============================================
.. automodule:: gso.workflows.tasks.import_super_pop_switch .. automodule:: gso.workflows.router.create_imported_router
:members: :members:
:show-inheritance: :show-inheritance:
...@@ -13,6 +13,7 @@ Submodules ...@@ -13,6 +13,7 @@ Submodules
:titlesonly: :titlesonly:
activate_router activate_router
create_imported_router
create_router create_router
redeploy_base_config redeploy_base_config
terminate_router terminate_router
......
``gso.workflows.site.create_imported_site``
===========================================
.. automodule:: gso.workflows.site.create_imported_site
:members:
:show-inheritance:
...@@ -12,6 +12,7 @@ Submodules ...@@ -12,6 +12,7 @@ Submodules
:maxdepth: 2 :maxdepth: 2
:titlesonly: :titlesonly:
create_imported_site
create_site create_site
modify_site modify_site
terminate_site terminate_site
``gso.workflows.office_router.create_imported_super_pop_switch``
================================================================
.. automodule:: gso.workflows.office_router.create_imported_super_pop_switch
:members:
:show-inheritance:
``gso.workflows.super_pop_switch``
==================================
.. automodule:: gso.workflows.super_pop_switch
:members:
:show-inheritance:
Submodules
----------
.. toctree::
:maxdepth: 2
:titlesonly:
create_imported_super_pop_switch
``gso.workflows.tasks.import_office_router``
============================================
.. automodule:: gso.workflows.tasks.import_office_router
:members:
:show-inheritance:
``gso.workflows.tasks.import_router``
=====================================
.. automodule:: gso.workflows.tasks.import_router
:members:
:show-inheritance:
``gso.workflows.tasks.import_site``
===================================
.. automodule:: gso.workflows.tasks.import_site
:members:
:show-inheritance:
...@@ -8,14 +8,14 @@ ...@@ -8,14 +8,14 @@
from orchestrator.domain import SUBSCRIPTION_MODEL_REGISTRY from orchestrator.domain import SUBSCRIPTION_MODEL_REGISTRY
from pydantic_forms.types import strEnum from pydantic_forms.types import strEnum
from gso.products.product_types.iptrunk import Iptrunk from gso.products.product_types.iptrunk import ImportedIptrunk, Iptrunk
from gso.products.product_types.lan_switch_interconnect import LanSwitchInterconnect from gso.products.product_types.lan_switch_interconnect import LanSwitchInterconnect
from gso.products.product_types.office_router import OfficeRouter from gso.products.product_types.office_router import ImportedOfficeRouter, OfficeRouter
from gso.products.product_types.opengear import Opengear from gso.products.product_types.opengear import Opengear
from gso.products.product_types.pop_vlan import PopVlan from gso.products.product_types.pop_vlan import PopVlan
from gso.products.product_types.router import Router from gso.products.product_types.router import ImportedRouter, Router
from gso.products.product_types.site import Site from gso.products.product_types.site import ImportedSite, Site
from gso.products.product_types.super_pop_switch import SuperPopSwitch from gso.products.product_types.super_pop_switch import ImportedSuperPopSwitch, SuperPopSwitch
from gso.products.product_types.switch import Switch from gso.products.product_types.switch import Switch
...@@ -30,6 +30,11 @@ class ProductName(strEnum): ...@@ -30,6 +30,11 @@ class ProductName(strEnum):
SWITCH = "Switch" SWITCH = "Switch"
LAN_SWITCH_INTERCONNECT = "LAN Switch Interconnect" LAN_SWITCH_INTERCONNECT = "LAN Switch Interconnect"
POP_VLAN = "Pop VLAN" POP_VLAN = "Pop VLAN"
IMPORTED_IP_TRUNK = "Imported IP trunk"
IMPORTED_ROUTER = "Imported router"
IMPORTED_SITE = "Imported site"
IMPORTED_SUPER_POP_SWITCH = "Imported super PoP switch"
IMPORTED_OFFICE_ROUTER = "Imported office router"
OPENGEAR = "Opengear" OPENGEAR = "Opengear"
...@@ -44,6 +49,11 @@ class ProductType(strEnum): ...@@ -44,6 +49,11 @@ class ProductType(strEnum):
SWITCH = Switch.__name__ SWITCH = Switch.__name__
LAN_SWITCH_INTERCONNECT = LanSwitchInterconnect.__name__ LAN_SWITCH_INTERCONNECT = LanSwitchInterconnect.__name__
POP_VLAN = PopVlan.__name__ POP_VLAN = PopVlan.__name__
IMPORTED_IP_TRUNK = ImportedIptrunk.__name__
IMPORTED_ROUTER = ImportedRouter.__name__
IMPORTED_SITE = ImportedSite.__name__
IMPORTED_SUPER_POP_SWITCH = ImportedSuperPopSwitch.__name__
IMPORTED_OFFICE_ROUTER = ImportedOfficeRouter.__name__
OPENGEAR = Opengear.__name__ OPENGEAR = Opengear.__name__
...@@ -57,6 +67,11 @@ SUBSCRIPTION_MODEL_REGISTRY.update( ...@@ -57,6 +67,11 @@ SUBSCRIPTION_MODEL_REGISTRY.update(
ProductName.SWITCH.value: Switch, ProductName.SWITCH.value: Switch,
ProductName.LAN_SWITCH_INTERCONNECT.value: LanSwitchInterconnect, ProductName.LAN_SWITCH_INTERCONNECT.value: LanSwitchInterconnect,
ProductName.POP_VLAN.value: PopVlan, ProductName.POP_VLAN.value: PopVlan,
ProductName.IMPORTED_IP_TRUNK.value: ImportedIptrunk,
ProductName.IMPORTED_ROUTER.value: ImportedRouter,
ProductName.IMPORTED_SITE.value: ImportedSite,
ProductName.IMPORTED_SUPER_POP_SWITCH.value: ImportedSuperPopSwitch,
ProductName.IMPORTED_OFFICE_ROUTER.value: ImportedOfficeRouter,
ProductName.OPENGEAR.value: Opengear, ProductName.OPENGEAR.value: Opengear,
}, },
) )
...@@ -26,3 +26,15 @@ class Iptrunk(IptrunkProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]): ...@@ -26,3 +26,15 @@ class Iptrunk(IptrunkProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""An IP trunk that is active.""" """An IP trunk that is active."""
iptrunk: IptrunkBlock iptrunk: IptrunkBlock
class ImportedIptrunkInactive(SubscriptionModel, is_base=True):
"""An IP trunk that is inactive."""
iptrunk: IptrunkBlockInactive
class ImportedIptrunk(ImportedIptrunkInactive, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""An IP trunk that is active."""
iptrunk: IptrunkBlock
...@@ -26,3 +26,15 @@ class OfficeRouter(OfficeRouterProvisioning, lifecycle=[SubscriptionLifecycle.AC ...@@ -26,3 +26,15 @@ class OfficeRouter(OfficeRouterProvisioning, lifecycle=[SubscriptionLifecycle.AC
"""An office router that is currently active.""" """An office router that is currently active."""
office_router: OfficeRouterBlock office_router: OfficeRouterBlock
class ImportedOfficeRouterInactive(SubscriptionModel, is_base=True):
"""An imported, inactive office router."""
office_router: OfficeRouterBlockInactive
class ImportedOfficeRouter(ImportedOfficeRouterInactive, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""An imported office router that is currently active."""
office_router: OfficeRouterBlock
...@@ -26,3 +26,15 @@ class Router(RouterProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]): ...@@ -26,3 +26,15 @@ class Router(RouterProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""A router that is currently active.""" """A router that is currently active."""
router: RouterBlock router: RouterBlock
class ImportedRouterInactive(SubscriptionModel, is_base=True):
"""An imported, inactive router."""
router: RouterBlockInactive
class ImportedRouter(ImportedRouterInactive, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""An imported router that is currently active."""
router: RouterBlock
...@@ -26,3 +26,15 @@ class Site(SiteProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]): ...@@ -26,3 +26,15 @@ class Site(SiteProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""A site that is currently active.""" """A site that is currently active."""
site: SiteBlock site: SiteBlock
class ImportedSiteInactive(SubscriptionModel, is_base=True):
"""An imported site that is inactive."""
site: SiteBlockInactive
class ImportedSite(ImportedSiteInactive, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""An imported site that is currently active."""
site: SiteBlock
...@@ -26,3 +26,15 @@ class SuperPopSwitch(SuperPopSwitchProvisioning, lifecycle=[SubscriptionLifecycl ...@@ -26,3 +26,15 @@ class SuperPopSwitch(SuperPopSwitchProvisioning, lifecycle=[SubscriptionLifecycl
"""A Super PoP switch that is currently active.""" """A Super PoP switch that is currently active."""
super_pop_switch: SuperPopSwitchBlock super_pop_switch: SuperPopSwitchBlock
class ImportedSuperPopSwitchInactive(SubscriptionModel, is_base=True):
"""An imported, inactive Super PoP switch."""
super_pop_switch: SuperPopSwitchBlockInactive
class ImportedSuperPopSwitch(ImportedSuperPopSwitchInactive, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""An imported Super PoP switch that is currently active."""
super_pop_switch: SuperPopSwitchBlock
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment