fix: handle netbox migration to disk set in MB#642
fix: handle netbox migration to disk set in MB#642fbreckle merged 9 commits intoe-breuninger:masterfrom
Conversation
|
@fbreckle Hi Unfortunately, the last remaining resource requires changes in the API client in order to complete. Are you planning on patching the client? |
|
Yes, I will update the client. I'm currenlty releasing a last version for 4.0.x with 4.0.11 support. Then I'll get to the necessary client changes later today or tomorrow. Sorry for the delay! As for the disk size change: I think we should change the attribute name to |
|
Sigh. Am I mistaken or is this one of these situations where the netbox devs did not properly update the openapi spec? I have this in the openapi spec of netbox 4.1.3: and I see this in the debug console when changing the new "vlan ids" field: ... but a |
e43c4c4 to
35ff227
Compare
|
Ok tests are green and only disk size and its migration are to do. Then this can go live. |
|
@fbreckle the fix for this has been merged recently and should be in the next netbox release. are you tracking this somewhere? |
|
In light of the 4.2 api changes, I recently tried the "official" go-netbox client again (openapi3 autogenerated). I was honestly having a pretty bad time with it (netbox-community/go-netbox#197), so for now, I will stick to my own go-netbox implementation where this is fixed. That implementation basically lives off a handcrafted swagger file and by handcrafted I mean that I do not track any upstream API issues. |
|
In light of the 4.2 api changes, I recently tried the "official" go-netbox client again (openapi3 autogenerated). I was honestly having a pretty bad time with it (netbox-community/go-netbox#197), so for now, I will stick to my own go-netbox implementation where this is fixed. That implementation basically lives off a handcrafted swagger file and by handcrafted I mean that I do not track any upstream API issues. |
Update to handle NetBox 4.1.0 and above.
NetBox 4.1.0 introduced multiple breaking changes.
https://github.com/netbox-community/netbox/releases/tag/v4.1.0
Disk Size
Size was changed from GB to MB.
A migration when NetBox is started is updating the stored disk value by multiplying with 1000.
This proposed change ensures that the provider is backwards compatible in terms of HCL but still can support NetBox 4.1.0 and above.
Option number two is to rename
disk_size_gbtodisk_size_mband break existing HCL.If that is preferred let me know.
VLAN Group
The
min_vidandmax_vidfields on the VLAN group model have been replaced withvid_ranges, an array of starting and ending VLAN ID pairs.I've removed the depercated implementation. VLAN Group support is pending changes in the API client.
Users Password
Password must now have at least one numeral.
Rack type
A new model has been introduced to model Rack Types.
I've removed the old references to type. The new Rack Model support support is pending changes in the API client.