opsmill / infrahub

Infrahub - A new approach to Infrastructure Management
https://opsmill.com/
GNU Affero General Public License v3.0
148 stars 7 forks source link

Add model for number pool #3667

Closed ogenstad closed 5 days ago

ogenstad commented 3 weeks ago

This PR adds a resource manager for allocating numbers for number based attributes on "local nodes", i.e. not in the same way as is done in the IP resource manager where a relationship is created to a new node.

As such I'm not convinced that the "pool identifier" makes much sense in this context as the pool allocation would point directly to the assigned resource. Potentially we could just return the display_label or hfid for this field in the future. For upcoming number allocation pools where they work closer to how a the IP pools work, for instance if it's a related object such as a VLAN that we want to assign the pool identifier would make sense.

ogenstad commented 5 days ago

Looks good overall Not a blocker, but would be good to add a few more unit tests to ensure that everything is working as expected

For sure, was thinking we could add more tests after the candidate branch is created if that's ok?

dgarros commented 5 days ago

For sure, was thinking we could add more tests after the candidate branch is created if that's ok?

Yes