Documentation
¶
Index ¶
- Constants
- func DebugLevel() log.Level
- func IsDebugLevel(l Logger) bool
- type Bootloader
- type BtrfsConfig
- type BuildConfig
- type CloudInitRunner
- type Config
- type DiskSpec
- type ElementalPartitions
- func (ep ElementalPartitions) GetConfigStorage() string
- func (ep ElementalPartitions) PartitionsByInstallOrder(extraPartitions PartitionList, excludes ...*Partition) PartitionList
- func (ep ElementalPartitions) PartitionsByMountPoint(descending bool, excludes ...*Partition) PartitionList
- func (ep *ElementalPartitions) SetFirmwarePartitions(firmware string, partTable string) error
- type EphemeralMounts
- type FS
- type HTTPClient
- type Image
- type ImageExtractor
- type ImageSource
- func (i *ImageSource) CustomUnmarshal(data interface{}) (bool, error)
- func (i ImageSource) GetDigest() string
- func (i ImageSource) IsDir() bool
- func (i ImageSource) IsEmpty() bool
- func (i ImageSource) IsFile() bool
- func (i ImageSource) IsImage() bool
- func (i ImageSource) MarshalYAML() (interface{}, error)
- func (i *ImageSource) SetDigest(digest string)
- func (i ImageSource) String() string
- func (i *ImageSource) UnmarshalYAML(value *yaml.Node) error
- func (i ImageSource) Value() string
- type InitSpec
- type InstallSpec
- type InstallState
- type KeyValuePair
- type LiveISO
- type Logger
- type LoggerOptions
- type LoopDeviceConfig
- type MountSpec
- type Mounter
- type OCIImageExtractor
- type Partition
- type PartitionList
- type PartitionState
- type PersistentMounts
- type Platform
- type RealRunner
- func (r RealRunner) CommandExists(command string) bool
- func (r RealRunner) GetLogger() Logger
- func (r RealRunner) InitCmd(command string, args ...string) *exec.Cmd
- func (r RealRunner) Run(command string, args ...string) ([]byte, error)
- func (r RealRunner) RunCmd(cmd *exec.Cmd) ([]byte, error)
- func (r *RealRunner) SetLogger(logger Logger)
- type RealSyscall
- type Repository
- type ResetSpec
- type RunConfig
- type Runner
- type Snapshot
- type Snapshotter
- type SnapshotterConfig
- type SourceNotFound
- type SyscallInterface
- type SystemState
- type UpgradeSpec
- type VolumeMount
Constants ¶
const ( GPT = "gpt" BIOS = "bios" MSDOS = "msdos" EFI = "efi" ESP = "esp" )
Variables ¶
This section is empty.
Functions ¶
func DebugLevel ¶
func IsDebugLevel ¶
Types ¶
type Bootloader ¶
type Bootloader interface {
Install(rootDir, bootDir string) (err error)
InstallConfig(rootDir, bootDir string) error
DoEFIEntries(shimName, efiDir string) error
InstallEFI(rootDir, efiDir string) error
InstallEFIBinaries(rootDir, efiDir, efiPath string) error
SetPersistentVariables(envFile string, vars map[string]string) error
SetDefaultEntry(partMountPoint, imgMountPoint, defaultEntry string) error
}
type BtrfsConfig ¶
type BtrfsConfig struct {
Snapper bool `yaml:"snapper,omitempty" mapstructure:"snapper"`
}
func NewBtrfsConfig ¶
func NewBtrfsConfig() *BtrfsConfig
type BuildConfig ¶
type BuildConfig struct {
Date bool `yaml:"date,omitempty" mapstructure:"date"`
Name string `yaml:"name,omitempty" mapstructure:"name"`
OutDir string `yaml:"output,omitempty" mapstructure:"output"`
Snapshotter SnapshotterConfig `yaml:"snapshotter,omitempty" mapstructure:"snapshotter"`
// 'inline' and 'squash' labels ensure config fields
// are embedded from a yaml and map PoV
Config `yaml:",inline" mapstructure:",squash"`
}
BuildConfig represents the config we need for building isos, raw images, artifacts
func (*BuildConfig) Sanitize ¶
func (b *BuildConfig) Sanitize() error
Sanitize checks the consistency of the struct, returns error if unsolvable inconsistencies are found
type CloudInitRunner ¶
type Config ¶
type Config struct {
Logger Logger
Fs FS
Mounter Mounter
Runner Runner
Syscall SyscallInterface
CloudInitRunner CloudInitRunner
ImageExtractor ImageExtractor
Client HTTPClient
Platform *Platform `yaml:"platform,omitempty" mapstructure:"platform"`
Cosign bool `yaml:"cosign,omitempty" mapstructure:"cosign"`
Verify bool `yaml:"verify,omitempty" mapstructure:"verify"`
TLSVerify bool `yaml:"tls-verify,omitempty" mapstructure:"tls-verify"`
CosignPubKey string `yaml:"cosign-key,omitempty" mapstructure:"cosign-key"`
LocalImage bool `yaml:"local,omitempty" mapstructure:"local"`
Arch string `yaml:"arch,omitempty" mapstructure:"arch"`
SquashFsCompressionConfig []string `yaml:"squash-compression,omitempty" mapstructure:"squash-compression"`
SquashFsNoCompression bool `yaml:"squash-no-compression,omitempty" mapstructure:"squash-no-compression"`
CloudInitPaths []string `yaml:"cloud-init-paths,omitempty" mapstructure:"cloud-init-paths"`
Strict bool `yaml:"strict,omitempty" mapstructure:"strict"`
}
Config is the struct that includes basic and generic configuration of elemental binary runtime. It mostly includes the interfaces used around many methods in elemental code
func (Config) LoadInstallState ¶
func (c Config) LoadInstallState() (*InstallState, error)
LoadInstallState loads the state.yaml file and unmarshals it to an InstallState object
func (*Config) Sanitize ¶
Sanitize checks the consistency of the struct, returns error if unsolvable inconsistencies are found
func (Config) WriteInstallState ¶
func (c Config) WriteInstallState(i *InstallState, statePath, recoveryPath string) error
WriteInstallState writes the state.yaml file to the given state and recovery paths
type DiskSpec ¶
type DiskSpec struct {
Size uint `yaml:"size,omitempty" mapstructure:"size"`
Partitions ElementalPartitions `yaml:"partitions,omitempty" mapstructure:"partitions"`
Expandable bool `yaml:"expandable,omitempty" mapstructure:"expandable"`
System *ImageSource `yaml:"system,omitempty" mapstructure:"system"`
RecoverySystem Image `yaml:"recovery-system,omitempty" mapstructure:"recovery-system"`
GrubConf string
CloudInit []string `yaml:"cloud-init,omitempty" mapstructure:"cloud-init"`
GrubDefEntry string `yaml:"grub-entry-name,omitempty" mapstructure:"grub-entry-name"`
Type string `yaml:"type,omitempty" mapstructure:"type"`
DeployCmd []string `yaml:"deploy-command,omitempty" mapstructure:"deploy-command"`
}
func (DiskSpec) GetGrubLabels ¶
func (*DiskSpec) MinDiskSize ¶
minDiskSize counts the minimum size (MB) required for the disk given the partitions setup
type ElementalPartitions ¶
type ElementalPartitions struct {
BIOS *Partition
Boot *Partition `yaml:"bootloader,omitempty" mapstructure:"bootloader"`
OEM *Partition `yaml:"oem,omitempty" mapstructure:"oem"`
Recovery *Partition `yaml:"recovery,omitempty" mapstructure:"recovery"`
State *Partition `yaml:"state,omitempty" mapstructure:"state"`
Persistent *Partition `yaml:"persistent,omitempty" mapstructure:"persistent"`
}
func NewElementalPartitionsFromList ¶
func NewElementalPartitionsFromList(pl PartitionList, state *InstallState) ElementalPartitions
NewElementalPartitionsFromList fills an ElementalPartitions instance from given partitions list. First tries to match partitions by partition label, if not, it tries to match partitions by filesystem label
func (ElementalPartitions) GetConfigStorage ¶
func (ep ElementalPartitions) GetConfigStorage() string
GetConfigStorage returns the path, usually a mountpoint, of the configuration partition
func (ElementalPartitions) PartitionsByInstallOrder ¶
func (ep ElementalPartitions) PartitionsByInstallOrder(extraPartitions PartitionList, excludes ...*Partition) PartitionList
PartitionsByInstallOrder sorts partitions according to the default layout nil partitons are ignored partition with 0 size is set last
func (ElementalPartitions) PartitionsByMountPoint ¶
func (ep ElementalPartitions) PartitionsByMountPoint(descending bool, excludes ...*Partition) PartitionList
PartitionsByMountPoint sorts partitions according to its mountpoint, ignores nil partitions or partitions with an empty mountpoint
func (*ElementalPartitions) SetFirmwarePartitions ¶
func (ep *ElementalPartitions) SetFirmwarePartitions(firmware string, partTable string) error
SetFirmwarePartitions sets firmware partitions for a given firmware and partition table type
type EphemeralMounts ¶
type EphemeralMounts struct {
Type string `yaml:"type,omitempty" mapstructure:"type"`
Device string `yaml:"device,omitempty" mapstructure:"device"`
Size string `yaml:"size,omitempty" mapstructure:"size"`
Paths []string `yaml:"paths,omitempty" mapstructure:"paths"`
}
EphemeralMounts contains information about the RW overlay mounted over the immutable system.
type FS ¶
type FS interface {
Chmod(name string, mode fs.FileMode) error
Create(name string) (*os.File, error)
Glob(pattern string) ([]string, error)
Link(oldname, newname string) error
Lstat(name string) (fs.FileInfo, error)
Mkdir(name string, perm fs.FileMode) error
Open(name string) (fs.File, error)
OpenFile(name string, flag int, perm fs.FileMode) (*os.File, error)
RawPath(name string) (string, error)
ReadDir(dirname string) ([]fs.DirEntry, error)
ReadFile(filename string) ([]byte, error)
Readlink(name string) (string, error)
Remove(name string) error
RemoveAll(name string) error
Rename(oldpath, newpath string) error
Stat(name string) (fs.FileInfo, error)
Symlink(oldname, newname string) error
WriteFile(filename string, data []byte, perm fs.FileMode) error
}
type HTTPClient ¶
type Image ¶
type Image struct {
File string
Label string `yaml:"label,omitempty" mapstructure:"label"`
Size uint `yaml:"size,omitempty" mapstructure:"size"`
FS string `yaml:"fs,omitempty" mapstructure:"fs"`
Source *ImageSource `yaml:"uri,omitempty" mapstructure:"uri"`
MountPoint string
LoopDevice string
}
Image struct represents a file system image with its commonly configurable values, size in MiB
type ImageExtractor ¶
type ImageSource ¶
type ImageSource struct {
// contains filtered or unexported fields
}
ImageSource represents the source from where an image is created for easy identification
func NewDirSrc ¶
func NewDirSrc(src string) *ImageSource
func NewDockerSrc ¶
func NewDockerSrc(src string) *ImageSource
func NewEmptySrc ¶
func NewEmptySrc() *ImageSource
func NewFileSrc ¶
func NewFileSrc(src string) *ImageSource
func NewSrcFromURI ¶
func NewSrcFromURI(uri string) (*ImageSource, error)
func (*ImageSource) CustomUnmarshal ¶
func (i *ImageSource) CustomUnmarshal(data interface{}) (bool, error)
func (ImageSource) GetDigest ¶
func (i ImageSource) GetDigest() string
func (ImageSource) IsDir ¶
func (i ImageSource) IsDir() bool
func (ImageSource) IsEmpty ¶
func (i ImageSource) IsEmpty() bool
func (ImageSource) IsFile ¶
func (i ImageSource) IsFile() bool
func (ImageSource) IsImage ¶
func (i ImageSource) IsImage() bool
func (ImageSource) MarshalYAML ¶
func (i ImageSource) MarshalYAML() (interface{}, error)
func (*ImageSource) SetDigest ¶
func (i *ImageSource) SetDigest(digest string)
func (ImageSource) String ¶
func (i ImageSource) String() string
func (*ImageSource) UnmarshalYAML ¶
func (i *ImageSource) UnmarshalYAML(value *yaml.Node) error
func (ImageSource) Value ¶
func (i ImageSource) Value() string
type InitSpec ¶
type InitSpec struct {
Mkinitrd bool `yaml:"mkinitrd,omitempty" mapstructure:"mkinitrd"`
Force bool `yaml:"force,omitempty" mapstructure:"force"`
Features []string `yaml:"features,omitempty" mapstructure:"features"`
}
InitSpec struct represents all the init action details
type InstallSpec ¶
type InstallSpec struct {
Target string `yaml:"target,omitempty" mapstructure:"target"`
Firmware string
PartTable string
Partitions ElementalPartitions `yaml:"partitions,omitempty" mapstructure:"partitions"`
ExtraPartitions PartitionList `yaml:"extra-partitions,omitempty" mapstructure:"extra-partitions"`
NoFormat bool `yaml:"no-format,omitempty" mapstructure:"no-format"`
Force bool `yaml:"force,omitempty" mapstructure:"force"`
CloudInit []string `yaml:"cloud-init,omitempty" mapstructure:"cloud-init"`
Iso string `yaml:"iso,omitempty" mapstructure:"iso"`
GrubDefEntry string `yaml:"grub-entry-name,omitempty" mapstructure:"grub-entry-name"`
System *ImageSource `yaml:"system,omitempty" mapstructure:"system"`
RecoverySystem Image `yaml:"recovery-system,omitempty" mapstructure:"recovery-system"`
DisableBootEntry bool `yaml:"disable-boot-entry,omitempty" mapstructure:"disable-boot-entry"`
SnapshotLabels KeyValuePair `yaml:"snapshot-labels,omitempty" mapstructure:"snapshot-labels"`
}
InstallSpec struct represents all the installation action details
func (InstallSpec) GetGrubLabels ¶
func (i InstallSpec) GetGrubLabels() map[string]string
func (*InstallSpec) Sanitize ¶
func (i *InstallSpec) Sanitize() error
Sanitize checks the consistency of the struct, returns error if unsolvable inconsistencies are found
type InstallState ¶
type InstallState struct {
Date string `yaml:"date,omitempty"`
Partitions map[string]*PartitionState `yaml:",omitempty,inline"`
Snapshotter SnapshotterConfig `yaml:"snapshotter,omitempty"`
}
InstallState tracks the installation data of the whole system
type KeyValuePair ¶ added in v2.2.0
func KeyValuePairFromData ¶ added in v2.2.0
func KeyValuePairFromData(data interface{}) (KeyValuePair, error)
KeyValuePairFromData decoded a KeyValuePair object from comma separated strings. The expected format is 'myLabel1=foo,myLabel2=bar'.
type LiveISO ¶
type LiveISO struct {
RootFS []*ImageSource `yaml:"rootfs,omitempty" mapstructure:"rootfs"`
UEFI []*ImageSource `yaml:"uefi,omitempty" mapstructure:"uefi"`
Image []*ImageSource `yaml:"image,omitempty" mapstructure:"image"`
Label string `yaml:"label,omitempty" mapstructure:"label"`
GrubEntry string `yaml:"grub-entry-name,omitempty" mapstructure:"grub-entry-name"`
BootloaderInRootFs bool `yaml:"bootloader-in-rootfs" mapstructure:"bootloader-in-rootfs"`
Firmware string `yaml:"firmware,omitempty" mapstructure:"firmware"`
ExtraCmdline string `yaml:"extra-cmdline,omitempty" mapstructure:"extra-cmdline"`
}
LiveISO represents the configurations needed for a live ISO image
type Logger ¶
type Logger interface {
Info(...interface{})
Warn(...interface{})
Debug(...interface{})
Error(...interface{})
Fatal(...interface{})
Success(...interface{})
Warning(...interface{})
Panic(...interface{})
Trace(...interface{})
Infof(string, ...interface{})
Warnf(string, ...interface{})
Debugf(string, ...interface{})
Errorf(string, ...interface{})
Fatalf(string, ...interface{})
Panicf(string, ...interface{})
Tracef(string, ...interface{})
SetLevel(level log.Level)
GetLevel() log.Level
SetOutput(writer io.Writer)
SetFormatter(formatter log.Formatter)
SetContext(string)
SpinnerStop()
Spinner()
Ask() bool
Screen(string)
}
Logger is the interface we want for our logger, so we can plug different ones easily
func NewBufferLogger ¶
NewBufferLogger will return a logger that stores all logs in a buffer, used mainly for testing
func NewNullLogger ¶
func NewNullLogger() Logger
NewNullLogger will return a logger that discards all logs, used mainly for testing
type LoggerOptions ¶
type LoopDeviceConfig ¶
type LoopDeviceConfig struct {
Size uint `yaml:"size,omitempty" mapstructure:"size"`
FS string `yaml:"fs,omitempty" mapstructure:"fs"`
}
func NewLoopDeviceConfig ¶
func NewLoopDeviceConfig() *LoopDeviceConfig
type MountSpec ¶
type MountSpec struct {
WriteFstab bool `yaml:"write-fstab,omitempty" mapstructure:"write-fstab"`
Disable bool `yaml:"disable,omitempty" mapstructure:"disable"`
Sysroot string `yaml:"sysroot,omitempty" mapstructure:"sysroot"`
Mode string `yaml:"mode,omitempty" mapstructure:"mode"`
SelinuxRelabel bool `yaml:"selinux-relabel,omitempty" mapstructure:"selinux-relabel"`
Volumes []*VolumeMount `yaml:"extra-volumes,omitempty" mapstructure:"extra-volumes"`
Ephemeral EphemeralMounts `yaml:"ephemeral,omitempty" mapstructure:"ephemeral"`
Persistent PersistentMounts `yaml:"persistent,omitempty" mapstructure:"persistent"`
}
MountSpec struct represents all the mount action details
func (*MountSpec) HasPersistent ¶
type Mounter ¶
type Mounter interface {
Mount(source string, target string, fstype string, options []string) error
Unmount(target string) error
IsLikelyNotMountPoint(file string) (bool, error)
}
This is is just a redefinition of mount.Interface to types.Mounter types
func NewDummyMounter ¶
func NewDummyMounter() Mounter
func NewMounter ¶
type Partition ¶
type Partition struct {
Name string
FilesystemLabel string `yaml:"label,omitempty" mapstructure:"label"`
Size uint `yaml:"size,omitempty" mapstructure:"size"`
FS string `yaml:"fs,omitempty" mapstructure:"fs"`
Flags []string `yaml:"flags,omitempty" mapstructure:"flags"`
MountPoint string
Path string
Disk string
}
Partition struct represents a partition with its commonly configurable values, size in MiB
type PartitionList ¶
type PartitionList []*Partition
func (PartitionList) GetByLabel ¶
func (pl PartitionList) GetByLabel(label string) *Partition
GetByLabel gets a partition by its label from the PartitionList
func (PartitionList) GetByName ¶
func (pl PartitionList) GetByName(name string) *Partition
GetByName gets a partitions by its name from the PartitionList
func (PartitionList) GetByNameOrLabel ¶
func (pl PartitionList) GetByNameOrLabel(name, label string) *Partition
GetByNameOrLabel gets a partition by its name or label. It tries by name first
type PartitionState ¶
type PartitionState struct {
FSLabel string `yaml:"label,omitempty"`
RecoveryImage *SystemState `yaml:"recovery,omitempty"`
Snapshots map[int]*SystemState `yaml:"snapshots,omitempty"`
}
PartState tracks installation data of a partition
type PersistentMounts ¶
type PersistentMounts struct {
Mode string `yaml:"mode,omitempty" mapstructure:"mode"`
Paths []string `yaml:"paths,omitempty" mapstructure:"paths"`
Volume VolumeMount `yaml:"volume,omitempty" mapstructure:"volume"`
}
PersistentMounts struct contains settings for which paths to mount as persistent
type Platform ¶
func NewPlatform ¶
func NewPlatformFromArch ¶
func ParsePlatform ¶
func (*Platform) CustomUnmarshal ¶
func (Platform) MarshalYAML ¶
type RealRunner ¶
type RealRunner struct {
Logger Logger
}
func (RealRunner) CommandExists ¶
func (r RealRunner) CommandExists(command string) bool
func (RealRunner) GetLogger ¶
func (r RealRunner) GetLogger() Logger
func (*RealRunner) SetLogger ¶
func (r *RealRunner) SetLogger(logger Logger)
type RealSyscall ¶
type RealSyscall struct{}
func (*RealSyscall) Chdir ¶
func (r *RealSyscall) Chdir(path string) error
func (*RealSyscall) Chroot ¶
func (r *RealSyscall) Chroot(path string) error
type Repository ¶
type Repository struct {
Name string `yaml:"name,omitempty" mapstructure:"name"`
Priority int `yaml:"priority,omitempty" mapstructure:"priority"`
URI string `yaml:"uri,omitempty" mapstructure:"uri"`
Type string `yaml:"type,omitempty" mapstructure:"type"`
Arch string `yaml:"arch,omitempty" mapstructure:"arch"`
ReferenceID string `yaml:"reference,omitempty" mapstructure:"reference"`
}
Repository represents the basic configuration for a package repository
type ResetSpec ¶
type ResetSpec struct {
FormatPersistent bool `yaml:"reset-persistent,omitempty" mapstructure:"reset-persistent"`
FormatOEM bool `yaml:"reset-oem,omitempty" mapstructure:"reset-oem"`
CloudInit []string `yaml:"cloud-init,omitempty" mapstructure:"cloud-init"`
GrubDefEntry string `yaml:"grub-entry-name,omitempty" mapstructure:"grub-entry-name"`
System *ImageSource `yaml:"system,omitempty" mapstructure:"system"`
Partitions ElementalPartitions
Target string
Efi bool
State *InstallState
DisableBootEntry bool `yaml:"disable-boot-entry,omitempty" mapstructure:"disable-boot-entry"`
SnapshotLabels KeyValuePair `yaml:"snapshot-labels,omitempty" mapstructure:"snapshot-labels"`
}
ResetSpec struct represents all the reset action details
func (ResetSpec) GetGrubLabels ¶
type RunConfig ¶
type RunConfig struct {
Reboot bool `yaml:"reboot,omitempty" mapstructure:"reboot"`
PowerOff bool `yaml:"poweroff,omitempty" mapstructure:"poweroff"`
EjectCD bool `yaml:"eject-cd,omitempty" mapstructure:"eject-cd"`
Snapshotter SnapshotterConfig `yaml:"snapshotter,omitempty" mapstructure:"snapshotter"`
// 'inline' and 'squash' labels ensure config fields
// are embedded from a yaml and map PoV
Config `yaml:",inline" mapstructure:",squash"`
}
type Snapshotter ¶
type Snapshotter interface {
InitSnapshotter(state *Partition, efiDir string) error
StartTransaction() (*Snapshot, error)
CloseTransaction(snap *Snapshot) error
CloseTransactionOnError(snap *Snapshot) error
DeleteSnapshot(id int) error
GetSnapshots() ([]int, error)
SnapshotToImageSource(snap *Snapshot) (*ImageSource, error)
}
type SnapshotterConfig ¶
type SnapshotterConfig struct {
Type string `yaml:"type,omitempty" mapstructure:"type"`
MaxSnaps int `yaml:"max-snaps,omitempty" mapstructure:"max-snaps"`
Config interface{} `yaml:"config,omitempty" mapstructure:"config"`
}
func NewBtrfs ¶
func NewBtrfs() SnapshotterConfig
func NewLoopDevice ¶
func NewLoopDevice() SnapshotterConfig
func (*SnapshotterConfig) CustomUnmarshal ¶
func (c *SnapshotterConfig) CustomUnmarshal(data interface{}) (bool, error)
func (*SnapshotterConfig) UnmarshalYAML ¶
func (c *SnapshotterConfig) UnmarshalYAML(node *yaml.Node) error
type SourceNotFound ¶
type SourceNotFound struct {
}
SourceNotFound is the error to raise when we can't find a source for install/upgrade
func (*SourceNotFound) Error ¶
func (s *SourceNotFound) Error() string
type SyscallInterface ¶
type SystemState ¶
type SystemState struct {
Source *ImageSource `yaml:"source,omitempty"`
Digest string `yaml:"digest,omitempty"`
Active bool `yaml:"active,omitempty"`
Label string `yaml:"label,omitempty"` // Only meaningful for the recovery image
FS string `yaml:"fs,omitempty"` // Only meaningful for the recovery image
Labels map[string]string `yaml:"labels,omitempty"`
Date string `yaml:"date,omitempty"`
FromAction string `yaml:"fromAction,omitempty"`
}
SystemState represents data of a deployed OS image
type UpgradeSpec ¶
type UpgradeSpec struct {
RecoveryUpgrade bool `yaml:"recovery,omitempty" mapstructure:"recovery"`
System *ImageSource `yaml:"system,omitempty" mapstructure:"system"`
RecoverySystem Image `yaml:"recovery-system,omitempty" mapstructure:"recovery-system"`
GrubDefEntry string `yaml:"grub-entry-name,omitempty" mapstructure:"grub-entry-name"`
BootloaderUpgrade bool `yaml:"bootloader,omitempty" mapstructure:"bootloader"`
SnapshotLabels KeyValuePair `yaml:"snapshot-labels,omitempty" mapstructure:"snapshot-labels"`
Partitions ElementalPartitions
State *InstallState
}
func (UpgradeSpec) GetGrubLabels ¶
func (u UpgradeSpec) GetGrubLabels() map[string]string
func (*UpgradeSpec) Sanitize ¶
func (u *UpgradeSpec) Sanitize() error
Sanitize checks the consistency of the struct, returns error if unsolvable inconsistencies are found
func (*UpgradeSpec) SanitizeForRecoveryOnly ¶
func (u *UpgradeSpec) SanitizeForRecoveryOnly() error
SanitizeForRecoveryOnly sanitizes UpgradeSpec when upgrading recovery only.