opsmill / infrahub

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

infrastructure_edge: Readability and performance improvements #3771

Closed ogenstad closed 3 months ago

ogenstad commented 3 months ago

In this iteration I've started to move out code from the global run() method and provide a way to batch tasks that doesn't depend on each other in a simpler way.

I also changed the randomness of the script with regards to how many IPv6 addresses were created. In the previous version we had for networks where we created a random number of hosts between 1 and 255, this make it harder to measure the time it took for the script to complete as it was completely random each time.

There are also some improvements with regards to how the profiles are assigned to the interfaces (here's an example where I don't think the current ".fetch()" approach works that great.

There's still a lot to do to improve both the speed and readability of the script but I don't want to change too much in one go.

Related to #3733.