Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add virtual machine disks #37

Merged
merged 1 commit into from
Feb 29, 2024
Merged

Conversation

Ikke
Copy link

@Ikke Ikke commented Feb 8, 2024

Netbox 3.7 added support for virtual machine disks, so add the necessary code the support this.

The client code has been copied from virtual machines, the models from virtual chassis.

@Ikke
Copy link
Author

Ikke commented Feb 8, 2024

I've marked this as draft as I have not tested the code yet.

@fbreckle
Copy link
Owner

fbreckle commented Feb 8, 2024

Hi,

when impleneting completely new models and their APIs, please update the postprocessor or the swagger.json and generate accordingly.

Also note that I am currently implementing the new vpn stuff in https://github.com/fbreckle/go-netbox/tree/feature/vpn , so conflicts may arise.

@Ikke
Copy link
Author

Ikke commented Feb 8, 2024

Ok, I must have misunderstood the readme then:

In conclusion, at the time of writing this, NetBox 3.5 is out quite some time already with NetBox 3.6 around the corner, so I decided that the show must go on and manual adjustments to this client are now the fastest way to allow the terraform provider to support newer NetBox versions.

@fbreckle
Copy link
Owner

fbreckle commented Feb 8, 2024

Yes, I figured that youve read that and then did the changes. I can just merge this if you need it right now, if you do not want to adjust the swagger stuff accordingly.

Im actually really torn on how to proceed with this library. I didnt expect them to keep adding new models so fast. I find adjusting the client via swagger "manually" extremely annoying as well. This VPN alone is like five whole new models again.

But changing to the openapi3 go-netbox requires a complete rewrite of the provider, which is also pretty much out of scope for my current time. Just venting. :\

@Ikke
Copy link
Author

Ikke commented Feb 8, 2024

I can just merge this if you need it right now, if you do not want to adjust the swagger stuff accordingly.

I'll first try to get the models / client updated using the generator, and I also wanted to at least verify it through terraform-provider-netbox.

which is also pretty much out of scope for my current time. Just venting. :\

No worries, I completely understand

@fbreckle
Copy link
Owner

We just got an issue about this feature in the provider and it reminded me of this PR. Any news?

No pressure, I just don't like duplicate work being done.

@Ikke
Copy link
Author

Ikke commented Feb 28, 2024

I'm planning on finishing it tomorrow. I have managed to update swagger.json and use the generator, so only thing left is confirming everything is working as expected.

@Ikke Ikke marked this pull request as ready for review February 29, 2024 09:03
Netbox 3.7 added support for virtual machine disks[0], so add the necessary
code the support this.

The client code has been copied from virtual machines, the models from
virtual chassis.

[0]:https://docs.netbox.dev/en/stable/release-notes/version-3.7/#virtual-machine-disks-8356
@Ikke
Copy link
Author

Ikke commented Feb 29, 2024

@fbreckle I think this is ready now.

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.

2 participants