ansible_modules icon indicating copy to clipboard operation
ansible_modules copied to clipboard

[Feature Request] nb_inventory filter for Devices and Virtual Machines

Open hyudra opened this issue 4 years ago • 3 comments

ISSUE TYPE
  • Feature Idea
Netbox:

2.10.4

Collection:

3.0.0

SUMMARY

I'd like to have option to filter only devices or only Virtual machines for nb_inventory. This will make inventory lookup to run faster and able to separate device from virtual machines

hyudra avatar Mar 16 '21 10:03 hyudra

Have you tried specifying the specific query_filters for each to see if that works?

Instead of using query_filters try using only device_query_filters.

FragmentedPacket avatar May 09 '21 02:05 FragmentedPacket

same here. want to import only VM's, but query_filters ingore everything except active\offline. i tried: "cluster": "cluster_type": "uuid": "is_virtual": true,

query_filters:

  • status: active device_query_filters:
  • cluster_type: xcp-ng-pool
  • is_virtual: true

and same with only device_query_filters.

anywhere it import all switches, servers, etc.

TristisOris avatar Sep 08 '21 16:09 TristisOris

A workaround to disable one type is by filtering on id=-1 which forces an empty response.

device_query_filters:                                                                                                                                           
- id: -1

Urth avatar Sep 28 '21 15:09 Urth