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
c39c2c8a
Verified
Commit
c39c2c8a
authored
1 year ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
add documentation to device product block
parent
f4552e7a
No related branches found
No related tags found
1 merge request
!46
Feature/update documentation
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gso/products/product_blocks/__init__.py
+18
-4
18 additions, 4 deletions
gso/products/product_blocks/__init__.py
gso/products/product_blocks/device.py
+36
-5
36 additions, 5 deletions
gso/products/product_blocks/device.py
with
54 additions
and
9 deletions
gso/products/product_blocks/__init__.py
+
18
−
4
View file @
c39c2c8a
"""
Product blocks that store information about subscriptions.
In this file, some enumerators may be declared that are used across multiple subscriptions.
"""
from
enum
import
Enum
from
enum
import
Enum
class
PhyPortCapacity
(
Enum
):
class
PhyPortCapacity
(
Enum
):
ONE
=
"
1g
"
"""
Physical port capacity enumerator.
TEN
=
"
10g
"
HUNDRED
=
"
100g
"
An enumerator that contains the different possible capacities of ports that are available to use in subscriptions.
FOUR_HUNDRED
=
"
400g
"
"""
ONE
=
"
1G
"
"""
1Gbps
"""
TEN
=
"
10G
"
"""
10Gbps
"""
HUNDRED
=
"
100G
"
"""
100Gbps
"""
FOUR_HUNDRED
=
"
400G
"
"""
400Gbps
"""
This diff is collapsed.
Click to expand it.
gso/products/product_blocks/device.py
+
36
−
5
View file @
c39c2c8a
"""
Product block for {class}`Device` products.
"""
import
ipaddress
import
ipaddress
from
typing
import
Optional
from
typing
import
Optional
...
@@ -8,19 +9,30 @@ from gso.products.product_blocks.site import SiteBlock, SiteBlockInactive, SiteB
...
@@ -8,19 +9,30 @@ from gso.products.product_blocks.site import SiteBlock, SiteBlockInactive, SiteB
class
DeviceVendor
(
strEnum
):
class
DeviceVendor
(
strEnum
):
juniper
=
"
juniper
"
"""
Enumerator for the different product vendors that are supported.
"""
nokia
=
"
nokia
"
JUNIPER
=
"
Juniper
"
"""
Juniper devices.
"""
NOKIA
=
"
Nokia
"
"""
Nokia devices.
"""
class
DeviceRole
(
strEnum
):
class
DeviceRole
(
strEnum
):
p
=
"
p
"
"""
Enumerator for the different types of routers.
"""
pe
=
"
pe
"
amt
=
"
amt
"
P
=
"
P
"
"""
P router.
"""
PE
=
"
PE
"
"""
PE router.
"""
AMT
=
"
AMT
"
"""
AMT router.
"""
class
DeviceBlockInactive
(
class
DeviceBlockInactive
(
ProductBlockModel
,
lifecycle
=
[
SubscriptionLifecycle
.
INITIAL
],
product_block_name
=
"
DeviceBlock
"
ProductBlockModel
,
lifecycle
=
[
SubscriptionLifecycle
.
INITIAL
],
product_block_name
=
"
DeviceBlock
"
):
):
"""
A device that is being currently inactive. See {class}`DeviceBlock`.
"""
device_fqdn
:
Optional
[
str
]
=
None
device_fqdn
:
Optional
[
str
]
=
None
device_ts_address
:
Optional
[
str
]
=
None
device_ts_address
:
Optional
[
str
]
=
None
device_ts_port
:
Optional
[
int
]
=
None
device_ts_port
:
Optional
[
int
]
=
None
...
@@ -37,6 +49,8 @@ class DeviceBlockInactive(
...
@@ -37,6 +49,8 @@ class DeviceBlockInactive(
class
DeviceBlockProvisioning
(
DeviceBlockInactive
,
lifecycle
=
[
SubscriptionLifecycle
.
PROVISIONING
]):
class
DeviceBlockProvisioning
(
DeviceBlockInactive
,
lifecycle
=
[
SubscriptionLifecycle
.
PROVISIONING
]):
"""
A device that is being provisioned. See {class}`DeviceBlock`.
"""
device_fqdn
:
str
device_fqdn
:
str
device_ts_address
:
str
device_ts_address
:
str
device_ts_port
:
int
device_ts_port
:
int
...
@@ -53,16 +67,33 @@ class DeviceBlockProvisioning(DeviceBlockInactive, lifecycle=[SubscriptionLifecy
...
@@ -53,16 +67,33 @@ class DeviceBlockProvisioning(DeviceBlockInactive, lifecycle=[SubscriptionLifecy
class
DeviceBlock
(
DeviceBlockProvisioning
,
lifecycle
=
[
SubscriptionLifecycle
.
ACTIVE
]):
class
DeviceBlock
(
DeviceBlockProvisioning
,
lifecycle
=
[
SubscriptionLifecycle
.
ACTIVE
]):
"""
A device that is currently deployed in the network.
"""
device_fqdn
:
str
device_fqdn
:
str
"""
{term}`FQDN` of a device.
"""
device_ts_address
:
str
device_ts_address
:
str
"""
The address of the terminal server that this device is connected to. The terminal server provides out of band
access. This is required in case a link goes down, or when a device is initially added to the network and it does
not have any IP trunks connected to it yet.
"""
device_ts_port
:
int
device_ts_port
:
int
"""
The port of the terminal server that this device is connected to. Used for the same reason as mentioned above.
"""
device_access_via_ts
:
bool
device_access_via_ts
:
bool
"""
Whether this device should be accessed through the terminal server, or through its loopback address.
"""
device_lo_ipv4_address
:
ipaddress
.
IPv4Address
device_lo_ipv4_address
:
ipaddress
.
IPv4Address
"""
The IPv4 loopback address of the device.
"""
device_lo_ipv6_address
:
ipaddress
.
IPv6Address
device_lo_ipv6_address
:
ipaddress
.
IPv6Address
"""
The IPv6 loopback address of the device.
"""
device_lo_iso_address
:
str
device_lo_iso_address
:
str
"""
The {term}`ISO` {term}`NET` of the device, used for {term}`IS-IS` support.
"""
device_si_ipv4_network
:
ipaddress
.
IPv4Network
device_si_ipv4_network
:
ipaddress
.
IPv4Network
"""
The SI IPv4 network of the device.
"""
device_ias_lt_ipv4_network
:
ipaddress
.
IPv4Network
device_ias_lt_ipv4_network
:
ipaddress
.
IPv4Network
"""
The IAS LT IPv4 network of the device.
"""
device_ias_lt_ipv6_network
:
ipaddress
.
IPv6Network
device_ias_lt_ipv6_network
:
ipaddress
.
IPv6Network
"""
The IAS LT IPv6 network of the device.
"""
device_vendor
:
DeviceVendor
device_vendor
:
DeviceVendor
"""
The vendor of the device, can be any of the values defined in {class}`DeviceVendor`.
"""
device_role
:
DeviceRole
device_role
:
DeviceRole
"""
The role of the device, which can be any of the values defined in {class}`DeviceRole`.
"""
device_site
:
SiteBlock
device_site
:
SiteBlock
"""
The {class}`Site` that this device resides in. Both physically and computationally.
"""
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