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
d7acdd0f
Commit
d7acdd0f
authored
1 year ago
by
JORGE SASIAIN
Committed by
Neda Moeini
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
NAT-244
: black/tox
parent
17c74a1f
No related branches found
No related tags found
1 merge request
!94
Feature/Netbox integration terminate ip trunk
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gso/services/netbox_client.py
+0
-1
0 additions, 1 deletion
gso/services/netbox_client.py
utils/netboxcli.py
+6
-9
6 additions, 9 deletions
utils/netboxcli.py
with
6 additions
and
10 deletions
gso/services/netbox_client.py
+
0
−
1
View file @
d7acdd0f
...
@@ -194,7 +194,6 @@ class NetboxClient:
...
@@ -194,7 +194,6 @@ class NetboxClient:
raise
WorkflowStateError
(
raise
WorkflowStateError
(
f
"
The interface:
{
iface_name
}
on device:
{
device_name
}
already belongs to a LAG:
{
iface
.
lag
.
name
}
.
"
f
"
The interface:
{
iface_name
}
on device:
{
device_name
}
already belongs to a LAG:
{
iface
.
lag
.
name
}
.
"
)
)
iface
.
lag
=
lag
.
id
iface
.
lag
=
lag
.
id
# Set description if provided
# Set description if provided
...
...
This diff is collapsed.
Click to expand it.
utils/netboxcli.py
+
6
−
9
View file @
d7acdd0f
...
@@ -137,17 +137,14 @@ def delete() -> None:
...
@@ -137,17 +137,14 @@ def delete() -> None:
pass
pass
@attach.command
()
@delete.command
()
# type: ignore[no-redef]
@click.option
(
"
--fqdn
"
,
help
=
"
Device name where to attach interface to lag
"
)
@click.option
(
"
--fqdn
"
,
help
=
"
Name of device to delete
"
)
@click.option
(
"
--iface
"
,
help
=
"
Interface name to attach to lag
"
)
def
device
(
fqdn
:
str
)
->
None
:
@click.option
(
"
--lag
"
,
help
=
"
LAG name to attach interface
"
)
click
.
echo
(
f
"
Deleting device: device=
{
fqdn
}
"
)
def
interface_to_lag
(
fqdn
:
str
,
iface
:
str
,
lag
:
str
)
->
None
:
NetboxClient
().
delete_device
(
fqdn
)
click
.
echo
(
f
"
Attaching interface to lag: device =
{
fqdn
}
, interface name=
{
iface
}
to lag=
{
lag
}
"
)
new_iface
=
NetboxClient
().
attach_interface_to_lag
(
fqdn
,
lag
,
iface
)
click
.
echo
(
new_iface
)
@delete.command
()
@delete.command
()
# type: ignore[no-redef]
@click.option
(
"
--fqdn
"
,
help
=
"
Device name from where to get interface to delete
"
)
@click.option
(
"
--fqdn
"
,
help
=
"
Device name from where to get interface to delete
"
)
@click.option
(
"
--iface
"
,
help
=
"
Name of interface name to delete
"
)
@click.option
(
"
--iface
"
,
help
=
"
Name of interface name to delete
"
)
def
interface
(
fqdn
:
str
,
iface
:
str
)
->
None
:
def
interface
(
fqdn
:
str
,
iface
:
str
)
->
None
:
...
...
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