1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

DeviceType.subdevice_role to slug (#3569)

This commit is contained in:
Jeremy Stretch
2019-11-18 22:03:25 -05:00
parent fbd12e1887
commit afd82fd9d3
8 changed files with 71 additions and 36 deletions

View File

@@ -66,6 +66,26 @@ class RackStatusChoices(ChoiceSet):
}
#
# DeviceTypes
#
class SubdeviceRoleChoices(ChoiceSet):
ROLE_PARENT = 'parent'
ROLE_CHILD = 'child'
CHOICES = (
(ROLE_PARENT, 'Parent'),
(ROLE_CHILD, 'Child'),
)
LEGACY_MAP = {
ROLE_PARENT: True,
ROLE_CHILD: False,
}
#
# Devices
#