Commit 00568c9a authored by NexAdn's avatar NexAdn
Browse files

hausaufgang: Fix choices with new Netbox API


Signed-off-by: default avatarNexAdn <git@nexadn.de>
parent 639c67d0
# 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
......
......@@ -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 = PORT_TYPE_8P8C
type = PortTypeChoices.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 = PORT_TYPE_8P8C
type = PortTypeChoices.TYPE_8P8C
)
front_port.save()
#circuit = Circuit(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment