Documentation ¶
Index ¶
- func CheckActiveDeployment(c v1.Config, labels []string) bool
- func CopyCloudConfig(c v1.Config, path string, cloudInit []string) (err error)
- func CopyFileImg(c v1.Config, img *v1.Image) error
- func CreateFileSystemImage(c v1.Config, img *v1.Image, rootDir string, preload bool) error
- func CreateImageFromTree(c v1.Config, img *v1.Image, rootDir string, preload bool, ...) (err error)
- func DeactivateDevices(c v1.Config) error
- func DeployImage(c v1.Config, img *v1.Image) (interface{}, error)
- func DeployImgTree(c v1.Config, img *v1.Image, root string) (info interface{}, cleaner func() error, err error)
- func DumpSource(c v1.Config, target string, imgSrc *v1.ImageSource) (info interface{}, err error)
- func FormatPartition(c v1.Config, part *v1.Partition, opts ...string) error
- func GetTempDir(c v1.Config, suffix string) string
- func IsMounted(c v1.Config, part *v1.Partition) (bool, error)
- func MountFileSystemImage(c v1.Config, img *v1.Image, opts ...string) error
- func MountPartition(c v1.Config, part *v1.Partition, opts ...string) error
- func MountPartitions(c v1.Config, parts v1.PartitionList) error
- func MountRWPartition(c v1.Config, part *v1.Partition) (umount func() error, err error)
- func PartitionAndFormatDevice(c v1.Config, i *v1.InstallSpec) error
- func SelinuxRelabel(c v1.Config, rootDir string, raiseError bool) error
- func SourceFormISO(c v1.Config, iso string) (*v1.ImageSource, func() error, error)
- func UnmountFileSystemImage(c v1.Config, img *v1.Image) error
- func UnmountPartition(c v1.Config, part *v1.Partition) error
- func UnmountPartitions(c v1.Config, parts v1.PartitionList) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckActiveDeployment ¶ added in v1.2.0
CheckActiveDeployment returns true if at least one of the provided filesystem labels is found within the system
func CopyCloudConfig ¶ added in v1.2.0
CopyCloudConfig will check if there is a cloud init in the config and store it on the target
func CopyFileImg ¶ added in v1.2.0
CopyFileImg copies the files target as the source of this image. It also applies the img label over the copied image.
func CreateFileSystemImage ¶ added in v1.2.0
CreateFileSystemImage creates the image file for the given image. An root tree path can be used to determine the image size and the preload flag can be used to create an image including the root tree data.
func CreateImageFromTree ¶ added in v1.2.0
func CreateImageFromTree(c v1.Config, img *v1.Image, rootDir string, preload bool, cleaners ...func() error) (err error)
CreateImageFromTree creates the given image including the given root tree. If preload flag is true it attempts to preload the root tree at filesystem format time. This allows creating images with the given root tree without the need of mounting them.
func DeactivateDevices ¶ added in v1.2.0
DeactivateDevice deactivates unmounted the block devices present within the system. Useful to deactivate LVM volumes, if any, related to the target device.
func DeployImage ¶ added in v1.2.0
DeployImage will deploy the given image into the target. This method creates the filesystem image file and fills it with the correspondant data
func DeployImgTree ¶ added in v1.2.0
func DeployImgTree(c v1.Config, img *v1.Image, root string) (info interface{}, cleaner func() error, err error)
DeployImgTree will deploy the given image into the given root tree. Returns source metadata in info, a tree cleaner function and error. The given root will be a bind mount of a temporary directory into the same filesystem of img.File, this is helpful to make the deployment easily accessible in after-* hooks.
func DumpSource ¶ added in v1.2.0
DumpSource sets the image data according to the image source type
func FormatPartition ¶ added in v1.2.0
FormatPartition will format an already existing partition
func GetTempDir ¶ added in v1.2.0
GetTempDir returns the dir for storing related temporal files It will respect TMPDIR and use that if exists, fallback to try the persistent partition if its mounted and finally the default /tmp/ dir suffix is what is appended to the dir name elemental-suffix. If empty it will randomly generate a number
func MountFileSystemImage ¶ added in v1.2.0
MountFileSystemImage mounts an image with the given mount options
func MountPartition ¶ added in v1.2.0
MountPartition mounts a partition with the given mount options
func MountPartitions ¶ added in v1.2.0
func MountPartitions(c v1.Config, parts v1.PartitionList) error
MountPartitions mounts configured partitions. Partitions with an unset mountpoint are not mounted. Note umounts must be handled by caller logic.
func MountRWPartition ¶ added in v1.2.0
MountRWPartition mounts, or remounts if needed, a partition with RW permissions
func PartitionAndFormatDevice ¶ added in v1.2.0
func PartitionAndFormatDevice(c v1.Config, i *v1.InstallSpec) error
PartitionAndFormatDevice creates a new empty partition table on target disk and applies the configured disk layout by creating and formatting all required partitions
func SelinuxRelabel ¶ added in v1.2.0
SelinuxRelabel will relabel the system if it finds the binary and the context
func SourceFormISO ¶ added in v1.2.0
SourceISO downloads an ISO in a temporary folder, mounts it and returns the image source to be used Returns a source and cleaner method to unmount and remove the temporary folder afterwards.
func UnmountFileSystemImage ¶ added in v1.2.0
UnmountFilesystemImage unmounts the given image or does nothing if not mounted
func UnmountPartition ¶ added in v1.2.0
UnmountPartition unmounts the given partition or does nothing if not mounted
func UnmountPartitions ¶ added in v1.2.0
func UnmountPartitions(c v1.Config, parts v1.PartitionList) error
UnmountPartitions unmounts configured partitiosn. Partitions with an unset mountpoint are not unmounted.
Types ¶
This section is empty.