juju: github.com/juju/juju/controller/modelmanager Index | Files

package modelmanager

import "github.com/juju/juju/controller/modelmanager"

Package modelmanager provides the business logic for model management operations in the controller.

Index

Package Files

createmodel.go

type ModelConfigCreator Uses

type ModelConfigCreator struct {
    // Provider will be used to obtain EnvironProviders for preparing
    // and validating configuration.
    Provider func(string) (environs.EnvironProvider, error)

    // FindTools, if non-nil, will be used to validate the agent-version
    // value in NewModelConfig if it differs from the base configuration.
    //
    // If FindTools is nil, agent-version may not be different to the
    // base configuration.
    FindTools func(version.Number) (tools.List, error)
}

ModelConfigCreator provides a method of creating a new model config.

The zero value of ModelConfigCreator is usable with the limitations noted on each struct field.

func (ModelConfigCreator) NewModelConfig Uses

func (c ModelConfigCreator) NewModelConfig(
    cloud environs.CloudSpec,
    base *config.Config,
    attrs map[string]interface{},
) (*config.Config, error)

NewModelConfig returns a new model config given a base (controller) config and a set of attributes that will be specific to the new model, overriding any non-restricted attributes in the base configuration. The resulting config will be suitable for creating a new model in state.

If "attrs" does not include a UUID, a new, random one will be generated and added to the config.

The config will be validated with the provider before being returned.

Package modelmanager imports 7 packages (graph) and is imported by 39 packages. Updated 2019-03-05. Refresh now. Tools for package owners.