nautobot / nornir-nautobot

Nornir inventory and plugins for Nautobot.
https://docs.nautobot.com/projects/nornir-nautobot/en/latest/
33 stars 25 forks source link

Iterate over Virtualization objects instead of DCIM only. #171

Open kacem-expereo opened 3 weeks ago

kacem-expereo commented 3 weeks ago

Hello team, Is there a way to use the nornir-nautobot plugin to build the inventory from the virtualization model instead of dcim? From what I see it seems to be restricted to DCIM (it's also specified in the Readme). Would this be aproved if I submit such PR or it's a choice by design to only support dcim?

Thank you!

jvanderaa commented 3 weeks ago

Support for Virtualization would be welcomed. If possible, through an option.

kacem-expereo commented 3 weeks ago

Thank you for the quick feedback!

To confirm, would you prefer adding this as an option under the InitNornir/inventory/options field? I am considering two possible approaches for implementing this:

  1. Allowing both DCIM and Virtualization models to be fetched simultaneously and merged as hosts within the inventory, though I’m mindful this might introduce unforeseen complexities.
  2. Providing users with a choice (as an option) between using either the DCIM or Virtualization model, where the filtering_parameter would apply to the selected model.

Please let me know if you have a preferred approach, or if there are any additional considerations to keep in mind.