Skip to content

[Feature]: Add support for saved_filters #1523

@tcb678

Description

@tcb678

NetBox version

v4.5

Feature type

New Module

Proposed functionality

pynetbox supports saved filters under the extras API; would like to see support in the the community module for the CRUD of a saved filter. I imagine this may be challenging since the filter logic might be complex and tracking errors would be difficult, but it would be a nice to have.

>>> nb = pynetbox.api(NETBOX_ADDRESS, token=USER_TOKEN)
>>> nb.http_session.verify=False
>>> urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
>>> list(nb.extras.saved_filters.all())
[Foo]
>>>
>>> nb.extras.saved_filters.<TAB>
nb.extras.saved_filters.all(         nb.extras.saved_filters.choices()    nb.extras.saved_filters.filter(      nb.extras.saved_filters.token
nb.extras.saved_filters.api          nb.extras.saved_filters.count(       nb.extras.saved_filters.get(         nb.extras.saved_filters.update(
nb.extras.saved_filters.app          nb.extras.saved_filters.create(      nb.extras.saved_filters.name         nb.extras.saved_filters.url
nb.extras.saved_filters.base_url     nb.extras.saved_filters.delete(      

Use case

In a world where I programmatically create Netbox instances via Ansible, saved filters is an important item for usability.

External dependencies

No new dependencies

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions