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

Compatability with Netbox 4.1 #7966

Closed
ChrisMcNichol opened this issue Sep 5, 2024 · 3 comments · Fixed by #8002
Closed

Compatability with Netbox 4.1 #7966

ChrisMcNichol opened this issue Sep 5, 2024 · 3 comments · Fixed by #8002

Comments

@ChrisMcNichol
Copy link

Is your feature request related to a problem? Please describe.
Netbox v4.1.0 has made a change to the VM Disk Size unit from 1 GB to 1MB. Disk sizes will get changed for example from 100GB to 100MB.

Describe the solution you'd like
Update to the Netbox plugin to account for this change.

Additional context
From testing in a dev environment, this can be overcome by changing the line specifying the const G variable from 1024 ** 3 to (1024 ** 3)/1000.
This allows the plugin to correctly update Netbox with the VM disk size in GB, but obviously does not in itself allow for backwards compatibility with Netbox v.4.0.x

@olivierlambert
Copy link
Member

Hi,

Thanks for your report. I agree, we need to make the change. However, I have to admit I'm fed up with Netbox breaking many things after each minor release (I'm not even talking about 4.0). The problem is we cannot guarantee nobody will use <4.1, so we need to make the code even more complex to handle this 😞

@ChrisMcNichol
Copy link
Author

@olivierlambert
You are correct, it is annoying when these things break the plugin.
For this change, I can only think we will have to check the Netbox version and change the variable based on that, although that is more of a temporary fix, as we can't afford to keep adding extra version checks for any small thing that needs changing due to changes in Netbox.

@olivierlambert
Copy link
Member

Yes, @pdonias will take the appropriate action, but I hope this won't continue at this pace.

pdonias added a commit that referenced this issue Sep 23, 2024
Fixes #7966

Storage size unit changed from GB to MB
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 a pull request may close this issue.

2 participants