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
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
432a89fc
Commit
432a89fc
authored
4 months ago
by
Neda Moeini
Browse files
Options
Downloads
Patches
Plain Diff
Initial modeling of core layer 3 VRF product modeling.
parent
19f6db02
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!314
Feature/vrf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gso/products/product_blocks/l3_core_vrf.py
+46
-0
46 additions, 0 deletions
gso/products/product_blocks/l3_core_vrf.py
gso/products/product_types/l3_core_vrf.py
+57
-0
57 additions, 0 deletions
gso/products/product_types/l3_core_vrf.py
with
103 additions
and
0 deletions
gso/products/product_blocks/l3_core_vrf.py
0 → 100644
+
46
−
0
View file @
432a89fc
"""
Product blocks for Layer 3 Core VRF products.
"""
from
orchestrator.domain.base
import
ProductBlockModel
from
orchestrator.types
import
SubscriptionLifecycle
from
pydantic
import
Field
from
gso.products.product_blocks.nren_l3_core_service
import
(
NRENAccessPort
,
NRENAccessPortInactive
,
NRENAccessPortProvisioning
,
)
class
L3CoreVRFBlockInactive
(
ProductBlockModel
,
lifecycle
=
[
SubscriptionLifecycle
.
INITIAL
],
product_block_name
=
"
L3CoreVRFBlock
"
):
"""
An inactive Layer 3 Core VRF service subscription. See :class:`L3CoreVRFBlock`.
"""
vrf_ap_list
:
list
[
NRENAccessPortInactive
]
=
Field
(
default_factory
=
list
)
vrf_name
:
str
route_distinguisher
:
str
route_target
:
str
class
L3CoreVRFBlockProvisioning
(
L3CoreVRFBlockInactive
,
lifecycle
=
[
SubscriptionLifecycle
.
PROVISIONING
]
):
"""
A provisioning Layer 3 Core VRF service subscription. See :class:`L3CoreVRFBlock`.
"""
vrf_ap_list
:
list
[
NRENAccessPortProvisioning
]
# type: ignore[assignment]
vrf_name
:
str
route_distinguisher
:
str
route_target
:
str
class
L3CoreVRFBlock
(
L3CoreVRFBlockProvisioning
,
lifecycle
=
[
SubscriptionLifecycle
.
ACTIVE
]):
"""
Represents an active Layer 3 Core VRF service subscription block.
"""
#: List of Access Points associated with this VRF.
nren_ap_list
:
list
[
NRENAccessPort
]
# type: ignore[assignment]
#: Unique name identifying this VRF.
vrf_name
:
str
#: Route Distinguisher (RD) ensuring unique route identification within this VRF.
route_distinguisher
:
str
#: Route Target (RT) defining routing policies for importing/exporting routes.
route_target
:
str
This diff is collapsed.
Click to expand it.
gso/products/product_types/l3_core_vrf.py
0 → 100644
+
57
−
0
View file @
432a89fc
"""
L3 Core VRF product types.
"""
from
orchestrator.domain
import
SubscriptionModel
from
orchestrator.types
import
SubscriptionLifecycle
from
pydantic_forms.types
import
strEnum
from
gso.products.product_blocks.l3_core_vrf
import
L3CoreVRFBlock
,
L3CoreVRFBlockInactive
,
L3CoreVRFBlockProvisioning
class
L3CoreVRFType
(
strEnum
):
"""
Available types of L3 Core VRFs.
"""
GEANT_IP_VRF
=
"
GÉANT IP VRF
"
IMPORTED_GEANT_IP_VRF
=
"
IMPORTED GÉANT IP VRF
"
IAS_VRF
=
"
IAS VRF
"
IMPORTED_IAS_VRF
=
"
IMPORTED IAS VRF
"
LHCONE_VRF
=
"
LHCONE VRF
"
IMPORTED_LHCONE_VRF
=
"
IMPORTED LHCONE VRF
"
COPERNICUS_VRF
=
"
COPERNICUS VRF
"
IMPORTED_COPERNICUS_VRF
=
"
IMPORTED COPERNICUS VRF
"
class
L3CoreVRFInactive
(
SubscriptionModel
,
is_base
=
True
):
"""
An inactive L3 Core VRF subscription.
"""
l3_core_vrf_type
:
L3CoreVRFType
l3_core_vrf
:
L3CoreVRFBlockInactive
class
L3CoreVRFProvisioning
(
L3CoreVRFInactive
,
lifecycle
=
[
SubscriptionLifecycle
.
PROVISIONING
]):
"""
A l3 Core VRF subscription that
'
s being provisioned.
"""
l3_core_vrf_type
:
L3CoreVRFType
l3_core_vrf
:
L3CoreVRFBlockProvisioning
class
L3CoreVRF
(
L3CoreVRFProvisioning
,
lifecycle
=
[
SubscriptionLifecycle
.
ACTIVE
]):
"""
An active L3 Core VRF subscription.
"""
l3_core_vrf_type
:
L3CoreVRFType
l3_core_vrf
:
L3CoreVRFBlock
class
ImportedL3CoreVRFInactive
(
SubscriptionModel
,
is_base
=
True
):
"""
An imported, inactive L3 Core VRF subscription.
"""
l3_core_vrf_type
:
L3CoreVRFType
l3_core_vrf
:
L3CoreVRFBlockInactive
class
ImportedL3CoreVRF
(
ImportedL3CoreVRFInactive
,
lifecycle
=
[
SubscriptionLifecycle
.
PROVISIONING
,
SubscriptionLifecycle
.
ACTIVE
]
):
"""
An imported L3 Core VRF subscription.
"""
l3_core_vrf_type
:
L3CoreVRFType
l3_core_vrf
:
L3CoreVRFBlock
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