Documentation ¶
Overview ¶
* Copyright (C) 2019 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. *
* Copyright (C) 2019 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. *
* Copyright (C) 2019 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. *
* Copyright (C) 2019 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. *
* Copyright (C) 2019 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. *
* Copyright (C) 2019 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. *
* Copyright (C) 2019 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. *
* Copyright (C) 2019 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. *
* Copyright (C) 2019 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. *
Index ¶
- Constants
- Variables
- func FindDeviceForStructure(ps *LaidOutStructure) (string, error)
- func FindMountPointForStructure(ps *LaidOutStructure) (string, error)
- func MkfsExt4(img, label, contentsRootDir string) error
- func MkfsVfat(img, label, contentsRootDir string) error
- func MockUpdaterForStructure(mock func(ps *LaidOutStructure, rootDir, rollbackDir string) (Updater, error)) (restore func())
- func Partition(image string, pv *LaidOutVolume) error
- func Update(old, new GadgetData, rollbackDirPath string) error
- type Connection
- type ConnectionPlug
- type ConnectionSlot
- type FilesystemImageWriter
- type GadgetData
- type Info
- type LaidOutContent
- type LaidOutStructure
- type LaidOutVolume
- type LayoutConstraints
- type MkfsFunc
- type MountedFilesystemUpdater
- type MountedFilesystemWriter
- type OffsetWriter
- type PartiallyLaidOutVolume
- type PostStageFunc
- type RawStructureUpdater
- type RawStructureWriter
- type RelativeOffset
- type Size
- type Updater
- type Volume
- type VolumeContent
- type VolumeStructure
- type VolumeUpdate
Constants ¶
const ( // MBR identifies a Master Boot Record partitioning schema, or an MBR like role MBR = "mbr" // GPT identifies a GUID Partition Table partitioning schema GPT = "gpt" SystemBoot = "system-boot" SystemData = "system-data" BootImage = "system-boot-image" BootSelect = "system-boot-select" // ImplicitSystemDataLabel is the implicit filesystem label of structure // of system-data role ImplicitSystemDataLabel = "writable" // only supported for legacy reasons LegacyBootImage = "bootimg" LegacyBootSelect = "bootselect" )
const ( SizeKiB = Size(1 << 10) SizeMiB = Size(1 << 20) SizeGiB = Size(1 << 30) // SizeMBR is the maximum byte size of a structure of role 'mbr' SizeMBR = Size(446) // SizeLBA48Pointer is the byte size of a pointer value written at the // location described by 'offset-write' SizeLBA48Pointer = Size(4) )
Variables ¶
var ErrDeviceNotFound = errors.New("device not found")
var ErrMountNotFound = errors.New("mount point not found")
var ErrNoFilesystemDefined = errors.New("no filesystem defined")
var (
ErrNoUpdate = errors.New("nothing to update")
)
Functions ¶
func FindDeviceForStructure ¶
func FindDeviceForStructure(ps *LaidOutStructure) (string, error)
FindDeviceForStructure attempts to find an existing block device matching given volume structure, by inspecting its name and, optionally, the filesystem label. Assumes that the host's udev has set up device symlinks correctly.
func FindMountPointForStructure ¶
func FindMountPointForStructure(ps *LaidOutStructure) (string, error)
FindMountPointForStructure locates a mount point of a device that matches given structure. The structure must have a filesystem defined, otherwise an error is raised.
func MkfsExt4 ¶
MkfsExt4 creates an EXT4 filesystem in given image file, with an optional filesystem label, and populates it with the contents of provided root directory.
func MkfsVfat ¶
MkfsVfat creates a VFAT filesystem in given image file, with an optional filesystem label, and populates it with the contents of provided root directory.
func MockUpdaterForStructure ¶
func MockUpdaterForStructure(mock func(ps *LaidOutStructure, rootDir, rollbackDir string) (Updater, error)) (restore func())
MockUpdaterForStructure replace internal call with a mocked one, for use in tests only
func Partition ¶
func Partition(image string, pv *LaidOutVolume) error
func Update ¶
func Update(old, new GadgetData, rollbackDirPath string) error
Update applies the gadget update given the gadget information and data from old and new revisions. It errors out when the update is not possible or illegal, or a failure occurs at any of the steps. When there is no update, a special error ErrNoUpdate is returned.
Updates are opt-in, and are only applied to structures with a higher value of Edition field in the new gadget definition.
Data that would be modified during the update is first backed up inside the rollback directory. Should the apply step fail, the modified data is recovered.
Types ¶
type Connection ¶
type Connection struct { Plug ConnectionPlug `yaml:"plug"` Slot ConnectionSlot `yaml:"slot"` }
GadgetConnect describes an interface connection requested by the gadget between seeded snaps. The syntax is of a mapping like:
plug: (<plug-snap-id>|system):plug [slot: (<slot-snap-id>|system):slot]
"system" indicates a system plug or slot. Fully omitting the slot part indicates a system slot with the same name as the plug.
type ConnectionPlug ¶
func (*ConnectionPlug) Empty ¶
func (gcplug *ConnectionPlug) Empty() bool
func (*ConnectionPlug) UnmarshalYAML ¶
func (gcplug *ConnectionPlug) UnmarshalYAML(unmarshal func(interface{}) error) error
type ConnectionSlot ¶
func (*ConnectionSlot) Empty ¶
func (gcslot *ConnectionSlot) Empty() bool
func (*ConnectionSlot) UnmarshalYAML ¶
func (gcslot *ConnectionSlot) UnmarshalYAML(unmarshal func(interface{}) error) error
type FilesystemImageWriter ¶
type FilesystemImageWriter struct {
// contains filtered or unexported fields
}
FilesystemImageWriter is capable of creating filesystem images described by laid out structures.
func NewFilesystemImageWriter ¶
func NewFilesystemImageWriter(contentDir string, ps *LaidOutStructure, workDir string) (*FilesystemImageWriter, error)
NewFilesystemImageWriter returns a writer capable of creating filesystem images corresponding to the provided structure, with content from the given content directory. A staging directory will be created in either, the optionally provided work directory, or the default temp location.
func (*FilesystemImageWriter) Write ¶
func (f *FilesystemImageWriter) Write(fname string, postStage PostStageFunc) error
Write creates the filesystem inside the provided image file and populates it with data according to content declartion of the structure. Content data is staged in a temporary location. An optional post-stage helper function can be used to manipulate the data before it is copied over to the image.
type GadgetData ¶
type GadgetData struct { // Info is the gadget metadata Info *Info // RootDir is the root directory of gadget snap data RootDir string }
GadgetData holds references to a gadget revision metadata and its data directory.
type Info ¶
type Info struct { Volumes map[string]Volume `yaml:"volumes,omitempty"` // Default configuration for snaps (snap-id => key => value). Defaults map[string]map[string]interface{} `yaml:"defaults,omitempty"` Connections []Connection `yaml:"connections"` }
type LaidOutContent ¶
type LaidOutContent struct { *VolumeContent // StartOffset defines the start offset of this content image StartOffset Size // AbsoluteOffsetWrite is the resolved absolute position of offset-write // for this content element within the enclosing volume AbsoluteOffsetWrite *Size // Size is the maximum size occupied by this image Size Size // Index of the content in structure declaration inside gadget YAML Index int }
LaidOutContent describes raw content that has been placed within the encompassing structure and volume
func (LaidOutContent) String ¶
func (p LaidOutContent) String() string
type LaidOutStructure ¶
type LaidOutStructure struct { *VolumeStructure // StartOffset defines the start offset of the structure within the // enclosing volume StartOffset Size // AbsoluteOffsetWrite is the resolved absolute position of offset-write // for this structure element within the enclosing volume AbsoluteOffsetWrite *Size // Index of the structure definition in gadget YAML Index int // LaidOutContent is a list of raw content inside the structure LaidOutContent []LaidOutContent }
LaidOutStructure describes a VolumeStructure that has been placed within the volume
func ShiftStructureTo ¶
func ShiftStructureTo(ps LaidOutStructure, offset Size) LaidOutStructure
ShiftStructureTo translates the starting offset of a laid out structure and its content to the provided offset.
func (LaidOutStructure) String ¶
func (p LaidOutStructure) String() string
type LaidOutVolume ¶
type LaidOutVolume struct { *Volume // Size is the total size of the volume Size Size // SectorSize sector size of the volume SectorSize Size // LaidOutStructure is a list of structures within the volume, sorted // by their start offsets LaidOutStructure []LaidOutStructure // RootDir is the root directory for volume data RootDir string }
LaidOutVolume defines the size of a volume and arrangement of all the structures within it
func LayoutVolume ¶
func LayoutVolume(gadgetRootDir string, volume *Volume, constraints LayoutConstraints) (*LaidOutVolume, error)
LayoutVolume attempts to completely lay out the volume, that is the structures and their content, using provided constraints
type LayoutConstraints ¶
type LayoutConstraints struct { // NonMBRStartOffset is the default start offset of non-MBR structure in // the volume. NonMBRStartOffset Size // SectorSize is the size of the sector to be used for calculations SectorSize Size }
LayoutConstraints defines the constraints for arranging structures within a volume
type MountedFilesystemUpdater ¶
type MountedFilesystemUpdater struct { *MountedFilesystemWriter // contains filtered or unexported fields }
MountedFilesystemUpdater assits in applying updates to a mounted filesystem.
The update process is composed of 2 main passes, and an optional rollback:
1) backup, where update data and current data is analyzed to identify identical content, stamp files are created for entries that are to be preserved, modified or otherwise touched by the update, that is, for existing files that would be created/overwritten, ones that are explicitly listed as preserved, or directories to be written to
2) update, where update data is written to the target location
3) rollback (optional), where update data is rolled back and replaced with backup copies of files, newly created directories are removed
func NewMountedFilesystemUpdater ¶
func NewMountedFilesystemUpdater(rootDir string, ps *LaidOutStructure, backupDir string, mountLookup mountLookupFunc) (*MountedFilesystemUpdater, error)
NewMountedFilesystemUpdater returns an updater for given filesystem structure, with structure content coming from provided root directory. The mount is located by calling a mount lookup helper. The backup directory contains backup state information for use during rollback.
func (*MountedFilesystemUpdater) Backup ¶
func (f *MountedFilesystemUpdater) Backup() error
Backup analyzes a mounted filesystem and prepares a rollback state should the update be applied. The content of the filesystem is processed, files and directories that would be modified by the update are backed up, while identical/preserved files may be stamped to improve the later step of update process.
The backup directory structure mirrors the the structure of destination location. Given the following destination structure:
foo ├── a ├── b ├── bar │ ├── baz │ │ └── d │ └── z └── c
The structure of backup looks like this:
foo-backup ├── a.backup <-- backup copy of ./a ├── bar │ ├── baz │ │ └── d.backup <-- backup copy of ./bar/baz/d │ └── baz.backup <-- stamp indicating ./bar/baz existed before the update ├── bar.backup <-- stamp indicating ./bar existed before the update ├── b.same <-- stamp indicating ./b is identical to the update data └── c.preserve <-- stamp indicating ./c is to be preserved
func (*MountedFilesystemUpdater) Rollback ¶
func (f *MountedFilesystemUpdater) Rollback() error
Rollback attempts to revert changes done by the update step, using state information collected during backup phase. Files that were modified by the update are stored from their backup copies, newly added directories are removed.
func (*MountedFilesystemUpdater) Update ¶
func (f *MountedFilesystemUpdater) Update() error
Update applies an update to a mounted filesystem. The caller must have executed a Backup() before, to prepare a data set for rollback purpose.
type MountedFilesystemWriter ¶
type MountedFilesystemWriter struct {
// contains filtered or unexported fields
}
MountedFilesystemWriter assists in writing contents of a structure to a mounted filesystem.
func NewMountedFilesystemWriter ¶
func NewMountedFilesystemWriter(contentDir string, ps *LaidOutStructure) (*MountedFilesystemWriter, error)
NewMountedFilesystemWriter returns a writer capable of writing provided structure, with content of the structure stored in the given root directory.
func (*MountedFilesystemWriter) Write ¶
func (m *MountedFilesystemWriter) Write(whereDir string, preserve []string) error
Write writes structure data into provided directory. All existing files are overwritten, unless their paths, relative to target directory, are listed in the preserve list. Permission bits and ownership of updated entries is not preserved.
type OffsetWriter ¶
type OffsetWriter struct {
// contains filtered or unexported fields
}
OffsetWriter implements support for writing the start offsets of structure and its content at locations defined by offset-write property. structures and their content.
func NewOffsetWriter ¶
func NewOffsetWriter(ps *LaidOutStructure, sectorSize Size) (*OffsetWriter, error)
NewOffsetWriter returns a writer for given structure.
func (*OffsetWriter) Write ¶
func (w *OffsetWriter) Write(out io.WriteSeeker) error
Write writes the start offset of the structure and the raw content of the structure, at the locations defined by offset-writer property of respective element, in the format of LBA pointer.
type PartiallyLaidOutVolume ¶
type PartiallyLaidOutVolume struct { *Volume // SectorSize sector size of the volume SectorSize Size // LaidOutStructure is a list of structures within the volume, sorted // by their start offsets LaidOutStructure []LaidOutStructure }
PartiallyLaidOutVolume defines the layout of volume structures, but lacks the details about the layout of raw image content within the bare structures.
func LayoutVolumePartially ¶
func LayoutVolumePartially(volume *Volume, constraints LayoutConstraints) (*PartiallyLaidOutVolume, error)
LayoutVolumePartially attempts to lay out only the structures in the volume using provided constraints
type PostStageFunc ¶
type PostStageFunc func(rootDir string, ps *LaidOutStructure) error
PostStageFunc is called after the filesystem contents for the given structure have been staged at a temporary location, but before the filesystem image is created. The function can be used to manipulate the staged data.
type RawStructureUpdater ¶
type RawStructureUpdater struct { *RawStructureWriter // contains filtered or unexported fields }
RawStructureUpdater implements support for updating raw (bare) structures.
func NewRawStructureUpdater ¶
func NewRawStructureUpdater(contentDir string, ps *LaidOutStructure, backupDir string, deviceLookup deviceLookupFunc) (*RawStructureUpdater, error)
NewRawStructureUpdater returns an updater for the given raw (bare) structure. Update data will be loaded from the provided gadget content directory. Backups of replaced structures are temporarily kept in the rollback directory.
func (*RawStructureUpdater) Backup ¶
func (r *RawStructureUpdater) Backup() error
Backup attempts to analyze and prepare a backup copy of data that will be replaced during subsequent update. Backups are kept in the backup directory passed to NewRawStructureUpdater(). Each region replaced by new content is copied out to a separate file. Only differing regions are backed up. Analysis and backup of each region is checkpointed. Regions that have been backed up or determined to be identical will not be analyzed on subsequent calls.
func (*RawStructureUpdater) Rollback ¶
func (r *RawStructureUpdater) Rollback() error
Rollback attempts to restore original content from the backup copies prepared during Backup().
func (*RawStructureUpdater) Update ¶
func (r *RawStructureUpdater) Update() error
Update attempts to update the structure. The structure must have been analyzed and backed up by a prior Backup() call.
type RawStructureWriter ¶
type RawStructureWriter struct {
// contains filtered or unexported fields
}
RawStructureWriter implements support for writing raw (bare) structures.
func NewRawStructureWriter ¶
func NewRawStructureWriter(contentDir string, ps *LaidOutStructure) (*RawStructureWriter, error)
NewRawStructureWriter returns a writer for the given structure, that will load the structure content data from the provided gadget content directory.
func (*RawStructureWriter) Write ¶
func (r *RawStructureWriter) Write(out io.WriteSeeker) error
Write will write whole contents of a structure into the output stream.
type RelativeOffset ¶
type RelativeOffset struct { // RelativeTo names the structure relative to which the location of the // address write will be calculated. RelativeTo string // Offset is a 32-bit value Offset Size }
RelativeOffset describes an offset where structure data is written at. The position can be specified as byte-offset relative to the start of another named structure.
func ParseRelativeOffset ¶
func ParseRelativeOffset(grs string) (*RelativeOffset, error)
ParseRelativeOffset parses a string describing an offset that can be expressed relative to a named structure, with the format: [<name>+]<size>.
func (*RelativeOffset) String ¶
func (r *RelativeOffset) String() string
func (*RelativeOffset) UnmarshalYAML ¶
func (s *RelativeOffset) UnmarshalYAML(unmarshal func(interface{}) error) error
type Size ¶
type Size uint64
Size describes the size of a structure item or an offset within the structure.
func FindDeviceForStructureWithFallback ¶
func FindDeviceForStructureWithFallback(ps *LaidOutStructure) (dev string, offs Size, err error)
FindDeviceForStructureWithFallback attempts to find an existing block device partition containing given non-filesystem volume structure, by inspecting the structure's name.
Should there be no match, attempts to find the block device corresponding to the volume enclosing the structure under the following conditions:
- the structure has no filesystem
- and the structure is of type: bare (no partition table entry)
- or the structure has no name, but a partition table entry (hence no label by which we could find it)
The fallback mechanism uses the fact that Core devices always have a mount at /writable. The system is booted from the parent of the device mounted at /writable.
Returns the device name and an offset at which the structure content starts within the device or an error.
func ParseSize ¶
ParseSize parses a string expressing size in gadget declaration. The accepted format is one of: <bytes> | <bytes/2^20>M | <bytes/2^30>G.
func (*Size) UnmarshalYAML ¶
type Volume ¶
type Volume struct { // Schema describes the schema used for the volume Schema string `yaml:"schema"` // Bootloader names the bootloader used by the volume Bootloader string `yaml:"bootloader"` // ID is a 2-hex digit disk ID or GPT GUID ID string `yaml:"id"` // Structure describes the structures that are part of the volume Structure []VolumeStructure `yaml:"structure"` }
Volume defines the structure and content for the image to be written into a block device.
func (*Volume) EffectiveSchema ¶
type VolumeContent ¶
type VolumeContent struct { // Source is the data of the partition relative to the gadget base // directory Source string `yaml:"source"` // Target is the location of the data inside the root filesystem Target string `yaml:"target"` // Image names the image, relative to gadget base directory, to be used // for a 'bare' type structure Image string `yaml:"image"` // Offset the image is written at Offset *Size `yaml:"offset"` // OffsetWrite describes a 32-bit address, within the volume, at which // the offset of current image will be written. The position may be // specified as a byte offset relative to the start of a named structure OffsetWrite *RelativeOffset `yaml:"offset-write"` // Size of the image, when empty size is calculated by looking at the // image Size Size `yaml:"size"` Unpack bool `yaml:"unpack"` }
VolumeContent defines the contents of the structure. The content can be either files within a filesystem described by the structure or raw images written into the area of a bare structure.
func (VolumeContent) String ¶
func (vc VolumeContent) String() string
type VolumeStructure ¶
type VolumeStructure struct { // Name, when non empty, provides the name of the structure Name string `yaml:"name"` // Label provides the filesystem label Label string `yaml:"filesystem-label"` // Offset defines a starting offset of the structure Offset *Size `yaml:"offset"` // OffsetWrite describes a 32-bit address, within the volume, at which // the offset of current structure will be written. The position may be // specified as a byte offset relative to the start of a named structure OffsetWrite *RelativeOffset `yaml:"offset-write"` // Size of the structure Size Size `yaml:"size"` // Type of the structure, which can be 2-hex digit MBR partition, // 36-char GUID partition, comma separated <mbr>,<guid> for hybrid // partitioning schemes, or 'bare' when the structure is not considered // a partition. // // For backwards compatibility type 'mbr' is also accepted, and the // structure is treated as if it is of role 'mbr'. Type string `yaml:"type"` // Role describes the role of given structure, can be one of 'mbr', // 'system-data', 'system-boot', 'bootimg', 'bootselect'. Structures of type 'mbr', must have a // size of 446 bytes and must start at 0 offset. Role string `yaml:"role"` // ID is the GPT partition ID ID string `yaml:"id"` // Filesystem used for the partition, 'vfat', 'ext4' or 'none' for // structures of type 'bare' Filesystem string `yaml:"filesystem"` // Content of the structure Content []VolumeContent `yaml:"content"` Update VolumeUpdate `yaml:"update"` }
VolumeStructure describes a single structure inside a volume. A structure can represent a partition, Master Boot Record, or any other contiguous range within the volume.
func (*VolumeStructure) EffectiveFilesystemLabel ¶
func (vs *VolumeStructure) EffectiveFilesystemLabel() string
EffectiveFilesystemLabel returns the effective filesystem label, either explicitly provided or implied by the structure's role
func (*VolumeStructure) EffectiveRole ¶
func (vs *VolumeStructure) EffectiveRole() string
EffectiveRole returns the role of given structure
func (*VolumeStructure) IsBare ¶
func (vs *VolumeStructure) IsBare() bool
IsBare returns true if the structure is not using a filesystem.
type VolumeUpdate ¶
type VolumeUpdate struct { Edition editionNumber `yaml:"edition"` Preserve []string `yaml:"preserve"` }