Documentation
¶
Overview ¶
Package seed offers a number of useful functions to parse the user provided initial seed data/configuration.
Index ¶
- Variables
- func GetApplications(_ context.Context, partition string) (*apiseed.Applications, error)
- func GetIncus(_ context.Context, partition string) (*apiseed.Incus, error)
- func GetInstall(partition string) (*apiseed.Install, error)
- func GetMigrationManager(_ context.Context, partition string) (*apiseed.MigrationManager, error)
- func GetNetwork(ctx context.Context, partition string) (*api.SystemNetworkConfig, error)
- func GetOperationsCenter(_ context.Context, partition string) (*apiseed.OperationsCenter, error)
- func GetProvider(_ context.Context, partition string) (*apiseed.Provider, error)
- func GetSeedPath() string
- func IsMissing(e error) bool
- func NetworkConfigHasEmptyDevices(networkCfg api.SystemNetworkConfig) bool
Constants ¶
This section is empty.
Variables ¶
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.
var ErrNoSeedPartition = errors.New("no seed partition could be found")
ErrNoSeedPartition is returned when the seed partition couldn't be found.
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 ¶
GetApplications extracts the list of applications from the seed data.
func GetInstall ¶
GetInstall extracts the installation config from the seed data.
func GetMigrationManager ¶
GetMigrationManager extracts the Migration Manager preseed from the seed data.
func GetNetwork ¶
GetNetwork extracts the network configuration from the seed data. If no seed network found, a default minimal network config will be returned.
func GetOperationsCenter ¶
GetOperationsCenter extracts the Operations Center preseed from the seed data.
func GetProvider ¶
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 ¶
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.