seed

package
v0.0.0-...-35e1b89 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package seed offers a number of useful functions to parse the user provided initial seed data/configuration.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSeedData = errors.New("no seed data present in the partition")

ErrNoSeedData is returned when a partition could be found but no data was found in it.

View Source
var ErrNoSeedPartition = errors.New("no seed partition could be found")

ErrNoSeedPartition is returned when the seed partition couldn't be found.

View Source
var ErrNoSeedSection = errors.New("requested seed section couldn't be found")

ErrNoSeedSection is returned when the seed data is available but the requested section/file couldn't be found.

Functions

func GetApplications

func GetApplications(_ context.Context, partition string) (*apiseed.Applications, error)

GetApplications extracts the list of applications from the seed data.

func GetIncus

func GetIncus(_ context.Context, partition string) (*apiseed.Incus, error)

GetIncus extracts the Incus preseed from the seed data.

func GetInstall

func GetInstall(partition string) (*apiseed.Install, error)

GetInstall extracts the installation config from the seed data.

func GetMigrationManager

func GetMigrationManager(_ context.Context, partition string) (*apiseed.MigrationManager, error)

GetMigrationManager extracts the Migration Manager preseed from the seed data.

func GetNetwork

func GetNetwork(ctx context.Context, partition string) (*api.SystemNetworkConfig, error)

GetNetwork extracts the network configuration from the seed data. If no seed network found, a default minimal network config will be returned.

func GetOperationsCenter

func GetOperationsCenter(_ context.Context, partition string) (*apiseed.OperationsCenter, error)

GetOperationsCenter extracts the Operations Center preseed from the seed data.

func GetProvider

func GetProvider(_ context.Context, partition string) (*apiseed.Provider, error)

GetProvider extracts the provider configuration from the seed data.

func GetSeedPath

func GetSeedPath() string

GetSeedPath defines the path to the expected seed configuration. It will first search for any disk with a "SEED_DATA" label, which would be externally provided by the user. If not found, defaults to the "seed-data" partition that exists on install media.

func IsMissing

func IsMissing(e error) bool

IsMissing checks whether the provided error is an expected error for missing seed data.

func NetworkConfigHasEmptyDevices

func NetworkConfigHasEmptyDevices(networkCfg api.SystemNetworkConfig) bool

NetworkConfigHasEmptyDevices checks if any device (interface, bond, or vlan) is defined in the given config.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL