Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Commits
d21c44bd
Commit
d21c44bd
authored
3 months ago
by
Neda Moeini
Browse files
Options
Downloads
Patches
Plain Diff
Product block and type - 10GGBS - WIP
parent
98e65bd6
No related branches found
No related tags found
No related merge requests found
Pipeline
#91940
failed
3 months ago
Stage: tox
Stage: documentation
Stage: sonarqube
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gso/products/__init__.py
+8
-0
8 additions, 0 deletions
gso/products/__init__.py
gso/products/product_blocks/tenggbs.py
+92
-0
92 additions, 0 deletions
gso/products/product_blocks/tenggbs.py
gso/products/product_types/tenggbs.py
+42
-0
42 additions, 0 deletions
gso/products/product_types/tenggbs.py
with
142 additions
and
0 deletions
gso/products/__init__.py
+
8
−
0
View file @
d21c44bd
...
@@ -21,6 +21,7 @@ from gso.products.product_types.site import ImportedSite, Site
...
@@ -21,6 +21,7 @@ from gso.products.product_types.site import ImportedSite, Site
from
gso.products.product_types.super_pop_switch
import
ImportedSuperPopSwitch
,
SuperPopSwitch
from
gso.products.product_types.super_pop_switch
import
ImportedSuperPopSwitch
,
SuperPopSwitch
from
gso.products.product_types.switch
import
ImportedSwitch
,
Switch
from
gso.products.product_types.switch
import
ImportedSwitch
,
Switch
from
gso.products.product_types.vrf
import
VRF
from
gso.products.product_types.vrf
import
VRF
from
gso.products.product_types.tenggbs
import
TenGGBS
,
ImportedTenGGBS
class
ProductName
(
strEnum
):
class
ProductName
(
strEnum
):
...
@@ -78,6 +79,9 @@ class ProductName(strEnum):
...
@@ -78,6 +79,9 @@ class ProductName(strEnum):
IMPORTED_EXPRESSROUTE
=
Layer2CircuitServiceType
.
IMPORTED_EXPRESSROUTE
IMPORTED_EXPRESSROUTE
=
Layer2CircuitServiceType
.
IMPORTED_EXPRESSROUTE
VRF
=
"
VRF
"
VRF
=
"
VRF
"
"""
VRFs.
"""
"""
VRFs.
"""
TenGGBS
=
"
TenGGBS
"
"""
10GGBS.
"""
IMPORTED_TenGGBS
=
"
Imported TenGGBS
"
L3_CORE_SERVICE_PRODUCT_TYPE
=
L3CoreService
.
__name__
L3_CORE_SERVICE_PRODUCT_TYPE
=
L3CoreService
.
__name__
...
@@ -121,6 +125,8 @@ class ProductType(strEnum):
...
@@ -121,6 +125,8 @@ class ProductType(strEnum):
EXPRESSROUTE
=
L2_CIRCUIT_PRODUCT_TYPE
EXPRESSROUTE
=
L2_CIRCUIT_PRODUCT_TYPE
IMPORTED_EXPRESSROUTE
=
ImportedLayer2Circuit
.
__name__
IMPORTED_EXPRESSROUTE
=
ImportedLayer2Circuit
.
__name__
VRF
=
VRF
.
__name__
VRF
=
VRF
.
__name__
TenGGBS
=
TenGGBS
.
__name__
IMPORTED_TenGGBS
=
ImportedTenGGBS
.
__name__
SUBSCRIPTION_MODEL_REGISTRY
.
update
(
SUBSCRIPTION_MODEL_REGISTRY
.
update
(
...
@@ -159,6 +165,8 @@ SUBSCRIPTION_MODEL_REGISTRY.update(
...
@@ -159,6 +165,8 @@ SUBSCRIPTION_MODEL_REGISTRY.update(
ProductName
.
EXPRESSROUTE
.
value
:
Layer2Circuit
,
ProductName
.
EXPRESSROUTE
.
value
:
Layer2Circuit
,
ProductName
.
IMPORTED_EXPRESSROUTE
.
value
:
ImportedLayer2Circuit
,
ProductName
.
IMPORTED_EXPRESSROUTE
.
value
:
ImportedLayer2Circuit
,
ProductName
.
VRF
.
value
:
VRF
,
ProductName
.
VRF
.
value
:
VRF
,
ProductName
.
TenGGBS
.
value
:
TenGGBS
,
ProductName
.
IMPORTED_TenGGBS
.
value
:
ImportedTenGGBS
,
},
},
)
)
...
...
This diff is collapsed.
Click to expand it.
gso/products/product_blocks/tenggbs.py
0 → 100644
+
92
−
0
View file @
d21c44bd
"""
10GGBS product block models.
"""
from
typing
import
Annotated
,
TypeVar
from
annotated_types
import
Len
from
orchestrator.domain.base
import
ProductBlockModel
from
orchestrator.types
import
SubscriptionLifecycle
from
orchestrator.types
import
strEnum
from
pydantic
import
AfterValidator
from
pydantic_forms.validators
import
validate_unique_list
from
typing_extensions
import
Doc
from
gso.products.product_blocks.iptrunk
import
(
IptrunkSideBlock
,
IptrunkSideBlockInactive
,
IptrunkSideBlockProvisioning
,
)
from
gso.products.product_blocks.layer_2_circuit
import
(
Layer2CircuitBlock
,
Layer2CircuitBlockInactive
,
Layer2CircuitBlockProvisioning
,
)
T
=
TypeVar
(
"
T
"
)
class
PathRole
(
strEnum
):
"""
Defines path role types.
"""
PRIMARY
=
"
Primary
"
"""
Primary path.
"""
SECONDARY
=
"
Secondary
"
"""
Secondary path.
"""
Paths
=
Annotated
[
list
[
T
],
AfterValidator
(
validate_unique_list
),
Len
(
min_length
=
0
),
Doc
(
"
A list of TrunkSideBlocks that make up a path.
"
),
]
class
PathBlockInactive
(
ProductBlockModel
,
lifecycle
=
[
SubscriptionLifecycle
.
INITIAL
],
product_block_name
=
"
PathBlock
"
):
"""
A path representing an ordered list of adjacent trunk sides.
"""
role
:
PathRole
|
None
=
None
path
:
Paths
[
IptrunkSideBlockInactive
]
class
PathBlockProvisioning
(
PathBlockInactive
,
lifecycle
=
[
SubscriptionLifecycle
.
PROVISIONING
]):
"""
A path that is being provisioned.
"""
role
:
PathRole
|
None
=
None
path
:
Paths
[
IptrunkSideBlockProvisioning
]
class
PathBlock
(
PathBlockProvisioning
,
lifecycle
=
[
SubscriptionLifecycle
.
ACTIVE
]):
"""
An active path.
"""
role
:
PathRole
path
:
Paths
[
IptrunkSideBlock
]
PathsList
=
Annotated
[
list
[
T
],
AfterValidator
(
validate_unique_list
),
Doc
(
"
A list of paths (1 primary, multiple secondary).
"
),
]
class
TenGGBSBlockInactive
(
ProductBlockModel
,
lifecycle
=
[
SubscriptionLifecycle
.
INITIAL
],
product_block_name
=
"
TenGGBSBlock
"
):
"""
Inactive 10GGBS service model.
"""
l2_circuit
:
Layer2CircuitBlockInactive
paths
:
PathsList
[
PathBlockInactive
]
|
None
=
None
class
TenGGBSBlockProvisioning
(
TenGGBSBlockInactive
,
lifecycle
=
[
SubscriptionLifecycle
.
PROVISIONING
]):
"""
Provisioning state of 10GGBS.
"""
l2_circuit
:
Layer2CircuitBlockProvisioning
paths
:
PathsList
[
PathBlockProvisioning
]
|
None
=
None
class
TenGGBSBlock
(
TenGGBSBlockProvisioning
,
lifecycle
=
[
SubscriptionLifecycle
.
ACTIVE
]):
"""
Active 10GGBS service model.
"""
l2_circuit
:
Layer2CircuitBlock
paths
:
PathsList
[
PathBlock
]
|
None
=
None
This diff is collapsed.
Click to expand it.
gso/products/product_types/tenggbs.py
0 → 100644
+
42
−
0
View file @
d21c44bd
"""
The product type for 10GGBS services.
"""
from
orchestrator.domain.base
import
SubscriptionModel
from
orchestrator.types
import
SubscriptionLifecycle
from
gso.products.product_blocks.tenggbs
import
(
TenGGBSBlock
,
TenGGBSBlockInactive
,
TenGGBSBlockProvisioning
,
)
class
TenGGBSInactive
(
SubscriptionModel
,
is_base
=
True
):
"""
A 10GGBS service that is inactive.
"""
tenggbs
:
TenGGBSBlockInactive
class
TenGGBSProvisioning
(
TenGGBSInactive
,
lifecycle
=
[
SubscriptionLifecycle
.
PROVISIONING
]):
"""
A 10GGBS service that is being provisioned.
"""
tenggbs
:
TenGGBSBlockProvisioning
class
TenGGBS
(
TenGGBSProvisioning
,
lifecycle
=
[
SubscriptionLifecycle
.
ACTIVE
]):
"""
A 10GGBS service that is active.
"""
tenggbs
:
TenGGBSBlock
class
ImportedTenGGBSInactive
(
SubscriptionModel
,
is_base
=
True
):
"""
An imported 10GGBS service that is inactive.
"""
tenggbs
:
TenGGBSBlockInactive
class
ImportedTenGGBS
(
ImportedTenGGBSInactive
,
lifecycle
=
[
SubscriptionLifecycle
.
PROVISIONING
,
SubscriptionLifecycle
.
ACTIVE
]
):
"""
An imported 10GGBS service that is active.
"""
tenggbs
:
TenGGBSBlock
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment