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
8d3ce08e
Commit
8d3ce08e
authored
1 year ago
by
Neda Moeini
Committed by
Karel van Klink
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Deleted extra functionality from NetboxClient
parent
a363a69d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!92
Feature/nat 314 integrate iptrunk modification with netbox
Pipeline
#84319
passed
1 year ago
Stage: tox
Stage: documentation
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gso/services/netbox_client.py
+0
-20
0 additions, 20 deletions
gso/services/netbox_client.py
with
0 additions
and
20 deletions
gso/services/netbox_client.py
+
0
−
20
View file @
8d3ce08e
...
...
@@ -268,26 +268,6 @@ class NetboxClient:
interface
.
save
()
return
def
deallocate_interface
(
self
,
device_name
:
str
,
iface_name
:
str
)
->
Interfaces
:
"""
Allocate an interface by marking it as connected.
"""
device
=
self
.
get_device_by_name
(
device_name
)
interface
=
self
.
netbox
.
dcim
.
interfaces
.
get
(
device_id
=
device
.
id
,
name
=
iface_name
)
# Check if interface is available
if
interface
is
None
:
raise
NotFoundError
(
f
"
Interface:
{
iface_name
}
on device:
{
device_name
}
not found.
"
)
# Check if interface is reserved
if
interface
.
mark_connected
:
raise
WorkflowStateError
(
f
"
The interface:
{
iface_name
}
on device:
{
device_name
}
is already allocated.
"
)
# allocate interface by mark as connected
interface
.
mark_connected
=
False
interface
.
save
()
return
interface
def
get_available_lags
(
self
,
router_id
:
UUID
)
->
list
[
str
]:
"""
Return all available :term:`LAG`s not assigned to a device.
"""
...
...
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