Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateModel ¶
func CreateModel( modelID coremodel.UUID, args model.ModelCreationArgs, ) internaldatabase.BootstrapOpt
CreateModel is responsible for making a new model with all of its associated metadata during the bootstrap process. If the ModelCreationArgs does not have a credential name set then no cloud credential will be associated with the model.
The only supported agent version during bootstrap is that of the current controller. This will be the default if no agent version is supplied.
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.
CreateModel 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 id's for controller models in the bootstrap process.
func CreateReadOnlyModel ¶
func CreateReadOnlyModel( id coremodel.UUID, controllerUUID uuid.UUID, ) internaldatabase.BootstrapOpt
CreateReadOnlyModel creates a new model within the model database with all of its associated metadata. The data will be read-only and cannot be modified once created.
Types ¶
This section is empty.