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
92cf47ee
Verified
Commit
92cf47ee
authored
2 years ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
update endpoints for deletion and modification of an iptrunk
parent
1d1b4555
No related branches found
No related tags found
1 merge request
!26
Feature/iptrunk and docs
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lso/routes/ip_trunk.py
+14
-10
14 additions, 10 deletions
lso/routes/ip_trunk.py
with
14 additions
and
10 deletions
lso/routes/ip_trunk.py
+
14
−
10
View file @
92cf47ee
...
@@ -30,7 +30,7 @@ class IPTrunkModifyParams(IPTrunkParams):
...
@@ -30,7 +30,7 @@ class IPTrunkModifyParams(IPTrunkParams):
"""
Additional parameters for modifying an IPtrunk.
"""
"""
Additional parameters for modifying an IPtrunk.
"""
dry_run
:
Optional
[
bool
]
=
True
dry_run
:
Optional
[
bool
]
=
True
old_subscription
:
dict
old_subscription
:
dict
verb
:
str
object
:
str
class
IPTrunkCheckParams
(
IPTrunkParams
):
class
IPTrunkCheckParams
(
IPTrunkParams
):
...
@@ -41,7 +41,6 @@ class IPTrunkCheckParams(IPTrunkParams):
...
@@ -41,7 +41,6 @@ class IPTrunkCheckParams(IPTrunkParams):
class
IPTrunkDeleteParams
(
IPTrunkParams
):
class
IPTrunkDeleteParams
(
IPTrunkParams
):
"""
Additional parameters for deleting an IPtrunk.
"""
"""
Additional parameters for deleting an IPtrunk.
"""
dry_run
:
Optional
[
bool
]
=
True
dry_run
:
Optional
[
bool
]
=
True
verb
:
str
@router.post
(
'
/
'
)
@router.post
(
'
/
'
)
...
@@ -80,19 +79,24 @@ def modify_ip_trunk(params: IPTrunkModifyParams) -> PlaybookLaunchResponse:
...
@@ -80,19 +79,24 @@ def modify_ip_trunk(params: IPTrunkModifyParams) -> PlaybookLaunchResponse:
Launch a playbook that modifies an existing IP trunk service.
Launch a playbook that modifies an existing IP trunk service.
"""
"""
extra_vars
=
{
extra_vars
=
{
'
wfo_
ip_
trunk_json
'
:
params
.
subscription
,
'
wfo_trunk_json
'
:
params
.
subscription
,
'
wfo_
old_
ip
_trunk_json
'
:
params
.
old_subscription
,
'
old_
wfo
_trunk_json
'
:
params
.
old_subscription
,
'
dry_run
'
:
str
(
params
.
dry_run
),
'
dry_run
'
:
str
(
params
.
dry_run
),
'
verb
'
:
params
.
verb
'
verb
'
:
'
modify
'
,
'
config_object
'
:
params
.
object
,
'
commit_comment
'
:
f
'
IPtrunk
'
f
"
{
params
.
subscription
[
'
iptrunk
'
][
'
geant_s_sid
'
]
}
"
f
"
(
{
params
.
subscription
[
'
subscription_id
'
]
}
) -
"
f
'
modification of
{
params
.
object
}
'
}
}
return
run_playbook
(
return
run_playbook
(
playbook_path
=
path
.
join
(
config_params
.
ansible_playbooks_root_dir
,
playbook_path
=
path
.
join
(
config_params
.
ansible_playbooks_root_dir
,
'
iptrunks.yaml
'
),
'
iptrunks.yaml
'
),
inventory
=
[
params
.
subscription
[
'
iptrunk
'
][
'
iptrunk_sideA_node
'
][
inventory
=
str
(
params
.
subscription
[
'
iptrunk
'
][
'
iptrunk_sideA_node
'
][
'
device_fqdn
'
]
,
'
device_fqdn
'
]
+
"
\n
"
+
params
.
subscription
[
'
iptrunk
'
][
'
iptrunk_sideB_node
'
][
params
.
subscription
[
'
iptrunk
'
][
'
iptrunk_sideB_node
'
][
'
device_fqdn
'
]
]
,
'
device_fqdn
'
]
+
"
\n
"
)
,
extra_vars
=
extra_vars
,
extra_vars
=
extra_vars
,
callback
=
params
.
callback
callback
=
params
.
callback
)
)
...
@@ -106,7 +110,7 @@ def delete_ip_trunk(params: IPTrunkDeleteParams) -> PlaybookLaunchResponse:
...
@@ -106,7 +110,7 @@ def delete_ip_trunk(params: IPTrunkDeleteParams) -> PlaybookLaunchResponse:
extra_vars
=
{
extra_vars
=
{
'
wfo_trunk_json
'
:
params
.
subscription
,
'
wfo_trunk_json
'
:
params
.
subscription
,
'
dry_run
'
:
str
(
params
.
dry_run
),
'
dry_run
'
:
str
(
params
.
dry_run
),
'
verb
'
:
params
.
verb
,
'
verb
'
:
'
terminate
'
,
'
config_object
'
:
"
trunk_deprovision
"
,
'
config_object
'
:
"
trunk_deprovision
"
,
'
commit_comment
'
:
f
'
IPtrunk
'
'
commit_comment
'
:
f
'
IPtrunk
'
f
"
{
params
.
subscription
[
'
iptrunk
'
][
'
geant_s_sid
'
]
}
"
f
"
{
params
.
subscription
[
'
iptrunk
'
][
'
geant_s_sid
'
]
}
"
...
...
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