Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
nexbox
NetBox Backend Scripts
Commits
00568c9a
Commit
00568c9a
authored
Apr 05, 2021
by
NexAdn
Browse files
hausaufgang: Fix choices with new Netbox API
Signed-off-by:
NexAdn
<
git@nexadn.de
>
parent
639c67d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
00568c9a
# Changelog
## Upcoming
### Bugfixes
*
`hausaufgang.py`
Use new netbox choices instead of global constants which aren't available anymore in newer Netbox versions
## Version 1.1.0
### Enhancements
*
`aruba.py`
can now determine an AP's site from its name under certain circumstances if the site is not specified explicitly
...
...
hausaufgang.py
View file @
00568c9a
...
...
@@ -4,6 +4,7 @@ from django.utils.text import slugify
from
circuits.models
import
*
from
dcim.models
import
*
from
dcim.choices
import
PortTypeChoices
from
ipam.models
import
*
from
extras.scripts
import
*
...
...
@@ -48,7 +49,7 @@ class AddHausaufgang(Script):
userport_label
),
device
=
patchpanel
,
positions
=
1
,
type
=
P
ORT_
TYPE_8P8C
type
=
P
ortTypeChoices
.
TYPE_8P8C
)
rear_port
.
save
()
front_port
=
FrontPort
(
...
...
@@ -57,7 +58,7 @@ class AddHausaufgang(Script):
device
=
patchpanel
,
rear_port
=
rear_port
,
rear_port_position
=
1
,
type
=
P
ORT_
TYPE_8P8C
type
=
P
ortTypeChoices
.
TYPE_8P8C
)
front_port
.
save
()
#circuit = Circuit(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment