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
9fd85a57
Verified
Commit
9fd85a57
authored
1 year ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
update keys from device to router in ip_trunk endpoint
parent
53399210
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#83840
passed
1 year ago
Stage: tox
Stage: documentation
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lso/routes/ip_trunk.py
+9
-11
9 additions, 11 deletions
lso/routes/ip_trunk.py
test/routes/test_ip_trunk.py
+24
-24
24 additions, 24 deletions
test/routes/test_ip_trunk.py
with
33 additions
and
35 deletions
lso/routes/ip_trunk.py
+
9
−
11
View file @
9fd85a57
...
@@ -74,18 +74,16 @@ def provision_ip_trunk(params: IPTrunkProvisioningParams) -> PlaybookLaunchRespo
...
@@ -74,18 +74,16 @@ def provision_ip_trunk(params: IPTrunkProvisioningParams) -> PlaybookLaunchRespo
"
dry_run
"
:
str
(
params
.
dry_run
),
"
dry_run
"
:
str
(
params
.
dry_run
),
"
verb
"
:
"
deploy
"
,
"
verb
"
:
"
deploy
"
,
"
config_object
"
:
params
.
object
,
"
config_object
"
:
params
.
object
,
"
commit_comment
"
:
f
"
IPtrunk
"
"
commit_comment
"
:
f
"
IPtrunk
{
params
.
subscription
[
'
iptrunk
'
][
'
geant_s_sid
'
]
}
"
f
"
{
params
.
subscription
[
'
iptrunk
'
][
'
geant_s_sid
'
]
}
"
f
"
(
{
params
.
subscription
[
'
subscription_id
'
]
}
) - deployment of
{
params
.
object
}
"
,
f
"
(
{
params
.
subscription
[
'
subscription_id
'
]
}
) -
"
f
"
deployment of
{
params
.
object
}
"
,
}
}
return
run_playbook
(
return
run_playbook
(
playbook_path
=
path
.
join
(
config_params
.
ansible_playbooks_root_dir
,
"
iptrunks.yaml
"
),
playbook_path
=
path
.
join
(
config_params
.
ansible_playbooks_root_dir
,
"
iptrunks.yaml
"
),
inventory
=
str
(
inventory
=
str
(
params
.
subscription
[
"
iptrunk
"
][
"
iptrunk_sideA_node
"
][
"
device
_fqdn
"
]
params
.
subscription
[
"
iptrunk
"
][
"
iptrunk_sideA_node
"
][
"
router
_fqdn
"
]
+
"
\n
"
+
"
\n
"
+
params
.
subscription
[
"
iptrunk
"
][
"
iptrunk_sideB_node
"
][
"
device
_fqdn
"
]
+
params
.
subscription
[
"
iptrunk
"
][
"
iptrunk_sideB_node
"
][
"
router
_fqdn
"
]
+
"
\n
"
+
"
\n
"
),
),
extra_vars
=
extra_vars
,
extra_vars
=
extra_vars
,
...
@@ -115,9 +113,9 @@ def modify_ip_trunk(params: IPTrunkModifyParams) -> PlaybookLaunchResponse:
...
@@ -115,9 +113,9 @@ def modify_ip_trunk(params: IPTrunkModifyParams) -> PlaybookLaunchResponse:
return
run_playbook
(
return
run_playbook
(
playbook_path
=
path
.
join
(
config_params
.
ansible_playbooks_root_dir
,
"
iptrunks.yaml
"
),
playbook_path
=
path
.
join
(
config_params
.
ansible_playbooks_root_dir
,
"
iptrunks.yaml
"
),
inventory
=
str
(
inventory
=
str
(
params
.
subscription
[
"
iptrunk
"
][
"
iptrunk_sideA_node
"
][
"
device
_fqdn
"
]
params
.
subscription
[
"
iptrunk
"
][
"
iptrunk_sideA_node
"
][
"
router
_fqdn
"
]
+
"
\n
"
+
"
\n
"
+
params
.
subscription
[
"
iptrunk
"
][
"
iptrunk_sideB_node
"
][
"
device
_fqdn
"
]
+
params
.
subscription
[
"
iptrunk
"
][
"
iptrunk_sideB_node
"
][
"
router
_fqdn
"
]
+
"
\n
"
+
"
\n
"
),
),
extra_vars
=
extra_vars
,
extra_vars
=
extra_vars
,
...
@@ -149,9 +147,9 @@ def delete_ip_trunk(params: IPTrunkDeleteParams) -> PlaybookLaunchResponse:
...
@@ -149,9 +147,9 @@ def delete_ip_trunk(params: IPTrunkDeleteParams) -> PlaybookLaunchResponse:
return
run_playbook
(
return
run_playbook
(
playbook_path
=
path
.
join
(
config_params
.
ansible_playbooks_root_dir
,
"
iptrunks.yaml
"
),
playbook_path
=
path
.
join
(
config_params
.
ansible_playbooks_root_dir
,
"
iptrunks.yaml
"
),
inventory
=
str
(
inventory
=
str
(
params
.
subscription
[
"
iptrunk
"
][
"
iptrunk_sideA_node
"
][
"
device
_fqdn
"
]
params
.
subscription
[
"
iptrunk
"
][
"
iptrunk_sideA_node
"
][
"
router
_fqdn
"
]
+
"
\n
"
+
"
\n
"
+
params
.
subscription
[
"
iptrunk
"
][
"
iptrunk_sideB_node
"
][
"
device
_fqdn
"
]
+
params
.
subscription
[
"
iptrunk
"
][
"
iptrunk_sideB_node
"
][
"
router
_fqdn
"
]
+
"
\n
"
+
"
\n
"
),
),
extra_vars
=
extra_vars
,
extra_vars
=
extra_vars
,
...
@@ -175,7 +173,7 @@ def check_ip_trunk(params: IPTrunkCheckParams) -> PlaybookLaunchResponse:
...
@@ -175,7 +173,7 @@ def check_ip_trunk(params: IPTrunkCheckParams) -> PlaybookLaunchResponse:
return
run_playbook
(
return
run_playbook
(
playbook_path
=
path
.
join
(
config_params
.
ansible_playbooks_root_dir
,
"
iptrunks_checks.yaml
"
),
playbook_path
=
path
.
join
(
config_params
.
ansible_playbooks_root_dir
,
"
iptrunks_checks.yaml
"
),
inventory
=
params
.
subscription
[
"
iptrunk
"
][
"
iptrunk_sideA_node
"
][
"
device
_fqdn
"
],
inventory
=
params
.
subscription
[
"
iptrunk
"
][
"
iptrunk_sideA_node
"
][
"
router
_fqdn
"
],
extra_vars
=
extra_vars
,
extra_vars
=
extra_vars
,
callback
=
params
.
callback
,
callback
=
params
.
callback
,
)
)
This diff is collapsed.
Click to expand it.
test/routes/test_ip_trunk.py
+
24
−
24
View file @
9fd85a57
...
@@ -21,15 +21,15 @@ _SUBSCRIPTION_OBJECT = {
...
@@ -21,15 +21,15 @@ _SUBSCRIPTION_OBJECT = {
"
iptrunk_sideA_ae_members
"
:
[
"
ge-0/0/0
"
],
"
iptrunk_sideA_ae_members
"
:
[
"
ge-0/0/0
"
],
"
iptrunk_sideA_ae_members_description
"
:
[
"
this is the first interface on side A
"
],
"
iptrunk_sideA_ae_members_description
"
:
[
"
this is the first interface on side A
"
],
"
iptrunk_sideA_node
"
:
{
"
iptrunk_sideA_node
"
:
{
"
device
_fqdn
"
:
"
rtx.city.country.geant.net
"
,
"
router
_fqdn
"
:
"
rtx.city.country.geant.net
"
,
"
device
_ias_lt_ipv4_network
"
:
"
1.0.0.0/31
"
,
"
router
_ias_lt_ipv4_network
"
:
"
1.0.0.0/31
"
,
"
device
_ias_lt_ipv6_network
"
:
"
dead:beef::3/126
"
,
"
router
_ias_lt_ipv6_network
"
:
"
dead:beef::3/126
"
,
"
device
_lo_ipv4_address
"
:
"
1.0.0.0
"
,
"
router
_lo_ipv4_address
"
:
"
1.0.0.0
"
,
"
device
_lo_ipv6_address
"
:
"
dead:beef::
"
,
"
router
_lo_ipv6_address
"
:
"
dead:beef::
"
,
"
device
_lo_iso_address
"
:
"
00.0000.0000.0000.0000.0000.00
"
,
"
router
_lo_iso_address
"
:
"
00.0000.0000.0000.0000.0000.00
"
,
"
device
_role
"
:
"
p
"
,
"
router
_role
"
:
"
p
"
,
"
device
_si_ipv4_network
"
:
"
0.0.1.0/31
"
,
"
router
_si_ipv4_network
"
:
"
0.0.1.0/31
"
,
"
device
_site
"
:
{
"
router
_site
"
:
{
"
name
"
:
"
SiteBlock
"
,
"
name
"
:
"
SiteBlock
"
,
"
label
"
:
None
,
"
label
"
:
None
,
"
site_city
"
:
"
City
"
,
"
site_city
"
:
"
City
"
,
...
@@ -43,10 +43,10 @@ _SUBSCRIPTION_OBJECT = {
...
@@ -43,10 +43,10 @@ _SUBSCRIPTION_OBJECT = {
"
owner_subscription_id
"
:
"
0
"
,
"
owner_subscription_id
"
:
"
0
"
,
"
site_bgp_community_id
"
:
0
,
"
site_bgp_community_id
"
:
0
,
"
subscription_instance_id
"
:
"
0
"
,
"
subscription_instance_id
"
:
"
0
"
,
"
site_ts_address
"
:
"
127.0.0.2
"
,
},
},
"
device_ts_address
"
:
"
127.0.0.1
"
,
"
router_ts_port
"
:
22
,
"
device_ts_port
"
:
22
,
"
router_vendor
"
:
"
vendor
"
,
"
device_vendor
"
:
"
vendor
"
,
"
owner_subscription_id
"
:
"
0
"
,
"
owner_subscription_id
"
:
"
0
"
,
"
subscription_instance_id
"
:
"
0
"
,
"
subscription_instance_id
"
:
"
0
"
,
},
},
...
@@ -55,15 +55,15 @@ _SUBSCRIPTION_OBJECT = {
...
@@ -55,15 +55,15 @@ _SUBSCRIPTION_OBJECT = {
"
iptrunk_sideB_ae_members
"
:
[
"
ge-0/0/0
"
],
"
iptrunk_sideB_ae_members
"
:
[
"
ge-0/0/0
"
],
"
iptrunk_sideB_ae_members_description
"
:
[
"
this is the first interface side B
"
],
"
iptrunk_sideB_ae_members_description
"
:
[
"
this is the first interface side B
"
],
"
iptrunk_sideB_node
"
:
{
"
iptrunk_sideB_node
"
:
{
"
device
_fqdn
"
:
"
rtx.town.country.geant.net
"
,
"
router
_fqdn
"
:
"
rtx.town.country.geant.net
"
,
"
device
_ias_lt_ipv4_network
"
:
"
0.0.0.0/31
"
,
"
router
_ias_lt_ipv4_network
"
:
"
0.0.0.0/31
"
,
"
device
_ias_lt_ipv6_network
"
:
"
deaf:beef::1/126
"
,
"
router
_ias_lt_ipv6_network
"
:
"
deaf:beef::1/126
"
,
"
device
_lo_ipv4_address
"
:
"
0.0.0.0
"
,
"
router
_lo_ipv4_address
"
:
"
0.0.0.0
"
,
"
device
_lo_ipv6_address
"
:
"
dead:beef::2
"
,
"
router
_lo_ipv6_address
"
:
"
dead:beef::2
"
,
"
device
_lo_iso_address
"
:
"
00.0000.0000.0000.0000.0000.00
"
,
"
router
_lo_iso_address
"
:
"
00.0000.0000.0000.0000.0000.00
"
,
"
device
_role
"
:
"
p
"
,
"
router
_role
"
:
"
p
"
,
"
device
_si_ipv4_network
"
:
"
0.1.0.0/31
"
,
"
router
_si_ipv4_network
"
:
"
0.1.0.0/31
"
,
"
device
_site
"
:
{
"
router
_site
"
:
{
"
name
"
:
"
SiteBlock
"
,
"
name
"
:
"
SiteBlock
"
,
"
label
"
:
None
,
"
label
"
:
None
,
"
site_city
"
:
"
Town
"
,
"
site_city
"
:
"
Town
"
,
...
@@ -77,10 +77,10 @@ _SUBSCRIPTION_OBJECT = {
...
@@ -77,10 +77,10 @@ _SUBSCRIPTION_OBJECT = {
"
owner_subscription_id
"
:
"
0
"
,
"
owner_subscription_id
"
:
"
0
"
,
"
site_bgp_community_id
"
:
2
,
"
site_bgp_community_id
"
:
2
,
"
subscription_instance_id
"
:
"
0
"
,
"
subscription_instance_id
"
:
"
0
"
,
"
site_ts_address
"
:
"
127.0.0.2
"
,
},
},
"
device_ts_address
"
:
"
127.0.0.2
"
,
"
router_ts_port
"
:
22
,
"
device_ts_port
"
:
22
,
"
router_vendor
"
:
"
vendor
"
,
"
device_vendor
"
:
"
vendor
"
,
"
owner_subscription_id
"
:
"
0
"
,
"
owner_subscription_id
"
:
"
0
"
,
"
subscription_instance_id
"
:
"
0
"
,
"
subscription_instance_id
"
:
"
0
"
,
},
},
...
...
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