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

Hide cloud-init data when no cloud-init disk is present? #358

Open
Tinyblargon opened this issue Aug 16, 2024 · 0 comments
Open

Hide cloud-init data when no cloud-init disk is present? #358

Tinyblargon opened this issue Aug 16, 2024 · 0 comments
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself

Comments

@Tinyblargon
Copy link
Collaborator

Should we return a ConfigQemu.CloudInit object when no cloud-init disk has been configured?
When no cloud-init disk is configured the settings don't do anything. The PVE gui still shows the information all be it grayed out.

I do feel like checking if ConfigQemu.CloudInit == nil is the most intuitive way of checking if the vm uses cloud-init settings.
The alternative would be to check if a cloud-init disk is configured and check if ConfigQemu.CloudInit == nil.
Making users check if a cloud-init disk is configured feels like a lot to ask, especially with how the disks are implemented.
so we should make ConfigQemu.CloudInit = nil when no cloud-init disk is configured.

@mleone87 whats your opinion on this?

type ConfigQemu struct {
Agent *QemuGuestAgent `json:"agent,omitempty"`
Args string `json:"args,omitempty"`
Bios string `json:"bios,omitempty"`
Boot string `json:"boot,omitempty"` // TODO should be an array of custom enums
BootDisk string `json:"bootdisk,omitempty"` // TODO discuss deprecation? Only returned as it's deprecated in the proxmox api
CPU *QemuCPU `json:"cpu,omitempty"`
CloudInit *CloudInit `json:"cloudinit,omitempty"`

@Tinyblargon Tinyblargon added the type/question Issue needs no code to be fixed, only a description on how to fix it yourself label Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself
Projects
None yet
Development

No branches or pull requests

1 participant