You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on a comment made by @cfergeau on #212.
Open this issue to make that PR easier to review. I'm going to refactor it in a follow-up PR
Only a comment (or just me thinking out loud), I'm not asking for changes in response to this comment.
We could having both ImagePath and URI in StorageConfig, and avoid these checks with something like:
type StorageConfig struct {
DevName string `json:"devName"`
ReadOnly bool `json:"readOnly,omitempty"`
}
type DiskStorageConfig {
StorageConfig
ImagePath string `json:"imagePath,omitempty"`
}
type NetworkBlockDevice {
StorageConfig
URI string `json:"uri,omitempty"`
}
If it works, this makes sure we'll never get a NetworkBlockDevice with ImagePath set as it does not have this member at all.
This adds one more almost empty type though, and may be breaking unserializing json on upgrades (?).
Based on a comment made by @cfergeau on #212.
Open this issue to make that PR easier to review. I'm going to refactor it in a follow-up PR
Only a comment (or just me thinking out loud), I'm not asking for changes in response to this comment.
We could having both
ImagePath
andURI
inStorageConfig
, and avoid these checks with something like:If it works, this makes sure we'll never get a NetworkBlockDevice with ImagePath set as it does not have this member at all.
This adds one more almost empty type though, and may be breaking unserializing json on upgrades (?).
Originally posted by @cfergeau in #212 (comment)
The text was updated successfully, but these errors were encountered: