bootstrap

package
v0.0.0-...-0a271de Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: AGPL-3.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGlobalModelRecord

func CreateGlobalModelRecord(
	modelID coremodel.UUID,
	args model.GlobalModelCreationArgs,
) internaldatabase.BootstrapOpt

CreateGlobalModelRecord is responsible for making a new model with all of its associated metadata during the bootstrap process. If the GlobalModelCreationArgs does not have a credential name set then no cloud credential will be associated with the model.

The following error types can be expected to be returned: - modelerrors.AlreadyExists: When the model UUID is already in use or a model with the same name and owner already exists. - errors.NotFound: When the cloud, cloud region, or credential do not exist. - errors.NotValid: When the model UUID is not valid. - [modelerrors.AgentVersionNotSupported] - [usererrors.NotFound] When the model owner does not exist. - secretbackenderrors.NotFound When the secret backend for the model cannot be found.

CreateGlobalModelRecord expects the caller to generate their own model ID and pass it to this function. In an ideal world we want to have this stopped and make this function generate a new ID and return the value. This can only be achieved once we have the Juju client stop generating IDs for controller models in the bootstrap process.

func CreateLocalModelRecord

func CreateLocalModelRecord(
	id coremodel.UUID,
	controllerUUID uuid.UUID,
	agentVersion version.Number,
) internaldatabase.BootstrapOpt

CreateLocalModelRecord creates a new model within the model database with all of its associated metadata.

func SetModelConstraints

func SetModelConstraints(cons coreconstraints.Value) internaldatabase.BootstrapOpt

SetModelConstraints sets the constraints for the controller model during bootstrap. The following error types can be expected: - [networkerrors.SpaceNotFound]: when a space constraint is set but the space does not exist. - [machineerrors.InvalidContainerType]: when the container type set on the constraints is invalid. - [modelerrors.NotFound]: when no model exists to set constraints for.

Types

This section is empty.

Jump to

Keyboard shortcuts

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