amyasnikov / validity

NetBox plugin to validate network devices
MIT License
121 stars 7 forks source link

Polling devices according to the selector #70

Closed ArsenyPie closed 6 months ago

ArsenyPie commented 6 months ago

Hi! I use Validity in my project with a large number of network devices (more than 500) and I need that when performing Compliance tests, Validity Polling polls only those devices that are selected in the Selector. I understand that you can do this by attaching tenant to each device manually, but this option is not suitable for me : ( If such a function is not provided, can you please tell me how to get a list of devices that got into the Selector via the API, so that later I use it in a python script. I hope for your help!!

amyasnikov commented 6 months ago

Hey @ArsenyPie, If you execute RunTests script with sync_datasources=True and override_datasource=<Validity Polling>, only devices selected for tests execution (via selectors or/and devices script params) will be polled. I suppose you can use it right now (in 2.0.0) as a hack to poll selected devices only.

If you don't use override_datasource script param, all the devices bound to Validity Polling will be polled during RunTests execution. I think you're right and I should change this behaviour and always poll selected devices only instead of all devices.

amyasnikov commented 6 months ago

Let's keep the issue open till I change the default polling behaviour without override_datasource