Fix VM getters to work with shutdown VMs#257
Open
aravindhp wants to merge 1 commit into
Open
Conversation
402d845 to
61c399a
Compare
dupondje
requested changes
Feb 3, 2026
61c399a to
6f23b3a
Compare
dupondje
requested changes
Feb 10, 2026
Member
dupondje
left a comment
There was a problem hiding this comment.
Looks good already. Some minor changes and we're done :)
| gateway, _ := ipv6.Gateway() | ||
| netmask, _ := ipv6.Netmask() | ||
| if nicConfiguration == nil { | ||
| nicConfiguration = NewNicConfiguration( |
Member
There was a problem hiding this comment.
I would add this on top of the function.
And then for IPv4 do nicConfiguration.WithIP(...)
| }, | ||
| ) | ||
| name, _ := sdkObject.Name() | ||
| var nicConfiguration BuildableNicConfiguration |
| address, _ := ipv4.Address() | ||
| gateway, _ := ipv4.Gateway() | ||
| netmask, _ := ipv4.Netmask() | ||
| nicConfiguration = NewNicConfiguration( |
6f23b3a to
bb43d32
Compare
aravindhp
commented
Feb 12, 2026
Comment on lines
+571
to
+572
| if !hasIPv4 && !hasIPv6 { | ||
| return nil |
Author
There was a problem hiding this comment.
I am not sure if I should be returning nil here or just remove this if block which will result in nicConfiguration being returned.
bb43d32 to
cf62cdd
Compare
convertSDKNicConfiguration() was assuming that VMs will have an active NIC configuration. This is not the case for shutdown VMs, so we need to account for that. Signed-off-by: Aravindh Puthiyaparambil <aravindh.foss@pm.me>
cf62cdd to
bb09f64
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please describe the change you are making
convertSDKNicConfiguration() was assuming that VMs will have an active NIC configuration. This is not the case for shutdown VMs, so we need to account for that.
Fixes #256
Are you the owner of the code you are sending in, or do you have permission of the owner?
I am not the owner nor do I have permission of the owner
The code will be published under the BSD 3 clause license. Have you read and understood this license?
Yes