fbreckle / go-netbox

Package netbox provides an API client for DigitalOcean's NetBox IPAM and DCIM service.
Other
1 stars 22 forks source link

feat: add virtual machine disks #37

Closed Ikke closed 6 months ago

Ikke commented 7 months ago

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 commented 7 months ago

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

fbreckle commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

@fbreckle I think this is ready now.