Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LSO
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
LSO
Commits
49e70989
Verified
Commit
49e70989
authored
2 years ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
Update documentation of ip trunks
parent
92cf47ee
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!26
Feature/iptrunk and docs
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
build-docs.sh
+1
-0
1 addition, 0 deletions
build-docs.sh
docs/source/conf.py
+1
-1
1 addition, 1 deletion
docs/source/conf.py
lso/routes/device.py
+1
-1
1 addition, 1 deletion
lso/routes/device.py
lso/routes/ip_trunk.py
+40
-0
40 additions, 0 deletions
lso/routes/ip_trunk.py
with
43 additions
and
2 deletions
build-docs.sh
+
1
−
0
View file @
49e70989
python docs/dump-openapi-spec.py
rm
-r
./docs/build/
*
sphinx-apidoc lso lso/app.py
-o
docs/source
-d
2
-f
vale
--config
=
docs/vale/.vale.ini
sync
vale
--config
=
docs/vale/.vale.ini docs/source/
*
.rst lso/
*
.py
...
...
This diff is collapsed.
Click to expand it.
docs/source/conf.py
+
1
−
1
View file @
49e70989
...
...
@@ -48,7 +48,7 @@ def setup(app):
# -- Project information -----------------------------------------------------
project
=
'
Lightweight
Ansible Runner Provisione
r
'
project
=
'
Lightweight
Service Orchestrato
r
'
copyright
=
'
2023, GÉANT
'
author
=
'
GÉANT Orchestration & Automation Team
'
...
...
This diff is collapsed.
Click to expand it.
lso/routes/device.py
+
1
−
1
View file @
49e70989
...
...
@@ -45,7 +45,7 @@ async def provision_node(params: NodeProvisioningParams) \
:param params: Parameters for provisioning a new node
:type params: :class:`NodeProvisioningParams`
:return: Response from the Ansible runner, including a run ID.
:rtype: :class:`PlaybookLaunchResponse`
:rtype: :class:`
lso.playbook.
PlaybookLaunchResponse`
"""
extra_vars
=
{
'
wfo_device_json
'
:
params
.
subscription
,
...
...
This diff is collapsed.
Click to expand it.
lso/routes/ip_trunk.py
+
40
−
0
View file @
49e70989
...
...
@@ -16,30 +16,47 @@ config_params = config.load()
class
IPTrunkParams
(
BaseModel
):
"""
Default parameters for an IPtrunk deployment.
"""
#: The address where LSO should call back to upon completion.
callback
:
HttpUrl
#: A dictionary representation of the IP trunk
#: subscription that is to be provisioned.
subscription
:
dict
class
IPTrunkProvisioningParams
(
IPTrunkParams
):
"""
Additional parameters for provisioning an IPtrunk.
"""
#: Whether this playbook execution should be a dry run, or run for real.
#: defaults to ``True`` for obvious reasons, also making it an optional
#: parameter.
dry_run
:
Optional
[
bool
]
=
True
#: The type of object that is changed.
object
:
str
class
IPTrunkModifyParams
(
IPTrunkParams
):
"""
Additional parameters for modifying an IPtrunk.
"""
#: Whether this playbook execution should be a dry run, or run for real.
#: defaults to ``True`` for obvious reasons, also making it an optional
#: parameter.
dry_run
:
Optional
[
bool
]
=
True
#: The old subscription object, represented as a dictionary. This allows
#: for calculating the difference in subscriptions.
old_subscription
:
dict
#: The type of object that is changed.
object
:
str
class
IPTrunkCheckParams
(
IPTrunkParams
):
"""
Additional parameters for checking an IPtrunk.
"""
#: The name of the check that is to be performed.
check_name
:
str
class
IPTrunkDeleteParams
(
IPTrunkParams
):
"""
Additional parameters for deleting an IPtrunk.
"""
#: Whether this playbook execution should be a dry run, or run for real.
#: defaults to ``True`` for obvious reasons, also making it an optional
#: parameter.
dry_run
:
Optional
[
bool
]
=
True
...
...
@@ -49,6 +66,12 @@ def provision_ip_trunk(params: IPTrunkProvisioningParams) \
"""
Launch a playbook to provision a new IP trunk service.
The response will contain either a job ID, or error information.
:param params: The parameters that define the new subscription object that
is to be deployed.
:type params: :class:`IPTrunkProvisioningParams`
:return: Response from the Ansible runner, including a run ID.
:rtype: :class:`lso.playbook.PlaybookLaunchResponse`
"""
extra_vars
=
{
'
wfo_trunk_json
'
:
params
.
subscription
,
...
...
@@ -77,6 +100,11 @@ def provision_ip_trunk(params: IPTrunkProvisioningParams) \
def
modify_ip_trunk
(
params
:
IPTrunkModifyParams
)
->
PlaybookLaunchResponse
:
"""
Launch a playbook that modifies an existing IP trunk service.
:param params: The parameters that define the change in configuration.
:type params: :class:`IPTrunkModifyParams`
:return: Response from the Ansible runner, including a run ID.
:rtype: :class:`lso.playbook.PlaybookLaunchResponse`
"""
extra_vars
=
{
'
wfo_trunk_json
'
:
params
.
subscription
,
...
...
@@ -106,6 +134,12 @@ def modify_ip_trunk(params: IPTrunkModifyParams) -> PlaybookLaunchResponse:
def
delete_ip_trunk
(
params
:
IPTrunkDeleteParams
)
->
PlaybookLaunchResponse
:
"""
Launch a playbook that deletes an existing IP trunk service.
:param params: Parameters that define the subscription that should get
terminated.
:type params: :class:`IPTrunkDeleteParams`
:return: Response from the Ansible runner, including a run ID.
:rtype: :class:`lso.playbook.PlaybookLaunchResponse`
"""
extra_vars
=
{
'
wfo_trunk_json
'
:
params
.
subscription
,
...
...
@@ -134,6 +168,12 @@ def delete_ip_trunk(params: IPTrunkDeleteParams) -> PlaybookLaunchResponse:
def
check_ip_trunk
(
params
:
IPTrunkCheckParams
)
->
PlaybookLaunchResponse
:
"""
Launch a playbook that performs a check on an IP trunk service instance.
:param params: Parameters that define the check that is going to be
executed, including on which relevant subscription.
:type params: :class:`IPTrunkCheckParams`
:return: Response from the Ansible runner, including a run ID.
:rtype: :class:`lso.playbook.PlaybookLaunchResponse`
"""
extra_vars
=
{
'
wfo_ip_trunk_json
'
:
params
.
subscription
,
...
...
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