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
f567b1c9
Commit
f567b1c9
authored
1 year ago
by
Neda Moeini
Browse files
Options
Downloads
Patches
Plain Diff
Created Opengear product block and product type.
parent
4a7cb5c7
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!202
Feature/nat 458 opengear domain model
Pipeline
#86578
failed
1 year ago
Stage: tox
Stage: documentation
Stage: sonarqube
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gso/products/product_blocks/opengear.py
+45
-0
45 additions, 0 deletions
gso/products/product_blocks/opengear.py
gso/products/product_types/opengear.py
+24
-0
24 additions, 0 deletions
gso/products/product_types/opengear.py
with
69 additions
and
0 deletions
gso/products/product_blocks/opengear.py
0 → 100644
+
45
−
0
View file @
f567b1c9
"""
Product block for :class:`Opengear` products.
"""
import
ipaddress
from
orchestrator.domain.base
import
ProductBlockModel
from
orchestrator.types
import
SubscriptionLifecycle
from
gso.products.product_blocks.site
import
(
SiteBlock
,
SiteBlockInactive
,
SiteBlockProvisioning
,
)
class
OpengearBlockInactive
(
ProductBlockModel
,
lifecycle
=
[
SubscriptionLifecycle
.
INITIAL
],
product_block_name
=
"
OpengearBlock
"
,
):
"""
An Opengear that
'
s being currently inactive. See :class:`OpengearBlock`.
"""
opengear_hostname
:
str
|
None
=
None
opengear_site
:
SiteBlockInactive
|
None
=
None
opengear_wan_address
:
ipaddress
.
IPv4Address
|
None
=
None
opengear_wan_netmask
:
ipaddress
.
IPv4Address
|
None
=
None
opengear_wan_gateway
:
ipaddress
.
IPv4Address
|
None
=
None
class
OpengearBlockProvisioning
(
OpengearBlockInactive
,
lifecycle
=
[
SubscriptionLifecycle
.
PROVISIONING
]):
"""
An Opengear that
'
s being provisioned. See :class:`OpengearBlock`.
"""
opengear_hostname
:
str
opengear_site
:
SiteBlockProvisioning
opengear_wan_address
:
ipaddress
.
IPv4Address
|
None
=
None
opengear_wan_netmask
:
ipaddress
.
IPv4Address
|
None
=
None
opengear_wan_gateway
:
ipaddress
.
IPv4Address
|
None
=
None
class
OpengearBlock
(
OpengearBlockProvisioning
,
lifecycle
=
[
SubscriptionLifecycle
.
ACTIVE
]):
"""
An Opengear that
'
s currently deployed in the network.
"""
opengear_hostname
:
str
opengear_site
:
SiteBlock
opengear_wan_address
:
ipaddress
.
IPv4Address
opengear_wan_netmask
:
ipaddress
.
IPv4Address
opengear_wan_gateway
:
ipaddress
.
IPv4Address
This diff is collapsed.
Click to expand it.
gso/products/product_types/opengear.py
0 → 100644
+
24
−
0
View file @
f567b1c9
"""
An Opengear product type.
"""
from
orchestrator.domain.base
import
SubscriptionModel
from
orchestrator.types
import
SubscriptionLifecycle
from
gso.products.product_blocks.opengear
import
OpengearBlock
,
OpengearBlockInactive
,
OpengearBlockProvisioning
class
OpengearInactive
(
SubscriptionModel
,
is_base
=
True
):
"""
An inactive Opengear.
"""
opengear
:
OpengearBlockInactive
class
OpengearProvisioning
(
OpengearInactive
,
lifecycle
=
[
SubscriptionLifecycle
.
PROVISIONING
]):
"""
An Opengear that is being provisioned.
"""
opengear
:
OpengearBlockProvisioning
class
OpenGear
(
OpengearProvisioning
,
lifecycle
=
[
SubscriptionLifecycle
.
ACTIVE
]):
"""
An Opengear that is currently active.
"""
opengear
:
OpengearBlock
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