Skip to content

Conversation

@henrybear327
Copy link
Collaborator

@henrybear327 henrybear327 commented Dec 16, 2024

Several changes are introduced in this PR

  • database.sql is stripped down to only populating the API token
  • The local demo data is now populated through NetBox API, by using a Python script and running as a Kubernetes job, which makes it easier to work across NetBox versions. (idea from @jstudler)

e2e tests are modified accordingly, as we also migrate to using locally-created tenants and sites only (idea from @bruelea ). We are also check if the tenant and site from parentPrefixSelector and the spec is properly leveraged by using 2 different tenants and sites.

Implements and closes #175

@henrybear327 henrybear327 force-pushed the kind/migrate_setup_to_netbox_api branch from 5eb79ad to 75fc276 Compare December 16, 2024 14:42
@henrybear327
Copy link
Collaborator Author

henrybear327 commented Dec 17, 2024

There are several TODO(henrybear327) that will be deferred for the future, as it's NetBox implementation-related issues

@henrybear327 henrybear327 marked this pull request as ready for review December 17, 2024 11:30
@henrybear327
Copy link
Collaborator Author

To run the e2e test locally, please use a clean kind cluster (you can remove the current one by executing kind delete cluster --name kind), and execute make create-kind deploy-kind test-e2e @faebr

Copy link
Collaborator

@faebr faebr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks way clearer now with the python script I like it. Also tested it locally on my machine and works as expected.

@henrybear327 henrybear327 merged commit 327b3a1 into main Dec 18, 2024
6 checks passed
@henrybear327 henrybear327 deleted the kind/migrate_setup_to_netbox_api branch December 18, 2024 10:52
vaishutin pushed a commit to vaishutin/netbox-operator that referenced this pull request Aug 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate populating local demo data through database.sql to using NetBox API

3 participants