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
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
12dbf6d4
Commit
12dbf6d4
authored
1 year ago
by
JORGE SASIAIN
Browse files
Options
Downloads
Patches
Plain Diff
Address SonarQube code smells
parent
35817ba4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!112
Address SonarQube code smells
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gso/services/netbox_client.py
+1
-1
1 addition, 1 deletion
gso/services/netbox_client.py
gso/utils/device_info.py
+2
-2
2 additions, 2 deletions
gso/utils/device_info.py
gso/workflows/iptrunk/migrate_iptrunk.py
+7
-5
7 additions, 5 deletions
gso/workflows/iptrunk/migrate_iptrunk.py
with
10 additions
and
8 deletions
gso/services/netbox_client.py
+
1
−
1
View file @
12dbf6d4
...
...
@@ -162,7 +162,7 @@ class NetboxClient:
def
create_device
(
self
,
device_name
:
str
,
site_tier
:
str
)
->
Devices
:
"""
Create a new device in Netbox.
"""
# Get device type id
tier_info
=
TierInfo
().
get_module_by_name
(
f
"
T
ier
{
site_tier
}
"
)
tier_info
=
TierInfo
().
get_module_by_name
(
f
"
t
ier
{
site_tier
}
"
)
device_type
=
self
.
netbox
.
dcim
.
device_types
.
get
(
model
=
tier_info
.
device_type
)
# Get device role id
...
...
This diff is collapsed.
Click to expand it.
gso/utils/device_info.py
+
2
−
2
View file @
12dbf6d4
...
...
@@ -18,14 +18,14 @@ class TierInfo:
def
__init__
(
self
)
->
None
:
"""
Initialise the different tiers of sites that exist.
"""
self
.
T
ier1
=
ModuleInfo
(
self
.
t
ier1
=
ModuleInfo
(
device_type
=
"
7750 SR-7s
"
,
module_bays_slots
=
[
1
,
2
],
module_type
=
"
XMA2-s-36p-400g
"
,
breakout_interfaces_per_slot
=
[
36
,
35
,
34
,
33
],
total_10g_interfaces
=
80
,
)
self
.
T
ier2
=
ModuleInfo
(
self
.
t
ier2
=
ModuleInfo
(
device_type
=
"
7750-SR7s
"
,
module_bays_slots
=
[
1
,
2
],
module_type
=
"
XMA2-s-36p-400g
"
,
...
...
This diff is collapsed.
Click to expand it.
gso/workflows/iptrunk/migrate_iptrunk.py
+
7
−
5
View file @
12dbf6d4
...
...
@@ -41,6 +41,8 @@ from gso.utils.helpers import (
logger
=
getLogger
(
__name__
)
PLAYBOOK_VERB_NOT_YET_PROPERLY_SET
=
"
Playbook verb is not yet properly set.
"
def
initial_input_form_generator
(
subscription_id
:
UUIDstr
)
->
FormGenerator
:
"""
Gather input from the operator on the new router that the IP trunk should connect to.
"""
...
...
@@ -251,7 +253,7 @@ def deploy_new_config_dry(
"
trunk_interface
"
,
)
logger
.
warning
(
"
Playbook verb is not yet properly set.
"
)
logger
.
warning
(
PLAYBOOK_VERB_NOT_YET_PROPERLY_SET
)
return
{
"
subscription
"
:
subscription
,
...
...
@@ -287,7 +289,7 @@ def deploy_new_config_real(
dry_run
=
False
,
)
logger
.
warning
(
"
Playbook verb is not yet properly set.
"
)
logger
.
warning
(
PLAYBOOK_VERB_NOT_YET_PROPERLY_SET
)
return
{
"
subscription
"
:
subscription
,
...
...
@@ -338,7 +340,7 @@ def deploy_new_isis(
dry_run
=
False
,
)
logger
.
warning
(
"
Playbook verb is not yet properly set.
"
)
logger
.
warning
(
PLAYBOOK_VERB_NOT_YET_PROPERLY_SET
)
return
{
"
subscription
"
:
subscription
,
...
...
@@ -410,7 +412,7 @@ def delete_old_config_dry(
"
delete
"
,
)
logger
.
warning
(
"
Playbook verb is not yet properly set.
"
)
logger
.
warning
(
PLAYBOOK_VERB_NOT_YET_PROPERLY_SET
)
return
{
"
subscription
"
:
subscription
}
...
...
@@ -444,7 +446,7 @@ def delete_old_config_real(
dry_run
=
False
,
)
logger
.
warning
(
"
Playbook verb is not yet properly set.
"
)
logger
.
warning
(
PLAYBOOK_VERB_NOT_YET_PROPERLY_SET
)
return
{
"
subscription
"
:
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