Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for custom-fields API released in netbox 2.10 #347

Closed
jianan-pony opened this issue Apr 5, 2021 · 2 comments
Closed

Support for custom-fields API released in netbox 2.10 #347

jianan-pony opened this issue Apr 5, 2021 · 2 comments

Comments

@jianan-pony
Copy link

As mentioned in netbox-community/netbox#5455 2.10 release, the custom-fields implementation and endpoints are updated to support more flexible API query pattern. However, the latest release of pynetbox seems still does not support it, as it only contains _custom_field_choices endpoint here instead of the new endpoint of custom-fields. Please help consider adding it. Thanks.

@markkuleinio
Copy link
Contributor

Can you tell what kind of additional support from pynetbox are you looking for? Currently (with pynetbox 5.3.1) there is for example:

>>> netbox.version
'2.10'

>>> netbox.extras.custom_fields.all()
[dhcp_excludes]

>>> pprint(dict(netbox.extras.custom_fields.get(name="dhcp_excludes")))
{'choices': [],
 'content_types': ['ipam.prefix'],
 'default': None,
 'description': '',
 'filter_logic': {'label': 'Loose', 'value': 'loose'},
 'id': 1,
 'label': 'DHCP excludes',
 'name': 'dhcp_excludes',
 'required': False,
 'type': {'label': 'Text', 'value': 'text'},
 'url': 'http://netbox-test.lein.io/api/extras/custom-fields/1/',
 'validation_maximum': None,
 'validation_minimum': None,
 'validation_regex': '',
 'weight': 100}

@jianan-pony
Copy link
Author

Seems I'm confused with the custom_fields with the custom_field_choices related implementation mentioned above. Tested and it worked fine. Thanks. Closed this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants