-
Notifications
You must be signed in to change notification settings - Fork 254
Closed
Labels
Milestone
Description
ISSUE TYPE
- Feature Idea
SUMMARY
Replace the pre-defined constants in netbox_utils.py, for example:
IP_ADDRESS_STATUS
IP_ADDRESS_ROLE
RACK_TYPE
INTF_FORM_FACTOR
INTF_MODE
by using the _choices api.
ie, to get all the choices from dcim, you an do:
http://api-url/api/dcim/_choices (or using pynetbox - dcim_choicse = nb.dcim.choices())
and it will give all the choices.
This is need because netbox-2.7 replaces many of the numeric constants with "slugs"/human readable values, and in netbox-2.8, the numeric constants will no longer be honored..
If you use the _choices api, you will also maintain compatibility with netbox-2.6 (since it also supports the choices api)