params

package
v0.0.0-...-b0bff92 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ActionCancelled is the status for an Action that has been
	// cancelled prior to execution.
	ActionCancelled string = "cancelled"

	// ActionCompleted is the status of an Action that has completed
	// successfully.
	ActionCompleted string = "completed"

	// ActionFailed is the status of an Action that has completed with
	// an error.
	ActionFailed string = "failed"

	// ActionPending is the status of an Action that has been queued up but
	// not executed yet.
	ActionPending string = "pending"

	// ActionRunning is the status of an Action that has been started but
	// not completed yet.
	ActionRunning string = "running"

	// ActionAborting is the status of an Action that is running but is to be
	// terminated. Identical to ActionRunning.
	ActionAborting string = "aborting"

	// ActionAborted is the status of an Action that was aborted.
	// Identical to ActionFailed and can have an error.
	ActionAborted string = "aborted"

	// ActionError is the status of an Action that did not get run
	// due to an error.
	ActionError string = "error"
)
View Source
const (
	CodeNotFound                  = "not found"
	CodeUserNotFound              = "user not found"
	CodeModelNotFound             = "model not found"
	CodeUnauthorized              = "unauthorized access"
	CodeLoginExpired              = "login expired"
	CodeNoCreds                   = "no credentials provided"
	CodeCannotEnterScope          = "cannot enter scope"
	CodeCannotEnterScopeYet       = "cannot enter scope yet"
	CodeExcessiveContention       = "excessive contention"
	CodeUnitHasSubordinates       = "unit has subordinates"
	CodeNotAssigned               = "not assigned"
	CodeStopped                   = "stopped"
	CodeDead                      = "dead"
	CodeHasAssignedUnits          = "machine has assigned units"
	CodeHasHostedModels           = "controller has hosted models"
	CodeHasPersistentStorage      = "controller/model has persistent storage"
	CodeModelNotEmpty             = "model not empty"
	CodeMachineHasAttachedStorage = "machine has attached storage"
	CodeMachineHasContainers      = "machine is hosting containers"
	CodeStorageAttached           = "storage is attached"
	CodeNotProvisioned            = "not provisioned"
	CodeNoAddressSet              = "no address set"
	CodeTryAgain                  = "try again"
	CodeNotImplemented            = "not implemented" // asserted to match rpc.codeNotImplemented in rpc/rpc_test.go
	CodeAlreadyExists             = "already exists"
	CodeUpgradeInProgress         = "upgrade in progress"
	CodeMigrationInProgress       = "model migration in progress"
	CodeIncompatibleClient        = "incompatible client"
	CodeActionNotAvailable        = "action no longer available"
	CodeOperationBlocked          = "operation is blocked"
	CodeLeadershipClaimDenied     = "leadership claim denied"
	CodeLeaseClaimDenied          = "lease claim denied"
	CodeNotSupported              = "not supported"
	CodeBadRequest                = "bad request"
	CodeMethodNotAllowed          = "method not allowed"
	CodeForbidden                 = "forbidden"
	CodeDischargeRequired         = "macaroon discharge required"
	CodeRedirect                  = "redirection required"
	CodeIncompatibleSeries        = "incompatible series"
	CodeCloudRegionRequired       = "cloud region required"
	CodeIncompatibleClouds        = "incompatible clouds"
	CodeQuotaLimitExceeded        = "quota limit exceeded"
	CodeNotYetAvailable           = "not yet available; try again later"
	CodeNotLeader                 = "not leader"
	CodeDeadlineExceeded          = "deadline exceeded"
	CodeLeaseError                = "lease error"
)

The Code constants hold error codes for some kinds of error.

View Source
const (
	MachineNonceHeader = "X-Juju-Nonce"
	JujuClientVersion  = "X-Juju-ClientVersion"
)
View Source
const (
	// DigestSHA is the HTTP digest algorithm value used in juju's HTTP code.
	DigestSHA256 DigestAlgorithm = "SHA-256"

	// ContentTypeJSON is the HTTP content-type value used for JSON content.
	ContentTypeJSON = "application/json"

	// ContentTypeRaw is the HTTP content-type value used for raw, unformattedcontent.
	ContentTypeRaw = "application/octet-stream"

	// ContentTypeJS is the HTTP content-type value used for javascript.
	ContentTypeJS = "application/javascript"

	// ContentTypeXJS is the outdated HTTP content-type value used for javascript.
	ContentTypeXJS = "application/x-javascript"
)
View Source
const MigrationModelHTTPHeader = "X-Juju-Migration-Model-UUID"

MigrationModelHTTPHeader is the key for the HTTP header value that is used to specify the model UUID for the model being migrated for the uploading of the binaries for that model.

Variables

View Source
var MigrationInProgressError = errors.New(CodeMigrationInProgress)

MigrationInProgressError signifies a migration is in progress.

View Source
var UpgradeInProgressError = errors.New(CodeUpgradeInProgress)

UpgradeInProgressError signifies an upgrade is in progress.

Functions

func EncodeChecksum

func EncodeChecksum(checksum string) string

EncodeChecksum base64 encodes a sha256 checksum according to RFC 4648 and returns a value that can be added to the "Digest" http header.

func ErrCode

func ErrCode(err error) string

ErrCode returns the error code associated with the given error, or the empty string if there is none.

func FromCharmOptionMap

func FromCharmOptionMap(config map[string]CharmOption) *charm.Config

func FromHostsPorts

func FromHostsPorts(nhpm []network.HostPorts) [][]HostPort

FromHostsPorts is a helper to create a parameter out of the network type, here for a nested slice of HostPort.

func FromProviderHostsPorts

func FromProviderHostsPorts(nhpm []network.ProviderHostPorts) [][]HostPort

FromProviderHostsPorts is a helper to create a parameter out of the network type, here for a nested slice of HostPort.

func InterfaceInfoFromNetworkConfig

func InterfaceInfoFromNetworkConfig(configs []NetworkConfig) network.InterfaceInfos

InterfaceInfoFromNetworkConfig converts a slice of NetworkConfig into the equivalent network.InterfaceInfo slice.

func IsBadRequest

func IsBadRequest(err error) bool

func IsCodeActionNotAvailable

func IsCodeActionNotAvailable(err error) bool

func IsCodeAlreadyExists

func IsCodeAlreadyExists(err error) bool

func IsCodeCannotEnterScope

func IsCodeCannotEnterScope(err error) bool

func IsCodeCannotEnterScopeYet

func IsCodeCannotEnterScopeYet(err error) bool

func IsCodeCloudRegionRequired

func IsCodeCloudRegionRequired(err error) bool

func IsCodeDead

func IsCodeDead(err error) bool

func IsCodeDeadlineExceeded

func IsCodeDeadlineExceeded(err error) bool

func IsCodeExcessiveContention

func IsCodeExcessiveContention(err error) bool

func IsCodeForbidden

func IsCodeForbidden(err error) bool

func IsCodeHasAssignedUnits

func IsCodeHasAssignedUnits(err error) bool

func IsCodeHasHostedModels

func IsCodeHasHostedModels(err error) bool

func IsCodeHasPersistentStorage

func IsCodeHasPersistentStorage(err error) bool

func IsCodeIncompatibleSeries

func IsCodeIncompatibleSeries(err error) bool

func IsCodeLeadershipClaimDenied

func IsCodeLeadershipClaimDenied(err error) bool

func IsCodeLeaseClaimDenied

func IsCodeLeaseClaimDenied(err error) bool

func IsCodeLoginExpired

func IsCodeLoginExpired(err error) bool

func IsCodeMachineHasAttachedStorage

func IsCodeMachineHasAttachedStorage(err error) bool

func IsCodeMachineHasContainers

func IsCodeMachineHasContainers(err error) bool

func IsCodeModelNotEmpty

func IsCodeModelNotEmpty(err error) bool

func IsCodeModelNotFound

func IsCodeModelNotFound(err error) bool

func IsCodeNoAddressSet

func IsCodeNoAddressSet(err error) bool

func IsCodeNoCreds

func IsCodeNoCreds(err error) bool

func IsCodeNotAssigned

func IsCodeNotAssigned(err error) bool

func IsCodeNotFound

func IsCodeNotFound(err error) bool

func IsCodeNotFoundOrCodeUnauthorized

func IsCodeNotFoundOrCodeUnauthorized(err error) bool

IsCodeNotFoundOrCodeUnauthorized is used in API clients which, pre-API, used errors.IsNotFound; this is because an API client is not necessarily privileged to know about the existence or otherwise of a particular entity, and the server may hence convert NotFound to Unauthorized at its discretion.

func IsCodeNotImplemented

func IsCodeNotImplemented(err error) bool

func IsCodeNotLeader

func IsCodeNotLeader(err error) bool

func IsCodeNotProvisioned

func IsCodeNotProvisioned(err error) bool

func IsCodeNotSupported

func IsCodeNotSupported(err error) bool

func IsCodeNotYetAvailable

func IsCodeNotYetAvailable(err error) bool

func IsCodeOperationBlocked

func IsCodeOperationBlocked(err error) bool

func IsCodeQuotaLimitExceeded

func IsCodeQuotaLimitExceeded(err error) bool

IsCodeQuotaLimitExceeded returns true if err includes a QuotaLimitExceeded error code.

func IsCodeStopped

func IsCodeStopped(err error) bool

func IsCodeStorageAttached

func IsCodeStorageAttached(err error) bool

func IsCodeTryAgain

func IsCodeTryAgain(err error) bool

func IsCodeUnauthorized

func IsCodeUnauthorized(err error) bool

func IsCodeUnitHasSubordinates

func IsCodeUnitHasSubordinates(err error) bool

func IsCodeUpgradeInProgress

func IsCodeUpgradeInProgress(err error) bool

func IsCodeUserNotFound

func IsCodeUserNotFound(err error) bool

func IsIncompatibleClientError

func IsIncompatibleClientError(err error) bool

IsIncompatibleClientError returns true if this err is a IncompatibleClientError.

func IsLeaseError

func IsLeaseError(err error) bool

func IsMethodNotAllowed

func IsMethodNotAllowed(err error) bool

func IsRedirect

func IsRedirect(err error) bool

func ToCharmOptionMap

func ToCharmOptionMap(config *charm.Config) map[string]CharmOption

func ToMachineHostPorts

func ToMachineHostPorts(hps []HostPort) network.MachineHostPorts

ToMachineHostPorts transforms multiple Addresses into a MachineHostPort collection.

func ToMachineHostsPorts

func ToMachineHostsPorts(hpm [][]HostPort) []network.MachineHostPorts

ToMachineHostsPorts transforms slices of HostPort grouped by server into a slice of MachineHostPorts collections.

func ToNetworkSpaceInfos

func ToNetworkSpaceInfos(allInfos SpaceInfos) network.SpaceInfos

ToNetworkSpaceInfos converts a serializable SpaceInfos payload into a network.SpaceInfos instance.

func ToProviderAddresses

func ToProviderAddresses(addrs ...Address) network.ProviderAddresses

ToProviderAddresses transforms multiple Addresses into a ProviderAddresses collection.

func ToProviderHostPorts

func ToProviderHostPorts(hps []HostPort) network.ProviderHostPorts

ToProviderHostPorts transforms multiple Addresses into a ProviderHostPorts collection.

func ToProviderHostsPorts

func ToProviderHostsPorts(hpm [][]HostPort) []network.ProviderHostPorts

ToProviderHostsPorts transforms slices of HostPort grouped by server into a slice of ProviderHostPort collections.

Types

type APIHostPortsResult

type APIHostPortsResult struct {
	Servers [][]HostPort `json:"servers"`
}

APIHostPortsResult holds the result of an APIHostPorts call. Each element in the top level slice holds the addresses for one API server.

func (APIHostPortsResult) MachineHostsPorts

func (r APIHostPortsResult) MachineHostsPorts() []network.MachineHostPorts

MachineHostsPorts transforms the APIHostPortsResult into a slice of MachineHostPorts.

type Action

type Action struct {
	Tag            string                 `json:"tag"`
	Receiver       string                 `json:"receiver"`
	Name           string                 `json:"name"`
	Parameters     map[string]interface{} `json:"parameters,omitempty"`
	Parallel       *bool                  `json:"parallel,omitempty"`
	ExecutionGroup *string                `json:"execution-group,omitempty"`
}

Action describes an Action that will be or has been queued up.

type ActionExecutionResult

type ActionExecutionResult struct {
	ActionTag string                 `json:"action-tag"`
	Status    string                 `json:"status"`
	Results   map[string]interface{} `json:"results,omitempty"`
	Message   string                 `json:"message,omitempty"`
}

ActionExecutionResult holds the action tag and output used when recording the result of an action.

type ActionExecutionResults

type ActionExecutionResults struct {
	Results []ActionExecutionResult `json:"results,omitempty"`
}

ActionExecutionResults holds a slice of ActionExecutionResult for a bulk action API call

type ActionInfo

type ActionInfo struct {
	ModelUUID  string                 `json:"model-uuid"`
	Id         string                 `json:"id"`
	Receiver   string                 `json:"receiver"`
	Name       string                 `json:"name"`
	Parameters map[string]interface{} `json:"parameters,omitempty"`
	Status     string                 `json:"status"`
	Message    string                 `json:"message"`
	Results    map[string]interface{} `json:"results,omitempty"`
	Enqueued   time.Time              `json:"enqueued"`
	Started    time.Time              `json:"started"`
	Completed  time.Time              `json:"completed"`
}

ActionInfo holds the information about a action that is tracked by multiwatcherStore.

func (*ActionInfo) EntityId

func (i *ActionInfo) EntityId() EntityId

EntityId returns a unique identifier for an action across models.

type ActionMessage

type ActionMessage struct {
	Timestamp time.Time `json:"timestamp"`
	Message   string    `json:"message"`
}

ActionMessage represents a logged message on an action.

type ActionMessageParams

type ActionMessageParams struct {
	Messages []EntityString `json:"messages"`
}

ActionMessageParams holds the arguments for logging progress messages for some actions.

type ActionPruneArgs

type ActionPruneArgs struct {
	MaxHistoryTime time.Duration `json:"max-history-time"`
	MaxHistoryMB   int           `json:"max-history-mb"`
}

type ActionResult

type ActionResult struct {
	Action    *Action                `json:"action,omitempty"`
	Enqueued  time.Time              `json:"enqueued,omitempty"`
	Started   time.Time              `json:"started,omitempty"`
	Completed time.Time              `json:"completed,omitempty"`
	Status    string                 `json:"status,omitempty"`
	Message   string                 `json:"message,omitempty"`
	Log       []ActionMessage        `json:"log,omitempty"`
	Output    map[string]interface{} `json:"output,omitempty"`
	Error     *Error                 `json:"error,omitempty"`
}

ActionResult describes an Action that will be or has been completed.

type ActionResults

type ActionResults struct {
	Results []ActionResult `json:"results,omitempty"`
}

ActionResults is a slice of ActionResult for bulk requests.

type ActionSpec

type ActionSpec struct {
	Description string                 `json:"description"`
	Params      map[string]interface{} `json:"params"`
}

ActionSpec is a definition of the parameters and traits of an Action. The Params map is expected to conform to JSON-Schema Draft 4 as defined at http://json-schema.org/draft-04/schema# (see http://json-schema.org/latest/json-schema-core.html)

type Actions

type Actions struct {
	Actions []Action `json:"actions,omitempty"`
}

Actions is a slice of Action for bulk requests.

type ActionsByReceiver

type ActionsByReceiver struct {
	Receiver string         `json:"receiver,omitempty"`
	Actions  []ActionResult `json:"actions,omitempty"`
	Error    *Error         `json:"error,omitempty"`
}

ActionsByReceiver is a bulk API call wrapper containing Actions, either as input parameters or as results.

type ActionsByReceivers

type ActionsByReceivers struct {
	Actions []ActionsByReceiver `json:"actions,omitempty"`
}

ActionsByReceivers wrap a slice of Actions for API calls.

type ActionsQueryResult

type ActionsQueryResult struct {
	Receiver string       `json:"receiver,omitempty"`
	Action   ActionResult `json:"action,omitempty"`
	Error    *Error       `json:"error,omitempty"`
}

ActionsQueryResult holds the name and parameters of an query result.

type ActionsQueryResults

type ActionsQueryResults struct {
	Results []ActionsQueryResult `json:"results,omitempty"`
}

ActionsQueryResults holds a slice of responses from the Actions query.

type AddApplicationOffer

type AddApplicationOffer struct {
	ModelTag               string            `json:"model-tag"`
	OfferName              string            `json:"offer-name"`
	ApplicationName        string            `json:"application-name"`
	ApplicationDescription string            `json:"application-description"`
	Endpoints              map[string]string `json:"endpoints"`
}

AddApplicationOffer values are used to create an application offer.

type AddApplicationOffers

type AddApplicationOffers struct {
	Offers []AddApplicationOffer
}

AddApplicationOffers is used when adding offers to an application directory.

type AddApplicationUnits

type AddApplicationUnits struct {
	ApplicationName string                `json:"application"`
	NumUnits        int                   `json:"num-units"`
	Placement       []*instance.Placement `json:"placement"`
	Policy          string                `json:"policy,omitempty"`
	AttachStorage   []string              `json:"attach-storage,omitempty"`
}

AddApplicationUnits holds parameters for the AddUnits call.

type AddApplicationUnitsResults

type AddApplicationUnitsResults struct {
	Units []string `json:"units"`
}

AddApplicationUnitsResults holds the names of the units added by the AddUnits call.

type AddApplicationUnitsV5

type AddApplicationUnitsV5 struct {
	ApplicationName string                `json:"application"`
	NumUnits        int                   `json:"num-units"`
	Placement       []*instance.Placement `json:"placement"`
	AttachStorage   []string              `json:"attach-storage,omitempty"`
}

AddApplicationUnitsV5 holds parameters for the AddUnits call. V5 is missing the new policy arg.

type AddCharm

type AddCharm struct {
	URL     string `json:"url"`
	Channel string `json:"channel"`
	Force   bool   `json:"force"`
}

AddCharm holds the arguments for making an AddCharm API call.

type AddCharmWithAuth

type AddCharmWithAuth struct {
	URL                string             `json:"url"`
	Origin             CharmOrigin        `json:"charm-origin"`
	CharmStoreMacaroon *macaroon.Macaroon `json:"macaroon"`
	Force              bool               `json:"force"`

	// Deprecated, series has moved into Origin and this should only be used
	// to talk to older controllers.
	Series string `json:"series"`
}

AddCharmWithAuth holds the arguments for making an AddCharmWithAuth API call via the Charms facade.

type AddCharmWithAuthorization

type AddCharmWithAuthorization struct {
	URL                string             `json:"url"`
	Channel            string             `json:"channel"`
	CharmStoreMacaroon *macaroon.Macaroon `json:"macaroon"`
	Force              bool               `json:"force"`
}

AddCharmWithAuthorization holds the arguments for making an AddCharmWithAuthorization API call.

type AddCharmWithOrigin

type AddCharmWithOrigin struct {
	URL    string      `json:"url"`
	Origin CharmOrigin `json:"charm-origin"`
	Force  bool        `json:"force"`

	// Deprecated, series has moved into Origin and this should only be used
	// to talk to older controllers.
	Series string `json:"series"`
}

AddCharmWithOrigin holds the arguments for making an AddCharm API call via the Charms facade.

type AddCloudArgs

type AddCloudArgs struct {
	Cloud Cloud  `json:"cloud"`
	Name  string `json:"name"`
	Force *bool  `json:"force,omitempty"`
}

AddCloudArgs holds a cloud to be added with its name

type AddMachineParams

type AddMachineParams struct {
	// The following fields hold attributes that will be given to the
	// new machine when it is created.
	Series      string             `json:"series"`
	Constraints constraints.Value  `json:"constraints"`
	Jobs        []model.MachineJob `json:"jobs"`

	// Disks describes constraints for disks that must be attached to
	// the machine when it is provisioned.
	Disks []storage.Constraints `json:"disks,omitempty"`

	// If Placement is non-nil, it contains a placement directive
	// that will be used to decide how to instantiate the machine.
	Placement *instance.Placement `json:"placement,omitempty"`

	// If ParentId is non-empty, it specifies the id of the
	// parent machine within which the new machine will
	// be created. In that case, ContainerType must also be
	// set.
	ParentId string `json:"parent-id"`

	// ContainerType optionally gives the container type of the
	// new machine. If it is non-empty, the new machine
	// will be implemented by a container. If it is specified
	// but ParentId is empty, a new top level machine will
	// be created to hold the container with given series,
	// constraints and jobs.
	ContainerType instance.ContainerType `json:"container-type"`

	// If InstanceId is non-empty, it will be associated with
	// the new machine along with the given nonce,
	// hardware characteristics and addresses.
	// All the following fields will be ignored if ContainerType
	// is set.
	InstanceId              instance.Id                      `json:"instance-id"`
	Nonce                   string                           `json:"nonce"`
	HardwareCharacteristics instance.HardwareCharacteristics `json:"hardware-characteristics"`
	Addrs                   []Address                        `json:"addresses"`
}

AddMachineParams encapsulates the parameters used to create a new machine.

type AddMachines

type AddMachines struct {
	MachineParams []AddMachineParams `json:"params"`
}

AddMachines holds the parameters for making the AddMachines call.

type AddMachinesResult

type AddMachinesResult struct {
	Machine string `json:"machine"`
	Error   *Error `json:"error,omitempty"`
}

AddMachinesResult holds the name of a machine added by the api.client.AddMachine call for a single machine.

type AddMachinesResults

type AddMachinesResults struct {
	Machines []AddMachinesResult `json:"machines"`
}

AddMachinesResults holds the results of an AddMachines call.

type AddPendingResourcesArgs

type AddPendingResourcesArgs struct {
	Entity
	AddCharmWithAuthorization

	// Resources is the list of resources to add as pending.
	Resources []CharmResource `json:"resources"`
}

AddPendingResourcesArgs holds the arguments to the AddPendingResources API endpoint.

type AddPendingResourcesArgsV2

type AddPendingResourcesArgsV2 struct {
	Entity
	URL                string             `json:"url"`
	CharmOrigin        CharmOrigin        `json:"charm-origin"`
	CharmStoreMacaroon *macaroon.Macaroon `json:"macaroon"`

	// Resources is the list of resources to add as pending.
	Resources []CharmResource `json:"resources"`
}

AddPendingResourcesArgsV2 holds the arguments to the AddPendingResources API endpoint.

type AddPendingResourcesResult

type AddPendingResourcesResult struct {
	ErrorResult

	// PendingIDs holds the "pending ID" for each of the requested
	// resources.
	PendingIDs []string `json:"pending-ids"`
}

AddPendingResourcesResult holds the result of the AddPendingResources API endpoint.

type AddRelation

type AddRelation struct {
	Endpoints []string `json:"endpoints"`
	ViaCIDRs  []string `json:"via-cidrs,omitempty"`
}

AddRelation holds the parameters for making the AddRelation call. The endpoints specified are unordered.

type AddRelationResults

type AddRelationResults struct {
	Endpoints map[string]CharmRelation `json:"endpoints"`
}

AddRelationResults holds the results of a AddRelation call. The Endpoints field maps application names to the involved endpoints.

type AddStorageDetails

type AddStorageDetails struct {
	// StorageTags contains the string representation of the storage tags
	// of the added storage instances.
	StorageTags []string `json:"storage-tags"`
}

AddStorageDetails contains the details of added storage.

type AddStorageResult

type AddStorageResult struct {
	Result *AddStorageDetails `json:"result,omitempty"`
	Error  *Error             `json:"error,omitempty"`
}

AddStorageResult contains the result of adding storage to a unit.

type AddStorageResults

type AddStorageResults struct {
	Results []AddStorageResult `json:"results"`
}

AddStorageResults contains the results of adding storage to units.

type AddSubnetParams

type AddSubnetParams struct {
	CIDR              string   `json:"cidr,omitempty"`
	SubnetProviderId  string   `json:"subnet-provider-id,omitempty"`
	ProviderNetworkId string   `json:"provider-network-id,omitempty"`
	SpaceTag          string   `json:"space-tag"`
	VLANTag           int      `json:"vlan-tag,omitempty"`
	Zones             []string `json:"zones,omitempty"`
}

AddSubnetParams holds a cidr and space tags, subnet provider ID, and a list of zones to associate the subnet to. Either SubnetTag or SubnetProviderId must be set, but not both. Zones can be empty if they can be discovered

type AddSubnetParamsV2

type AddSubnetParamsV2 struct {
	SubnetTag         string   `json:"subnet-tag,omitempty"`
	SubnetProviderId  string   `json:"subnet-provider-id,omitempty"`
	ProviderNetworkId string   `json:"provider-network-id,omitempty"`
	SpaceTag          string   `json:"space-tag"`
	VLANTag           int      `json:"vlan-tag,omitempty"`
	Zones             []string `json:"zones,omitempty"`
}

AddSubnetParamsV2 holds a subnet and space tags, subnet provider ID, and a list of zones to associate the subnet to. Either SubnetTag or SubnetProviderId must be set, but not both. Zones can be empty if they can be discovered.

type AddSubnetsParams

type AddSubnetsParams struct {
	Subnets []AddSubnetParams `json:"subnets"`
}

AddSubnetsParams holds the arguments of AddSubnets API call.

type AddSubnetsParamsV2

type AddSubnetsParamsV2 struct {
	Subnets []AddSubnetParamsV2 `json:"subnets"`
}

AddSubnetsParamsV2 holds the arguments of AddSubnets APIv2 call.

type AddUser

type AddUser struct {
	Username    string `json:"username"`
	DisplayName string `json:"display-name"`

	// Password is optional. If it is empty, then
	// a secret key will be generated for the user
	// and returned in AddUserResult. It will not
	// be possible to login with a password until
	// registration with the secret key is completed.
	Password string `json:"password,omitempty"`
}

AddUser stores the parameters to add one user.

type AddUserResult

type AddUserResult struct {
	Tag       string `json:"tag,omitempty"`
	SecretKey []byte `json:"secret-key,omitempty"`
	Error     *Error `json:"error,omitempty"`
}

AddUserResult returns the tag of the newly created user and the secret key required to complete registration, or an error.

type AddUserResults

type AddUserResults struct {
	Results []AddUserResult `json:"results"`
}

AddUserResults holds the results of the bulk AddUser API call.

type AddUsers

type AddUsers struct {
	Users []AddUser `json:"users"`
}

AddUsers holds the parameters for adding new users.

type Address

type Address struct {
	Value           string `json:"value"`
	CIDR            string `json:"cidr,omitempty"`
	Type            string `json:"type"`
	Scope           string `json:"scope"`
	SpaceName       string `json:"space-name,omitempty"`
	ProviderSpaceID string `json:"space-id,omitempty"`
	ConfigType      string `json:"config-type,omitempty"`
	IsSecondary     bool   `json:"is-secondary,omitempty"`
}

Address represents the location of a machine, including metadata about what kind of location the address describes. See also the address types in core/network that this type can be transformed to/from. TODO (manadart 2021-03-05): CIDR is here to correct the old cardinality mismatch of having it on the parent NetworkConfig. Once we are liberated from backwards compatibility concerns (Juju 3/4), we should consider just ensuring that the Value field is in CIDR form. This way we can push any required parsing to a single location server-side instead of doing it for every implementation of environ.NetworkInterfaces plus on-machine detection. There are cases when we convert it *back* to the ip/mask form anyway.

func FromMachineAddress

func FromMachineAddress(addr network.MachineAddress) Address

FromMachineAddress returns an Address for the input MachineAddress.

func FromMachineAddresses

func FromMachineAddresses(mAddrs ...network.MachineAddress) []Address

FromMachineAddresses transforms multiple MachineAddresses into a slice of Address.

func FromProviderAddress

func FromProviderAddress(addr network.ProviderAddress) Address

FromProviderAddress returns an Address for the input ProviderAddress.

func FromProviderAddresses

func FromProviderAddresses(pAddrs ...network.ProviderAddress) []Address

FromProviderAddresses transforms multiple ProviderAddresses into a slice of Address.

func (Address) MachineAddress

func (addr Address) MachineAddress() network.MachineAddress

MachineAddress transforms the Address to a MachineAddress, effectively ignoring the space fields.

func (Address) ProviderAddress

func (addr Address) ProviderAddress() network.ProviderAddress

ProviderAddress transforms the Address to a ProviderAddress.

type AdoptResourcesArgs

type AdoptResourcesArgs struct {
	// ModelTag identifies the model that owns the resources.
	ModelTag string `json:"model-tag"`

	// SourceControllerVersion indicates the version of the calling
	// controller. This is needed in case the way the resources are
	// tagged has changed between versions - the provider should
	// ensure it looks for the original tags in the correct format for
	// that version.
	SourceControllerVersion version.Number `json:"source-controller-version"`
}

AdoptResourcesArgs holds the information required to ask the provider to update the controller tags for a model's resources.

type AgentGetEntitiesResult

type AgentGetEntitiesResult struct {
	Life          life.Value             `json:"life"`
	Jobs          []model.MachineJob     `json:"jobs"`
	ContainerType instance.ContainerType `json:"container-type"`
	Error         *Error                 `json:"error,omitempty"`
}

AgentGetEntitiesResult holds the results of a machineagent.API.GetEntities call for a single entity.

type AgentGetEntitiesResults

type AgentGetEntitiesResults struct {
	Entities []AgentGetEntitiesResult `json:"entities"`
}

AgentGetEntitiesResults holds the results of a agent.API.GetEntities call.

type AgentVersionResult

type AgentVersionResult struct {
	Version version.Number `json:"version"`
}

AgentVersionResult is used to return the current version number of the agent running the API server.

type AllWatcherId

type AllWatcherId struct {
	AllWatcherId string `json:"watcher-id"`
}

AllWatcherId holds the id of an AllWatcher.

type AllWatcherNextResults

type AllWatcherNextResults struct {
	Deltas []Delta `json:"deltas"`
}

AllWatcherNextResults holds deltas returned from calling AllWatcher.Next().

type AnnotationInfo

type AnnotationInfo struct {
	ModelUUID   string            `json:"model-uuid"`
	Tag         string            `json:"tag"`
	Annotations map[string]string `json:"annotations"`
}

AnnotationInfo holds the information about an annotation that is tracked by multiwatcherStore.

func (*AnnotationInfo) EntityId

func (i *AnnotationInfo) EntityId() EntityId

EntityId returns a unique identifier for an annotation across models.

type AnnotationsGetResult

type AnnotationsGetResult struct {
	EntityTag   string            `json:"entity"`
	Annotations map[string]string `json:"annotations"`
	Error       ErrorResult       `json:"error,omitempty"`
}

AnnotationsGetResult holds entity annotations or retrieval error.

type AnnotationsGetResults

type AnnotationsGetResults struct {
	Results []AnnotationsGetResult `json:"results"`
}

AnnotationsGetResults holds annotations associated with entities.

type AnnotationsSet

type AnnotationsSet struct {
	Annotations []EntityAnnotations `json:"annotations"`
}

AnnotationsSet stores parameters for making Set call on Annotations client.

type ApplicationCharm

type ApplicationCharm struct {
	// URL holds the URL of the charm assigned to the
	// application.
	URL string `json:"url"`

	// ForceUpgrade indicates whether or not application
	// units should upgrade to the charm even if they
	// are in an error state.
	ForceUpgrade bool `json:"force-upgrade,omitempty"`

	// SHA256 holds the SHA256 hash of the charm archive.
	SHA256 string `json:"sha256"`

	// CharmModifiedVersion increases when the charm changes in some way.
	CharmModifiedVersion int `json:"charm-modified-version"`

	// DeploymentMode is either "operator" or "workload"
	DeploymentMode string `json:"deployment-mode,omitempty"`
}

ApplicationCharm contains information about an application's charm.

type ApplicationCharmActionsResult

type ApplicationCharmActionsResult struct {
	ApplicationTag string                `json:"application-tag,omitempty"`
	Actions        map[string]ActionSpec `json:"actions,omitempty"`
	Error          *Error                `json:"error,omitempty"`
}

ApplicationCharmActionsResult holds application name and charm.Actions for the application. If an error such as a missing charm or malformed application name occurs, it is encapsulated in this type.

type ApplicationCharmPlacement

type ApplicationCharmPlacement struct {
	Application string `json:"application"`
	CharmURL    string `json:"charm-url"`
}

type ApplicationCharmPlacements

type ApplicationCharmPlacements struct {
	Placements []ApplicationCharmPlacement `json:"placements"`
}

type ApplicationCharmRelations

type ApplicationCharmRelations struct {
	ApplicationName string `json:"application"`
}

ApplicationCharmRelations holds parameters for making the application CharmRelations call.

type ApplicationCharmRelationsResults

type ApplicationCharmRelationsResults struct {
	CharmRelations []string `json:"charm-relations"`
}

ApplicationCharmRelationsResults holds the results of the application CharmRelations call.

type ApplicationCharmResult

type ApplicationCharmResult struct {
	Result *ApplicationCharm `json:"result,omitempty"`
	Error  *Error            `json:"error,omitempty"`
}

ApplicationCharmResult contains an ApplicationCharm or an error.

type ApplicationCharmResults

type ApplicationCharmResults struct {
	Results []ApplicationCharmResult `json:"results"`
}

ApplicationCharmResults contains a set of ApplicationCharmResults.

type ApplicationConfigUnsetArgs

type ApplicationConfigUnsetArgs struct {
	Args []ApplicationUnset
}

ApplicationConfigUnsetArgs holds the parameters for resetting application config values for specified applications.

type ApplicationConstraint

type ApplicationConstraint struct {
	Constraints constraints.Value `json:"constraints"`
	Error       *Error            `json:"error,omitempty"`
}

ApplicationConstraint holds the constraints value for a single application, or an error for trying to get it.

type ApplicationDeploy

type ApplicationDeploy struct {
	ApplicationName  string                         `json:"application"`
	Series           string                         `json:"series"`
	CharmURL         string                         `json:"charm-url"`
	CharmOrigin      *CharmOrigin                   `json:"charm-origin,omitempty"`
	Channel          string                         `json:"channel"`
	NumUnits         int                            `json:"num-units"`
	Config           map[string]string              `json:"config,omitempty"` // Takes precedence over yaml entries if both are present.
	ConfigYAML       string                         `json:"config-yaml"`
	Constraints      constraints.Value              `json:"constraints"`
	Placement        []*instance.Placement          `json:"placement,omitempty"`
	Policy           string                         `json:"policy,omitempty"`
	Storage          map[string]storage.Constraints `json:"storage,omitempty"`
	Devices          map[string]devices.Constraints `json:"devices,omitempty"`
	AttachStorage    []string                       `json:"attach-storage,omitempty"`
	EndpointBindings map[string]string              `json:"endpoint-bindings,omitempty"`
	Resources        map[string]string              `json:"resources,omitempty"`
	Force            bool
}

ApplicationDeploy holds the parameters for making the application Deploy call.

type ApplicationDestroy

type ApplicationDestroy struct {
	ApplicationName string `json:"application"`
}

ApplicationDestroy holds the parameters for making the deprecated Application.Destroy call.

type ApplicationExpose

type ApplicationExpose struct {
	ApplicationName string `json:"application"`

	// Expose parameters grouped by endpoint name. An empty ("") endpoint
	// name key represents all application endpoints. For compatibility
	// with pre 2.9 clients, if this field is empty, all opened ports
	// for the application will be exposed to 0.0.0.0/0.
	ExposedEndpoints map[string]ExposedEndpoint `json:"exposed-endpoints,omitempty"`
}

ApplicationExpose holds the parameters for making the application Expose call.

type ApplicationGet

type ApplicationGet struct {
	ApplicationName string `json:"application"`

	// BranchName identifies the "in-flight" branch that this
	// request will retrieve application data for.
	BranchName string `json:"branch"`
}

ApplicationGet holds parameters for making the singular Get or GetCharmURL calls, and bulk calls to CharmConfig in the V9 API.

type ApplicationGetArgs

type ApplicationGetArgs struct {
	Args []ApplicationGet `json:"args"`
}

ApplicationGetArgs is used to request config for multiple application/generation pairs.

type ApplicationGetConfigResults

type ApplicationGetConfigResults struct {
	Results []ConfigResult
}

ApplicationGetConfigResults holds the return values for application GetConfig.

type ApplicationGetConstraintsResults

type ApplicationGetConstraintsResults struct {
	Results []ApplicationConstraint `json:"results"`
}

ApplicationGetConstraintsResults holds the multiple return values for GetConstraints call.

type ApplicationGetResults

type ApplicationGetResults struct {
	Application       string                 `json:"application"`
	Charm             string                 `json:"charm"`
	CharmConfig       map[string]interface{} `json:"config"`
	ApplicationConfig map[string]interface{} `json:"application-config,omitempty"`
	Constraints       constraints.Value      `json:"constraints"`
	Series            string                 `json:"series"`
	Channel           string                 `json:"channel"`
	EndpointBindings  map[string]string      `json:"endpoint-bindings,omitempty"`
}

ApplicationGetResults holds results of the application Get call.

type ApplicationInfo

type ApplicationInfo struct {
	ModelUUID       string                 `json:"model-uuid"`
	Name            string                 `json:"name"`
	Exposed         bool                   `json:"exposed"`
	CharmURL        string                 `json:"charm-url"`
	OwnerTag        string                 `json:"owner-tag"`
	Life            life.Value             `json:"life"`
	MinUnits        int                    `json:"min-units"`
	Constraints     constraints.Value      `json:"constraints"`
	Config          map[string]interface{} `json:"config,omitempty"`
	Subordinate     bool                   `json:"subordinate"`
	Status          StatusInfo             `json:"status"`
	WorkloadVersion string                 `json:"workload-version"`
}

ApplicationInfo holds the information about an application that is tracked by multiwatcherStore.

func (*ApplicationInfo) EntityId

func (i *ApplicationInfo) EntityId() EntityId

EntityId returns a unique identifier for an application across models.

type ApplicationInfoResult

type ApplicationInfoResult struct {
	Result *ApplicationResult `json:"result,omitempty"`
	Error  *Error             `json:"error,omitempty"`
}

ApplicationInfoResults holds an application info result or a retrieval error.

type ApplicationInfoResults

type ApplicationInfoResults struct {
	Results []ApplicationInfoResult `json:"results"`
}

ApplicationInfoResults holds applications associated with entities.

type ApplicationMergeBindings

type ApplicationMergeBindings struct {
	ApplicationTag string            `json:"application-tag"`
	Bindings       map[string]string `json:"bindings"`
	Force          bool              `json:"force"`
}

ApplicationMergeBindings holds a list of operator-defined bindings to be merged with the current application bindings.

type ApplicationMergeBindingsArgs

type ApplicationMergeBindingsArgs struct {
	Args []ApplicationMergeBindings `json:"args"`
}

ApplicationMergeBindingsArgs holds the parameters for updating application bindings.

type ApplicationMetricCredential

type ApplicationMetricCredential struct {
	ApplicationName   string `json:"application"`
	MetricCredentials []byte `json:"metrics-credentials"`
}

ApplicationMetricCredential holds parameters for the SetApplicationCredentials call.

type ApplicationMetricCredentials

type ApplicationMetricCredentials struct {
	Creds []ApplicationMetricCredential `json:"creds"`
}

ApplicationMetricCredentials holds multiple ApplicationMetricCredential parameters.

type ApplicationOfferAdminDetails

type ApplicationOfferAdminDetails struct {
	ApplicationOfferDetails
	ApplicationName string            `json:"application-name"`
	CharmURL        string            `json:"charm-url"`
	Connections     []OfferConnection `json:"connections,omitempty"`
}

ApplicationOfferAdminDetails represents an application offering, including details about how it has been deployed.

type ApplicationOfferDetails

type ApplicationOfferDetails struct {
	SourceModelTag         string             `json:"source-model-tag"`
	OfferUUID              string             `json:"offer-uuid"`
	OfferURL               string             `json:"offer-url"`
	OfferName              string             `json:"offer-name"`
	ApplicationDescription string             `json:"application-description"`
	Endpoints              []RemoteEndpoint   `json:"endpoints,omitempty"`
	Spaces                 []RemoteSpace      `json:"spaces,omitempty"`
	Bindings               map[string]string  `json:"bindings,omitempty"`
	Users                  []OfferUserDetails `json:"users,omitempty"`
}

ApplicationOfferDetails represents an application offering from an external model.

type ApplicationOfferInfo

type ApplicationOfferInfo struct {
	ModelUUID            string `json:"model-uuid"`
	OfferName            string `json:"offer-name"`
	OfferUUID            string `json:"offer-uuid"`
	ApplicationName      string `json:"application-name"`
	CharmName            string `json:"charm-name"`
	TotalConnectedCount  int    `json:"total-connected-count"`
	ActiveConnectedCount int    `json:"active-connected-count"`
}

ApplicationOfferInfo holds the information about an application offer that is tracked by multiwatcherStore.

func (*ApplicationOfferInfo) EntityId

func (i *ApplicationOfferInfo) EntityId() EntityId

EntityId returns a unique identifier for an application offer across models.

type ApplicationOfferResult

type ApplicationOfferResult struct {
	// Result contains application offer information.
	Result *ApplicationOfferAdminDetails `json:"result,omitempty"`

	// Error contains related error.
	Error *Error `json:"error,omitempty"`
}

ApplicationOfferResult is a result of querying a remote application offer based on its URL.

type ApplicationOfferStatus

type ApplicationOfferStatus struct {
	Err                  *Error                    `json:"err,omitempty"`
	OfferName            string                    `json:"offer-name"`
	ApplicationName      string                    `json:"application-name"`
	CharmURL             string                    `json:"charm"`
	Endpoints            map[string]RemoteEndpoint `json:"endpoints"`
	ActiveConnectedCount int                       `json:"active-connected-count"`
	TotalConnectedCount  int                       `json:"total-connected-count"`
}

ApplicationOfferStatus holds status info about an application offer.

type ApplicationOffersResults

type ApplicationOffersResults struct {
	// Results contains collection of remote application results.
	Results []ApplicationOfferResult `json:"results,omitempty"`
}

ApplicationOffersResults is a result of listing remote application offers.

type ApplicationResult

type ApplicationResult struct {
	Tag              string                     `json:"tag"`
	Charm            string                     `json:"charm,omitempty"`
	Series           string                     `json:"series,omitempty"`
	Channel          string                     `json:"channel,omitempty"`
	Constraints      constraints.Value          `json:"constraints,omitempty"`
	Principal        bool                       `json:"principal"`
	Exposed          bool                       `json:"exposed"`
	Remote           bool                       `json:"remote"`
	EndpointBindings map[string]string          `json:"endpoint-bindings,omitempty"`
	ExposedEndpoints map[string]ExposedEndpoint `json:"exposed-endpoints,omitempty"`
}

ApplicationResult holds an application info. NOTE: we should look to combine ApplicationResult and ApplicationInfo.

type ApplicationSet

type ApplicationSet struct {
	ApplicationName string `json:"application"`

	// BranchName identifies the "in-flight" branch that this
	// request will set configuration for.
	BranchName string `json:"branch"`

	Options map[string]string `json:"options"`
}

ApplicationSet holds the parameters for an application Set command. Options contains the configuration data.

type ApplicationSetCharm

type ApplicationSetCharm struct {
	// ApplicationName is the name of the application to set the charm on.
	ApplicationName string `json:"application"`

	// Generation is the generation version that this
	// request will set the application charm for.
	Generation string `json:"generation"`

	// CharmURL is the new url for the charm.
	CharmURL string `json:"charm-url"`

	// CharmOrigin is the charm origin
	CharmOrigin *CharmOrigin `json:"charm-origin,omitempty"`

	// Channel is the charm store channel from which the charm came.
	Channel string `json:"channel"`

	// ConfigSettings is the charm settings to set during the upgrade.
	// This field is only understood by Application facade version 2
	// and greater.
	ConfigSettings map[string]string `json:"config-settings,omitempty"`

	// ConfigSettingsYAML is the charm settings in YAML format to set
	// during the upgrade. If this is non-empty, it will take precedence
	// over ConfigSettings. This field is only understood by Application
	// facade version 2
	ConfigSettingsYAML string `json:"config-settings-yaml,omitempty"`

	// Force forces the lxd profile validation overriding even if it's fails.
	Force bool `json:"force"`

	// ForceUnits forces the upgrade on units in an error state.
	ForceUnits bool `json:"force-units"`

	// ForceSeries forces the use of the charm even if it doesn't match the
	// series of the unit.
	ForceSeries bool `json:"force-series"`

	// ResourceIDs is a map of resource names to resource IDs to activate during
	// the upgrade.
	ResourceIDs map[string]string `json:"resource-ids,omitempty"`

	// StorageConstraints is a map of storage names to storage constraints to
	// update during the upgrade. This field is only understood by Application
	// facade version 2 and greater.
	StorageConstraints map[string]StorageConstraints `json:"storage-constraints,omitempty"`

	// EndpointBindings is a map of operator-defined endpoint names to
	// space names to be merged with any existing endpoint bindings. This
	// field is only understood by Application facade version 10 and greater.
	EndpointBindings map[string]string `json:"endpoint-bindings,omitempty"`
}

ApplicationSetCharm sets the charm for a given application.

type ApplicationStatus

type ApplicationStatus struct {
	Err              *Error                     `json:"err,omitempty"`
	Charm            string                     `json:"charm"`
	CharmVersion     string                     `json:"charm-version"`
	CharmProfile     string                     `json:"charm-profile"`
	CharmChannel     string                     `json:"charm-channel,omitempty"`
	Series           string                     `json:"series"`
	Exposed          bool                       `json:"exposed"`
	ExposedEndpoints map[string]ExposedEndpoint `json:"exposed-endpoints,omitempty"`
	Life             life.Value                 `json:"life"`
	Relations        map[string][]string        `json:"relations"`
	CanUpgradeTo     string                     `json:"can-upgrade-to"`
	SubordinateTo    []string                   `json:"subordinate-to"`
	Units            map[string]UnitStatus      `json:"units"`
	MeterStatuses    map[string]MeterStatus     `json:"meter-statuses"`
	Status           DetailedStatus             `json:"status"`
	WorkloadVersion  string                     `json:"workload-version"`
	EndpointBindings map[string]string          `json:"endpoint-bindings"`

	// The following are for CAAS models.
	Scale         int    `json:"int,omitempty"`
	ProviderId    string `json:"provider-id,omitempty"`
	PublicAddress string `json:"public-address"`
}

ApplicationStatus holds status info about an application.

func (ApplicationStatus) MarshalJSON

func (as ApplicationStatus) MarshalJSON() ([]byte, error)

MarshalJSON marshals a status with a typo left in for compatibility. TODO(wallyworld) - remove in Juju 3

type ApplicationStatusResult

type ApplicationStatusResult struct {
	Application StatusResult            `json:"application"`
	Units       map[string]StatusResult `json:"units"`
	Error       *Error                  `json:"error,omitempty"`
}

ApplicationStatusResult holds results for an application Full Status.

type ApplicationStatusResults

type ApplicationStatusResults struct {
	Results []ApplicationStatusResult `json:"results"`
}

ApplicationStatusResults holds multiple StatusResult.

type ApplicationUnexpose

type ApplicationUnexpose struct {
	ApplicationName string `json:"application"`

	// A list of endpoints to unexpose. If empty, the entire application
	// will be unexposed.
	ExposedEndpoints []string `json:"exposed-endpoints"`
}

ApplicationUnexpose holds parameters for the application Unexpose call.

type ApplicationUnitInfo

type ApplicationUnitInfo struct {
	ProviderId string `json:"provider-id"`
	UnitTag    string `json:"unit-tag"`
}

ApplicationUnitInfo holds info about the unit in the application.

type ApplicationUnitParams

type ApplicationUnitParams struct {
	ProviderId     string                     `json:"provider-id"`
	UnitTag        string                     `json:"unit-tag"`
	Address        string                     `json:"address"`
	Ports          []string                   `json:"ports"`
	Stateful       bool                       `json:"stateful,omitempty"`
	FilesystemInfo []KubernetesFilesystemInfo `json:"filesystem-info,omitempty"`
	Status         string                     `json:"status"`
	Info           string                     `json:"info"`
	Data           map[string]interface{}     `json:"data,omitempty"`
}

ApplicationUnitParams holds unit parameters used to update a unit.

type ApplicationUnset

type ApplicationUnset struct {
	ApplicationName string `json:"application"`

	// BranchName identifies the "in-flight" branch that this
	// request will unset configuration for.
	BranchName string `json:"branch"`

	Options []string `json:"options"`
}

ApplicationUnset holds the parameters for an application Unset command. Options contains the option attribute names to unset.

type ApplicationUpdate

type ApplicationUpdate struct {
	ApplicationName string             `json:"application"`
	CharmURL        string             `json:"charm-url"`
	ForceCharmURL   bool               `json:"force-charm-url"`
	ForceSeries     bool               `json:"force-series"`
	Force           bool               `json:"force"`
	MinUnits        *int               `json:"min-units,omitempty"`
	SettingsStrings map[string]string  `json:"settings,omitempty"` // Takes precedence over yaml entries if both are present.
	SettingsYAML    string             `json:"settings-yaml"`
	Constraints     *constraints.Value `json:"constraints,omitempty"`

	// Generation is the generation version in which this
	// request will update the application.
	Generation string `json:"generation"`
}

ApplicationUpdate holds the parameters for making the application Update call.

type ApplicationsCharmActionsResults

type ApplicationsCharmActionsResults struct {
	Results []ApplicationCharmActionsResult `json:"results,omitempty"`
}

ApplicationsCharmActionsResults holds a slice of ApplicationCharmActionsResult for a bulk result of charm Actions for Applications.

type ApplicationsDeploy

type ApplicationsDeploy struct {
	Applications []ApplicationDeploy `json:"applications"`
}

ApplicationsDeploy holds the parameters for deploying one or more applications.

type AuthUserInfo

type AuthUserInfo struct {
	DisplayName    string     `json:"display-name"`
	Identity       string     `json:"identity"`
	LastConnection *time.Time `json:"last-connection,omitempty"`

	// Credentials contains an optional opaque credential value to be held by
	// the client, if any.
	Credentials *string `json:"credentials,omitempty"`

	// ControllerAccess holds the access the user has to the connected controller.
	// It will be empty if the user has no access to the controller.
	ControllerAccess string `json:"controller-access"`

	// ModelAccess holds the access the user has to the connected model.
	ModelAccess string `json:"model-access"`
}

AuthUserInfo describes a logged-in local user or remote identity.

type BackupsCreateArgs

type BackupsCreateArgs struct {
	Notes      string `json:"notes"`
	NoDownload bool   `json:"no-download"`
}

BackupsCreateArgs holds the args for the API Create method.

type BackupsDownloadArgs

type BackupsDownloadArgs struct {
	ID string `json:"id"`
}

BackupsDownloadArgs holds the args for the API Download method.

type BackupsMetadataResult

type BackupsMetadataResult struct {
	ID string `json:"id"`

	Checksum       string    `json:"checksum"`
	ChecksumFormat string    `json:"checksum-format"`
	Size           int64     `json:"size"`
	Stored         time.Time `json:"stored"` // May be zero...

	Started  time.Time      `json:"started"`
	Finished time.Time      `json:"finished"` // May be zero...
	Notes    string         `json:"notes"`
	Model    string         `json:"model"`
	Machine  string         `json:"machine"`
	Hostname string         `json:"hostname"`
	Version  version.Number `json:"version"`
	Series   string         `json:"series"`

	Filename string `json:"filename"`

	// FormatVersion stores the version of the backup format.
	// All unversioned backup files are considered 0,
	// so the versioned formats start at 1.
	FormatVersion int64 `json:"format-version"`

	// ControllerUUID is the controller UUID that is backed up.
	ControllerUUID string `json:"controller-uuid"`

	// ControllerMachineID is the controller machine ID that the backup was created on.
	ControllerMachineID string `json:"controller-machine-id"`

	// ControllerMachineInstanceID is the controller machine cloud instance ID that the backup was created on.
	ControllerMachineInstanceID string `json:"controller-machine-inst-id"`

	// HANodes reflects HA configuration: number of controller nodes in HA.
	HANodes int64 `json:"ha-nodes"`
}

BackupsMetadataResult holds the metadata for a backup as returned by an API backups method (such as Create).

type Block

type Block struct {
	// Id is this blocks id.
	Id string `json:"id"`

	// Tag holds the tag of the entity that is blocked.
	Tag string `json:"tag"`

	// Type is block type as per model.BlockType.
	// Valid types are "BlockDestroy", "BlockRemove" and "BlockChange".
	Type string `json:"type"`

	// Message is a descriptive or an explanatory message
	// that the block was created with.
	Message string `json:"message,omitempty"`
}

Block describes a Juju block that protects model from corruption.

type BlockDeviceResult

type BlockDeviceResult struct {
	Result storage.BlockDevice `json:"result"`
	Error  *Error              `json:"error,omitempty"`
}

BlockDeviceResult holds the result of an API call to retrieve details of a block device.

type BlockDeviceResults

type BlockDeviceResults struct {
	Results []BlockDeviceResult `json:"results,omitempty"`
}

BlockDeviceResults holds the result of an API call to retrieve details of multiple block devices.

type BlockDevicesResult

type BlockDevicesResult struct {
	Result []storage.BlockDevice `json:"result"`
	Error  *Error                `json:"error,omitempty"`
}

BlockDevicesResult holds the result of an API call to retrieve details of all block devices relating to some entity.

type BlockDevicesResults

type BlockDevicesResults struct {
	Results []BlockDevicesResult `json:"results,omitempty"`
}

BlockDevicesResults holds the result of an API call to retrieve details of all block devices relating to some entities.

type BlockInfo

type BlockInfo struct {
	ModelUUID string          `json:"model-uuid"`
	Id        string          `json:"id"`
	Type      model.BlockType `json:"type"`
	Message   string          `json:"message"`
	Tag       string          `json:"tag"`
}

BlockInfo holds the information about a block that is tracked by multiwatcherStore.

func (*BlockInfo) EntityId

func (i *BlockInfo) EntityId() EntityId

EntityId returns a unique identifier for a block across models.

type BlockResult

type BlockResult struct {
	Result Block  `json:"result"`
	Error  *Error `json:"error,omitempty"`
}

BlockResult holds the result of an API call to retrieve details for a block.

type BlockResults

type BlockResults struct {
	Results []BlockResult `json:"results,omitempty"`
}

BlockResults holds the result of an API call to list blocks.

type BlockSwitchParams

type BlockSwitchParams struct {
	// Type is block type as per model.BlockType.
	// Valid types are "BlockDestroy", "BlockRemove" and "BlockChange".
	Type string `json:"type"`

	// Message is a descriptive or an explanatory message
	// that accompanies the switch.
	Message string `json:"message,omitempty"`
}

BlockSwitchParams holds the parameters for switching a block on/off.

type BoolResult

type BoolResult struct {
	Error  *Error `json:"error,omitempty"`
	Result bool   `json:"result"`
}

BoolResult holds the result of an API call that returns a a boolean or an error.

type BoolResults

type BoolResults struct {
	Results []BoolResult `json:"results"`
}

BoolResults holds multiple results with BoolResult each.

type BranchArg

type BranchArg struct {
	BranchName string `json:"branch"`
}

BranchArg represents an in-flight branch via its model and branch name.

type BranchInfo

type BranchInfo struct {
	ModelUUID     string                  `json:"model-uuid"`
	Id            string                  `json:"id"`
	Name          string                  `json:"name"`
	AssignedUnits map[string][]string     `json:"assigned-units"`
	Config        map[string][]ItemChange `json:"charm-config"`
	Created       int64                   `json:"created"`
	CreatedBy     string                  `json:"created-by"`
	Completed     int64                   `json:"completed"`
	CompletedBy   string                  `json:"completed-by"`
	GenerationId  int                     `json:"generation-id"`
}

BranchInfo holds data about a model generation (branch) that is tracked by multiwatcherStore.

func (*BranchInfo) EntityId

func (i *BranchInfo) EntityId() EntityId

EntityId returns a unique identifier for a generation.

type BranchInfoArgs

type BranchInfoArgs struct {
	// BranchNames is the names of branches for which info is being requested.
	BranchNames []string `json:"branches"`

	// Detailed indicates whether full unit tracking detail should returned,
	// or a summary.
	Detailed bool `json:"detailed"`
}

BranchInfoArgs transports arguments to the BranchInfo method

type BranchResults

type BranchResults struct {
	// Generations holds the details of the requested generations.
	Generations []Generation `json:"generations"`

	// Error holds the value of any error that occurred processing the request.
	Error *Error `json:"error,omitempty"`
}

BranchResults transports a collection of generation details.

type BranchStatus

type BranchStatus struct {
	AssignedUnits map[string][]string `json:"assigned-units"`
	Created       int64               `json:"created"`
	CreatedBy     string              `json:"created-by"`
}

BranchStatus holds the results for an branch Full Status.

type BranchTrackArg

type BranchTrackArg struct {
	BranchName string   `json:"branch"`
	Entities   []Entity `json:"entities"`
	NumUnits   int      `json:"num-units,omitempty"`
}

BranchTrackArg identifies an in-flight branch and a collection of entities that should be set to track changes made under the branch.

type BulkImportStorageParams

type BulkImportStorageParams struct {
	Storage []ImportStorageParams `json:"storage"`
}

BulkImportStorageParams contains the parameters for importing a collection of storage entities.

type BundleChange

type BundleChange struct {
	// Id is the unique identifier for this change.
	Id string `json:"id"`
	// Method is the action to be performed to apply this change.
	Method string `json:"method"`
	// Args holds a list of arguments to pass to the method.
	Args []interface{} `json:"args"`
	// Requires holds a list of dependencies for this change. Each dependency
	// is represented by the corresponding change id, and must be applied
	// before this change is applied.
	Requires []string `json:"requires"`
}

BundleChange holds a single change required to deploy a bundle.

type BundleChangesMapArgs

type BundleChangesMapArgs struct {
	// Id is the unique identifier for this change.
	Id string `json:"id"`
	// Method is the action to be performed to apply this change.
	Method string `json:"method"`
	// Args holds a list of arguments to pass to the method.
	Args map[string]interface{} `json:"args"`
	// Requires holds a list of dependencies for this change. Each dependency
	// is represented by the corresponding change id, and must be applied
	// before this change is applied.
	Requires []string `json:"requires"`
}

BundleChangesMapArgs holds a single change required to deploy a bundle. BundleChangesMapArgs has Args represented as a map of arguments rather than a series.

type BundleChangesMapArgsResults

type BundleChangesMapArgsResults struct {
	// Changes holds the list of changes required to deploy the bundle.
	// It is omitted if the provided bundle YAML has verification errors.
	Changes []*BundleChangesMapArgs `json:"changes,omitempty"`
	// Errors holds possible bundle verification errors.
	Errors []string `json:"errors,omitempty"`
}

BundleChangesMapArgsResults holds results of the Bundle.GetChanges call.

type BundleChangesParams

type BundleChangesParams struct {
	// BundleDataYAML is the YAML-encoded charm bundle data
	// (see "github.com/juju/charm.BundleData").
	BundleDataYAML string `json:"yaml"`
	BundleURL      string `json:"bundleURL"`
}

BundleChangesParams holds parameters for making Bundle.GetChanges calls.

type BundleChangesResults

type BundleChangesResults struct {
	// Changes holds the list of changes required to deploy the bundle.
	// It is omitted if the provided bundle YAML has verification errors.
	Changes []*BundleChange `json:"changes,omitempty"`
	// Errors holds possible bundle verification errors.
	Errors []string `json:"errors,omitempty"`
}

BundleChangesResults holds results of the Bundle.GetChanges call.

type BundleCharm

type BundleCharm struct {
	Name      string `json:"name"`
	PackageID string `json:"package-id"`
}

type BytesResult

type BytesResult struct {
	Result []byte `json:"result"`
}

BytesResult holds the result of an API call that returns a slice of bytes.

type CAASApplicationGarbageCollectArg

type CAASApplicationGarbageCollectArg struct {
	Application     Entity   `json:"application"`
	ObservedUnits   Entities `json:"observed-units"`
	DesiredReplicas int      `json:"desired-replicas"`
	ActivePodNames  []string `json:"active-pod-names"`
	Force           bool     `json:"force"`
}

CAASApplicationGarbageCollectArg holds info needed to cleanup units that have gone away permanently.

type CAASApplicationGarbageCollectArgs

type CAASApplicationGarbageCollectArgs struct {
	Args []CAASApplicationGarbageCollectArg `json:"args"`
}

CAASApplicationGarbageCollectArgs holds info needed to cleanup units that have gone away permanently.

type CAASApplicationOCIResourceResult

type CAASApplicationOCIResourceResult struct {
	Result *CAASApplicationOCIResources `json:"result,omitempty"`
	Error  *Error                       `json:"error,omitempty"`
}

CAASApplicationOCIResourceResult holds the image result or error for the queried application.

type CAASApplicationOCIResourceResults

type CAASApplicationOCIResourceResults struct {
	Results []CAASApplicationOCIResourceResult `json:"results"`
}

CAASApplicationOCIResourceResults holds all the image results for queried applications.

type CAASApplicationOCIResources

type CAASApplicationOCIResources struct {
	Images map[string]DockerImageInfo `json:"images"`
}

CAASApplicationOCIResources holds a list of image OCI resources.

type CAASApplicationProvisioningInfo

type CAASApplicationProvisioningInfo struct {
	ImagePath            string                       `json:"image-path"`
	Version              version.Number               `json:"version"`
	APIAddresses         []string                     `json:"api-addresses"`
	CACert               string                       `json:"ca-cert"`
	Constraints          constraints.Value            `json:"constraints"`
	Tags                 map[string]string            `json:"tags,omitempty"`
	Filesystems          []KubernetesFilesystemParams `json:"filesystems,omitempty"`
	Volumes              []KubernetesVolumeParams     `json:"volumes,omitempty"`
	Devices              []KubernetesDeviceParams     `json:"devices,omitempty"`
	Series               string                       `json:"series,omitempty"`
	ImageRepo            DockerImageInfo              `json:"image-repo,omitempty"`
	CharmModifiedVersion int                          `json:"charm-modified-version,omitempty"`
	CharmURL             string                       `json:"charm-url,omitempty"`
	Trust                bool                         `json:"trust,omitempty"`
	Scale                int                          `json:"scale,omitempty"`
	Error                *Error                       `json:"error,omitempty"`
}

CAASApplicationProvisioningInfo holds info needed to provision a caas application.

type CAASApplicationProvisioningInfoResults

type CAASApplicationProvisioningInfoResults struct {
	Results []CAASApplicationProvisioningInfo `json:"results"`
}

CAASApplicationProvisioningInfoResults holds OperatorProvisioningInfo results.

type CAASUnit

type CAASUnit struct {
	Tag        names.Tag
	UnitStatus *UnitStatus
}

CAASUnit holds CAAS unit information.

type CAASUnitInfo

type CAASUnitInfo struct {
	Tag        string      `json:"tag"`
	UnitStatus *UnitStatus `json:"unit-status,omitempty"`
}

CAASUnitInfo holds CAAS unit information.

type CAASUnitIntroduction

type CAASUnitIntroduction struct {
	UnitName  string `json:"unit-name"`
	AgentConf []byte `json:"agent-conf"`
}

CAASUnitIntroduction contains the agent config for CAASApplication units.

type CAASUnitIntroductionArgs

type CAASUnitIntroductionArgs struct {
	PodName string `json:"pod-name"`
	PodUUID string `json:"pod-uuid"`
}

CAASUnitIntroductionArgs is used by sidecar units to introduce themselves via CAASApplication facade.

type CAASUnitIntroductionResult

type CAASUnitIntroductionResult struct {
	Result *CAASUnitIntroduction `json:"result,omitempty"`
	Error  *Error                `json:"error,omitempty"`
}

CAASUnitIntroductionResult is returned from CAASApplication facade.

type CAASUnitTerminationResult

type CAASUnitTerminationResult struct {
	// WillRestart is true if the termination of the unit is temporary.
	WillRestart bool
	Error       *Error
}

CAASUnitTerminationResult holds result to UnitTerminating call.

type CAASUnitsResult

type CAASUnitsResult struct {
	Units []CAASUnitInfo `json:"units,omitempty"`
	Error *Error         `json:"error,omitempty"`
}

CAASUnitsResult holds a slice of CAAS unit information or an error.

type CAASUnitsResults

type CAASUnitsResults struct {
	Results []CAASUnitsResult `json:"results"`
}

CAASUnitsResults contains multiple CAAS units result.

type CIDRParams

type CIDRParams struct {
	CIDRS []string `json:"cidrs"`
}

CIDRParams contains a slice of subnet CIDRs used for querying subnets.

type CLICommandStatus

type CLICommandStatus struct {
	Output []string `json:"output,omitempty"`
	Done   bool     `json:"done,omitempty"`
	Error  *Error   `json:"error,omitempty"`
}

CLICommandStatus represents a status update for a CLI command.

type CLICommands

type CLICommands struct {
	User        string           `json:"user"`
	Credentials string           `json:"credentials,omitempty"`
	Macaroons   []macaroon.Slice `json:"macaroons,omitempty"`

	ActiveBranch string   `json:"active-branch,omitempty"`
	Commands     []string `json:"commands"`
}

CLICommands holds credentials, model and a list of CLI commands to run.

type ChangeModelCredentialParams

type ChangeModelCredentialParams struct {
	// ModelTag is a tag for the model where cloud credential change takes place.
	ModelTag string `json:"model-tag"`

	// CloudCredentialTag is the tag for the new cloud credential.
	CloudCredentialTag string `json:"credential-tag"`
}

ChangeModelCredentialParams holds the argument to replace cloud credential used by a model.

type ChangeModelCredentialsParams

type ChangeModelCredentialsParams struct {
	Models []ChangeModelCredentialParams `json:"model-credentials"`
}

ChangeModelCredentialsParams holds the arguments for changing cloud credentials on models.

type Channel

type Channel struct {
	ReleasedAt string     `json:"released-at"`
	Track      string     `json:"track"`
	Risk       string     `json:"risk"`
	Revision   int        `json:"revision"`
	Size       int        `json:"size"`
	Version    string     `json:"version"`
	Platforms  []Platform `json:"platforms"`
}

type Charm

type Charm struct {
	Revision   int                    `json:"revision"`
	URL        string                 `json:"url"`
	Config     map[string]CharmOption `json:"config"`
	Meta       *CharmMeta             `json:"meta,omitempty"`
	Actions    *CharmActions          `json:"actions,omitempty"`
	Metrics    *CharmMetrics          `json:"metrics,omitempty"`
	Manifest   *CharmManifest         `json:"manifest,omitempty"`
	LXDProfile *CharmLXDProfile       `json:"lxd-profile,omitempty"`
}

Charm holds all the charm data that the client needs. To be honest, it probably returns way more than what is actually needed.

type CharmActionSpec

type CharmActionSpec struct {
	Description string                 `json:"description"`
	Params      map[string]interface{} `json:"params"`
}

CharmActionSpec mirrors charm.ActionSpec.

type CharmActions

type CharmActions struct {
	ActionSpecs map[string]CharmActionSpec `json:"specs,omitempty"`
}

CharmActions mirrors charm.Actions.

type CharmBase

type CharmBase struct {
	Name          string   `json:"name,omitempty"`
	Channel       string   `json:"channel,omitempty"`
	Architectures []string `json:"architectures,omitempty"`
}

CharmBase mirrors charm.Base

type CharmContainer

type CharmContainer struct {
	Resource string       `json:"resource,omitempty"`
	Mounts   []CharmMount `json:"mounts,omitempty"`
}

CharmContainer mirrors charm.Container

type CharmDeployment

type CharmDeployment struct {
	DeploymentType string `json:"type"`
	DeploymentMode string `json:"mode"`
	ServiceType    string `json:"service"`
	MinVersion     string `json:"min-version"`
}

CharmDeployment mirrors charm.Deployment.

type CharmDevice

type CharmDevice struct {
	Name        string `bson:"name"`
	Description string `bson:"description"`
	Type        string `bson:"type"`
	CountMin    int64  `bson:"count-min"`
	CountMax    int64  `bson:"count-max"`
}

CharmDevice mirrors charm.Device.

type CharmHubBundle

type CharmHubBundle struct {
	Charms []BundleCharm `json:"charms,"`
}

type CharmHubCharm

type CharmHubCharm struct {
	Config      map[string]CharmOption       `json:"config"`
	Relations   map[string]map[string]string `json:"relations"`
	Subordinate bool                         `json:"subordinate"`
	UsedBy      []string                     `json:"used-by"` // bundles which use the charm
}

type CharmHubEntityFindResult

type CharmHubEntityFindResult struct {
	Results []FindResponse `json:"result"`
	Errors  ErrorResponse  `json:"errors"`
}

type CharmHubEntityInfoResult

type CharmHubEntityInfoResult struct {
	Result InfoResponse  `json:"result"`
	Errors ErrorResponse `json:"errors"`
}

type CharmHubError

type CharmHubError struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type CharmInfo

type CharmInfo struct {
	ModelUUID    string     `json:"model-uuid"`
	CharmURL     string     `json:"charm-url"`
	CharmVersion string     `json:"charm-version"`
	Life         life.Value `json:"life"`
	LXDProfile   *Profile   `json:"profile"`
	// DefaultConfig is derived from state-stored *charm.Config.
	DefaultConfig map[string]interface{} `json:"config,omitempty"`
}

CharmInfo holds the information about a charm that is tracked by the multiwatcher.

func (*CharmInfo) EntityId

func (i *CharmInfo) EntityId() EntityId

EntityId returns a unique identifier for an charm across models.

type CharmLXDProfile

type CharmLXDProfile struct {
	Config      map[string]string            `json:"config"`
	Description string                       `json:"description"`
	Devices     map[string]map[string]string `json:"devices"`
}

CharmLXDProfile mirrors charm.LXDProfile

type CharmLXDProfileResult

type CharmLXDProfileResult struct {
	LXDProfile *CharmLXDProfile `json:"lxd-profile"`
}

CharmLXDProfileResult returns the result of finding the CharmLXDProfile

type CharmManifest

type CharmManifest struct {
	Bases []CharmBase `json:"bases,omitempty"`
}

CharmManifest mirrors charm.Manifest

type CharmMeta

type CharmMeta struct {
	Name           string                       `json:"name"`
	Summary        string                       `json:"summary"`
	Description    string                       `json:"description"`
	Subordinate    bool                         `json:"subordinate"`
	Provides       map[string]CharmRelation     `json:"provides,omitempty"`
	Requires       map[string]CharmRelation     `json:"requires,omitempty"`
	Peers          map[string]CharmRelation     `json:"peers,omitempty"`
	ExtraBindings  map[string]string            `json:"extra-bindings,omitempty"`
	Categories     []string                     `json:"categories,omitempty"`
	Tags           []string                     `json:"tags,omitempty"`
	Series         []string                     `json:"series,omitempty"`
	Storage        map[string]CharmStorage      `json:"storage,omitempty"`
	Devices        map[string]CharmDevice       `json:"devices,omitempty"`
	Deployment     *CharmDeployment             `json:"deployment,omitempty"`
	PayloadClasses map[string]CharmPayloadClass `json:"payload-classes,omitempty"`
	Resources      map[string]CharmResourceMeta `json:"resources,omitempty"`
	Terms          []string                     `json:"terms,omitempty"`
	MinJujuVersion string                       `json:"min-juju-version,omitempty"`

	Containers map[string]CharmContainer `json:"containers,omitempty"`

	AssumesExpr *assumes.ExpressionTree `json:"assumes-expr,omitempty"`
}

CharmMeta mirrors charm.Meta.

type CharmMetric

type CharmMetric struct {
	Type        string `json:"type"`
	Description string `json:"description"`
}

CharmMetric mirrors charm.Metric.

type CharmMetrics

type CharmMetrics struct {
	Metrics map[string]CharmMetric `json:"metrics"`
	Plan    CharmPlan              `json:"plan"`
}

CharmMetrics mirrors charm.Metrics.

type CharmMount

type CharmMount struct {
	Storage  string `json:"storage,omitempty"`
	Location string `json:"location,omitempty"`
}

CharmMount mirrors charm.Mount

type CharmOption

type CharmOption struct {
	Type        string      `json:"type"`
	Description string      `json:"description,omitempty"`
	Default     interface{} `json:"default,omitempty"`
}

CharmOption mirrors charm.Option

type CharmOrigin

type CharmOrigin struct {
	// Source is where the charm came from, Local, CharmStore or CharmHub.
	Source string `json:"source"`
	Type   string `json:"type"`

	// ID is the CharmHub ID for this charm
	ID   string `json:"id"`
	Hash string `json:"hash,omitempty"`

	// Risk is the CharmHub channel risk, or the CharmStore channel value.
	Risk string `json:"risk,omitempty"`

	// Revision is the charm revision number.
	Revision *int    `json:"revision,omitempty"`
	Track    *string `json:"track,omitempty"`

	Architecture string `json:"architecture,omitempty"`
	OS           string `json:"os,omitempty"`
	Series       string `json:"series,omitempty"`

	// InstanceKey is a unique string associated with the application. To
	// assist with keeping KPI data in charmhub, it must be the same for every
	// charmhub Refresh action related to an application. Create with the
	// charmhub.CreateInstanceKey method. LP: 1944582
	InstanceKey string `json:"instance-key,omitempty"`
}

CharmOrigin holds the parameters for the optional location of the source of the charm.

type CharmOriginResult

type CharmOriginResult struct {
	Origin CharmOrigin `json:"charm-origin"`
	Error  *Error      `json:"error,omitempty"`
}

CharmOriginResult holds the results of AddCharms calls where a CharmOrigin was used.

type CharmPayloadClass

type CharmPayloadClass struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

CharmPayloadClass mirrors charm.PayloadClass.

type CharmPlan

type CharmPlan struct {
	Required bool `json:"required"`
}

CharmPlan mirrors charm.Plan

type CharmProfilingInfoResult

type CharmProfilingInfoResult struct {
	InstanceId      instance.Id         `json:"instance-id"`
	ModelName       string              `json:"model-name"`
	ProfileChanges  []ProfileInfoResult `json:"profile-changes"`
	CurrentProfiles []string            `json:"current-profiles"`
	Error           *Error              `json:"error"`
}

CharmProfilingInfoResult contains the result based on ProfileInfoArg values to update profiles on a machine.

type CharmRelation

type CharmRelation struct {
	Name      string `json:"name"`
	Role      string `json:"role"`
	Interface string `json:"interface"`
	Optional  bool   `json:"optional"`
	Limit     int    `json:"limit"`
	Scope     string `json:"scope"`
}

CharmRelation mirrors charm.Relation.

func NewCharmRelation

func NewCharmRelation(cr charm.Relation) CharmRelation

NewCharmRelation creates a new local CharmRelation structure from the charm.Relation structure. NOTE: when we update the database to not store a charm.Relation directly in the database, this method should take the state structure type.

type CharmResource

type CharmResource struct {
	// Name identifies the resource.
	Name string `json:"name"`

	// Type is the name of the resource type.
	Type string `json:"type"`

	// Path is where the resource will be stored.
	Path string `json:"path"`

	// Description contains user-facing info about the resource.
	Description string `json:"description,omitempty"`

	// Origin is where the resource will come from.
	Origin string `json:"origin"`

	// Revision is the revision, if applicable.
	Revision int `json:"revision"`

	// Fingerprint is the SHA-384 checksum for the resource blob.
	Fingerprint []byte `json:"fingerprint"`

	// Size is the size of the resource, in bytes.
	Size int64 `json:"size"`
}

CharmResource contains the definition for a resource.

type CharmResourceMeta

type CharmResourceMeta struct {
	Name        string `json:"name"`
	Type        string `json:"type"`
	Path        string `json:"path"`
	Description string `json:"description"`
}

CharmResourceMeta mirrors charm.ResourceMeta.

type CharmResourceResult

type CharmResourceResult struct {
	ErrorResult
	CharmResource
}

CharmResourceResult returns a charm resource result.

type CharmResourcesResults

type CharmResourcesResults struct {
	Results [][]CharmResourceResult `json:"results"`
}

CharmResourcesResults returns a list of charm resource results.

type CharmStorage

type CharmStorage struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Type        string   `json:"type"`
	Shared      bool     `json:"shared"`
	ReadOnly    bool     `json:"read-only"`
	CountMin    int      `json:"count-min"`
	CountMax    int      `json:"count-max"`
	MinimumSize uint64   `json:"minimum-size"`
	Location    string   `json:"location,omitempty"`
	Properties  []string `json:"properties,omitempty"`
}

CharmStorage mirrors charm.Storage.

type CharmURL

type CharmURL struct {
	URL string `json:"url"`
}

CharmURL identifies a single charm URL.

type CharmURLAndOrigin

type CharmURLAndOrigin struct {
	CharmURL string             `json:"charm-url"`
	Origin   CharmOrigin        `json:"charm-origin"`
	Macaroon *macaroon.Macaroon `json:"macaroon,omitempty"`
}

CharmURLAndOrigin holds the information for selecting one bundle

type CharmURLAndOrigins

type CharmURLAndOrigins struct {
	Entities []CharmURLAndOrigin `json:"entities"`
}

CharmURLAndOrigins contains a slice of charm urls with a given origin.

type CharmURLOriginResult

type CharmURLOriginResult struct {
	URL    string      `json:"url"`
	Origin CharmOrigin `json:"charm-origin"`
	Error  *Error      `json:"error,omitempty"`
}

CharmURLOriginResult holds the results of the charm's url and origin.

type CharmURLs

type CharmURLs struct {
	URLs []CharmURL `json:"urls"`
}

CharmURLs identifies multiple charm URLs.

type CharmsList

type CharmsList struct {
	Names []string `json:"names"`
}

CharmsList stores parameters for a charms.List call

type CharmsListResult

type CharmsListResult struct {
	CharmURLs []string `json:"charm-urls"`
}

CharmsListResult stores result from a charms.List call

type CharmsResponse

type CharmsResponse struct {
	Error string `json:"error,omitempty"`

	// ErrorCode holds the code associated with the error.
	// Ideally, Error would hold an Error object and the
	// code would be in that, but for backward compatibility,
	// we cannot do that.
	ErrorCode string `json:"error-code,omitempty"`

	// ErrorInfo holds extra information associated with the error.
	ErrorInfo map[string]interface{} `json:"error-info,omitempty"`

	CharmURL string   `json:"charm-url,omitempty"`
	Files    []string `json:"files,omitempty"`
}

CharmsResponse is the server response to charm upload or GET requests.

type ClaimLeadershipBulkParams

type ClaimLeadershipBulkParams struct {

	// Params are the parameters for making a bulk leadership claim.
	Params []ClaimLeadershipParams `json:"params"`
}

ClaimLeadershipBulkParams is a collection of parameters for making a bulk leadership claim.

type ClaimLeadershipBulkResults

type ClaimLeadershipBulkResults ErrorResults

ClaimLeadershipBulkResults is the collection of results from a bulk leadership claim.

type ClaimLeadershipParams

type ClaimLeadershipParams struct {

	// ApplicationTag is the application for which you want to make a
	// leadership claim.
	ApplicationTag string `json:"application-tag"`

	// UnitTag is the unit which is making the leadership claim.
	UnitTag string `json:"unit-tag"`

	// DurationSeconds is the number of seconds for which the lease is required.
	DurationSeconds float64 `json:"duration"`
}

ClaimLeadershipParams are the parameters needed for making a leadership claim.

type Cloud

type Cloud struct {
	Type              string                            `json:"type"`
	HostCloudRegion   string                            `json:"host-cloud-region,omitempty"`
	AuthTypes         []string                          `json:"auth-types,omitempty"`
	Endpoint          string                            `json:"endpoint,omitempty"`
	IdentityEndpoint  string                            `json:"identity-endpoint,omitempty"`
	StorageEndpoint   string                            `json:"storage-endpoint,omitempty"`
	Regions           []CloudRegion                     `json:"regions,omitempty"`
	CACertificates    []string                          `json:"ca-certificates,omitempty"`
	SkipTLSVerify     bool                              `json:"skip-tls-verify,omitempty"`
	Config            map[string]interface{}            `json:"config,omitempty"`
	RegionConfig      map[string]map[string]interface{} `json:"region-config,omitempty"`
	IsControllerCloud bool                              `json:"is-controller-cloud,omitempty"`
}

Cloud holds information about a cloud.

type CloudAction

type CloudAction string

CloudAction is an action that can be performed on a cloud.

const (
	GrantCloudAccess  CloudAction = "grant"
	RevokeCloudAccess CloudAction = "revoke"
)

Actions that can be preformed on a cloud.

type CloudCredential

type CloudCredential struct {
	// AuthType is the authentication type.
	AuthType string `json:"auth-type"`

	// Attributes contains non-secret credential values.
	Attributes map[string]string `json:"attrs,omitempty"`

	// Redacted is a list of redacted attributes
	Redacted []string `json:"redacted,omitempty"`
}

CloudCredential contains a cloud credential possibly with secrets redacted.

type CloudCredentialArg

type CloudCredentialArg struct {
	CloudName      string `json:"cloud-name"`
	CredentialName string `json:"credential-name"`
}

CloudCredentialArg defines a credential in terms of its cloud and name. It is used to request detailed content for the credential stored on the controller.

func (CloudCredentialArg) IsEmpty

func (p CloudCredentialArg) IsEmpty() bool

IsEmpty returns whether a cloud credential argument is empty.

type CloudCredentialArgs

type CloudCredentialArgs struct {
	Credentials    []CloudCredentialArg `json:"credentials,omitempty"`
	IncludeSecrets bool                 `json:"include-secrets"`
}

CloudCredentialArgs defines an input required to make a valid call to get credentials content stored on the controller.

type CloudCredentialResult

type CloudCredentialResult struct {
	Result *CloudCredential `json:"result,omitempty"`
	Error  *Error           `json:"error,omitempty"`
}

CloudCredentialResult contains a CloudCredential or an error.

type CloudCredentialResults

type CloudCredentialResults struct {
	Results []CloudCredentialResult `json:"results,omitempty"`
}

CloudCredentialResults contains a set of CloudCredentialResults.

type CloudDetails

type CloudDetails struct {
	Type             string        `json:"type"`
	AuthTypes        []string      `json:"auth-types,omitempty"`
	Endpoint         string        `json:"endpoint,omitempty"`
	IdentityEndpoint string        `json:"identity-endpoint,omitempty"`
	StorageEndpoint  string        `json:"storage-endpoint,omitempty"`
	Regions          []CloudRegion `json:"regions,omitempty"`
}

CloudDetails holds information about a cloud.

type CloudImageMetadata

type CloudImageMetadata struct {
	// ImageId is an image identifier.
	ImageId string `json:"image-id"`

	// Stream contains reference to a particular stream,
	// for e.g. "daily" or "released"
	Stream string `json:"stream,omitempty"`

	// Region is the name of cloud region associated with the image.
	Region string `json:"region"`

	// Version is OS version, for e.g. "12.04".
	Version string `json:"version"`

	// Series is OS series, for e.g. "trusty".
	Series string `json:"series"`

	// Arch is the architecture for this cloud image, for e.g. "amd64"
	Arch string `json:"arch"`

	// VirtType contains the virtualisation type of the cloud image, for e.g. "pv", "hvm". "kvm".
	VirtType string `json:"virt-type,omitempty"`

	// RootStorageType contains type of root storage, for e.g. "ebs", "instance".
	RootStorageType string `json:"root-storage-type,omitempty"`

	// RootStorageSize contains size of root storage in gigabytes (GB).
	RootStorageSize *uint64 `json:"root-storage-size,omitempty"`

	// Source describes where this image is coming from: is it public? custom?
	Source string `json:"source"`

	// Priority is an importance factor for image metadata.
	// Higher number means higher priority.
	// This will allow to sort metadata by importance.
	Priority int `json:"priority"`
}

CloudImageMetadata holds cloud image metadata properties.

type CloudImageMetadataList

type CloudImageMetadataList struct {
	Metadata []CloudImageMetadata `json:"metadata,omitempty"`
}

CloudImageMetadataList holds a list of cloud image metadata.

type CloudInfo

type CloudInfo struct {
	CloudDetails `json:",inline"`

	// Users contains information about the users that have access
	// to the cloud. Administrators can see all users that have access;
	// other users can only see their own details.
	Users []CloudUserInfo `json:"users"`
}

CloudInfo holds information about a cloud and user who can access it.

type CloudInfoResult

type CloudInfoResult struct {
	Result *CloudInfo `json:"result,omitempty"`
	Error  *Error     `json:"error,omitempty"`
}

CloudInfoResult holds the result of a CloudInfo call.

type CloudInfoResults

type CloudInfoResults struct {
	Results []CloudInfoResult `json:"results"`
}

CloudInfoResults holds the result of a bulk CloudInfo call.

type CloudInstanceTypesConstraint

type CloudInstanceTypesConstraint struct {
	// CloudTag is the tag of the cloud for which instances types
	// should be returned.
	CloudTag string `json:"cloud-tag"`

	// CloudRegion is the name of the region for which instance
	// types should be returned.
	CloudRegion string `json:"region"`

	// Constraints, if specified, contains the constraints to filter
	// the instance types by. If Constraints is not specified, then
	// no filtering by constraints will take place: all instance
	// types supported by the region will be returned.
	Constraints *constraints.Value `json:"constraints,omitempty"`
}

CloudInstanceTypesConstraint contains the cloud information and constraints necessary to query for instance types on a given cloud.

type CloudInstanceTypesConstraints

type CloudInstanceTypesConstraints struct {
	Constraints []CloudInstanceTypesConstraint `json:"constraints"`
}

CloudInstanceTypesConstraints contains a slice of CloudInstanceTypesConstraint.

type CloudRegion

type CloudRegion struct {
	Name             string `json:"name"`
	Endpoint         string `json:"endpoint,omitempty"`
	IdentityEndpoint string `json:"identity-endpoint,omitempty"`
	StorageEndpoint  string `json:"storage-endpoint,omitempty"`
}

CloudRegion holds information about a cloud region.

type CloudResult

type CloudResult struct {
	Cloud *Cloud `json:"cloud,omitempty"`
	Error *Error `json:"error,omitempty"`
}

CloudResult contains a cloud definition or an error.

type CloudResults

type CloudResults struct {
	Results []CloudResult `json:"results,omitempty"`
}

CloudResults contains a set of CloudResults.

type CloudSpec

type CloudSpec struct {
	Type              string           `json:"type"`
	Name              string           `json:"name"`
	Region            string           `json:"region,omitempty"`
	Endpoint          string           `json:"endpoint,omitempty"`
	IdentityEndpoint  string           `json:"identity-endpoint,omitempty"`
	StorageEndpoint   string           `json:"storage-endpoint,omitempty"`
	Credential        *CloudCredential `json:"credential,omitempty"`
	CACertificates    []string         `json:"cacertificates,omitempty"`
	SkipTLSVerify     bool             `json:"skip-tls-verify,omitempty"`
	IsControllerCloud bool             `json:"is-controller-cloud,omitempty"`
}

CloudSpec holds a cloud specification.

type CloudSpecResult

type CloudSpecResult struct {
	Result *CloudSpec `json:"result,omitempty"`
	Error  *Error     `json:"error,omitempty"`
}

CloudSpecResult contains a CloudSpec or an error.

type CloudSpecResults

type CloudSpecResults struct {
	Results []CloudSpecResult `json:"results,omitempty"`
}

CloudSpecResults contains a set of CloudSpecResults.

type CloudUserInfo

type CloudUserInfo struct {
	UserName    string `json:"user"`
	DisplayName string `json:"display-name"`
	Access      string `json:"access"`
}

CloudUserInfo holds information on a user who has access to a cloud. Cloud admins can see this information for all users who have access, so it should not include sensitive information.

type CloudsResult

type CloudsResult struct {
	// Clouds is a map of clouds, keyed by cloud tag.
	Clouds map[string]Cloud `json:"clouds,omitempty"`
}

CloudsResult contains a set of Clouds.

type CommitHookChangesArg

type CommitHookChangesArg struct {
	Tag string `json:"tag"`

	UpdateNetworkInfo    bool                   `json:"update-network-info"`
	RelationUnitSettings []RelationUnitSettings `json:"relation-unit-settings,omitempty"`
	OpenPorts            []EntityPortRange      `json:"open-ports,omitempty"`
	ClosePorts           []EntityPortRange      `json:"close-ports,omitempty"`
	SetUnitState         *SetUnitStateArg       `json:"unit-state,omitempty"`
	AddStorage           []StorageAddParams     `json:"add-storage,omitempty"`
	SetPodSpec           *PodSpec               `json:"pod-spec,omitempty"`
	SetRawK8sSpec        *PodSpec               `json:"set-raw-k8s-spec,omitempty"`
}

CommitHookChangesArg holds a unit tag and a list of optional uniter API call payloads that are to be executed transactionally.

type CommitHookChangesArgs

type CommitHookChangesArgs struct {
	Args []CommitHookChangesArg `json:"args"`
}

CommitHookChangesArgs serves as a container for CommitHookChangesArg objects to be processed by the controller.

type ConfigResult

type ConfigResult struct {
	Config map[string]interface{} `json:"config"`
	Error  *Error                 `json:"error,omitempty"`
}

ConfigResults holds configuration values for an entity.

type ConfigSet

type ConfigSet struct {
	ApplicationName string `json:"application"`

	// Generation is the generation version that this request
	// will set application configuration for.
	Generation string `json:"generation"`

	Config     map[string]string `json:"config"`
	ConfigYAML string            `json:"config-yaml"`
}

ConfigSet holds the parameters for an application and charm config set command.

type ConfigSetArgs

type ConfigSetArgs struct {
	Args []ConfigSet
}

ConfigSetArgs holds the parameters for setting application and charm config values for specified applications.

type ConfigSettings

type ConfigSettings map[string]interface{}

ConfigSettings holds unit, application or charm configuration settings with string keys and arbitrary values.

type ConfigSettingsResult

type ConfigSettingsResult struct {
	Error    *Error         `json:"error,omitempty"`
	Settings ConfigSettings `json:"settings"`
}

ConfigSettingsResult holds a configuration map or an error.

type ConfigSettingsResults

type ConfigSettingsResults struct {
	Results []ConfigSettingsResult `json:"results"`
}

ConfigSettingsResults holds multiple configuration maps or errors.

type ConfigValue

type ConfigValue struct {
	Value  interface{} `json:"value"`
	Source string      `json:"source"`
}

ConfigValue encapsulates a configuration value and its source.

type ConstraintsResult

type ConstraintsResult struct {
	Error       *Error            `json:"error,omitempty"`
	Constraints constraints.Value `json:"constraints"`
}

ConstraintsResult holds machine constraints or an error.

type ConstraintsResults

type ConstraintsResults struct {
	Results []ConstraintsResult `json:"results"`
}

ConstraintsResults holds multiple constraints results.

type ConsumeApplicationArg

type ConsumeApplicationArg struct {
	// The offer to be consumed.
	ApplicationOfferDetails

	// Macaroon is used for authentication.
	Macaroon *macaroon.Macaroon `json:"macaroon,omitempty"`

	// ControllerInfo contains connection details to the controller
	// hosting the offer.
	ControllerInfo *ExternalControllerInfo `json:"external-controller,omitempty"`

	// ApplicationAlias is the name of the alias to use for the application name.
	ApplicationAlias string `json:"application-alias,omitempty"`
}

ConsumeApplicationArg holds the arguments for consuming a remote application.

type ConsumeApplicationArgs

type ConsumeApplicationArgs struct {
	Args []ConsumeApplicationArg `json:"args,omitempty"`
}

ConsumeApplicationArgs is a collection of arg for consuming applications.

type ConsumeOfferDetails

type ConsumeOfferDetails struct {
	Offer          *ApplicationOfferDetails `json:"offer,omitempty"`
	Macaroon       *macaroon.Macaroon       `json:"macaroon,omitempty"`
	ControllerInfo *ExternalControllerInfo  `json:"external-controller,omitempty"`
}

ConsumeOfferDetails contains the details necessary to consume an application offer.

type ConsumeOfferDetailsArg

type ConsumeOfferDetailsArg struct {
	OfferURLs OfferURLs `json:"offer-urls"`
	UserTag   string    `json:"user-tag,omitempty"`
}

ConsumeOfferDetailsArg holds arguments for querying the details used for consuming offers.

type ConsumeOfferDetailsResult

type ConsumeOfferDetailsResult struct {
	ConsumeOfferDetails
	Error *Error `json:"error,omitempty"`
}

ConsumeOfferDetailsResult contains the details necessary to consume an application offer or an error.

type ConsumeOfferDetailsResults

type ConsumeOfferDetailsResults struct {
	Results []ConsumeOfferDetailsResult `json:"results,omitempty"`
}

ConsumeOfferDetailsResults represents the result of a ConsumeOfferDetails call.

type ContainerConfig

type ContainerConfig struct {
	ProviderType               string                 `json:"provider-type"`
	AuthorizedKeys             string                 `json:"authorized-keys"`
	SSLHostnameVerification    bool                   `json:"ssl-hostname-verification"`
	LegacyProxy                proxy.Settings         `json:"legacy-proxy"`
	JujuProxy                  proxy.Settings         `json:"juju-proxy"`
	AptProxy                   proxy.Settings         `json:"apt-proxy"`
	SnapProxy                  proxy.Settings         `json:"snap-proxy"`
	SnapStoreAssertions        string                 `json:"snap-store-assertions"`
	SnapStoreProxyID           string                 `json:"snap-store-proxy-id"`
	SnapStoreProxyURL          string                 `json:"snap-store-proxy-url"`
	AptMirror                  string                 `json:"apt-mirror,omitempty"`
	CloudInitUserData          map[string]interface{} `json:"cloudinit-userdata,omitempty"`
	ContainerInheritProperties string                 `json:"container-inherit-properties,omitempty"`
	*UpdateBehavior
}

ContainerConfig contains information from the model config that is needed for container cloud-init.

type ContainerLXDProfile

type ContainerLXDProfile struct {
	Profile CharmLXDProfile `json:"profile" yaml:"profile"`
	Name    string          `json:"name" yaml:"name"`
}

ContainerLXDProfile contains the charm.LXDProfile information in addition to the name of the profile.

type ContainerManagerConfig

type ContainerManagerConfig struct {
	ManagerConfig map[string]string `json:"config"`
}

ContainerManagerConfig contains information from the model config that is needed for configuring the container manager.

type ContainerManagerConfigParams

type ContainerManagerConfigParams struct {
	Type instance.ContainerType `json:"type"`
}

ContainerManagerConfigParams contains the parameters for the ContainerManagerConfig provisioner API call.

type ContainerProfileResult

type ContainerProfileResult struct {
	Error       *Error                 `json:"error,omitempty"`
	LXDProfiles []*ContainerLXDProfile `json:"lxd-profiles,omitempty"`
}

ContainerProfileResult returns the result of finding the CharmLXDProfile and name of the lxd profile to be used for 1 unit on the container

type ContainerProfileResults

type ContainerProfileResults struct {
	Results []ContainerProfileResult `json:"results"`
}

ContainerProfileResults returns the ContainerProfileResult for each unit to be placed on the container.

type ContainerTypeResult

type ContainerTypeResult struct {
	Type  instance.ContainerType `json:"container-type"`
	Error *Error                 `json:"error"`
}

ContainerTypeResult holds the result of a machine's ContainerType.

type ControllerAPIInfoResult

type ControllerAPIInfoResult struct {
	Addresses []string `json:"addresses"`
	CACert    string   `json:"cacert"`
	Error     *Error   `json:"error,omitempty"`
}

ControllerAPIInfoResult holds controller api address details.

type ControllerAPIInfoResults

type ControllerAPIInfoResults struct {
	Results []ControllerAPIInfoResult `json:"results"`
}

ControllerAPIInfoResults holds controller api address details results.

type ControllerAction

type ControllerAction string

ControllerAction is an action that can be performed on a model.

const (
	GrantControllerAccess  ControllerAction = "grant"
	RevokeControllerAccess ControllerAction = "revoke"
)

Actions that can be preformed on a model.

type ControllerConfig

type ControllerConfig map[string]interface{}

ControllerConfig holds a controller configuration.

type ControllerConfigResult

type ControllerConfigResult struct {
	Config ControllerConfig `json:"config"`
}

ControllerConfigResult holds controller configuration.

type ControllerConfigSet

type ControllerConfigSet struct {
	Config map[string]interface{} `json:"config"`
}

ControllerConfigSet holds new config values for Controller.ConfigSet.

type ControllerCredentialInfo

type ControllerCredentialInfo struct {
	// Content has comprehensive credential content.
	Content CredentialContent `json:"content,omitempty"`

	// Models contains models that are using ths credential.
	Models []ModelAccess `json:"models,omitempty"`
}

ControllerCredentialInfo contains everything Juju stores on the controller about the credential - its contents as well as what models use it and what access currently logged in user, a credential owner, has to these models.

type ControllerVersionResults

type ControllerVersionResults struct {
	Version   string `json:"version"`
	GitCommit string `json:"git-commit"`
}

ControllerVersionResults holds the results from an api call to get the controller's version information.

type ControllersChangeResult

type ControllersChangeResult struct {
	Result ControllersChanges `json:"result"`
	Error  *Error             `json:"error,omitempty"`
}

ControllersChangeResult contains the results of a single EnableHA API call or an error.

type ControllersChangeResults

type ControllersChangeResults struct {
	Results []ControllersChangeResult `json:"results"`
}

ControllersChangeResults contains the results of the EnableHA API call.

type ControllersChanges

type ControllersChanges struct {
	Added      []string `json:"added,omitempty"`
	Maintained []string `json:"maintained,omitempty"`
	Removed    []string `json:"removed,omitempty"`
	Converted  []string `json:"converted,omitempty"`
}

ControllersChanges lists the servers that have been added, removed or maintained in the pool as a result of an enable-ha operation.

type ControllersSpec

type ControllersSpec struct {
	NumControllers int               `json:"num-controllers"`
	Constraints    constraints.Value `json:"constraints,omitempty"`
	// Series is the series to associate with new controller machines.
	// If this is empty, then the model's default series is used.
	Series string `json:"series,omitempty"`
	// Placement defines specific machines to become new controller machines.
	Placement []string `json:"placement,omitempty"`
}

ControllersServersSpec contains arguments for the EnableHA client API call.

type ControllersSpecs

type ControllersSpecs struct {
	Specs []ControllersSpec `json:"specs"`
}

ControllersServersSpecs contains all the arguments for the EnableHA API call.

type CountedEntity

type CountedEntity string

CountedEntity identifies an entity that has a count.

const (
	Machines CountedEntity = "machines"
	Cores    CountedEntity = "cores"
	Units    CountedEntity = "units"
)

type CreateSecretArg

type CreateSecretArg struct {
	// Type is "blob" for secrets where the data is passed
	// in here; "password" is use for where the actual
	// value is generated server side using arguments
	// in Params.
	Type string `json:"type"`
	// Path represents a unique string used to identify a secret.
	Path string `json:"path"`
	// RotateInterval is how often a secret should be rotated.
	RotateInterval time.Duration `json:"rotate-interval"`
	// Status represents the secret's status.
	Status string `json:"status"`
	// Description represents the secret's description.
	Description string `json:"description,omitempty"`
	// Params are used when generating secrets server side.
	// See core/secrets/secret.go.
	Params map[string]interface{} `json:"params,omitempty"`
	// Tags are the secret tags.
	Tags map[string]string `json:"tags,omitempty"`
	// Data is the key values of the secret value itself.
	Data map[string]string `json:"data,omitempty"`
}

CreateSecretArg holds the args for creating a secret.

type CreateSecretArgs

type CreateSecretArgs struct {
	Args []CreateSecretArg `json:"args"`
}

CreateSecretArgs holds args for creating secrets.

type CreateSpaceParams

type CreateSpaceParams struct {
	CIDRs      []string `json:"cidrs"`
	SpaceTag   string   `json:"space-tag"`
	Public     bool     `json:"public"`
	ProviderId string   `json:"provider-id,omitempty"`
}

CreateSpaceParams holds the space tag and at least one subnet tag required to create a new space.

type CreateSpaceParamsV4

type CreateSpaceParamsV4 struct {
	SubnetTags []string `json:"subnet-tags"`
	SpaceTag   string   `json:"space-tag"`
	Public     bool     `json:"public"`
	ProviderId string   `json:"provider-id,omitempty"`
}

CreateSpaceParamsV4 holds the space tag and at least one subnet tag required to create a new space.

type CreateSpacesParams

type CreateSpacesParams struct {
	Spaces []CreateSpaceParams `json:"spaces"`
}

CreateSpacesParams holds the arguments of the AddSpaces API call.

type CreateSpacesParamsV4

type CreateSpacesParamsV4 struct {
	Spaces []CreateSpaceParamsV4 `json:"spaces"`
}

CreateSpacesParamsV4 holds the arguments of the AddSpaces API call.

type CreateSubnetParams

type CreateSubnetParams struct {
	SubnetTag string   `json:"subnet-tag,omitempty"`
	SpaceTag  string   `json:"space-tag"`
	Zones     []string `json:"zones,omitempty"`
	VLANTag   int      `json:"vlan-tag,omitempty"`
	IsPublic  bool     `json:"is-public"`
}

CreateSubnetParams holds a subnet and space tags, vlan tag, and a list of zones to associate the subnet to.

type CreateSubnetsParams

type CreateSubnetsParams struct {
	Subnets []CreateSubnetParams `json:"subnets"`
}

CreateSubnetsParams holds the arguments of CreateSubnets API call.

type CredentialContent

type CredentialContent struct {
	// Name is the short name of the credential.
	Name string `json:"name"`

	// Cloud is the cloud name to which this credential belongs.
	Cloud string `json:"cloud"`

	// AuthType is the authentication type.
	AuthType string `json:"auth-type"`

	// Valid indicates whether credential is valid.
	Valid *bool `json:"valid,omitempty"`

	// Attributes contains credential values.
	Attributes map[string]string `json:"attrs,omitempty"`
}

CredentialContent contains a cloud credential content.

type CredentialContentResult

type CredentialContentResult struct {
	Result *ControllerCredentialInfo `json:"result,omitempty"`
	Error  *Error                    `json:"error,omitempty"`
}

CredentialContentResult contains comprehensive information about stored credential or an error.

type CredentialContentResults

type CredentialContentResults struct {
	Results []CredentialContentResult `json:"results,omitempty"`
}

CredentialContentResults contains a set of CredentialContentResults.

type Creds

type Creds struct {
	AuthTag  string `json:"auth-tag"`
	Password string `json:"password"`
	Nonce    string `json:"nonce"`
}

Creds holds credentials for identifying an entity.

type DashboardInfo

type DashboardInfo struct {
	Addresses []string `json:"addresses"`
	UseTunnel bool     `json:"use-tunnel"`
	Error     *Error   `json:"error,omitempty"`
}

DashboardInfo holds the results from an api call to get address info for the juju dashboard.

type Delta

type Delta struct {
	// If Removed is true, the entity has been removed;
	// otherwise it has been created or changed.
	Removed bool `json:"removed"`
	// Entity holds data about the entity that has changed.
	Entity EntityInfo `json:"entity"`
}

Delta holds details of a change to the model.

func (*Delta) MarshalJSON

func (d *Delta) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*Delta) UnmarshalJSON

func (d *Delta) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler.

type DeployAttachment

type DeployAttachment struct {
	// A URI describing the attachment. The URI schema dicates the
	// attachment type.
	URI string `json:"uri"`

	// When the attachment points to a resource that is local to the client
	// (e.g. a bundle, include file, controller details etc.), Data will
	// contain a serialized version of the attachment contents.
	Data json.RawMessage `json:"data,omitempty"`
}

DeployAttachment describes a generic payload which the client provides as part of a deploy request.

type DeployMode

type DeployMode string

DeployMode specifies the deploy mode that the controller should use.

const (
	// DeployModeAdditive instructs the controller to perform a diff against
	// the current model and only create entities that are not currently
	// part of the model.
	DeployModeAdditive DeployMode = "additive"
)

type DeployOptions

type DeployOptions struct {
	// Specifies the deploy mode that the controller should use.
	Mode DeployMode `json:"mode"`

	// An optional deployment ID to associate with the entities that will
	// be created as part of this deployment. If omitted, the controller
	// will allocate (and return) a unique deployment ID.
	DeploymentID string `json:"deployment-id,omitempty"`

	// If set to true, the controller will not perform any changes but
	// simply return back the list of operations that would normally
	// perform.
	DryRun bool `json:"dry-run"`

	// Force allows clients to effectively bypass the safety checks
	// performed by the controller and force the deployment to proceed.
	// Warning: using force may cause things to break.
	Force bool `json:"force"`
}

DeployOptions encapsulates the set of options that clients may provide to control a server-side deployment.

type DeployRequest

type DeployRequest struct {
	Options DeployOptions `json:"options"`

	// A set of bundles to be deployed.
	//
	// The first entry in the bundle list must always point to the base
	// bundle; all subsequent target attachments will be interpreted as
	// overlays. The first entry may still contain a multi-doc bundle
	// but the same rules apply (i.e. the first doc will be treated as
	// the base bundle).
	//
	// Clients may optionally generate and append an additional overlay to
	// model any overrides that the user specified when invoking the deploy
	// command (e.g. specify trust, endpoint bindings, deployment targets,
	// number of units etc.).
	Bundles []DeployAttachment `json:"targets"`

	// A list of additional information attachments provided by the client
	// when retrying a deploy request after the controller responds with
	// an ErrAdditionalInformationRequired error.
	Attachments []DeployAttachment `json:"attachments,omitempty"`
}

DeployRequest describes a request to transactionally deploy a base bundle which may be optionally accompanied by one or more overlay documents.

type DeployResult

type DeployResult struct {
	// DeploymentID is the ID that the controller associated with this
	// deployment. It is only populated when the deploy request was
	// successful.
	DeploymentID string `json:"deployment-id,omitempty"`

	// DeploymentLog contains the list of changes performed by the controller
	// as part of the deployment. It is only populated when the deploy request
	// was successful.
	DeploymentLog []string `json:"deployment-log,omitempty"`

	// Error is populated when the deploy request failed. Clients should
	// always check if the controller responded with an
	// ErrAdditionalInformationRequired code and retry the original request
	// with the required information attached.
	Error *Error `json:"error,omitempty"`
}

DeployResult describes the outcome of a deploy request.

type DeployerConnectionValues

type DeployerConnectionValues struct {
	APIAddresses []string `json:"api-addresses"`
}

DeployerConnectionValues containers the result of deployer.ConnectionInfo API call.

type DestroyApplicationInfo

type DestroyApplicationInfo struct {
	// DetachedStorage is the tags of storage instances that will be
	// detached from the application's units, and will remain in the
	// model after the units are removed.
	DetachedStorage []Entity `json:"detached-storage,omitempty"`

	// DestroyedStorage is the tags of storage instances that will be
	// destroyed as a result of destroying the application.
	DestroyedStorage []Entity `json:"destroyed-storage,omitempty"`

	// DestroyedUnits is the tags of units that will be destroyed
	// as a result of destroying the application.
	DestroyedUnits []Entity `json:"destroyed-units,omitempty"`
}

DestroyApplicationInfo contains information related to the removal of an application.

type DestroyApplicationOffers

type DestroyApplicationOffers struct {
	OfferURLs []string `json:"offer-urls"`
	Force     bool     `json:"force,omitempty"`
}

DestroyApplicationOffers holds parameters for the DestroyOffers call.

type DestroyApplicationParams

type DestroyApplicationParams struct {
	// ApplicationTag holds the tag of the application to destroy.
	ApplicationTag string `json:"application-tag"`

	// DestroyStorage controls whether or not storage attached to
	// units of the application should be destroyed.
	DestroyStorage bool `json:"destroy-storage,omitempty"`

	// Force controls whether or not the destruction of an application
	// will be forced, i.e. ignore operational errors.
	Force bool `json:"force"`

	// MaxWait specifies the amount of time that each step in application removal
	// will wait before forcing the next step to kick-off. This parameter
	// only makes sense in combination with 'force' set to 'true'.
	MaxWait *time.Duration `json:"max-wait,omitempty"`
}

DestroyApplicationParams holds parameters for the Application.DestroyApplication call.

type DestroyApplicationResult

type DestroyApplicationResult struct {
	Error *Error                  `json:"error,omitempty"`
	Info  *DestroyApplicationInfo `json:"info,omitempty"`
}

DestroyApplicationResult contains one of the results of a DestroyApplication API request.

type DestroyApplicationResults

type DestroyApplicationResults struct {
	Results []DestroyApplicationResult `json:"results,omitempty"`
}

DestroyApplicationResults contains the results of a DestroyApplication API request.

type DestroyApplicationUnits

type DestroyApplicationUnits struct {
	UnitNames []string `json:"unit-names"`
}

DestroyApplicationUnits holds parameters for the deprecated Application.DestroyUnits call.

type DestroyApplicationsParams

type DestroyApplicationsParams struct {
	Applications []DestroyApplicationParams `json:"applications"`
}

DestroyApplicationsParams holds bulk parameters for the Application.DestroyApplication call.

type DestroyConsumedApplicationParams

type DestroyConsumedApplicationParams struct {
	ApplicationTag string `json:"application-tag"`

	// Force controls whether or not the destruction process ignores
	// operational errors. When true, the process will ignore them.
	Force *bool `json:"force,omitempty"`

	// MaxWait specifies the amount of time that each step in application removal
	// will wait before forcing the next step to kick-off. This parameter
	// only makes sense in combination with 'force' set to 'true'.
	MaxWait *time.Duration `json:"max-wait,omitempty"`
}

DestroyConsumedApplicationParams holds the parameters for the RemoteApplication.Destroy call.

type DestroyConsumedApplicationsParams

type DestroyConsumedApplicationsParams struct {
	Applications []DestroyConsumedApplicationParams `json:"applications"`
}

DestroyConsumedApplicationsParams holds bulk parameters for the Application.DestroyConsumedApplication call.

type DestroyControllerArgs

type DestroyControllerArgs struct {
	// DestroyModels specifies whether or not the hosted models
	// should be destroyed as well. If this is not specified, and there are
	// other hosted models, the destruction of the controller will fail.
	DestroyModels bool `json:"destroy-models"`

	// DestroyStorage controls whether or not storage in the model (and
	// hosted models, if DestroyModels is true) should be destroyed.
	//
	// This is ternary: nil, false, or true. If nil and there is persistent
	// storage in the model (or hosted models), an error with the code
	// params.CodeHasPersistentStorage will be returned.
	DestroyStorage *bool `json:"destroy-storage,omitempty"`

	// Force specifies whether hosted model destruction will be forced,
	// i.e. keep going despite operational errors.
	Force *bool `json:"force,omitempty"`

	// MaxWait specifies the amount of time that each hosted model destroy step
	// will wait before forcing the next step to kick-off.
	// This parameter only makes sense in combination with 'force' set to 'true'.
	MaxWait *time.Duration `json:"max-wait,omitempty"`

	// ModelTimeout specifies how long to wait for each hosted model destroy process.
	ModelTimeout *time.Duration `json:"model-timeout,omitempty"`
}

DestroyControllerArgs holds the arguments for destroying a controller.

type DestroyMachineInfo

type DestroyMachineInfo struct {
	// DetachedStorage is the tags of storage instances that will be
	// detached from the machine (assigned units) as a result of
	// destroying the machine, and will remain in the model after
	// the machine and unit are removed.
	DetachedStorage []Entity `json:"detached-storage,omitempty"`

	// DestroyedStorage is the tags of storage instances that will be
	// destroyed as a result of destroying the machine.
	DestroyedStorage []Entity `json:"destroyed-storage,omitempty"`

	// DestroyedStorage is the tags of units that will be destroyed
	// as a result of destroying the machine.
	DestroyedUnits []Entity `json:"destroyed-units,omitempty"`
}

DestroyMachineInfo contains information related to the removal of a machine.

type DestroyMachineResult

type DestroyMachineResult struct {
	Error *Error              `json:"error,omitempty"`
	Info  *DestroyMachineInfo `json:"info,omitempty"`
}

DestroyMachineResult contains one of the results of a MachineManager.Destroy API request.

type DestroyMachineResults

type DestroyMachineResults struct {
	Results []DestroyMachineResult `json:"results,omitempty"`
}

DestroyMachineResults contains the results of a MachineManager.Destroy API request.

type DestroyMachines

type DestroyMachines struct {
	MachineNames []string `json:"machine-names"`
	Force        bool     `json:"force"`
}

DestroyMachines holds parameters for the DestroyMachines call. This is the legacy params struct used with the client facade. TODO(wallyworld) - remove in Juju 3.0

type DestroyMachinesParams

type DestroyMachinesParams struct {
	MachineTags []string `json:"machine-tags"`
	Force       bool     `json:"force,omitempty"`
	Keep        bool     `json:"keep,omitempty"`

	// MaxWait specifies the amount of time that each step in machine destroy process
	// will wait before forcing the next step to kick-off. This parameter
	// only makes sense in combination with 'force' set to 'true'.
	MaxWait *time.Duration `json:"max-wait,omitempty"`
}

DestroyMachinesParams holds parameters for the DestroyMachinesWithParams call.

type DestroyModelParams

type DestroyModelParams struct {
	// ModelTag is the tag of the model to destroy.
	ModelTag string `json:"model-tag"`

	// DestroyStorage controls whether or not storage in the model.
	//
	// This is ternary: nil, false, or true. If nil and there is persistent
	// storage in the model, an error with the code
	// params.CodeHasPersistentStorage will be returned.
	DestroyStorage *bool `json:"destroy-storage,omitempty"`

	// Force specifies whether model destruction will be forced, i.e.
	// keep going despite operational errors.
	Force *bool `json:"force,omitempty"`

	// MaxWait specifies the amount of time that each step in model destroy process
	// will wait before forcing the next step to kick-off. This parameter
	// only makes sense in combination with 'force' set to 'true'.
	MaxWait *time.Duration `json:"max-wait,omitempty"`

	// Timeout specifies how long to wait for the entire destroy process before
	// timing out.
	Timeout *time.Duration `json:"timeout,omitempty"`
}

DestroyModelParams holds the arguments for destroying a model.

type DestroyModelsParams

type DestroyModelsParams struct {
	Models []DestroyModelParams `json:"models"`
}

DestroyModelsParams holds the arguments for destroying models.

type DestroyRelation

type DestroyRelation struct {
	Endpoints  []string `json:"endpoints,omitempty"`
	RelationId int      `json:"relation-id"`

	// Force specifies whether relation destruction will be forced, i.e.
	// keep going despite operational errors.
	Force *bool `json:"force,omitempty"`

	// MaxWait specifies the amount of time that each step in relation destroy process
	// will wait before forcing the next step to kick-off. This parameter
	// only makes sense in combination with 'force' set to 'true'.
	MaxWait *time.Duration `json:"max-wait,omitempty"`
}

DestroyRelation holds the parameters for making the DestroyRelation call. A relation is identified by either endpoints or id. The endpoints, if specified, are unordered.

type DestroyUnitInfo

type DestroyUnitInfo struct {
	// DetachedStorage is the tags of storage instances that will be
	// detached from the unit, and will remain in the model after
	// the unit is removed.
	DetachedStorage []Entity `json:"detached-storage,omitempty"`

	// DestroyedStorage is the tags of storage instances that will be
	// destroyed as a result of destroying the unit.
	DestroyedStorage []Entity `json:"destroyed-storage,omitempty"`
}

DestroyUnitInfo contains information related to the removal of an application unit.

type DestroyUnitParams

type DestroyUnitParams struct {
	// UnitTag holds the tag of the unit to destroy.
	UnitTag string `json:"unit-tag"`

	// DestroyStorage controls whether or not storage
	// attached to the unit should be destroyed.
	DestroyStorage bool `json:"destroy-storage,omitempty"`

	// Force controls whether or not the destruction of an application
	// will be forced, i.e. ignore operational errors.
	Force bool `json:"force"`

	// MaxWait specifies the amount of time that each step in unit removal
	// will wait before forcing the next step to kick-off. This parameter
	// only makes sense in combination with 'force' set to 'true'.
	MaxWait *time.Duration `json:"max-wait,omitempty"`
}

DestroyUnitParams holds parameters for the Application.DestroyUnit call.

type DestroyUnitResult

type DestroyUnitResult struct {
	Error *Error           `json:"error,omitempty"`
	Info  *DestroyUnitInfo `json:"info,omitempty"`
}

DestroyUnitResult contains one of the results of a DestroyUnit API request.

type DestroyUnitResults

type DestroyUnitResults struct {
	Results []DestroyUnitResult `json:"results,omitempty"`
}

DestroyUnitResults contains the results of a DestroyUnit API request.

type DestroyUnitsParams

type DestroyUnitsParams struct {
	Units []DestroyUnitParams `json:"units"`
}

DestroyUnitsParams holds bulk parameters for the Application.DestroyUnit call.

type DetailedStatus

type DetailedStatus struct {
	Status  string                 `json:"status"`
	Info    string                 `json:"info"`
	Data    map[string]interface{} `json:"data"`
	Since   *time.Time             `json:"since"`
	Kind    string                 `json:"kind"`
	Version string                 `json:"version"`
	Life    life.Value             `json:"life"`
	Err     *Error                 `json:"err,omitempty"`
}

DetailedStatus holds status info about a machine or unit agent.

type DeviceBridgeInfo

type DeviceBridgeInfo struct {
	HostDeviceName string `json:"host-device-name"`
	BridgeName     string `json:"bridge-name"`
	MACAddress     string `json:"mac-address"`
}

DeviceBridgeInfo lists the host device and the expected bridge to be created.

type DeviceType

type DeviceType string

DeviceType defines a device type.

type DigestAlgorithm

type DigestAlgorithm string

DigestAlgorithm is one of the values in the IANA registry. See RFC 3230 and 5843.

type DischargeRequiredErrorInfo

type DischargeRequiredErrorInfo struct {
	// Macaroon may hold a macaroon that, when
	// discharged, may allow access to the juju API.
	// This field is associated with the ErrDischargeRequired
	// error code.
	Macaroon *macaroon.Macaroon `json:"macaroon,omitempty"`

	// BakeryMacaroon may hold a macaroon that, when
	// discharged, may allow access to the juju API.
	// This field is associated with the ErrDischargeRequired
	// error code.
	// This is the macaroon emitted by newer Juju controllers using bakery.v2.
	BakeryMacaroon *bakery.Macaroon `json:"bakery-macaroon,omitempty"`

	// MacaroonPath holds the URL path to be associated
	// with the macaroon. The macaroon is potentially
	// valid for all URLs under the given path.
	// If it is empty, the macaroon will be associated with
	// the original URL from which the error was returned.
	MacaroonPath string `json:"macaroon-path,omitempty"`
}

DischargeRequiredErrorInfo provides additional macaroon information for DischargeRequired errors. Note that although these fields are compatible with the same fields in httpbakery.ErrorInfo, the Juju API server does not implement endpoints directly compatible with that protocol because the error response format varies according to the endpoint.

func (DischargeRequiredErrorInfo) AsMap

func (e DischargeRequiredErrorInfo) AsMap() map[string]interface{}

AsMap encodes the error info as a map that can be attached to an Error.

type DistributionGroupResult

type DistributionGroupResult struct {
	Error  *Error        `json:"error,omitempty"`
	Result []instance.Id `json:"result"`
}

DistributionGroupResult contains the result of the DistributionGroup provisioner API call.

type DistributionGroupResults

type DistributionGroupResults struct {
	Results []DistributionGroupResult `json:"results"`
}

DistributionGroupResults is the bulk form of DistributionGroupResult.

type DockerImageInfo

type DockerImageInfo struct {
	// RegistryPath holds the path of the Docker image (including host and sha256) in a docker registry.
	RegistryPath string `json:"image-name"`

	// Username holds the username used to gain access to a non-public image.
	Username string `json:"username,omitempty"`

	// Password holds the password used to gain access to a non-public image.
	Password string `json:"password,omitempty"`

	// Auth is the base64 encoded "username:password" string.
	Auth string `json:"auth,omitempty" yaml:"auth,omitempty"`

	// IdentityToken is used to authenticate the user and get
	// an access token for the registry.
	IdentityToken string `json:"identitytoken,omitempty" yaml:"identitytoken,omitempty"`

	// RegistryToken is a bearer token to be sent to a registry
	RegistryToken string `json:"registrytoken,omitempty" yaml:"registrytoken,omitempty"`

	Email string `json:"email,omitempty" yaml:"email,omitempty"`

	// ServerAddress is the auth server address.
	ServerAddress string `json:"serveraddress,omitempty" yaml:"serveraddress,omitempty"`

	// Repository is the namespace of the image repo.
	Repository string `json:"repository,omitempty" yaml:"repository,omitempty"`
}

DockerImageInfo holds the details for a Docker resource type.

type DownloadInfoResult

type DownloadInfoResult struct {
	URL    string      `json:"url"`
	Origin CharmOrigin `json:"charm-origin"`
}

DownloadInfoResult returns a given bundle for a request.

type DownloadInfoResults

type DownloadInfoResults struct {
	Results []DownloadInfoResult `json:"results"`
}

DownloadInfoResults returns the download url for a given request.

type DumpModelRequest

type DumpModelRequest struct {
	Entities   []Entity `json:"entities"`
	Simplified bool     `json:"simplified"`
}

DumpModelRequest wraps the request for a dump-model call. A simplified dump will not contain a complete export, but instead a reduced set that is determined by the server.

type Endpoint

type Endpoint struct {
	ApplicationName string        `json:"application-name"`
	Relation        CharmRelation `json:"relation"`
}

Endpoint holds an application-relation pair.

type EndpointFilterAttributes

type EndpointFilterAttributes struct {
	Role      charm.RelationRole `json:"role"`
	Interface string             `json:"interface"`
	Name      string             `json:"name"`
}

EndpointFilterAttributes is used to filter offers matching the specified endpoint criteria.

type EndpointRelationData

type EndpointRelationData struct {
	Endpoint         string                  `json:"endpoint"`
	CrossModel       bool                    `json:"cross-model"`
	RelatedEndpoint  string                  `json:"related-endpoint"`
	ApplicationData  map[string]interface{}  `yaml:"application-relation-data"`
	UnitRelationData map[string]RelationData `json:"unit-relation-data"`
}

EndpointRelationData holds information about a relation to a given endpoint.

type EndpointStatus

type EndpointStatus struct {
	ApplicationName string `json:"application"`
	Name            string `json:"name"`
	Role            string `json:"role"`
	Subordinate     bool   `json:"subordinate"`
}

EndpointStatus holds status info about a single endpoint.

func (*EndpointStatus) String

func (epStatus *EndpointStatus) String() string

type EnqueuedActions

type EnqueuedActions struct {
	OperationTag string         `json:"operation"`
	Actions      []ActionResult `json:"actions,omitempty"`
}

EnqueuedActions represents the result of enqueuing actions to run.

type Entities

type Entities struct {
	Entities []Entity `json:"entities"`
}

Entities identifies multiple entities.

type EntitiesCharmURL

type EntitiesCharmURL struct {
	Entities []EntityCharmURL `json:"entities"`
}

EntitiesCharmURL holds the parameters for making a SetCharmURL API call.

type EntitiesPortRanges

type EntitiesPortRanges struct {
	Entities []EntityPortRange `json:"entities"`
}

EntitiesPortRanges holds the parameters for making an OpenPorts or ClosePorts on some entities.

type EntitiesPorts

type EntitiesPorts struct {
	Entities []EntityPort `json:"entities"`
}

EntitiesPorts holds the parameters for making an OpenPort or ClosePort on some entities.

type EntitiesResult

type EntitiesResult struct {
	Entities []Entity `json:"entities"`
	Error    *Error   `json:"error,omitempty"`
}

EntitiesResult is the result of one query that either yields some set of entities or an error.

type EntitiesResults

type EntitiesResults struct {
	Results []EntitiesResult `json:"results"`
}

EntitiesResults contains multiple Entities results (where each Entities is the result of a query).

type EntitiesVersion

type EntitiesVersion struct {
	AgentTools []EntityVersion `json:"agent-tools"`
}

EntitiesVersion specifies what tools are being run for multiple entities.

type EntitiesWatchResult

type EntitiesWatchResult struct {
	// Note legacy serialization tag.
	EntitiesWatcherId string   `json:"watcher-id"`
	Changes           []string `json:"changes,omitempty"`
	Error             *Error   `json:"error,omitempty"`
}

EntitiesWatchResult holds a EntitiesWatcher id, changes and an error (if any).

type EntitiesWatchResults

type EntitiesWatchResults struct {
	Results []EntitiesWatchResult `json:"results"`
}

EntitiesWatchResults holds the results for any API call which ends up returning a list of EntitiesWatchers.

type Entity

type Entity struct {
	Tag string `json:"tag"`
}

Entity identifies a single entity.

type EntityAnnotations

type EntityAnnotations struct {
	EntityTag   string            `json:"entity"`
	Annotations map[string]string `json:"annotations"`
}

EntityAnnotations stores annotations for an entity.

type EntityCharmURL

type EntityCharmURL struct {
	Tag      string `json:"tag"`
	CharmURL string `json:"charm-url"`
}

EntityCharmURL holds an entity's tag and a charm URL.

type EntityId

type EntityId struct {
	Kind      string `json:"kind"`
	ModelUUID string `json:"model-uuid"`
	Id        string `json:"id"`
}

EntityId uniquely identifies an entity being tracked by the multiwatcherStore.

type EntityInfo

type EntityInfo interface {
	// EntityId returns an identifier that will uniquely
	// identify the entity within its kind
	EntityId() EntityId
}

EntityInfo is implemented by all entity Info types.

type EntityMacaroonArg

type EntityMacaroonArg struct {
	Macaroon *macaroon.Macaroon `json:"macaroon"`
	Tag      string             `json:"tag"`
}

EntityMacaroonArg holds a macaroon and entity which we want to save.

type EntityMacaroonArgs

type EntityMacaroonArgs struct {
	Args []EntityMacaroonArg
}

EntityMacaroonArgs holds the arguments to a SaveMacaroons API call.

type EntityMetrics

type EntityMetrics struct {
	Metrics []MetricResult `json:"metrics,omitempty"`
	Error   *Error         `json:"error,omitempty"`
}

EntityMetrics contains the results of a GetMetrics call for a single entity.

type EntityPassword

type EntityPassword struct {
	Tag      string `json:"tag"`
	Password string `json:"password"`
}

EntityPassword specifies a password change for the entity with the given tag.

type EntityPasswords

type EntityPasswords struct {
	Changes []EntityPassword `json:"changes"`
}

EntityPasswords holds the parameters for making a SetPasswords call.

type EntityPort

type EntityPort struct {
	Tag      string `json:"tag"`
	Protocol string `json:"protocol"`
	Port     int    `json:"port"`
}

EntityPort holds an entity's tag, a protocol and a port.

type EntityPortRange

type EntityPortRange struct {
	Tag      string `json:"tag"`
	Protocol string `json:"protocol"`
	FromPort int    `json:"from-port"`
	ToPort   int    `json:"to-port"`

	// Endpoint can be left empty to indicate that this port range applies
	// to all application endpoints.
	Endpoint string `json:"endpoint"`
}

EntityPortRange holds an entity's tag, a protocol and a port range.

type EntityStatus

type EntityStatus struct {
	Status status.Status          `json:"status"`
	Info   string                 `json:"info"`
	Data   map[string]interface{} `json:"data,omitempty"`
	Since  *time.Time             `json:"since"`
}

EntityStatus holds the status of an entity.

type EntityStatusArgs

type EntityStatusArgs struct {
	Tag    string                 `json:"tag"`
	Status string                 `json:"status"`
	Info   string                 `json:"info"`
	Data   map[string]interface{} `json:"data"`
}

EntityStatusArgs holds parameters for setting the status of a single entity.

type EntityString

type EntityString struct {
	Tag   string `json:"tag"`
	Value string `json:"value"`
}

EntityString holds an entity tag and a string value.

type EntityVersion

type EntityVersion struct {
	Tag   string   `json:"tag"`
	Tools *Version `json:"tools"`
}

EntityVersion specifies the tools version to be set for an entity with the given tag. version.Binary directly.

type EntityWorkloadVersion

type EntityWorkloadVersion struct {
	Tag             string `json:"tag"`
	WorkloadVersion string `json:"workload-version"`
}

EntityWorkloadVersion holds the workload version for an entity.

type EntityWorkloadVersions

type EntityWorkloadVersions struct {
	Entities []EntityWorkloadVersion `json:"entities"`
}

EntityWorkloadVersions holds the parameters for setting the workload version for a set of entities.

type Error

type Error struct {
	Message string                 `json:"message"`
	Code    string                 `json:"code"`
	Info    map[string]interface{} `json:"info,omitempty"`
}

Error is the type of error returned by any call to the state API.

func (Error) Error

func (e Error) Error() string

func (Error) ErrorCode

func (e Error) ErrorCode() string

func (Error) ErrorInfo

func (e Error) ErrorInfo() map[string]interface{}

ErrorInfo implements the rpc.ErrorInfoProvider interface which enables API error attachments to be returned as part of RPC error responses.

func (Error) GoString

func (e Error) GoString() string

GoString implements fmt.GoStringer. It means that a *Error shows its contents correctly when printed with %#v.

func (Error) UnmarshalInfo

func (e Error) UnmarshalInfo(to interface{}) error

UnmarshalInfo attempts to unmarshal the information contained in the Info field of a RequestError into an AdditionalErrorInfo instance a pointer to which is passed via the to argument. The method will return an error if a non-pointer arg is provided.

type ErrorResponse

type ErrorResponse struct {
	Error CharmHubError `json:"error-list"`
}

type ErrorResult

type ErrorResult struct {
	Error *Error `json:"error,omitempty"`
}

ErrorResult holds the error status of a single operation.

type ErrorResults

type ErrorResults struct {
	// Results contains the error results from each operation.
	Results []ErrorResult `json:"results"`
}

ErrorResults holds the results of calling a bulk operation which returns no data, only an error result. The order and number of elements matches the operations specified in the request.

func (ErrorResults) Combine

func (result ErrorResults) Combine() error

Combine returns one error from the result which is an accumulation of the errors. If there are no errors in the result, the return value is nil. Otherwise the error values are combined with new-line characters.

func (ErrorResults) OneError

func (result ErrorResults) OneError() error

OneError returns the error from the result of a bulk operation on a single value.

type ExportBundleParams

type ExportBundleParams struct {
	IncludeCharmDefaults bool `json:"include-charm-defaults,omitempty"`
}

ExportBundleParams holds parameters for exporting Bundles.

type ExposeInfoResult

type ExposeInfoResult struct {
	Error *Error `json:"error,omitempty"`

	Exposed bool `json:"exposed,omitempty"`

	// Expose parameters grouped by endpoint name. An empty ("") endpoint
	// name key represents all application endpoints. For compatibility
	// with pre 2.9 clients, if this field is empty, all opened ports
	// for the application will be exposed to 0.0.0.0/0.
	ExposedEndpoints map[string]ExposedEndpoint `json:"exposed-endpoints,omitempty"`
}

ExposeInfoResult holds the result of a GetExposeInfo call.

type ExposeInfoResults

type ExposeInfoResults struct {
	Results []ExposeInfoResult `json:"results"`
}

ExposeInfoResults the expose info for a list of applications.

type ExposedEndpoint

type ExposedEndpoint struct {
	ExposeToSpaces []string `json:"expose-to-spaces,omitempty"`
	ExposeToCIDRs  []string `json:"expose-to-cidrs,omitempty"`
}

ExposedEndpoint describes the spaces and/or CIDRs that should be able to reach the ports opened by an application for a particular endpoint.

type ExternalControllerInfo

type ExternalControllerInfo struct {
	ControllerTag string   `json:"controller-tag"`
	Alias         string   `json:"controller-alias"`
	Addrs         []string `json:"addrs"`
	CACert        string   `json:"ca-cert"`
}

ExternalControllerInfo holds addressed and other information needed to make a connection to an external controller.

type ExternalControllerInfoResult

type ExternalControllerInfoResult struct {
	Result *ExternalControllerInfo `json:"result"`
	Error  *Error                  `json:"error"`
}

ExternalControllerInfoResult contains the result of querying the information of external controllers.

type ExternalControllerInfoResults

type ExternalControllerInfoResults struct {
	Results []ExternalControllerInfoResult `json:"results"`
}

ExternalControllerInfoResults contains the results of querying the information for a set of external controllers.

type FacadeVersions

type FacadeVersions struct {
	Name     string `json:"name"`
	Versions []int  `json:"versions"`
}

FacadeVersions describes the available Facades and what versions of each one are available

type FanConfigEntry

type FanConfigEntry struct {
	Underlay string `json:"underlay"`
	Overlay  string `json:"overlay"`
}

FanConfigEntry holds configuration for a single fan.

type FanConfigResult

type FanConfigResult struct {
	Fans []FanConfigEntry `json:"fans"`
}

FanConfigResult holds configuration for all fans in a model.

type Filesystem

type Filesystem struct {
	FilesystemTag string         `json:"filesystem-tag"`
	VolumeTag     string         `json:"volume-tag,omitempty"`
	Info          FilesystemInfo `json:"info"`
}

Filesystem identifies and describes a storage filesystem in the model.

type FilesystemAttachment

type FilesystemAttachment struct {
	FilesystemTag string                   `json:"filesystem-tag"`
	MachineTag    string                   `json:"machine-tag"`
	Info          FilesystemAttachmentInfo `json:"info"`
}

FilesystemAttachment identifies and describes a filesystem attachment.

type FilesystemAttachmentDetails

type FilesystemAttachmentDetails struct {
	// NOTE(axw) for backwards-compatibility, this must not be given a
	// json tag. This ensures that we collapse FilesystemAttachmentInfo.
	//
	// TODO(axw) when we can break backwards-compatibility (Juju 3.0),
	// give this a field name of "info", like we have in FilesystemDetails
	// above.
	FilesystemAttachmentInfo

	// Life contains the lifecycle state of the filesystem attachment.
	// Juju controllers older than 2.2 do not populate this
	// field, so it may be omitted.
	Life life.Value `json:"life,omitempty"`
}

FilesystemAttachmentDetails describes a filesystem attachment.

type FilesystemAttachmentInfo

type FilesystemAttachmentInfo struct {
	MountPoint string `json:"mount-point,omitempty"`
	ReadOnly   bool   `json:"read-only,omitempty"`
}

FilesystemAttachmentInfo describes a filesystem attachment.

type FilesystemAttachmentParams

type FilesystemAttachmentParams struct {
	FilesystemTag string `json:"filesystem-tag"`
	MachineTag    string `json:"machine-tag"`
	FilesystemId  string `json:"filesystem-id,omitempty"`
	InstanceId    string `json:"instance-id,omitempty"`
	Provider      string `json:"provider"`
	MountPoint    string `json:"mount-point,omitempty"`
	ReadOnly      bool   `json:"read-only,omitempty"`
}

FilesystemAttachmentParams holds the parameters for creating a filesystem attachment.

type FilesystemAttachmentParamsResult

type FilesystemAttachmentParamsResult struct {
	Result FilesystemAttachmentParams `json:"result"`
	Error  *Error                     `json:"error,omitempty"`
}

FilesystemAttachmentParamsResult holds provisioning parameters for a filesystem attachment.

type FilesystemAttachmentParamsResults

type FilesystemAttachmentParamsResults struct {
	Results []FilesystemAttachmentParamsResult `json:"results,omitempty"`
}

FilesystemAttachmentParamsResults holds provisioning parameters for multiple filesystem attachments.

type FilesystemAttachmentResult

type FilesystemAttachmentResult struct {
	Result FilesystemAttachment `json:"result"`
	Error  *Error               `json:"error,omitempty"`
}

FilesystemAttachmentResult holds the details of a single filesystem attachment, or an error.

type FilesystemAttachmentResults

type FilesystemAttachmentResults struct {
	Results []FilesystemAttachmentResult `json:"results,omitempty"`
}

FilesystemAttachmentResults holds a set of FilesystemAttachmentResults.

type FilesystemAttachments

type FilesystemAttachments struct {
	FilesystemAttachments []FilesystemAttachment `json:"filesystem-attachments"`
}

FilesystemAttachments describes a set of storage filesystem attachments.

type FilesystemDetails

type FilesystemDetails struct {
	// FilesystemTag is the tag for the filesystem.
	FilesystemTag string `json:"filesystem-tag"`

	// VolumeTag is the tag for the volume backing the
	// filesystem, if any.
	VolumeTag string `json:"volume-tag,omitempty"`

	// Info contains information about the filesystem.
	Info FilesystemInfo `json:"info"`

	// Life contains the lifecycle state of the filesystem.
	// Juju controllers older than 2.2 do not populate this
	// field, so it may be omitted.
	Life life.Value `json:"life,omitempty"`

	// Status contains the status of the filesystem.
	Status EntityStatus `json:"status"`

	// MachineAttachments contains a mapping from
	// machine tag to filesystem attachment information (IAAS models).
	MachineAttachments map[string]FilesystemAttachmentDetails `json:"machine-attachments,omitempty"`

	// UnitAttachments contains a mapping from
	// unit tag to filesystem attachment information (CAAS models).
	UnitAttachments map[string]FilesystemAttachmentDetails `json:"unit-attachments,omitempty"`

	// Storage contains details about the storage instance
	// that the volume is assigned to, if any.
	Storage *StorageDetails `json:"storage,omitempty"`
}

FilesystemDetails describes a storage filesystem in the model for the purpose of filesystem CLI commands.

This is kept separate from Filesystem which contains only information specific to the filesystem model, whereas FilesystemDetails is intended to contain complete information about a filesystem and related information (status, attachments, storage).

type FilesystemDetailsListResult

type FilesystemDetailsListResult struct {
	Result []FilesystemDetails `json:"result,omitempty"`
	Error  *Error              `json:"error,omitempty"`
}

FilesystemDetailsListResult holds a collection of filesystem details.

type FilesystemDetailsListResults

type FilesystemDetailsListResults struct {
	Results []FilesystemDetailsListResult `json:"results,omitempty"`
}

FilesystemDetailsListResults holds a collection of collections of filesystem details.

type FilesystemDetailsResult

type FilesystemDetailsResult struct {
	Result *FilesystemDetails `json:"result,omitempty"`
	Error  *Error             `json:"error,omitempty"`
}

FilesystemDetailsResult contains details about a filesystem, its attachments or an error preventing retrieving those details.

type FilesystemDetailsResults

type FilesystemDetailsResults struct {
	Results []FilesystemDetailsResult `json:"results,omitempty"`
}

FilesystemDetailsResults holds filesystem details.

type FilesystemFilter

type FilesystemFilter struct {
	// Machines are machine tags to filter on.
	Machines []string `json:"machines,omitempty"`
}

FilesystemFilter holds a filter for filter list API call.

func (*FilesystemFilter) IsEmpty

func (f *FilesystemFilter) IsEmpty() bool

IsEmpty determines if filter is empty

type FilesystemFilters

type FilesystemFilters struct {
	Filters []FilesystemFilter `json:"filters,omitempty"`
}

FilesystemFilters holds a collection of filesystem filters.

type FilesystemInfo

type FilesystemInfo struct {
	FilesystemId string `json:"filesystem-id"`
	// Pool is the name of the storage pool used to
	// allocate the filesystem. Juju controllers older
	// than 2.2 do not populate this field, so it may
	// be omitted.
	Pool string `json:"pool"`
	// Size is the size of the filesystem in MiB.
	Size uint64 `json:"size"`
}

FilesystemInfo describes a storage filesystem in the model.

type FilesystemParams

type FilesystemParams struct {
	FilesystemTag string                      `json:"filesystem-tag"`
	VolumeTag     string                      `json:"volume-tag,omitempty"`
	Size          uint64                      `json:"size"`
	Provider      string                      `json:"provider"`
	Attributes    map[string]interface{}      `json:"attributes,omitempty"`
	Tags          map[string]string           `json:"tags,omitempty"`
	Attachment    *FilesystemAttachmentParams `json:"attachment,omitempty"`
}

FilesystemParams holds the parameters for creating a storage filesystem.

type FilesystemParamsResult

type FilesystemParamsResult struct {
	Result FilesystemParams `json:"result"`
	Error  *Error           `json:"error,omitempty"`
}

FilesystemParamsResult holds provisioning parameters for a filesystem.

type FilesystemParamsResults

type FilesystemParamsResults struct {
	Results []FilesystemParamsResult `json:"results,omitempty"`
}

FilesystemParamsResults holds provisioning parameters for multiple filesystems.

type FilesystemResult

type FilesystemResult struct {
	Result Filesystem `json:"result"`
	Error  *Error     `json:"error,omitempty"`
}

FilesystemResult holds information about a filesystem.

type FilesystemResults

type FilesystemResults struct {
	Results []FilesystemResult `json:"results,omitempty"`
}

FilesystemResults holds information about multiple filesystems.

type Filesystems

type Filesystems struct {
	Filesystems []Filesystem `json:"filesystems"`
}

Filesystems describes a set of storage filesystems in the model.

type FindResponse

type FindResponse struct {
	Type      string   `json:"type"`
	ID        string   `json:"id"`
	Name      string   `json:"name"`
	Publisher string   `json:"publisher"`
	Summary   string   `json:"summary"`
	Version   string   `json:"version"`
	Arches    []string `json:"architectures,omitempty"`
	OS        []string `json:"os,omitempty"`
	Series    []string `json:"series,omitempty"`
	StoreURL  string   `json:"store-url"`
}

type FindToolsParams

type FindToolsParams struct {
	// Number will be used to match tools versions exactly if non-zero.
	Number version.Number `json:"number"`

	// MajorVersion will be used to match the major version if non-zero.
	MajorVersion int `json:"major"`

	// MinorVersion will be used to match the major version if greater
	// than or equal to zero, and Number is zero.
	MinorVersion int `json:"minor"`

	// Arch will be used to match tools by architecture if non-empty.
	Arch string `json:"arch"`

	// TODO(juju3) - remove series
	// Kept foe compatibility with older clients.
	// Series will be used to match tools by series if non-empty.
	Series string `json:"series"`

	// OSType will be used to match tools by os type if non-empty.
	OSType string `json:"os-type"`

	// AgentStream will be used to set agent stream to search
	AgentStream string `json:"agentstream"`
}

FindToolsParams defines parameters for the FindTools method.

type FindToolsResult

type FindToolsResult struct {
	List  tools.List `json:"list"`
	Error *Error     `json:"error,omitempty"`
}

FindToolsResult holds a list of tools from FindTools and any error.

type FirewallRule

type FirewallRule struct {
	// KnownService is the well known service for a firewall rule.
	KnownService KnownServiceValue `json:"known-service"`

	// WhitelistCIDRS is the ist of subnets allowed access.
	WhitelistCIDRS []string `json:"whitelist-cidrs,omitempty"`
}

FirewallRule is a rule for ingress through a firewall.

type FirewallRuleArgs

type FirewallRuleArgs struct {
	// Args holds the parameters for updating a firewall rule.
	Args []FirewallRule `json:"args"`
}

FirewallRuleArgs holds the parameters for updating one or more firewall rules.

type FullStatus

type FullStatus struct {
	Model               ModelStatusInfo                    `json:"model"`
	Machines            map[string]MachineStatus           `json:"machines"`
	Applications        map[string]ApplicationStatus       `json:"applications"`
	RemoteApplications  map[string]RemoteApplicationStatus `json:"remote-applications"`
	Offers              map[string]ApplicationOfferStatus  `json:"offers"`
	Relations           []RelationStatus                   `json:"relations"`
	ControllerTimestamp *time.Time                         `json:"controller-timestamp"`
	Branches            map[string]BranchStatus            `json:"branches"`
}

FullStatus holds information about the status of a juju model.

func (*FullStatus) IsEmpty

func (fs *FullStatus) IsEmpty() bool

IsEmpty checks all collections on FullStatus to determine if the status is empty. Note that only the collections are checked here as Model information will always be populated.

type Generation

type Generation struct {
	// BranchName uniquely identifies a branch *amongst in-flight branches*.
	BranchName string `json:"branch"`

	// Created is the Unix timestamp at generation creation.
	Created int64 `json:"created"`

	// Created is the user who created the generation.
	CreatedBy string `json:"created-by"`

	// Completed is the Unix timestamp at generation completion/commit.
	Completed int64 `json:"completed,omitempty"`

	// CompletedBy is the user who committed/completed the generation.
	CompletedBy string `json:"completed-by,omitempty"`

	// GenerationId is the id .
	GenerationId int `json:"generation-id,omitempty"`

	// Applications holds the collection of application changes
	// made under this generation.
	Applications []GenerationApplication `json:"applications"`
}

Generation represents a model generation's details including config changes.

type GenerationApplication

type GenerationApplication struct {
	// ApplicationsName is the name of the application.
	ApplicationName string `json:"application"`

	// UnitProgress is summary information about units tracking the branch.
	UnitProgress string `json:"progress"`

	// UnitsTracking is the names of application units that have been set to
	// track the branch.
	UnitsTracking []string `json:"tracking,omitempty"`

	// UnitsPending is the names of application units that are still tracking
	// the master generation.
	UnitsPending []string `json:"pending,omitempty"`

	// Config changes are the effective new configuration values resulting from
	// changes made under this branch.
	ConfigChanges map[string]interface{} `json:"config"`
}

GenerationApplication represents changes to an application made under a branch.

type GenerationId

type GenerationId struct {
	GenerationId int `json:"generation-id"`
}

GenerationId represents an GenerationId from a branch.

type GenerationResult

type GenerationResult struct {
	// Generation holds the details of the requested generation.
	Generation Generation `json:"generation"`

	// Error holds the value of any error that occurred processing the request.
	Error *Error `json:"error,omitempty"`
}

GenerationResult transports a generation detail.

type GetAnnotations

type GetAnnotations struct {
	Tag string `json:"tag"`
}

GetAnnotations stores parameters for making the GetAnnotations call.

type GetAnnotationsResults

type GetAnnotationsResults struct {
	Annotations map[string]string `json:"annotations"`
}

GetAnnotationsResults holds annotations associated with an entity.

type GetApplicationConstraints

type GetApplicationConstraints struct {
	ApplicationName string `json:"application"`
}

GetApplicationConstraints stores parameters for making the GetApplicationConstraints call.

type GetConstraintsResults

type GetConstraintsResults struct {
	Constraints constraints.Value `json:"constraints"`
}

GetConstraintsResults holds results of the GetConstraints call.

type GetLeadershipSettingsBulkResults

type GetLeadershipSettingsBulkResults struct {
	Results []GetLeadershipSettingsResult `json:"results"`
}

GetLeadershipSettingsBulkResults is the collection of results from a bulk request for leadership settings.

type GetLeadershipSettingsResult

type GetLeadershipSettingsResult struct {
	Settings Settings `json:"settings"`
	Error    *Error   `json:"error,omitempty"`
}

GetLeadershipSettingsResult is the results from requesting leadership settings.

type GetSecretArg

type GetSecretArg struct {
	URL string `json:"url,omitempty"`
	ID  string `json:"id,omitempty"`
}

GetSecretArg holds the args for getting a secret. Either specify a URL or ID.

type GetSecretArgs

type GetSecretArgs struct {
	Args []GetSecretArg `json:"args"`
}

GetSecretArgs holds the args for getting secrets.

type GetTokenArg

type GetTokenArg struct {
	// Tag is the tag of the entity for which we want the token.
	Tag string `json:"tag"`
}

GetTokenArg holds the model and entity for which we want a token.

type GetTokenArgs

type GetTokenArgs struct {
	Args []GetTokenArg
}

GetTokenArgs holds the arguments to a GetTokens API call.

type GoalState

type GoalState struct {
	Units     UnitsGoalState            `json:"units"`
	Relations map[string]UnitsGoalState `json:"relations"`
}

GoalState goal-state at application level, stores Units and Units-Relations

type GoalStateResult

type GoalStateResult struct {
	Result *GoalState `json:"result"`
	Error  *Error     `json:"error"`
}

GoalStateResult the result of GoalStates per entity.

type GoalStateResults

type GoalStateResults struct {
	Results []GoalStateResult `json:"results"`
}

GoalStateResults holds the results of GoalStates API call

type GoalStateStatus

type GoalStateStatus struct {
	Status string     `json:"status"`
	Since  *time.Time `json:"since"`
}

GoalStateStatus goal-state at unit level

type History

type History struct {
	Statuses []DetailedStatus `json:"statuses"`
	Error    *Error           `json:"error,omitempty"`
}

History holds many DetailedStatus.

type HostNetworkChange

type HostNetworkChange struct {
	Error *Error `json:"error,omitempty"`

	// NewBridges lists the bridges that need to be created and what host
	// device they should be connected to.
	NewBridges []DeviceBridgeInfo `json:"new-bridges"`

	// ReconfigureDelay is the duration in seconds to sleep before
	// raising the bridged interface
	ReconfigureDelay int `json:"reconfigure-delay"`
}

HostNetworkChange holds the information about how a host machine should be modified to prepare for a container.

type HostNetworkChangeResults

type HostNetworkChangeResults struct {
	Results []HostNetworkChange `json:"results"`
}

HostNetworkChangeResults holds the network changes that are necessary for multiple containers to be created.

type HostPort

type HostPort struct {
	Address
	Port int `json:"port"`
}

HostPort associates an address with a port. It's used in the API requests/responses. See also network.HostPort, from/to which this is transformed.

func FromHostPort

func FromHostPort(nhp network.HostPort) HostPort

FromHostPort is a convenience helper to create a parameter out of the network type, here for HostPort.

func FromHostPorts

func FromHostPorts(nhps network.HostPorts) []HostPort

FromHostPorts is a helper to create a parameter out of the network type, here for a slice of HostPort.

func FromProviderHostPort

func FromProviderHostPort(nhp network.ProviderHostPort) HostPort

FromProviderHostPort is a convenience helper to create a parameter out of the network type, here for ProviderHostPort.

func FromProviderHostPorts

func FromProviderHostPorts(nhps network.ProviderHostPorts) []HostPort

FromProviderHostPorts is a helper to create a parameter out of the network type, here for a slice of HostPort.

func (HostPort) MachineHostPort

func (hp HostPort) MachineHostPort() network.MachineHostPort

MachineHostPort transforms the HostPort to a MachineHostPort.

func (HostPort) ProviderHostPort

func (hp HostPort) ProviderHostPort() network.ProviderHostPort

ProviderHostPort transforms the HostPort to a ProviderHostPort.

type HostedModelConfig

type HostedModelConfig struct {
	Name      string                 `json:"name"`
	OwnerTag  string                 `json:"owner"`
	Config    map[string]interface{} `json:"config,omitempty"`
	CloudSpec *CloudSpec             `json:"cloud-spec,omitempty"`
	Error     *Error                 `json:"error,omitempty"`
}

HostedModelConfig contains the model config and the cloud spec for the model, both things that a client needs to talk directly with the provider. This is used to take down mis-behaving models aggressively.

type HostedModelConfigsResults

type HostedModelConfigsResults struct {
	Models []HostedModelConfig `json:"models"`
}

HostedModelConfigsResults contains an entry for each hosted model in the controller.

type ImageFilterParams

type ImageFilterParams struct {
	Images []ImageSpec `json:"images"`
}

ImageFilterParams holds the parameters used to specify images to delete.

type ImageMetadata

type ImageMetadata struct {
	Kind    string    `json:"kind"`
	Arch    string    `json:"arch"`
	Series  string    `json:"series"`
	URL     string    `json:"url"`
	Created time.Time `json:"created"`
}

ImageMetadata represents an image in storage.

type ImageMetadataFilter

type ImageMetadataFilter struct {
	// Region stores metadata region.
	Region string `json:"region,omitempty"`

	// Series stores all desired series.
	Series []string `json:"series,omitempty"`

	// Arches stores all desired architectures.
	Arches []string `json:"arches,omitempty"`

	// Stream can be "" or "released" for the default "released" stream,
	// or "daily" for daily images, or any other stream that the available
	// simplestreams metadata supports.
	Stream string `json:"stream,omitempty"`

	// VirtType stores virtualisation type.
	VirtType string `json:"virt-type,omitempty"`

	// RootStorageType stores storage type.
	RootStorageType string `json:"root-storage-type,omitempty"`
}

ImageMetadataFilter holds filter properties used to search for image metadata. It amalgamates both simplestreams.MetadataLookupParams and simplestreams.LookupParams and adds additional properties to satisfy existing and new use cases.

type ImageSpec

type ImageSpec struct {
	Kind   string `json:"kind"`
	Arch   string `json:"arch"`
	Series string `json:"series"`
}

ImageSpec defines the parameters to select images list or delete.

type ImportStorageDetails

type ImportStorageDetails struct {
	// StorageTag contains the string representation of the storage tag
	// assigned to the imported storage entity.
	StorageTag string `json:"storage-tag"`
}

ImportStorageDetails contains the details of an imported storage entity.

type ImportStorageParams

type ImportStorageParams struct {
	// Kind is the kind of the storage entity to import.
	Kind StorageKind `json:"kind"`

	// Pool is the name of the storage pool into which the storage is to
	// be imported.
	Pool string `json:"pool"`

	// ProviderId is the storage provider's unique ID for the storage,
	// e.g. the EBS volume ID.
	ProviderId string `json:"provider-id"`

	// StorageName is the name of the storage to assign to the entity.
	StorageName string `json:"storage-name"`
}

ImportStorageParams contains the parameters for importing a storage entity.

type ImportStorageResult

type ImportStorageResult struct {
	Result *ImportStorageDetails `json:"result,omitempty"`
	Error  *Error                `json:"error,omitempty"`
}

ImportStorageResult contains the result of importing a storage entity.

type ImportStorageResults

type ImportStorageResults struct {
	Results []ImportStorageResult `json:"results"`
}

ImportStorageResults contains the results of importing a collection of storage entities.

type IncompatibleClientError

type IncompatibleClientError struct {
	ServerVersion version.Number
}

IncompatibleClientError signifies the connecting client is not compatible with the controller.

func (*IncompatibleClientError) AsMap

func (e *IncompatibleClientError) AsMap() map[string]interface{}

AsMap returns the data for the RPC error Info field.

func (*IncompatibleClientError) Error

func (e *IncompatibleClientError) Error() string

Error implements error.

type Info

type Info struct {
	Tag     string `json:"tag"`
	Channel string `json:"channel,omitempty"`
}

Info tag represents a info query for a given tag and channel.

type InfoResponse

type InfoResponse struct {
	Type        string             `json:"type"`
	ID          string             `json:"id"`
	Name        string             `json:"name"`
	Description string             `json:"description"`
	Publisher   string             `json:"publisher"`
	Summary     string             `json:"summary"`
	Series      []string           `json:"series"`
	StoreURL    string             `json:"store-url"`
	Tags        []string           `json:"tags"`
	Charm       *CharmHubCharm     `json:"charm,omitempty"`
	Bundle      *CharmHubBundle    `json:"bundle,omitempty"`
	Channels    map[string]Channel `json:"channel-map"`
	Tracks      []string           `json:"tracks"`
}

type IngressNetworksChangeEvent

type IngressNetworksChangeEvent struct {
	// RelationToken is the token of the relation.
	RelationToken string `json:"relation-token"`

	// ApplicationToken is the token of the application.
	ApplicationToken string `json:"application-token"`

	// Networks are the CIDRs for which ingress is required.
	Networks []string `json:"networks,omitempty"`

	// IngressRequired is true if ingress is needed, otherwise
	// ingress should be disabled.
	IngressRequired bool `json:"ingress-required"`

	// Macaroons are used for authentication.
	Macaroons macaroon.Slice `json:"macaroons,omitempty"`

	// BakeryVersion is the version of the bakery used to mint macaroons.
	BakeryVersion bakery.Version `json:"bakery-version,omitempty"`
}

type IngressNetworksChanges

type IngressNetworksChanges struct {
	Changes []IngressNetworksChangeEvent `json:"changes,omitempty"`
}

IngressNetworksChanges holds a set of IngressNetworksChangeEvent structures.

type InitiateMigrationArgs

type InitiateMigrationArgs struct {
	Specs []MigrationSpec `json:"specs"`
}

InitiateMigrationArgs holds the details required to start one or more model migrations.

type InitiateMigrationResult

type InitiateMigrationResult struct {
	ModelTag    string `json:"model-tag"`
	Error       *Error `json:"error,omitempty"`
	MigrationId string `json:"migration-id"`
}

InitiateMigrationResult is used to return the result of one model migration initiation attempt.

type InitiateMigrationResults

type InitiateMigrationResults struct {
	Results []InitiateMigrationResult `json:"results"`
}

InitiateMigrationResults is used to return the result of one or more attempts to start model migrations.

type InstanceInfo

type InstanceInfo struct {
	Tag             string                            `json:"tag"`
	InstanceId      instance.Id                       `json:"instance-id"`
	DisplayName     string                            `json:"display-name"`
	Nonce           string                            `json:"nonce"`
	Characteristics *instance.HardwareCharacteristics `json:"characteristics"`
	Volumes         []Volume                          `json:"volumes"`
	// VolumeAttachments is a mapping from volume tag to
	// volume attachment info.
	VolumeAttachments map[string]VolumeAttachmentInfo `json:"volume-attachments"`

	NetworkConfig []NetworkConfig `json:"network-config"`
	CharmProfiles []string        `json:"charm-profiles"`
}

InstanceInfo holds information about an instance. Instances are typically virtual machines hosted by a cloud provider but may also be a container.

The InstanceInfo struct contains three categories of information:

  • interal data, as the machine's tag and the tags of any attached storage volumes
  • naming and other provider-specific information, including the instance id and display name
  • configuration information, including its attached storage volumes, charm profiles and networking

type InstanceType

type InstanceType struct {
	Name         string   `json:"name,omitempty"`
	Arches       []string `json:"arches"`
	CPUCores     int      `json:"cpu-cores"`
	Memory       int      `json:"memory"`
	RootDiskSize int      `json:"root-disk,omitempty"`
	VirtType     string   `json:"virt-type,omitempty"`
	Deprecated   bool     `json:"deprecated,omitempty"`
	Cost         int      `json:"cost,omitempty"`
}

InstanceType represents an available instance type in a cloud.

type InstanceTypesResult

type InstanceTypesResult struct {
	InstanceTypes []InstanceType `json:"instance-types,omitempty"`
	CostUnit      string         `json:"cost-unit,omitempty"`
	CostCurrency  string         `json:"cost-currency,omitempty"`
	// CostDivisor Will be present only when the Cost is not expressed in CostUnit.
	CostDivisor uint64 `json:"cost-divisor,omitempty"`
	Error       *Error `json:"error,omitempty"`
}

InstanceTypesResult contains the result of prompting a cloud for its instance types.

type InstanceTypesResults

type InstanceTypesResults struct {
	Results []InstanceTypesResult `json:"results"`
}

InstanceTypesResults contains the bulk result of prompting a cloud for its instance types.

type InstancesInfo

type InstancesInfo struct {
	Machines []InstanceInfo `json:"machines"`
}

InstancesInfo holds the parameters for making a SetInstanceInfo call for multiple machines.

type IntResult

type IntResult struct {
	// Error holds the error (if any) of this call.
	Error *Error `json:"error,omitempty"`
	// Result holds the integer result of the call (if Error is nil).
	Result int `json:"result"`
}

IntResult holds the result of an API call that returns a int or an error.

type IntResults

type IntResults struct {
	// Results holds a list of results for calls that return an int or error.
	Results []IntResult `json:"results"`
}

IntResults holds multiple results with an int in each.

type InterfaceAddress

type InterfaceAddress struct {
	Hostname string `json:"hostname" yaml:"hostname"`
	Address  string `json:"value" yaml:"address"`
	CIDR     string `json:"cidr" yaml:"cidr"`
}

InterfaceAddress represents a single address attached to the interface. The serialization is different between json and yaml because of accidental differences in the past, but should be preserved for compatibility

type InvalidateCredentialArg

type InvalidateCredentialArg struct {
	// Reason is the description of why we are invalidating credential.
	Reason string `json:"reason,omitempty"`
}

InvalidateCredentialArg is used to invalidate a controller credential.

type IsMasterResult

type IsMasterResult struct {
	// Master reports whether the connected agent
	// lives on the same instance as the mongo replica
	// set master.
	Master bool `json:"master"`
}

IsMasterResult holds the result of an IsMaster API call.

type IsMeteredResult

type IsMeteredResult struct {
	Metered bool `json:"metered"`
}

IsMeteredResult stores result from a charms.IsMetered call

type IssueOperatorCertificateResult

type IssueOperatorCertificateResult struct {
	CACert     string `json:"ca-cert"`
	Cert       string `json:"cert"`
	PrivateKey string `json:"private-key"`
	Error      *Error `json:"error,omitempty"`
}

IssueOperatorCertificateResult contains an x509 certificate for a CAAS Operator.

type IssueOperatorCertificateResults

type IssueOperatorCertificateResults struct {
	Results []IssueOperatorCertificateResult `json:"results"`
}

IssueOperatorCertificateResults holds IssueOperatorCertificate results.

type ItemChange

type ItemChange struct {
	Type     int         `json:"type"`
	Key      string      `json:"key"`
	OldValue interface{} `json:"old,omitempty"`
	NewValue interface{} `json:"new,omitempty"`
}

ItemChange is the multiwatcher representation of a core settings ItemChange.

type JobsResult

type JobsResult struct {
	Jobs  []model.MachineJob `json:"jobs"`
	Error *Error             `json:"error,omitempty"`
}

JobsResult holds the jobs for a machine that are returned by a call to Jobs.

type JobsResults

type JobsResults struct {
	Results []JobsResult `json:"results"`
}

JobsResults holds the result of a call to Jobs.

type KnownServiceArgs

type KnownServiceArgs struct {
	// KnownServices are the well known services for a firewall rule.
	KnownServices []KnownServiceValue `json:"known-services"`
}

KnownServiceArgs holds the parameters for retrieving firewall rules.

type KnownServiceValue

type KnownServiceValue string

KnownServiceValue describes a well known service for which a firewall rule can be set up.

const (

	// SSHRule is a rule for SSH connections.
	SSHRule KnownServiceValue = "ssh"

	// JujuControllerRule is a rule for connections to the Juju controller.
	JujuControllerRule KnownServiceValue = "juju-controller"

	// JujuApplicationOfferRule is a rule for connections to a Juju offer.
	JujuApplicationOfferRule KnownServiceValue = "juju-application-offer"
)

func (KnownServiceValue) Validate

func (v KnownServiceValue) Validate() error

Validate returns an error if the service value is not valid.

type KubernetesDeploymentInfo

type KubernetesDeploymentInfo struct {
	DeploymentType string `json:"deployment-type"`
	ServiceType    string `json:"service-type"`
}

KubernetesDeploymentInfo holds deployment info from charm metadata.

type KubernetesDeviceParams

type KubernetesDeviceParams struct {
	Type       DeviceType        `bson:"type"`
	Count      int64             `bson:"count"`
	Attributes map[string]string `bson:"attributes,omitempty"`
}

KubernetesDeviceParams holds a set of device constraints.

type KubernetesFilesystemAttachmentParams

type KubernetesFilesystemAttachmentParams struct {
	Provider   string `json:"provider"`
	MountPoint string `json:"mount-point,omitempty"`
	ReadOnly   bool   `json:"read-only,omitempty"`
}

KubernetesFilesystemAttachmentParams holds the parameters for creating a filesystem attachment.

type KubernetesFilesystemInfo

type KubernetesFilesystemInfo struct {
	StorageName  string                 `json:"storagename"`
	Pool         string                 `json:"pool"`
	Size         uint64                 `json:"size"`
	MountPoint   string                 `json:"mount-point,omitempty"`
	ReadOnly     bool                   `json:"read-only,omitempty"`
	FilesystemId string                 `json:"filesystem-id"`
	Status       string                 `json:"status"`
	Info         string                 `json:"info"`
	Data         map[string]interface{} `json:"data,omitempty"`
	Volume       KubernetesVolumeInfo   `json:"volume"`
}

KubernetesFilesystemInfo describes a storage filesystem in the cloud as reported to the model.

type KubernetesFilesystemParams

type KubernetesFilesystemParams struct {
	StorageName string                                `json:"storagename"`
	Size        uint64                                `json:"size"`
	Provider    string                                `json:"provider"`
	Attributes  map[string]interface{}                `json:"attributes,omitempty"`
	Tags        map[string]string                     `json:"tags,omitempty"`
	Attachment  *KubernetesFilesystemAttachmentParams `json:"attachment,omitempty"`
}

KubernetesFilesystemParams holds the parameters for creating a storage filesystem.

type KubernetesProvisioningInfo

type KubernetesProvisioningInfo struct {
	DeploymentInfo       *KubernetesDeploymentInfo    `json:"deployment-info,omitempty"`
	PodSpec              string                       `json:"pod-spec"`
	RawK8sSpec           string                       `json:"raw-k8s-spec,omitempty"`
	Constraints          constraints.Value            `json:"constraints"`
	Tags                 map[string]string            `json:"tags,omitempty"`
	Filesystems          []KubernetesFilesystemParams `json:"filesystems,omitempty"`
	Volumes              []KubernetesVolumeParams     `json:"volumes,omitempty"`
	Devices              []KubernetesDeviceParams     `json:"devices,omitempty"`
	OperatorImagePath    string                       `json:"operator-image-path,omitempty"`
	CharmModifiedVersion int                          `json:"charm-modified-version,omitempty"`
}

KubernetesProvisioningInfo holds unit provisioning info.

type KubernetesProvisioningInfoResult

type KubernetesProvisioningInfoResult struct {
	Error  *Error                      `json:"error,omitempty"`
	Result *KubernetesProvisioningInfo `json:"result"`
}

KubernetesProvisioningInfoResult holds unit provisioning info or an error.

type KubernetesProvisioningInfoResults

type KubernetesProvisioningInfoResults struct {
	Results []KubernetesProvisioningInfoResult `json:"results"`
}

KubernetesProvisioningInfoResults holds multiple provisioning info results.

type KubernetesUpgradeArg

type KubernetesUpgradeArg struct {
	AgentTag string         `json:"agent-tag"`
	Version  version.Number `json:"version"`
}

KubernetesUpgradeArg holds args used to upgrade an operator.

type KubernetesVolumeAttachmentParams

type KubernetesVolumeAttachmentParams struct {
	Provider string `json:"provider"`
	ReadOnly bool   `json:"read-only,omitempty"`
}

KubernetesVolumeAttachmentParams holds the parameters for creating a volume attachment.

type KubernetesVolumeInfo

type KubernetesVolumeInfo struct {
	VolumeId   string                 `json:"volume-id"`
	Pool       string                 `json:"pool,omitempty"`
	Size       uint64                 `json:"size"`
	Persistent bool                   `json:"persistent"`
	Status     string                 `json:"status"`
	Info       string                 `json:"info"`
	Data       map[string]interface{} `json:"data,omitempty"`
}

Volume describes a storage volume in the cloud as reported to the model.

type KubernetesVolumeParams

type KubernetesVolumeParams struct {
	StorageName string                            `json:"storagename"`
	Size        uint64                            `json:"size"`
	Provider    string                            `json:"provider"`
	Attributes  map[string]interface{}            `json:"attributes,omitempty"`
	Tags        map[string]string                 `json:"tags,omitempty"`
	Attachment  *KubernetesVolumeAttachmentParams `json:"attachment,omitempty"`
}

KubernetesVolumeParams holds the parameters for creating a storage volume.

type LXDProfile

type LXDProfile struct {
	Config      map[string]string            `json:"config"`
	Description string                       `json:"description"`
	Devices     map[string]map[string]string `json:"devices"`
}

LXDProfile holds status info about a LXDProfile

type LXDProfileUpgrade

type LXDProfileUpgrade struct {
	Entities        []Entity `json:"entities"`
	ApplicationName string   `json:"application-name"`
}

LXDProfileUpgrade holds the parameters for an application lxd profile machines

type LeaseOperation

type LeaseOperation struct {
	Command string `json:"command"`
}

LeaseOperation is used to send raft operational messages between controllers.

type LeaseOperations

type LeaseOperations struct {
	Operations []LeaseOperation `json:"commands"`
}

LeaseOperations is used to send raft operational messages between controllers.

type LifeResult

type LifeResult struct {
	Life  life.Value `json:"life"`
	Error *Error     `json:"error,omitempty"`
}

LifeResult holds the life status of a single entity, or an error indicating why it is not available.

type LifeResults

type LifeResults struct {
	Results []LifeResult `json:"results"`
}

LifeResults holds the life or error status of multiple entities.

type ListCloudImageMetadataResult

type ListCloudImageMetadataResult struct {
	Result []CloudImageMetadata `json:"result"`
}

ListCloudImageMetadataResult holds the results of querying cloud image metadata.

type ListCloudInfo

type ListCloudInfo struct {
	CloudDetails `json:",inline"`

	// Access is the access level for the user.
	Access string `json:"user-access"`
}

ListCloudInfo holds information about a cloud for a user.

type ListCloudInfoResult

type ListCloudInfoResult struct {
	Result *ListCloudInfo `json:"result,omitempty"`
	Error  *Error         `json:"error,omitempty"`
}

ListCloudInfoResult holds the result of a ListCloudInfo call.

type ListCloudInfoResults

type ListCloudInfoResults struct {
	Results []ListCloudInfoResult `json:"results"`
}

ListCloudInfoResults holds the result of a bulk ListCloudInfo call.

type ListCloudsRequest

type ListCloudsRequest struct {
	UserTag string `json:"user-tag"`
	All     bool   `json:"all,omitempty"`
}

ListCloudsRequest encapsulates how we request a list of cloud details for a user.

type ListFirewallRulesResults

type ListFirewallRulesResults struct {
	// Rules is a list of firewall rules.
	Rules []FirewallRule
}

ListFirewallRulesResults holds the results of listing firewall rules.

type ListImageResult

type ListImageResult struct {
	Result []ImageMetadata `json:"result"`
}

ListImageResult holds the results of querying images.

type ListResourcesArgs

type ListResourcesArgs Entities

ListResourcesArgs are the arguments for the ListResources endpoint.

type ListSSHKeys

type ListSSHKeys struct {
	Entities `json:"entities"`
	Mode     ssh.ListMode `json:"mode"`
}

ListSSHKeys stores parameters used for a KeyManager.ListKeys call.

type ListSecretResult

type ListSecretResult struct {
	URL            string             `json:"url"`
	Path           string             `json:"path"`
	Version        int                `json:"version"`
	RotateInterval time.Duration      `json:"rotate-interval"`
	Status         string             `json:"status"`
	Description    string             `json:"description,omitempty"`
	Tags           map[string]string  `json:"tags,omitempty"`
	ID             int                `json:"int"`
	Provider       string             `json:"provider"`
	ProviderID     string             `json:"provider-id,omitempty"`
	Revision       int                `json:"revision"`
	CreateTime     time.Time          `json:"create-time"`
	UpdateTime     time.Time          `json:"update-time"`
	Value          *SecretValueResult `json:"value,omitempty"`
}

ListSecretResult is the result of getting secret metadata.

type ListSecretResults

type ListSecretResults struct {
	Results []ListSecretResult `json:"results"`
}

ListSecretResults holds secret metadata results.

type ListSecretsArgs

type ListSecretsArgs struct {
	ShowSecrets bool `json:"show-secrets"`
}

ListSecretsArgs holds the args for listing secrets.

type ListSpacesResults

type ListSpacesResults struct {
	Results []Space `json:"results"`
}

ListSpacesResults holds the list of all available spaces.

type ListSubnetsResults

type ListSubnetsResults struct {
	Results []Subnet `json:"results"`
}

ListSubnetsResults holds the result of a ListSubnets API call.

type ListUnitResourcesArgs

type ListUnitResourcesArgs struct {
	// ResourceNames holds the names of the application's resources for
	// which information should be provided.
	ResourceNames []string `json:"resource-names"`
}

ListResourcesArgs holds the arguments for an API request to list resources for an application. The application is implicit to the uniter- specific HTTP connection.

type LogForwardingGetLastSentParams

type LogForwardingGetLastSentParams struct {
	// IDs holds the list of IDs for which individual "last sent"
	// timestamps should be returned (in the same order).
	IDs []LogForwardingID `json:"ids"`
}

LogForwardingGetLastSentParams holds the arguments for a call to the GetLastSent method of the LogForwarding facade.

type LogForwardingGetLastSentResult

type LogForwardingGetLastSentResult struct {
	// RecordID is the ID of the last log record that was
	// forwarded for a given model and sink. If Error is set then the
	// meaning of this value is undefined.
	RecordID int64 `json:"record-id"`

	// RecordTimestamp is the timestamp of the last log record that was
	// forwarded for a given model and sink. If Error is set then the
	// meaning of this value is undefined.
	RecordTimestamp int64 `json:"record-timestamp"`

	// Error holds the error, if any, that resulted while handling the
	// request for a specific ID.
	Error *Error `json:"err"`
}

LogForwardingGetLastSentResult holds a single result from a call to the GetLastSent method of the LogForwarding facade.

type LogForwardingGetLastSentResults

type LogForwardingGetLastSentResults struct {
	// Results holds the list of results that correspond to the IDs
	// sent in a GetLastSent call.
	Results []LogForwardingGetLastSentResult `json:"results"`
}

LogForwardingGetLastSentResults holds the results of a call to the GetLastSent method of the LogForwarding facade.

type LogForwardingID

type LogForwardingID struct {
	// ModelTag identifies the model associated with the log record.
	ModelTag string `json:"model"`

	// Sink is the name of the log forwarding target to which a log
	// record was last sent.
	Sink string `json:"sink"`
}

LogForwardingID is the API data that identifies a log forwarding "last sent" value. The controller has a mapping from a set of IDs to a timestamp (for each ID). The timestamp corresponds to the last log record that the specific log forwarding machinery sent to the identified "sink" (for a given model).

type LogForwardingSetLastSentParam

type LogForwardingSetLastSentParam struct {
	LogForwardingID

	// RecordID identifies the record ID to set for the given ID.
	RecordID int64 `json:"record-id"`

	// RecordTimestamp identifies the record timestamp to set for the given ID.
	RecordTimestamp int64 `json:"record-timestamp"`
}

LogForwardingSetLastSentParams holds holds the info needed to set a new "last sent" value via a call to the SetLastSent method of the LogForwarding facade.

type LogForwardingSetLastSentParams

type LogForwardingSetLastSentParams struct {
	// Params holds the list of individual requests for "last sent" info.
	Params []LogForwardingSetLastSentParam `json:"params"`
}

LogForwardingSetLastSentParams holds the arguments for a call to the SetLastSent method of the LogForwarding facade.

type LogMessage

type LogMessage struct {
	Entity    string    `json:"tag"`
	Timestamp time.Time `json:"ts"`
	Severity  string    `json:"sev"`
	Module    string    `json:"mod"`
	Location  string    `json:"loc"`
	Message   string    `json:"msg"`
	Labels    []string  `json:"lab"`
}

LogMessage is a structured logging entry.

type LogRecord

type LogRecord struct {
	Time     time.Time `json:"t"`
	Module   string    `json:"m"`
	Location string    `json:"l"`
	Level    string    `json:"v"`
	Message  string    `json:"x"`
	Entity   string    `json:"e,omitempty"`
	Labels   []string  `json:"c,omitempty"`
}

LogRecord is used to transmit log messages to the logsink API endpoint. Single character field names are used for serialisation to keep the size down. These messages are going to be sent a lot.

type LogStreamConfig

type LogStreamConfig struct {
	// Sink identifies the target to which log records will be streamed.
	// This is used as a bookmark for where to start the next time logs
	// are streamed for the same sink.
	Sink string `schema:"sink" url:"sink,omitempty"`

	// MaxLookbackDuration is the maximum time duration from the past to stream.
	// It must be a valid time duration string.
	MaxLookbackDuration string `schema:"maxlookbackduration" url:"maxlookbackduration,omitempty"`

	// MaxLookbackRecords is the maximum number of log records to stream from the past.
	MaxLookbackRecords int `schema:"maxlookbackrecords" url:"maxlookbackrecords,omitempty"`
}

LogStreamConfig holds all the information necessary to open a streaming connection to the API endpoint for reading log records.

The field tags relate to the following 2 libraries:

github.com/google/go-querystring/query (encoding)
github.com/gorilla/schema (decoding)

See apiserver/debuglog.go:debugLogParams for additional things we may consider supporting here.

type LogStreamRecord

type LogStreamRecord struct {
	ID        int64     `json:"id"`
	ModelUUID string    `json:"mid"`
	Entity    string    `json:"ent"`
	Version   string    `json:"ver,omitempty"`
	Timestamp time.Time `json:"ts"`
	Module    string    `json:"mod"`
	Location  string    `json:"lo"`
	Level     string    `json:"lv"`
	Message   string    `json:"msg"`
	Labels    []string  `json:"lab"`
}

LogStreamRecord describes a single log record being streamed from the server.

type LogStreamRecords

type LogStreamRecords struct {
	Records []LogStreamRecord `json:"records"`
}

LogStreamRecord contains a slice of LogStreamRecords.

type LoginRequest

type LoginRequest struct {
	AuthTag       string           `json:"auth-tag"`
	Credentials   string           `json:"credentials"`
	Nonce         string           `json:"nonce"`
	Macaroons     []macaroon.Slice `json:"macaroons"`
	BakeryVersion bakery.Version   `json:"bakery-version,omitempty"`
	CLIArgs       string           `json:"cli-args,omitempty"`
	UserData      string           `json:"user-data"`
	ClientVersion string           `json:"client-version,omitempty"`
}

LoginRequest holds credentials for identifying an entity to the Login v1 facade. AuthTag holds the tag of the user to connect as. If it is empty, then the provided macaroon slices will be used for authentication (if any one is valid, the authentication succeeds). If there are no valid macaroons and macaroon authentication is configured, the LoginResult will contain a macaroon that when discharged, may allow access.

type LoginRequestCompat

type LoginRequestCompat struct {
	LoginRequest `json:"login-request"`
	Creds        `json:"creds"`
}

LoginRequestCompat holds credentials for identifying an entity to the Login v1 or earlier (v0 or even pre-facade).

type LoginResult

type LoginResult struct {
	// DischargeRequired implies that the login request has failed, and none of
	// the other fields are populated. It contains a macaroon which, when
	// discharged, will grant access on a subsequent call to Login.
	// Note: It is OK to use the Macaroon type here as it is explicitly
	// designed to provide stable serialisation of macaroons.  It's good
	// practice to only use primitives in types that will be serialised,
	// however because of the above it is suitable to use the Macaroon type
	// here.
	DischargeRequired *macaroon.Macaroon `json:"discharge-required,omitempty"`

	// BakeryDischargeRequired implies that the login request has failed, and none of
	// the other fields are populated. It contains a macaroon which, when
	// discharged, will grant access on a subsequent call to Login.
	// Note: It is OK to use the Macaroon type here as it is explicitly
	// designed to provide stable serialisation of macaroons.  It's good
	// practice to only use primitives in types that will be serialised,
	// however because of the above it is suitable to use the Macaroon type
	// here.
	// This is the macaroon emitted by newer Juju controllers using bakery.v2.
	BakeryDischargeRequired *bakery.Macaroon `json:"bakery-discharge-required,omitempty"`

	// DischargeRequiredReason holds the reason that the above discharge was
	// required.
	DischargeRequiredReason string `json:"discharge-required-error,omitempty"`

	// Servers is the list of API server addresses.
	Servers [][]HostPort `json:"servers,omitempty"`

	// PublicDNSName holds the host name for which an officially
	// signed certificate will be used for TLS connection to the server.
	// If empty, the private Juju CA certificate must be used to verify
	// the connection.
	PublicDNSName string `json:"public-dns-name,omitempty"`

	// ModelTag is the tag for the model that is being connected to.
	ModelTag string `json:"model-tag,omitempty"`

	// ControllerTag is the tag for the controller that runs the API servers.
	ControllerTag string `json:"controller-tag,omitempty"`

	// UserInfo describes the authenticated user, if any.
	UserInfo *AuthUserInfo `json:"user-info,omitempty"`

	// Facades describes all the available API facade versions to the
	// authenticated client.
	Facades []FacadeVersions `json:"facades,omitempty"`

	// ServerVersion is the string representation of the server version
	// if the server supports it.
	ServerVersion string `json:"server-version,omitempty"`
}

LoginResult holds the result of an Admin Login call.

type LookUpPayloadArg

type LookUpPayloadArg struct {
	// Name is the payload name.
	Name string `json:"name"`

	// ID uniquely identifies the payload for the given name.
	ID string `json:"id"`
}

LookUpPayloadArg contains all the information necessary to identify a payload.

type LookUpPayloadArgs

type LookUpPayloadArgs struct {
	// Args is the list of arguments to pass to this function.
	Args []LookUpPayloadArg `json:"args"`
}

LookUpPayloadArgs are the arguments for the LookUp endpoint.

type MacaroonResult

type MacaroonResult struct {
	Result *macaroon.Macaroon `json:"result,omitempty"`
	Error  *Error             `json:"error,omitempty"`
}

MacaroonResult contains a macaroon or an error.

type MacaroonResults

type MacaroonResults struct {
	Results []MacaroonResult `json:"results"`
}

MacaroonResults contains a set of MacaroonResults.

type MachineAddresses

type MachineAddresses struct {
	Tag       string    `json:"tag"`
	Addresses []Address `json:"addresses"`
}

MachineAddresses holds an machine tag and addresses.

type MachineAddressesResult

type MachineAddressesResult struct {
	Error     *Error    `json:"error,omitempty"`
	Addresses []Address `json:"addresses"`
}

MachineAddressesResult holds a list of machine addresses or an error.

type MachineAddressesResults

type MachineAddressesResults struct {
	Results []MachineAddressesResult `json:"results"`
}

MachineAddressesResults holds the results of calling an API method returning a list of addresses per machine.

type MachineBlockDevices

type MachineBlockDevices struct {
	Machine      string                `json:"machine"`
	BlockDevices []storage.BlockDevice `json:"block-devices,omitempty"`
}

MachineBlockDevices holds a machine tag and the block devices present on that machine.

type MachineContainerResult

type MachineContainerResult struct {
	Error          *Error                   `json:"error,omitempty"`
	ContainerTypes []instance.ContainerType `json:"container-types"`
	Determined     bool                     `json:"determined"`
}

MachineContainerResult holds the result of making the call to SupportedContainers on a given machine.

type MachineContainerResults

type MachineContainerResults struct {
	Results []MachineContainerResult `json:"results"`
}

MachineContainerResults holds the results from making the call to SupportedContainers on a given machine.

type MachineContainers

type MachineContainers struct {
	MachineTag     string                   `json:"machine-tag"`
	ContainerTypes []instance.ContainerType `json:"container-types"`
}

MachineContainers holds the arguments for making an SetSupportedContainers call on a given machine.

type MachineContainersParams

type MachineContainersParams struct {
	Params []MachineContainers `json:"params"`
}

MachineContainersParams holds the arguments for making a SetSupportedContainers API call.

type MachineHardware

type MachineHardware struct {
	Arch             *string   `json:"arch,omitempty"`
	Mem              *uint64   `json:"mem,omitempty"`
	RootDisk         *uint64   `json:"root-disk,omitempty"`
	Cores            *uint64   `json:"cores,omitempty"`
	CpuPower         *uint64   `json:"cpu-power,omitempty"`
	Tags             *[]string `json:"tags,omitempty"`
	AvailabilityZone *string   `json:"availability-zone,omitempty"`
}

MachineHardware holds information about a machine's hardware characteristics.

type MachineInfo

type MachineInfo struct {
	ModelUUID                string                            `json:"model-uuid"`
	Id                       string                            `json:"id"`
	InstanceId               string                            `json:"instance-id"`
	AgentStatus              StatusInfo                        `json:"agent-status"`
	InstanceStatus           StatusInfo                        `json:"instance-status"`
	Life                     life.Value                        `json:"life"`
	Config                   map[string]interface{}            `json:"config,omitempty"`
	Series                   string                            `json:"series"`
	ContainerType            string                            `json:"container-type"`
	IsManual                 bool                              `json:"-"` // internal use only
	SupportedContainers      []instance.ContainerType          `json:"supported-containers"`
	SupportedContainersKnown bool                              `json:"supported-containers-known"`
	HardwareCharacteristics  *instance.HardwareCharacteristics `json:"hardware-characteristics,omitempty"`
	CharmProfiles            []string                          `json:"charm-profiles,omitempty"`
	Jobs                     []model.MachineJob                `json:"jobs"`
	Addresses                []Address                         `json:"addresses"`
	HasVote                  bool                              `json:"has-vote"`
	WantsVote                bool                              `json:"wants-vote"`
	Hostname                 string                            `json:"hostname,omitempty"`
}

MachineInfo holds the information about a machine that is tracked by multiwatcherStore.

func (*MachineInfo) EntityId

func (i *MachineInfo) EntityId() EntityId

EntityId returns a unique identifier for a machine across models.

type MachineNetworkConfigResult

type MachineNetworkConfigResult struct {
	Error *Error `json:"error,omitempty"`

	// Tagged to Info due to compatibility reasons.
	Config []NetworkConfig `json:"info"`
}

MachineNetworkConfigResult holds network configuration for a single machine.

type MachineNetworkConfigResults

type MachineNetworkConfigResults struct {
	Results []MachineNetworkConfigResult `json:"results"`
}

MachineNetworkConfigResults holds network configuration for multiple machines.

type MachinePortRange

type MachinePortRange struct {
	UnitTag     string    `json:"unit-tag"`
	RelationTag string    `json:"relation-tag"`
	PortRange   PortRange `json:"port-range"`
}

MachinePortRange holds a single port range open on a machine for the given unit and relation tags.

type MachinePorts

type MachinePorts struct {
	MachineTag string `json:"machine-tag"`
	SubnetTag  string `json:"subnet-tag"`
}

MachinePorts holds a machine and subnet tags. It's used when referring to opened ports on the machine for a subnet.

type MachinePortsResult

type MachinePortsResult struct {
	Error *Error             `json:"error,omitempty"`
	Ports []MachinePortRange `json:"ports"`
}

MachinePortsResult holds a single result of the Uniter.AllMachinePorts() API call. Deprecated: retained to allow upgrading from 2.8.9 (LTS).

type MachinePortsResults

type MachinePortsResults struct {
	Results []MachinePortsResult `json:"results"`
}

MachinePortsResults holds all the results of the Uniter.AllMachinePorts() API call. Deprecated: retained to allow upgrading from 2.8.9 (LTS).

type MachineStatus

type MachineStatus struct {
	AgentStatus        DetailedStatus `json:"agent-status"`
	InstanceStatus     DetailedStatus `json:"instance-status"`
	ModificationStatus DetailedStatus `json:"modification-status"`

	Hostname string `json:"hostname,omitempty"`
	DNSName  string `json:"dns-name"`

	// IPAddresses holds the IP addresses known for this machine. It is
	// here for backwards compatibility. It should be similar to its
	// namesakes in NetworkInterfaces, but may also include any
	// public/floating IP addresses not actually bound to the machine but
	// known to the provider.
	IPAddresses []string `json:"ip-addresses,omitempty"`

	// InstanceId holds the unique identifier for this machine, based on
	// what is supplied by the provider.
	InstanceId instance.Id `json:"instance-id"`

	// DisplayName is a human-readable name for this machine.
	DisplayName string `json:"display-name"`

	// Series holds the name of the operating system release installed on
	// this machine.
	Series string `json:"series"`

	// Id is the Juju identifier for this machine in this model.
	Id string `json:"id"`

	// NetworkInterfaces holds a map of NetworkInterface for this machine.
	NetworkInterfaces map[string]NetworkInterface `json:"network-interfaces,omitempty"`

	// Containers holds the MachineStatus of any containers hosted on this
	// machine.
	Containers map[string]MachineStatus `json:"containers"`

	// Constraints holds a string of space-separated key=value pairs for
	// each constraint datum.
	Constraints string `json:"constraints"`

	// Hardware holds a string of space-separated key=value pairs for each
	// hardware specification datum.
	Hardware string `json:"hardware"`

	Jobs      []model.MachineJob `json:"jobs"`
	HasVote   bool               `json:"has-vote"`
	WantsVote bool               `json:"wants-vote"`

	// LXDProfiles holds all the machines current LXD profiles that have
	// been applied to the machine
	LXDProfiles map[string]LXDProfile `json:"lxd-profiles,omitempty"`

	// PrimaryControllerMachine indicates whether this machine has a primary mongo instance in replicaset and,
	//	// thus, can be considered a primary controller machine in HA setup.
	PrimaryControllerMachine *bool `json:"primary-controller-machine,omitempty"`
}

MachineStatus holds status info about a machine.

type MachineStorageId

type MachineStorageId struct {
	MachineTag string `json:"machine-tag"`
	// AttachmentTag is the tag of the volume or filesystem whose
	// attachment to the machine is represented.
	AttachmentTag string `json:"attachment-tag"`
}

MachineStorageId identifies the attachment of a storage entity to a machine, by their tags.

type MachineStorageIds

type MachineStorageIds struct {
	Ids []MachineStorageId `json:"ids"`
}

MachineStorageIds holds a set of machine/storage-entity attachment identifiers.

type MachineStorageIdsWatchResult

type MachineStorageIdsWatchResult struct {
	MachineStorageIdsWatcherId string             `json:"watcher-id"`
	Changes                    []MachineStorageId `json:"changes"`
	Error                      *Error             `json:"error,omitempty"`
}

MachineStorageIdsWatchResult holds a MachineStorageIdsWatcher id, changes and an error (if any).

type MachineStorageIdsWatchResults

type MachineStorageIdsWatchResults struct {
	Results []MachineStorageIdsWatchResult `json:"results"`
}

MachineStorageIdsWatchResults holds the results for any API call which ends up returning a list of MachineStorageIdsWatchers.

type MapResult

type MapResult struct {
	Result map[string]interface{} `json:"result"`
	Error  *Error                 `json:"error,omitempty"`
}

MapResult holds a generic map or an error.

type MapResults

type MapResults struct {
	Results []MapResult `json:"results"`
}

MapResults holds the bulk operation result of an API call that returns a map or an error.

type MasterMigrationStatus

type MasterMigrationStatus struct {
	Spec             MigrationSpec `json:"spec"`
	MigrationId      string        `json:"migration-id"`
	Phase            string        `json:"phase"`
	PhaseChangedTime time.Time     `json:"phase-changed-time"`
}

MasterMigrationStatus is used to report the current status of a model migration for the migrationmaster. It includes authentication details for the remote controller.

type MergeLeadershipSettingsBulkParams

type MergeLeadershipSettingsBulkParams struct {

	// Params are the parameters for making a bulk leadership settings
	// merge.
	Params []MergeLeadershipSettingsParam `json:"params"`
}

MergeLeadershipSettingsBulkParams is a collection of parameters for making a bulk merge of leadership settings.

type MergeLeadershipSettingsParam

type MergeLeadershipSettingsParam struct {
	// ApplicationTag is the application for which you want to merge
	// leadership settings.
	ApplicationTag string `json:"application-tag,omitempty"`

	// UnitTag is the unit for which you want to merge
	// leadership settings.
	UnitTag string `json:"unit-tag,omitempty"`

	// Settings are the Leadership settings you wish to merge in.
	Settings Settings `json:"settings"`
}

MergeLeadershipSettingsParam are the parameters needed for merging in leadership settings.

type MetadataImageIds

type MetadataImageIds struct {
	Ids []string `json:"image-ids"`
}

MetadataImageIds holds image ids and can be used to identify related image metadata.

type MetadataSaveParams

type MetadataSaveParams struct {
	Metadata []CloudImageMetadataList `json:"metadata,omitempty"`
}

MetadataSaveParams holds lists of cloud image metadata to save. Each list will be saved atomically.

type MeterStatus

type MeterStatus struct {
	Color   string `json:"color"`
	Message string `json:"message"`
}

MeterStatus represents the meter status of a unit.

type MeterStatusParam

type MeterStatusParam struct {
	Tag  string `json:"tag"`
	Code string `json:"code"`
	Info string `json:"info,omitempty"`
}

MeterStatusParam holds meter status information to be set for the specified tag.

type MeterStatusParams

type MeterStatusParams struct {
	Statuses []MeterStatusParam `json:"statues"`
}

MeterStatusParams holds parameters for making SetMeterStatus calls.

type MeterStatusResult

type MeterStatusResult struct {
	Code  string `json:"code"`
	Info  string `json:"info"`
	Error *Error `json:"error,omitempty"`
}

MeterStatusResult holds unit meter status or error.

type MeterStatusResults

type MeterStatusResults struct {
	Results []MeterStatusResult `json:"results"`
}

MeterStatusResults holds meter status results for multiple units.

type Metric

type Metric struct {
	Key    string            `json:"key"`
	Value  string            `json:"value"`
	Time   time.Time         `json:"time"`
	Labels map[string]string `json:"labels,omitempty"`
}

Metric holds a single metric.

type MetricBatch

type MetricBatch struct {
	UUID     string    `json:"uuid"`
	CharmURL string    `json:"charm-url"`
	Created  time.Time `json:"created"`
	Metrics  []Metric  `json:"metrics"`
}

MetricBatch is a list of metrics with metadata.

type MetricBatchParam

type MetricBatchParam struct {
	Tag   string      `json:"tag"`
	Batch MetricBatch `json:"batch"`
}

MetricBatchParam contains a single metric batch.

type MetricBatchParams

type MetricBatchParams struct {
	Batches []MetricBatchParam `json:"batches"`
}

MetricBatchParams contains multiple metric batches.

type MetricResult

type MetricResult struct {
	Time   time.Time         `json:"time"`
	Key    string            `json:"key"`
	Value  string            `json:"value"`
	Unit   string            `json:"unit"`
	Labels map[string]string `json:"labels"`
}

MetricResult contains a single metric.

type MetricResults

type MetricResults struct {
	Results []EntityMetrics `json:"results"`
}

MetricResults contains results from a GetMetrics call, with one item per Entity given as an argument to the command.

func (*MetricResults) OneError

func (m *MetricResults) OneError() error

OneError returns the first error

type MetricsParam

type MetricsParam struct {
	Tag     string   `json:"tag"`
	Metrics []Metric `json:"metrics"`
}

MetricsParam contains the metrics for a single unit.

type MetricsParams

type MetricsParams struct {
	Metrics []MetricsParam `json:"metrics"`
}

MetricsParams contains the metrics for multiple units.

type MigrationModelInfo

type MigrationModelInfo struct {
	UUID                   string         `json:"uuid"`
	Name                   string         `json:"name"`
	OwnerTag               string         `json:"owner-tag"`
	AgentVersion           version.Number `json:"agent-version"`
	ControllerAgentVersion version.Number `json:"controller-agent-version"`
}

MigrationModelInfo is used to report basic model information to the migrationmaster worker.

type MigrationSpec

type MigrationSpec struct {
	ModelTag   string              `json:"model-tag"`
	TargetInfo MigrationTargetInfo `json:"target-info"`
}

MigrationSpec holds the details required to start the migration of a single model.

type MigrationStatus

type MigrationStatus struct {
	MigrationId string `json:"migration-id"`
	Attempt     int    `json:"attempt"`
	Phase       string `json:"phase"`

	// TODO(mjs): I'm not convinced these Source fields will get used.
	SourceAPIAddrs []string `json:"source-api-addrs"`
	SourceCACert   string   `json:"source-ca-cert"`

	TargetAPIAddrs []string `json:"target-api-addrs"`
	TargetCACert   string   `json:"target-ca-cert"`
}

MigrationStatus reports the current status of a model migration.

type MigrationTargetInfo

type MigrationTargetInfo struct {
	ControllerTag   string   `json:"controller-tag"`
	ControllerAlias string   `json:"controller-alias,omitempty"`
	Addrs           []string `json:"addrs"`
	CACert          string   `json:"ca-cert"`
	AuthTag         string   `json:"auth-tag"`
	Password        string   `json:"password,omitempty"`
	Macaroons       string   `json:"macaroons,omitempty"`
}

MigrationTargetInfo holds the details required to connect to and authenticate with a remote controller for model migration.

type MinionReport

type MinionReport struct {
	// MigrationId holds the id of the migration the agent is
	// reporting about.
	MigrationId string `json:"migration-id"`

	// Phase holds the phase of the migration the agent is
	// reporting about.
	Phase string `json:"phase"`

	// Success is true if the agent successfully completed its actions
	// for the migration phase, false otherwise.
	Success bool `json:"success"`
}

MinionReport holds the details of whether a migration minion succeeded or failed for a specific migration phase.

type MinionReports

type MinionReports struct {
	// MigrationId holds the id of the migration the reports related to.
	MigrationId string `json:"migration-id"`

	// Phase holds the phase of the migration the reports related to.
	Phase string `json:"phase"`

	// SuccessCount holds the number of agents which have successfully
	// completed a given migration phase.
	SuccessCount int `json:"success-count"`

	// UnknownCount holds the number of agents still to report for a
	// given migration phase.
	UnknownCount int `json:"unknown-count"`

	// UnknownSample holds the tags of a limited number of agents
	// that are still to report for a given migration phase (for
	// logging or showing in a user interface).
	UnknownSample []string `json:"unknown-sample"`

	// Failed contains the tags of all agents which have reported a
	// failed to complete a given migration phase.
	Failed []string `json:"failed"`
}

MinionReports holds the details of whether a migration minion succeeded or failed for a specific migration phase.

type Model

type Model struct {
	Name     string `json:"name"`
	UUID     string `json:"uuid"`
	Type     string `json:"type"`
	OwnerTag string `json:"owner-tag"`
}

Model holds the result of an API call returning a name and UUID for a model and the tag of the server in which it is running.

type ModelAbstract

type ModelAbstract struct {
	UUID    string `json:"uuid"`
	Removed bool   `json:"removed,omitempty"`

	Controller string   `json:"controller,omitempty"`
	Name       string   `json:"name,omitempty"`
	Admins     []string `json:"admins,omitempty"`

	Cloud      string `json:"cloud,omitempty"`
	Region     string `json:"region,omitempty"`
	Credential string `json:"credential,omitempty"`

	Size ModelSummarySize `json:"size,omitempty"`

	Status   string                `json:"status,omitempty"`
	Messages []ModelSummaryMessage `json:"messages,omitempty"`

	Annotations map[string]string `json:"annotations,omitempty"`
}

ModelAbstract represents a summary of a model. Unfortunately we already have a ModelSummary in the params package.

type ModelAccess

type ModelAccess struct {
	Model  string `json:"model,omitempty"`
	Access string `json:"access,omitempty"`
}

ModelAccess contains information about user model access.

type ModelAction

type ModelAction string

ModelAction is an action that can be performed on a model.

const (
	GrantModelAccess  ModelAction = "grant"
	RevokeModelAccess ModelAction = "revoke"
)

Actions that can be preformed on a model.

type ModelArgs

type ModelArgs struct {
	ModelTag string `json:"model-tag"`
}

ModelArgs wraps a simple model tag.

type ModelBlockInfo

type ModelBlockInfo struct {
	Name     string   `json:"name"`
	UUID     string   `json:"model-uuid"`
	OwnerTag string   `json:"owner-tag"`
	Blocks   []string `json:"blocks"`
}

ModelBlockInfo holds information about an model and its current blocks.

type ModelBlockInfoList

type ModelBlockInfoList struct {
	Models []ModelBlockInfo `json:"models,omitempty"`
}

ModelBlockInfoList holds information about the blocked models for a controller.

type ModelConfig

type ModelConfig map[string]interface{}

ModelConfig holds a model configuration.

type ModelConfigResult

type ModelConfigResult struct {
	Config ModelConfig `json:"config"`
}

ModelConfigResult holds model configuration.

type ModelConfigResults

type ModelConfigResults struct {
	Config map[string]ConfigValue `json:"config"`
}

ModelConfigResults contains the result of client API calls to get model config values.

type ModelCreateArgs

type ModelCreateArgs struct {
	// Name is the name for the new model.
	Name string `json:"name"`

	// OwnerTag represents the user that will own the new model.
	// The OwnerTag must be a valid user tag.  If the user tag represents
	// a local user, that user must exist.
	OwnerTag string `json:"owner-tag"`

	// Config defines the model config, which includes the name of the
	// model. A model UUID is allocated by the API server during the
	// creation of the model.
	Config map[string]interface{} `json:"config,omitempty"`

	// CloudTag is the tag of the cloud to create the model in.
	// If this is empty, the model will be created in the same
	// cloud as the controller model.
	CloudTag string `json:"cloud-tag,omitempty"`

	// CloudRegion is the name of the cloud region to create the
	// model in. If the cloud does not support regions, this must
	// be empty. If this is empty, and CloudTag is empty, the model
	// will be created in the same region as the controller model.
	CloudRegion string `json:"region,omitempty"`

	// CloudCredentialTag is the tag of the cloud credential to use
	// for managing the model's resources. If the cloud does not
	// require credentials, this may be empty. If this is empty,
	// and the owner is the controller owner, the same credential
	// used for the controller model will be used.
	CloudCredentialTag string `json:"credential,omitempty"`
}

ModelCreateArgs holds the arguments that are necessary to create a model.

type ModelCredential

type ModelCredential struct {
	// Model is a tag for the model.
	Model string `json:"model-tag"`

	// Exists indicates whether credential was set on the model.
	// It is valid for model not to have a credential if it is on the
	// cloud that does not require auth.
	Exists bool `json:"exists,omitempty"`

	// CloudCredential is the tag for the cloud credential that the model uses.
	CloudCredential string `json:"credential-tag"`

	// Valid stores whether this credential is valid, for example, not expired,
	// and whether this credential works for this model, i.e. all model
	// machines can be accessed with this credential.
	Valid bool `json:"valid,omitempty"`
}

ModelCredential stores information about cloud credential that a model uses: what credential is being used, is it valid for this model, etc.

type ModelDefaultValues

type ModelDefaultValues struct {
	CloudTag    string                 `json:"cloud-tag,omitempty"`
	CloudRegion string                 `json:"cloud-region,omitempty"`
	Config      map[string]interface{} `json:"config"`
}

ModelDefaultValues contains the default model values for a cloud/region.

type ModelDefaults

type ModelDefaults struct {
	Default    interface{}      `json:"default,omitempty"`
	Controller interface{}      `json:"controller,omitempty"`
	Regions    []RegionDefaults `json:"regions,omitempty"`
}

ModelDefaults holds the settings for a given ModelDefaultsResult config attribute.

type ModelDefaultsResult

type ModelDefaultsResult struct {
	Config map[string]ModelDefaults `json:"config"`
	Error  *Error                   `json:"error,omitempty"`
}

ModelDefaultsResult contains the result of client API calls to get the model default values.

type ModelDefaultsResults

type ModelDefaultsResults struct {
	Results []ModelDefaultsResult `json:"results"`
}

ModelDefaultsResults contains the result of client API calls to get the model default values.

type ModelEntityCount

type ModelEntityCount struct {
	Entity CountedEntity `json:"entity"`
	Count  int64         `json:"count"`
}

ModelEntityCount represent a count for a model entity where entities could be machines, units, etc...

type ModelFilesystemInfo

type ModelFilesystemInfo struct {
	Id         string `json:"id"`
	ProviderId string `json:"provider-id,omitempty"`
	Status     string `json:"status,omitempty"`
	Message    string `json:"message,omitempty"`
	Detachable bool   `json:"detachable,omitempty"`
}

ModelFilesystemInfo holds information about a filesystem in a model.

type ModelInfo

type ModelInfo struct {
	Name               string `json:"name"`
	Type               string `json:"type"`
	UUID               string `json:"uuid"`
	ControllerUUID     string `json:"controller-uuid"`
	IsController       bool   `json:"is-controller"`
	ProviderType       string `json:"provider-type,omitempty"`
	DefaultSeries      string `json:"default-series,omitempty"`
	CloudTag           string `json:"cloud-tag"`
	CloudRegion        string `json:"cloud-region,omitempty"`
	CloudCredentialTag string `json:"cloud-credential-tag,omitempty"`

	// CloudCredentialValidity contains if model credential is valid, if known.
	CloudCredentialValidity *bool `json:"cloud-credential-validity,omitempty"`

	// OwnerTag is the tag of the user that owns the model.
	OwnerTag string `json:"owner-tag"`

	// Life is the current lifecycle state of the model.
	Life life.Value `json:"life"`

	// Status is the current status of the model.
	Status EntityStatus `json:"status,omitempty"`

	// Users contains information about the users that have access
	// to the model. Owners and administrators can see all users
	// that have access; other users can only see their own details.
	Users []ModelUserInfo `json:"users"`

	// Machines contains information about the machines in the model.
	// This information is available to owners and users with write
	// access or greater.
	Machines []ModelMachineInfo `json:"machines"`

	// Migration contains information about the latest failed or
	// currently-running migration. It'll be nil if there isn't one.
	Migration *ModelMigrationStatus `json:"migration,omitempty"`

	// SLA contains the information about the SLA for the model, if set.
	SLA *ModelSLAInfo `json:"sla"`

	// AgentVersion is the agent version for this model.
	AgentVersion *version.Number `json:"agent-version"`

	// SupportedFeatures provides information about the set of features
	// supported by this model. The feature set contains both Juju-specific
	// entries (e.g. juju version) and other features that depend on the
	// substrate the model is deployed to.
	SupportedFeatures []SupportedFeature `json:"supported-features,omitempty"`
}

ModelInfo holds information about the Juju model.

type ModelInfoList

type ModelInfoList struct {
	Models []ModelInfo `json:"models,omitempty"`
}

ModelInfoList holds a list of ModelInfo structures.

type ModelInfoListResult

type ModelInfoListResult struct {
	Result *ModelInfoList `json:"result,omitempty"`
	Error  *Error         `json:"error,omitempty"`
}

ModelInfoListResult holds the result of a call that returns a list of ModelInfo structures.

type ModelInfoListResults

type ModelInfoListResults struct {
	Results []ModelInfoListResult `json:"results"`
}

ModelInfoListResults holds the result of a bulk call that returns multiple lists of ModelInfo structures.

type ModelInfoResult

type ModelInfoResult struct {
	Result *ModelInfo `json:"result,omitempty"`
	Error  *Error     `json:"error,omitempty"`
}

ModelInfoResult holds the result of a ModelInfo call.

type ModelInfoResults

type ModelInfoResults struct {
	Results []ModelInfoResult `json:"results"`
}

ModelInfoResults holds the result of a bulk ModelInfo call.

type ModelInstanceTypesConstraint

type ModelInstanceTypesConstraint struct {
	// Value, if specified, contains the constraints to filter
	// the instance types by. If Value is not specified, then
	// no filtering by constraints will take place: all instance
	// types supported by the region will be returned.
	Value *constraints.Value `json:"value,omitempty"`
}

ModelInstanceTypesConstraint contains a constraint applied when filtering instance types.

type ModelInstanceTypesConstraints

type ModelInstanceTypesConstraints struct {
	// Constraints, if specified, contains the constraints to filter
	// the instance types by. If Constraints is not specified, then
	// no filtering by constraints will take place: all instance
	// types supported by the model will be returned.
	Constraints []ModelInstanceTypesConstraint `json:"constraints"`
}

ModelInstanceTypesConstraints contains a slice of InstanceTypesConstraint.

type ModelMachineInfo

type ModelMachineInfo struct {
	Id          string           `json:"id"`
	Hardware    *MachineHardware `json:"hardware,omitempty"`
	InstanceId  string           `json:"instance-id,omitempty"`
	DisplayName string           `json:"display-name,omitempty"`
	Status      string           `json:"status,omitempty"`
	Message     string           `json:"message,omitempty"`
	HasVote     bool             `json:"has-vote,omitempty"`
	WantsVote   bool             `json:"wants-vote,omitempty"`
	// HAPrimary indicates whether this machine has a primary mongo instance in replicaset and,
	// thus, can be considered a primary controller machine in HA setup.
	HAPrimary *bool `json:"ha-primary,omitempty"`
}

ModelMachineInfo holds information about a machine in a model.

type ModelMigrationStatus

type ModelMigrationStatus struct {
	Status string     `json:"status"`
	Start  *time.Time `json:"start"`
	End    *time.Time `json:"end,omitempty"`
}

ModelMigrationStatus holds information about the progress of a (possibly failed) migration.

type ModelOperatorInfo

type ModelOperatorInfo struct {
	APIAddresses []string        `json:"api-addresses"`
	ImageDetails DockerImageInfo `json:"image-details"`
	Version      version.Number  `json:"version"`
}

ModelOperatorInfo

type ModelResult

type ModelResult struct {
	Error *Error `json:"error,omitempty"`
	Name  string `json:"name"`
	UUID  string `json:"uuid"`
	Type  string `json:"type"`
}

ModelResult holds the result of an API call returning a name and UUID for a model.

type ModelSLA

type ModelSLA struct {
	ModelSLAInfo
	Credentials []byte `json:"creds"`
}

ModelSLA contains the arguments for the SetSLALevel client API call.

type ModelSLAInfo

type ModelSLAInfo struct {
	Level string `json:"level"`
	Owner string `json:"owner"`
}

ModelSLAInfo describes the SLA info for a model.

type ModelSequencesResult

type ModelSequencesResult struct {
	Sequences map[string]int `json:"sequences"`
}

ModelSequencesResult holds the map of sequence names to next value.

type ModelSet

type ModelSet struct {
	Config map[string]interface{} `json:"config"`
}

ModelSet contains the arguments for ModelSet client API call.

type ModelStatus

type ModelStatus struct {
	ModelTag           string                `json:"model-tag"`
	Life               life.Value            `json:"life"`
	Type               string                `json:"type"`
	HostedMachineCount int                   `json:"hosted-machine-count"`
	ApplicationCount   int                   `json:"application-count"`
	UnitCount          int                   `json:"unit-count"`
	OwnerTag           string                `json:"owner-tag"`
	Machines           []ModelMachineInfo    `json:"machines,omitempty"`
	Volumes            []ModelVolumeInfo     `json:"volumes,omitempty"`
	Filesystems        []ModelFilesystemInfo `json:"filesystems,omitempty"`
	Error              *Error                `json:"error,omitempty"`
}

ModelStatus holds information about the status of a juju model.

type ModelStatusInfo

type ModelStatusInfo struct {
	Name             string         `json:"name"`
	Type             string         `json:"type"`
	CloudTag         string         `json:"cloud-tag"`
	CloudRegion      string         `json:"region,omitempty"`
	Version          string         `json:"version"`
	AvailableVersion string         `json:"available-version"`
	ModelStatus      DetailedStatus `json:"model-status"`
	MeterStatus      MeterStatus    `json:"meter-status"`
	SLA              string         `json:"sla"`
}

ModelStatusInfo holds status information about the model itself.

type ModelStatusResults

type ModelStatusResults struct {
	Results []ModelStatus `json:"models"`
}

ModelStatusResults holds status information about a group of models.

type ModelSummariesRequest

type ModelSummariesRequest struct {
	UserTag string `json:"user-tag"`
	All     bool   `json:"all,omitempty"`
}

ModelSummariesRequest encapsulates how we request a list of model summaries.

type ModelSummary

type ModelSummary struct {
	Name               string `json:"name"`
	UUID               string `json:"uuid"`
	Type               string `json:"type"`
	ControllerUUID     string `json:"controller-uuid"`
	IsController       bool   `json:"is-controller"`
	ProviderType       string `json:"provider-type,omitempty"`
	DefaultSeries      string `json:"default-series,omitempty"`
	CloudTag           string `json:"cloud-tag"`
	CloudRegion        string `json:"cloud-region,omitempty"`
	CloudCredentialTag string `json:"cloud-credential-tag,omitempty"`

	// OwnerTag is the tag of the user that owns the model.
	OwnerTag string `json:"owner-tag"`

	// Life is the current lifecycle state of the model.
	Life life.Value `json:"life"`

	// Status is the current status of the model.
	Status EntityStatus `json:"status,omitempty"`

	// UserAccess is model access level for the  current user.
	UserAccess UserAccessPermission `json:"user-access"`

	// UserLastConnection contains the time when current user logged in
	// into the model last.
	UserLastConnection *time.Time `json:"last-connection"`

	// Counts contains counts of interesting entities
	// in the model, for example machines, cores, containers, units, etc.
	Counts []ModelEntityCount `json:"counts"`

	// Migration contains information about the latest failed or
	// currently-running migration. It'll be nil if there isn't one.
	Migration *ModelMigrationStatus `json:"migration,omitempty"`

	// SLA contains the information about the SLA for the model, if set.
	SLA *ModelSLAInfo `json:"sla"`

	// AgentVersion is the agent version for this model.
	AgentVersion *version.Number `json:"agent-version"`
}

ModelSummary holds summary about a Juju model.

type ModelSummaryMessage

type ModelSummaryMessage struct {
	Agent   string `json:"agent"`
	Message string `json:"message"`
}

ModelSummaryMessage represents a non-green status from an agent.

type ModelSummaryResult

type ModelSummaryResult struct {
	Result *ModelSummary `json:"result,omitempty"`
	Error  *Error        `json:"error,omitempty"`
}

ModelSummaryResult holds the result of a ListModelsWithInfo call.

type ModelSummaryResults

type ModelSummaryResults struct {
	Results []ModelSummaryResult `json:"results"`
}

ModelSummaryResults holds the result of a bulk ListModelsWithInfo call.

type ModelSummarySize

type ModelSummarySize struct {
	Machines     int `json:"machines,omitempty"`
	Containers   int `json:"containers,omitempty"`
	Applications int `json:"applications,omitempty"`
	Units        int `json:"units,omitempty"`
	Relations    int `json:"relations,omitempty"`
}

ModelSummarySize represents the number of various entities in the model.

type ModelUnset

type ModelUnset struct {
	Keys []string `json:"keys"`
}

ModelUnset contains the arguments for ModelUnset client API call.

type ModelUnsetKeys

type ModelUnsetKeys struct {
	CloudTag    string   `json:"cloud-tag,omitempty"`
	CloudRegion string   `json:"cloud-region,omitempty"`
	Keys        []string `json:"keys"`
}

ModelUnsetKeys contains the config keys to unset for a cloud/region.

type ModelUpdate

type ModelUpdate struct {
	ModelUUID      string                 `json:"model-uuid"`
	Name           string                 `json:"name"`
	Life           life.Value             `json:"life"`
	Owner          string                 `json:"owner"`
	ControllerUUID string                 `json:"controller-uuid"`
	IsController   bool                   `json:"is-controller"`
	Config         map[string]interface{} `json:"config,omitempty"`
	Status         StatusInfo             `json:"status"`
	Constraints    constraints.Value      `json:"constraints"`
	SLA            ModelSLAInfo           `json:"sla"`
}

ModelUpdate holds the information about a model that is tracked by multiwatcherStore.

func (*ModelUpdate) EntityId

func (i *ModelUpdate) EntityId() EntityId

EntityId returns a unique identifier for a model.

type ModelUserInfo

type ModelUserInfo struct {
	UserName       string               `json:"user"`
	DisplayName    string               `json:"display-name"`
	LastConnection *time.Time           `json:"last-connection"`
	Access         UserAccessPermission `json:"access"`
}

ModelUserInfo holds information on a user who has access to a model. Owners of a model can see this information for all users who have access, so it should not include sensitive information.

type ModelUserInfoResult

type ModelUserInfoResult struct {
	Result *ModelUserInfo `json:"result,omitempty"`
	Error  *Error         `json:"error,omitempty"`
}

ModelUserInfoResult holds the result of an ModelUserInfo call.

type ModelUserInfoResults

type ModelUserInfoResults struct {
	Results []ModelUserInfoResult `json:"results"`
}

ModelUserInfoResults holds the result of a bulk ModelUserInfo API call.

type ModelVolumeInfo

type ModelVolumeInfo struct {
	Id         string `json:"id"`
	ProviderId string `json:"provider-id,omitempty"`
	Status     string `json:"status,omitempty"`
	Message    string `json:"message,omitempty"`
	Detachable bool   `json:"detachable,omitempty"`
}

ModelVolumeInfo holds information about a volume in a model.

type ModifyCloudAccess

type ModifyCloudAccess struct {
	UserTag  string      `json:"user-tag"`
	CloudTag string      `json:"cloud-tag"`
	Action   CloudAction `json:"action"`
	Access   string      `json:"access"`
}

ModifyCloudAccess defines an operation to modify cloud access.

type ModifyCloudAccessRequest

type ModifyCloudAccessRequest struct {
	Changes []ModifyCloudAccess `json:"changes"`
}

ModifyCloudAccessRequest holds the parameters for making grant and revoke cloud calls.

type ModifyControllerAccess

type ModifyControllerAccess struct {
	UserTag string           `json:"user-tag"`
	Action  ControllerAction `json:"action"`
	Access  string           `json:"access"`
}

type ModifyControllerAccessRequest

type ModifyControllerAccessRequest struct {
	Changes []ModifyControllerAccess `json:"changes"`
}

ModifyControllerAccessRequest holds the parameters for making grant and revoke controller calls.

type ModifyModelAccess

type ModifyModelAccess struct {
	UserTag  string               `json:"user-tag"`
	Action   ModelAction          `json:"action"`
	Access   UserAccessPermission `json:"access"`
	ModelTag string               `json:"model-tag"`
}

type ModifyModelAccessRequest

type ModifyModelAccessRequest struct {
	Changes []ModifyModelAccess `json:"changes"`
}

ModifyModelAccessRequest holds the parameters for making grant and revoke model calls.

type ModifyOfferAccess

type ModifyOfferAccess struct {
	UserTag  string                `json:"user-tag"`
	Action   OfferAction           `json:"action"`
	Access   OfferAccessPermission `json:"access"`
	OfferURL string                `json:"offer-url"`
}

ModifyOfferAccess contains parameters to grant and revoke access to an offer.

type ModifyOfferAccessRequest

type ModifyOfferAccessRequest struct {
	Changes []ModifyOfferAccess `json:"changes"`
}

ModifyModelAccessRequest holds the parameters for making grant and revoke offer calls.

type ModifyUserSSHKeys

type ModifyUserSSHKeys struct {
	User string   `json:"user"`
	Keys []string `json:"ssh-keys"`
}

ModifyUserSSHKeys stores parameters used for a KeyManager.Add|Delete|Import call for a user.

type MongoVersion

type MongoVersion struct {
	Major         int    `json:"major"`
	Minor         int    `json:"minor"`
	Patch         string `json:"patch"`
	StorageEngine string `json:"engine"`
}

type MoveSubnetsParam

type MoveSubnetsParam struct {
	// SubnetTags identifies the subnets to move.
	SubnetTags []string `json:"subnets"`

	// SpaceTag identifies the space that the subnets will move to.
	SpaceTag string `json:"space-tag"`

	// Force, when true, moves the subnets despite existing constraints that
	// might be violated by such a topology change.
	Force bool `json:"force"`
}

MoveSubnetsParam contains the information required to move a collection of subnets into a space.

type MoveSubnetsParams

type MoveSubnetsParams struct {
	Args []MoveSubnetsParam `json:"args"`
}

MoveSubnetsParams contains the arguments of MoveSubnets API call.

type MoveSubnetsResult

type MoveSubnetsResult struct {
	// MovedSubnets contains the prior state of relocated subnets.
	MovedSubnets []MovedSubnet `json:"moved-subnets,omitempty"`

	// NewSpaceTag identifies the space that the the subnets were moved to.
	// It is intended to facilitate from/to confirmation messages without
	// clients needing to match up parameters with results.
	NewSpaceTag string `json:"new-space"`

	// Error will be non-nil if the subnets could not be moved.
	Error *Error `json:"error,omitempty"`
}

MoveSubnetsResult contains the result of moving a collection of subnets into a new space.

type MoveSubnetsResults

type MoveSubnetsResults struct {
	Results []MoveSubnetsResult `json:"results"`
}

MoveSubnetsResults contains the results of a call to MoveSubnets.

type MovedSubnet

type MovedSubnet struct {
	// SubnetTag identifies the subnet that was moved.
	SubnetTag string `json:"subnet"`

	// OldSpaceTag identifies the space that the subnet was in before being
	// successfully moved.
	OldSpaceTag string `json:"old-space"`

	// CIDR identifies the moved CIDR in the subnet move.
	CIDR string `json:"cidr"`
}

MovedSubnet represents the prior state of a relocated subnet.

type NetworkConfig

type NetworkConfig struct {
	// DeviceIndex specifies the order in which the network interface
	// appears on the host. The primary interface has an index of 0.
	DeviceIndex int `json:"device-index"`

	// MACAddress is the network interface's hardware MAC address
	// (e.g. "aa:bb:cc:dd:ee:ff").
	MACAddress string `json:"mac-address"`

	// CIDR of the network, in 123.45.67.89/24 format.
	CIDR string `json:"cidr"`

	// MTU is the Maximum Transmission Unit controlling the maximum size of the
	// protocol packets that the interface can pass through. It is only used
	// when > 0.
	MTU int `json:"mtu"`

	// ProviderId is a provider-specific network interface id.
	ProviderId string `json:"provider-id"`

	// ProviderNetworkId is a provider-specific id for the network this
	// interface is part of.
	ProviderNetworkId string `json:"provider-network-id"`

	// ProviderSubnetId is a provider-specific subnet id, to which the
	// interface is attached to.
	ProviderSubnetId string `json:"provider-subnet-id"`

	// ProviderSpaceId is a provider-specific space id to which the interface
	// is attached, if known and supported.
	ProviderSpaceId string `json:"provider-space-id"`

	// ProviderAddressId is the provider-specific id of the assigned address,
	// if supported and known.
	ProviderAddressId string `json:"provider-address-id"`

	// ProviderVLANId is the provider-specific id of the assigned address's
	// VLAN, if supported and known.
	ProviderVLANId string `json:"provider-vlan-id"`

	// VLANTag needs to be between 1 and 4094 for VLANs and 0 for
	// normal networks. It's defined by IEEE 802.1Q standard.
	VLANTag int `json:"vlan-tag"`

	// InterfaceName is the raw OS-specific network device name (e.g.
	// "eth1", even for a VLAN eth1.42 virtual interface).
	InterfaceName string `json:"interface-name"`

	// ParentInterfaceName is the name of the parent interface to use, if known.
	ParentInterfaceName string `json:"parent-interface-name"`

	// InterfaceType is the type of the interface.
	InterfaceType string `json:"interface-type"`

	// Disabled is true when the interface needs to be disabled on the
	// machine, e.g. not to configure it at all or stop it if running.
	Disabled bool `json:"disabled"`

	// NoAutoStart is true when the interface should not be configured
	// to start automatically on boot. By default and for
	// backwards-compatibility, interfaces are configured to
	// auto-start.
	NoAutoStart bool `json:"no-auto-start,omitempty"`

	// ConfigType, if set, defines what type of configuration to use.
	// See network.AddressConfigType for more info. If not set, for
	// backwards-compatibility, "dhcp" is assumed.
	ConfigType string `json:"config-type,omitempty"`

	// Address contains an optional static IP address to configure for
	// this network interface. The subnet mask to set will be inferred
	// from the CIDR value.
	//
	// NOTE(achilleasa) this field is retained for backwards compatibility
	// purposes and will be removed in juju 3. New features should use
	// the Addresses field below which also include scope information.
	Address string `json:"address,omitempty"`

	// Addresses contains an optional list of static IP address to
	// configure for this network interface. The subnet mask to set will be
	// inferred from the CIDR value of the first entry which is always
	// assumed to be the primary IP address for the interface.
	Addresses []Address `json:"addresses,omitempty"`

	// ShadowAddresses contains an optional list of additional IP addresses
	// that the underlying network provider associates with this network
	// interface instance. These IP addresses are not typically visible
	// to the machine that the interface is connected to.
	ShadowAddresses []Address `json:"shadow-addresses,omitempty"`

	// DNSServers contains an optional list of IP addresses and/or
	// hostnames to configure as DNS servers for this network
	// interface.
	DNSServers []string `json:"dns-servers,omitempty"`

	// DNSServers contains an optional list of IP addresses and/or
	// hostnames to configure as DNS servers for this network
	// interface.
	DNSSearchDomains []string `json:"dns-search-domains,omitempty"`

	// Gateway address, if set, defines the default gateway to
	// configure for this network interface. For containers this
	// usually (one of) the host address(es).
	GatewayAddress string `json:"gateway-address,omitempty"`

	// Routes is a list of routes that should be applied when this interface is
	// active.
	Routes []NetworkRoute `json:"routes,omitempty"`

	// IsDefaultGateway marks an interface that is a default gateway for a machine.
	IsDefaultGateway bool `json:"is-default-gateway,omitempty"`

	// VirtualPortType provides additional information about the type of
	// this device if it belongs to a virtual switch (e.g. when using
	// open-vswitch).
	VirtualPortType string `json:"virtual-port-type,omitempty"`

	// NetworkOrigin represents the authoritative source of the NetworkConfig.
	// It is expected that either the provider gave us this info or the
	// machine gave us this info.
	// Giving us this information allows us to reason about when a InterfaceInfo
	// is in use.
	NetworkOrigin NetworkOrigin `json:"origin,omitempty"`
}

NetworkConfig describes the necessary information to configure a single network interface on a machine. This mostly duplicates network.InterfaceInfo type and it's defined here so it can be kept separate and stable as definition to ensure proper wire-format for the API.

func NetworkConfigFromInterfaceInfo

func NetworkConfigFromInterfaceInfo(interfaceInfos network.InterfaceInfos) []NetworkConfig

NetworkConfigFromInterfaceInfo converts a slice of network.InterfaceInfo into the equivalent NetworkConfig slice.

type NetworkInfo

type NetworkInfo struct {
	// MACAddress is the network interface's hardware MAC address
	// (e.g. "aa:bb:cc:dd:ee:ff").
	MACAddress string `json:"mac-address" yaml:"macaddress"`

	// InterfaceName is the raw OS-specific network device name (e.g.
	// "eth1", even for a VLAN eth1.42 virtual interface).
	InterfaceName string `json:"interface-name" yaml:"interfacename"`

	// Addresses contains a list of addresses configured on the interface.
	Addresses []InterfaceAddress `json:"addresses" yaml:"addresses"`
}

NetworkInfo describes one interface with IP addresses. The serialization is different between json and yaml because of accidental differences in the past, but should be preserved for compatibility

type NetworkInfoParams

type NetworkInfoParams struct {
	Unit       string `json:"unit"`
	RelationId *int   `json:"relation-id,omitempty"`
	// TODO (manadart 2019-10-28): The name of this member was changed to
	// better indicate what it is, but the encoded name was left as-is to
	// avoid the need for facade schema regeneration.
	// Change it to "endpoints" if bumping the facade version for another
	// purpose.
	Endpoints []string `json:"bindings"`
}

NetworkInfoParams holds a name of the unit and list of bindings for which we want to get NetworkInfos.

type NetworkInfoResult

type NetworkInfoResult struct {
	Error            *Error        `json:"error,omitempty" yaml:"error,omitempty"`
	Info             []NetworkInfo `json:"bind-addresses,omitempty" yaml:"bind-addresses,omitempty"`
	EgressSubnets    []string      `json:"egress-subnets,omitempty" yaml:"egress-subnets,omitempty"`
	IngressAddresses []string      `json:"ingress-addresses,omitempty" yaml:"ingress-addresses,omitempty"`
}

NetworkInfoResult Adds egress and ingress subnets and changes the serialized `Info` key name in the yaml/json API protocol.

type NetworkInfoResultV6

type NetworkInfoResultV6 struct {
	Error *Error        `json:"error,omitempty" yaml:"error,omitempty"`
	Info  []NetworkInfo `json:"network-info" yaml:"info"`
}

NetworkInfoResultV6 holds either and error or a list of NetworkInfos for given binding.

type NetworkInfoResults

type NetworkInfoResults struct {
	Results map[string]NetworkInfoResult `json:"results"`
}

NetworkInfoResults holds a mapping from binding name to NetworkInfoResult.

type NetworkInfoResultsV6

type NetworkInfoResultsV6 struct {
	Results map[string]NetworkInfoResultV6 `json:"results"`
}

NetworkInfoResultsV6 holds a mapping from binding name to NetworkInfoResultV6.

type NetworkInterface

type NetworkInterface struct {
	// IPAddresses holds the IP addresses bound to this machine.
	IPAddresses    []string `json:"ip-addresses"`
	MACAddress     string   `json:"mac-address"`
	Gateway        string   `json:"gateway,omitempty"`
	DNSNameservers []string `json:"dns-nameservers,omitempty"`

	// Space holds the name of a space in which this devices IP addr's
	// subnet belongs.
	Space string `json:"space,omitempty"`

	// Is this interface up?
	IsUp bool `json:"is-up"`
}

NetworkInterfaceStatus holds a /etc/network/interfaces-type data and the space name for any device with at least one associated IP address.

type NetworkOrigin

type NetworkOrigin string

NetworkOrigin specifies where an address comes from, whether it was reported by a provider or by a machine.

type NetworkRoute

type NetworkRoute struct {
	// DestinationCIDR is the Subnet CIDR of traffic that needs a custom route.
	DestinationCIDR string `json:"destination-cidr"`
	// GatewayIP is the target IP to use as the next-hop when sending traffic to DestinationCIDR
	GatewayIP string `json:"gateway-ip"`
	// Metric is the cost for this particular route.
	Metric int `json:"metric"`
}

NetworkRoute describes a special route that should be added for a given network interface.

type NotifyWatchResult

type NotifyWatchResult struct {
	NotifyWatcherId string
	Error           *Error `json:"error,omitempty"`
}

NotifyWatchResult holds a NotifyWatcher id and an error (if any).

type NotifyWatchResults

type NotifyWatchResults struct {
	Results []NotifyWatchResult `json:"results"`
}

NotifyWatchResults holds the results for any API call which ends up returning a list of NotifyWatchers

type OfferAccessPermission

type OfferAccessPermission string

OfferAccessPermission defines a type for an access permission on an offer.

const (
	OfferAdminAccess   OfferAccessPermission = "admin"
	OfferConsumeAccess OfferAccessPermission = "consume"
	OfferReadAccess    OfferAccessPermission = "read"
)

Access permissions that may be set on an offer.

type OfferAction

type OfferAction string

OfferAction is an action that can be performed on an offer.

const (
	GrantOfferAccess  OfferAction = "grant"
	RevokeOfferAccess OfferAction = "revoke"
)

Actions that can be preformed on an offer.

type OfferArg

type OfferArg struct {
	OfferUUID     string         `json:"offer-uuid"`
	Macaroons     macaroon.Slice `json:"macaroons,omitempty"`
	BakeryVersion bakery.Version `json:"bakery-version,omitempty"`
}

OfferArg holds an offer uuid and corresponding macaroons.

type OfferArgs

type OfferArgs struct {
	Args []OfferArg `json:"args"`
}

OfferArgs holds arguments to an API call dealing with offers.

type OfferConnection

type OfferConnection struct {
	SourceModelTag string       `json:"source-model-tag"`
	RelationId     int          `json:"relation-id"`
	Username       string       `json:"username"`
	Endpoint       string       `json:"endpoint"`
	Status         EntityStatus `json:"status"`
	IngressSubnets []string     `json:"ingress-subnets"`
}

OfferConnection holds details about a connection to an offer.

type OfferFilter

type OfferFilter struct {
	// OwnerName is the owner of the model hosting the offer.
	OwnerName string `json:"owner-name"`

	// ModelName is the name of the model hosting the offer.
	ModelName string `json:"model-name"`

	OfferName              string                     `json:"offer-name"`
	ApplicationName        string                     `json:"application-name"`
	ApplicationDescription string                     `json:"application-description"`
	ApplicationUser        string                     `json:"application-user"`
	Endpoints              []EndpointFilterAttributes `json:"endpoints"`
	ConnectedUserTags      []string                   `json:"connected-users"`
	AllowedConsumerTags    []string                   `json:"allowed-users"`
}

OfferFilter is used to query offers.

type OfferFilters

type OfferFilters struct {
	Filters []OfferFilter
}

OfferFilters is used to query offers. Offers matching any of the filters are returned.

type OfferStatusChange

type OfferStatusChange struct {
	// OfferName is the name of the offer.
	OfferName string `json:"offer-name"`

	// Status is the status of the offer.
	Status EntityStatus `json:"status"`
}

OfferStatusChange describes the status of an offer.

type OfferStatusWatchResult

type OfferStatusWatchResult struct {
	OfferStatusWatcherId string              `json:"watcher-id"`
	Changes              []OfferStatusChange `json:"changes"`
	Error                *Error              `json:"error,omitempty"`
}

OfferStatusWatchResult holds a OfferStatusWatcher id, baseline state (in the Changes field), and an error (if any).

type OfferStatusWatchResults

type OfferStatusWatchResults struct {
	Results []OfferStatusWatchResult `json:"results"`
}

OfferStatusWatchResults holds the results for any API call which ends up returning a list of OfferStatusWatchers.

type OfferURLs

type OfferURLs struct {
	// OfferURLs contains collection of urls for applications that are to be shown.
	OfferURLs []string `json:"offer-urls,omitempty"`

	// BakeryVersion is the version of the bakery used to mint macaroons.
	BakeryVersion bakery.Version `json:"bakery-version,omitempty"`
}

OfferURLs is a collection of remote offer URLs

type OfferUserDetails

type OfferUserDetails struct {
	UserName    string `json:"user"`
	DisplayName string `json:"display-name"`
	Access      string `json:"access"`
}

OfferUserDetails represents an offer consumer and their permission on the offer.

type OpenMachinePortRangesByEndpointResult

type OpenMachinePortRangesByEndpointResult struct {
	Error *Error `json:"error,omitempty"`

	// The set of opened port ranges grouped by unit tag.
	UnitPortRanges map[string][]OpenUnitPortRangesByEndpoint `json:"unit-port-ranges"`
}

OpenMachinePortRangesByEndpointResult holds a single result of a request to the uniter's OpenedMachinePortRangesByEndpoint API.

type OpenMachinePortRangesByEndpointResults

type OpenMachinePortRangesByEndpointResults struct {
	Results []OpenMachinePortRangesByEndpointResult `json:"results"`
}

OpenMachinePortRangesByEndpointResults holds the results of a request to the uniter's OpenedMachinePortRangesByEndpoint API.

type OpenMachinePortRangesResult

type OpenMachinePortRangesResult struct {
	Error *Error `json:"error,omitempty"`

	// The set of opened port ranges grouped by unit tag.
	UnitPortRanges map[string][]OpenUnitPortRanges `json:"unit-port-ranges"`
}

OpenMachinePortRangesResult holds a single result of a request to the firewaller's OpenedMachinePortRanges API.

type OpenMachinePortRangesResults

type OpenMachinePortRangesResults struct {
	Results []OpenMachinePortRangesResult `json:"results"`
}

OpenMachinePortRangesResults holds the results of a request to the firewaller's OpenedMachinePortRanges API.

type OpenUnitPortRanges

type OpenUnitPortRanges struct {
	Endpoint   string      `json:"endpoint"`
	PortRanges []PortRange `json:"port-ranges"`

	// The CIDRs that correspond to the subnets assigned to the space that
	// this endpoint is bound to.
	SubnetCIDRs []string `json:"subnet-cidrs"`
}

OpenUnitPortRanges describes the set of port ranges that have been opened by a unit on the machine it is deployed to for an endpoint.

type OpenUnitPortRangesByEndpoint

type OpenUnitPortRangesByEndpoint struct {
	Endpoint   string      `json:"endpoint"`
	PortRanges []PortRange `json:"port-ranges"`
}

OpenUnitPortRangesByEndpoint describes the set of port ranges that have been opened by a unit on the machine it is deployed to for an endpoint.

type OperationQueryArgs

type OperationQueryArgs struct {
	Applications []string `json:"applications,omitempty"`
	Units        []string `json:"units,omitempty"`
	Machines     []string `json:"machines,omitempty"`
	ActionNames  []string `json:"actions,omitempty"`
	Status       []string `json:"status,omitempty"`

	// These attributes are used to support client side
	// batching of results.
	Offset *int `json:"offset,omitempty"`
	Limit  *int `json:"limit,omitempty"`
}

OperationQueryArgs holds args for listing operations.

type OperationResult

type OperationResult struct {
	OperationTag string         `json:"operation"`
	Summary      string         `json:"summary"`
	Fail         string         `json:"fail,omitempty"`
	Enqueued     time.Time      `json:"enqueued,omitempty"`
	Started      time.Time      `json:"started,omitempty"`
	Completed    time.Time      `json:"completed,omitempty"`
	Status       string         `json:"status,omitempty"`
	Actions      []ActionResult `json:"actions,omitempty"`
	Error        *Error         `json:"error,omitempty"`
}

OperationResult describes an Operation that will be or has been completed.

type OperationResults

type OperationResults struct {
	Results   []OperationResult `json:"results,omitempty"`
	Truncated bool              `json:"truncated,omitempty"`
}

OperationResults is a slice of OperationResult for bulk requests.

type OperatorProvisioningInfo

type OperatorProvisioningInfo struct {
	ImageDetails DockerImageInfo             `json:"image-details"`
	Version      version.Number              `json:"version"`
	APIAddresses []string                    `json:"api-addresses"`
	Tags         map[string]string           `json:"tags,omitempty"`
	CharmStorage *KubernetesFilesystemParams `json:"charm-storage,omitempty"`
	Error        *Error                      `json:"error,omitempty"`
}

OperatorProvisioningInfo holds info need to provision an operator.

type OperatorProvisioningInfoResults

type OperatorProvisioningInfoResults struct {
	Results []OperatorProvisioningInfo `json:"results"`
}

OperatorProvisioningInfoResults holds OperatorProvisioningInfo results.

type Payload

type Payload struct {
	// Class is the name of the payload class.
	Class string `json:"class"`

	// Type is the name of the payload type.
	Type string `json:"type"`

	// ID is a unique string identifying the payload to
	// the underlying technology.
	ID string `json:"id"`

	// Status is the Juju-level status for the payload.
	Status string `json:"status"`

	// Labels are labels associated with the payload.
	Labels []string `json:"labels"`

	// Unit identifies the unit tag associated with the payload.
	Unit string `json:"unit"`

	// Machine identifies the machine tag associated with the payload.
	Machine string `json:"machine"`
}

Payload contains full information about a payload.

type PayloadListArgs

type PayloadListArgs struct {
	// Patterns is the list of patterns against which to filter.
	Patterns []string `json:"patterns"`
}

PayloadListArgs are the arguments for the Payloads.List endpoint.

type PayloadListResults

type PayloadListResults struct {
	// Results is the list of payload results.
	Results []Payload `json:"results"`
}

PayloadListResults returns the result of the Payload.List endpoint.

type PayloadResult

type PayloadResult struct {
	Entity

	// Payload holds the details of the payload, if any.
	Payload *Payload `json:"payload"`

	// NotFound indicates that the payload was not found in state.
	NotFound bool `json:"not-found"`

	// Error is the error (if any) for the call referring to ID.
	Error *Error `json:"error,omitempty"`
}

PayloadResult contains the result for a single call.

type PayloadResults

type PayloadResults struct {
	Results []PayloadResult `json:"results"`
}

PayloadResults is the result for a call that makes one or more requests about payloads.

type PhaseResult

type PhaseResult struct {
	Phase string `json:"phase,omitempty"`
	Error *Error `json:"error,omitempty"`
}

PhaseResult holds the phase of a single model migration, or an error if the phase could not be determined.

type PhaseResults

type PhaseResults struct {
	Results []PhaseResult `json:"results"`
}

PhasesResults holds the phase of one or more model migrations.

type PinApplicationResult

type PinApplicationResult struct {
	// ApplicationName is the application for which a leadership pin/unpin
	// operation was attempted.
	ApplicationName string `json:"application-name"`
	// Error will contain a reference to an error resulting from pin/unpin
	// if one occurred.
	Error *Error `json:"error,omitempty"`
}

PinApplicationResult represents the result of a single application leadership pin/unpin operation

type PinApplicationsResults

type PinApplicationsResults struct {
	// Results is collection with each application tag and pin/unpin result.
	Results []PinApplicationResult `json:"results"`
}

PinApplicationsResults returns all applications for which pinning or unpinning was attempted, including any errors that occurred.

type PinnedLeadershipResult

type PinnedLeadershipResult struct {
	// Result has:
	// - Application name keys representing the application pinned.
	// - Tag slice values representing the entities requiring pinned
	//   behaviour for each application.
	Result map[string][]string `json:"result,omitempty"`
}

PinnedLeadershipResults holds data representing the current applications for which leadership is pinned

type Platform

type Platform struct {
	Architecture string `json:"architecture"`
	OS           string `json:"os"`
	Series       string `json:"series"`
}

type PodSpec

type PodSpec struct {
	Tag  string  `json:"tag"`
	Spec *string `json:"spec,omitempty"`
}

PodSpec holds an entity tag and optional podspec value.

type Port

type Port struct {
	Protocol string `json:"protocol"`
	Number   int    `json:"number"`
}

Port encapsulates a protocol and port number. It is used in API requests/responses. See also network.Port, from/to which this is transformed.

type PortRange

type PortRange struct {
	FromPort int    `json:"from-port"`
	ToPort   int    `json:"to-port"`
	Protocol string `json:"protocol"`
}

PortRange represents a single range of ports. It is used in API requests/responses. See also network.PortRange, from/to which this is transformed.

func FromNetworkPortRange

func FromNetworkPortRange(pr network.PortRange) PortRange

FromNetworkPortRange is a convenience helper to create a parameter out of the network type, here for PortRange.

func (PortRange) NetworkPortRange

func (pr PortRange) NetworkPortRange() network.PortRange

NetworkPortRange is a convenience helper to return the parameter as network type, here for PortRange.

type PortsResult

type PortsResult struct {
	Error *Error `json:"error,omitempty"`
	Ports []Port `json:"ports"`
}

PortsResult holds the result of an API call that returns a slice of Port or an error.

type PortsResults

type PortsResults struct {
	Results []PortsResult `json:"results"`
}

PortsResults holds the bulk operation result of an API call that returns a slice of Port.

type PrivateAddress

type PrivateAddress struct {
	Target string `json:"target"`
}

PrivateAddress holds parameters for the PrivateAddress call.

type PrivateAddressResults

type PrivateAddressResults struct {
	PrivateAddress string `json:"private-address"`
}

PrivateAddressResults holds results of the PrivateAddress call.

type ProcessRelations

type ProcessRelations struct {
	ControllerAlias string `json:"controller-alias"`
}

ProcessRelations holds the information required to process series of relations during a model migration.

type Profile

type Profile struct {
	Config      map[string]string            `json:"config,omitempty"`
	Description string                       `json:"description,omitempty"`
	Devices     map[string]map[string]string `json:"devices,omitempty"`
}

Profile is a representation of charm.v6 LXDProfile

type ProfileArg

type ProfileArg struct {
	Entity   Entity `json:"entity"`
	UnitName string `json:"unit-name"`
}

type ProfileArgs

type ProfileArgs struct {
	Args []ProfileArg `json:"args"`
}

type ProfileChangeResult

type ProfileChangeResult struct {
	OldProfileName string           `json:"old-profile-name,omitempty"`
	NewProfileName string           `json:"new-profile-name,omitempty"`
	Profile        *CharmLXDProfile `json:"profile,omitempty"`
	Subordinate    bool             `json:"subordinate,omitempty"`
	Error          *Error           `json:"error,omitempty"`
}

type ProfileChangeResults

type ProfileChangeResults struct {
	Results []ProfileChangeResult `json:"results"`
}

type ProfileInfoResult

type ProfileInfoResult struct {
	ApplicationName string           `json:"application-name,omitempty"`
	Revision        int              `json:"revision,omitempty"`
	Profile         *CharmLXDProfile `json:"profile,omitempty"`
	Error           *Error           `json:"error,omitempty"`
}

type ProviderInterfaceInfo

type ProviderInterfaceInfo struct {
	InterfaceName string `json:"interface-name"`
	MACAddress    string `json:"mac-address"`
	ProviderId    string `json:"provider-id"`
}

ProviderInterfaceInfo stores the details needed to identify an interface to a provider. It's the params equivalent of network.ProviderInterfaceInfo, defined here separately to ensure that API structures aren't inadvertently changed by internal changes.

type ProviderInterfaceInfoResult

type ProviderInterfaceInfoResult struct {
	MachineTag string                  `json:"machine-tag"`
	Interfaces []ProviderInterfaceInfo `json:"interfaces"`
	Error      *Error                  `json:"error,omitempty"`
}

ProviderInterfaceInfoResult stores the provider interface information for one machine, or any error that occurred getting the information for that machine.

type ProviderInterfaceInfoResults

type ProviderInterfaceInfoResults struct {
	Results []ProviderInterfaceInfoResult `json:"results"`
}

ProviderInterfaceInfoResults holds the results of a GetProviderInterfaceInfo call.

type ProviderNetworkConfig

type ProviderNetworkConfig struct {
	Tag     string          `json:"tag"`
	Configs []NetworkConfig `json:"config"`
}

ProviderNetworkConfig holds a machine tag and a list of network interface info obtained by querying the provider.

type ProviderSpace

type ProviderSpace struct {
	Name       string   `json:"name"`
	ProviderId string   `json:"provider-id"`
	Subnets    []Subnet `json:"subnets"`
	Error      *Error   `json:"error,omitempty"`
}

ProviderSpace holds the information about a single space and its associated subnets.

type ProvisioningInfo

type ProvisioningInfo struct {
	Constraints       constraints.Value        `json:"constraints"`
	Series            string                   `json:"series"`
	Placement         string                   `json:"placement"`
	Jobs              []model.MachineJob       `json:"jobs"`
	RootDisk          *VolumeParams            `json:"root-disk,omitempty"`
	Volumes           []VolumeParams           `json:"volumes,omitempty"`
	VolumeAttachments []VolumeAttachmentParams `json:"volume-attachments,omitempty"`
	Tags              map[string]string        `json:"tags,omitempty"`
	ImageMetadata     []CloudImageMetadata     `json:"image-metadata,omitempty"`
	EndpointBindings  map[string]string        `json:"endpoint-bindings,omitempty"`
	ControllerConfig  map[string]interface{}   `json:"controller-config,omitempty"`
	CloudInitUserData map[string]interface{}   `json:"cloudinit-userdata,omitempty"`
	CharmLXDProfiles  []string                 `json:"charm-lxd-profiles,omitempty"`

	ProvisioningNetworkTopology
}

ProvisioningInfo holds machine provisioning info.

type ProvisioningInfoResult

type ProvisioningInfoResult struct {
	Result *ProvisioningInfo `json:"result"`
	Error  *Error            `json:"error,omitempty"`
}

ProvisioningInfoResult holds machine provisioning info or an error.

type ProvisioningInfoResults

type ProvisioningInfoResults struct {
	Results []ProvisioningInfoResult `json:"results"`
}

ProvisioningInfoResults holds multiple machine provisioning info results.

type ProvisioningNetworkTopology

type ProvisioningNetworkTopology struct {
	// SubnetAZs is a map of availability zone names
	// indexed by provider subnet ID.
	SubnetAZs map[string][]string `json:"subnet-zones"`

	// SpaceSubnets is a map of subnet provider IDs from the map above
	// indexed by the space ID that the subnets reside in.
	SpaceSubnets map[string][]string `json:"space-subnets"`
}

ProvisioningNetworkTopology holds a network topology that is based on positive machine space constraints. This is used for creating NICs on instances where the provider is not space aware; I.e. not MAAS. We only care about positive constraints because negative constraints are satisfied implicitly by only creating NICs connected to subnets in inclusive spaces.

type ProvisioningScriptParams

type ProvisioningScriptParams struct {
	MachineId string `json:"machine-id"`
	Nonce     string `json:"nonce"`

	// DataDir may be "", in which case the default will be used.
	DataDir string `json:"data-dir"`

	// DisablePackageCommands may be set to disable all
	// package-related commands. It is then the responsibility of the
	// provisioner to ensure that all the packages required by Juju
	// are available.
	DisablePackageCommands bool `json:"disable-package-commands"`
}

ProvisioningScriptParams contains the parameters for the ProvisioningScript client API call.

type ProvisioningScriptResult

type ProvisioningScriptResult struct {
	Script string `json:"script"`
}

ProvisioningScriptResult contains the result of the ProvisioningScript client API call.

type ProxyConfig

type ProxyConfig struct {
	HTTP    string `json:"http"`
	HTTPS   string `json:"https"`
	FTP     string `json:"ftp"`
	NoProxy string `json:"no-proxy"`
}

type ProxyConfigResult

type ProxyConfigResult struct {
	LegacyProxySettings      ProxyConfig `json:"legacy-proxy-settings"`
	JujuProxySettings        ProxyConfig `json:"juju-proxy-settings"`
	APTProxySettings         ProxyConfig `json:"apt-proxy-settings,omitempty"`
	SnapProxySettings        ProxyConfig `json:"snap-proxy-settings,omitempty"`
	SnapStoreProxyId         string      `json:"snap-store-id,omitempty"`
	SnapStoreProxyAssertions string      `json:"snap-store-assertions,omitempty"`
	SnapStoreProxyURL        string      `json:"snap-store-proxy-url,omitempty"`
	AptMirror                string      `json:"apt-mirror,omitempty"`
	Error                    *Error      `json:"error,omitempty"`
}

ProxyConfigResult contains information needed to configure a clients proxy settings

type ProxyConfigResultV1

type ProxyConfigResultV1 struct {
	ProxySettings    ProxyConfig `json:"proxy-settings"`
	APTProxySettings ProxyConfig `json:"apt-proxy-settings"`
	Error            *Error      `json:"error,omitempty"`
}

ProxyConfigResultV1 contains information needed to configure a clients proxy settings. Result for facade v1 call.

type ProxyConfigResults

type ProxyConfigResults struct {
	Results []ProxyConfigResult `json:"results"`
}

ProxyConfigResults contains information needed to configure multiple clients proxy settings

type ProxyConfigResultsV1

type ProxyConfigResultsV1 struct {
	Results []ProxyConfigResultV1 `json:"results"`
}

ProxyConfigResultsV1 contains information needed to configure multiple clients proxy settings. Result for facade v1 call.

type PubSubMessage

type PubSubMessage struct {
	Topic string                 `json:"topic"`
	Data  map[string]interface{} `json:"data"`
}

PubSubMessage is used to propagate pubsub messages from one api server to the others.

type PublicAddress

type PublicAddress struct {
	Target string `json:"target"`
}

PublicAddress holds parameters for the PublicAddress call.

type PublicAddressResults

type PublicAddressResults struct {
	PublicAddress string `json:"public-address"`
}

PublicAddressResults holds results of the PublicAddress call.

type Query

type Query struct {
	Query            string `json:"query"`
	Category         string `json:"category,omitempty"`
	Channel          string `json:"channel,omitempty"`
	CharmType        string `json:"type,omitempty"`
	Platforms        string `json:"platforms,omitempty"`
	Publisher        string `json:"publisher,omitempty"`
	RelationRequires string `json:"relation-requires,omitempty"`
	RelationProvides string `json:"relation-provides,omitempty"`
}

Query holds the query information when attempting to find possible charms or bundles for searching the CharmHub.

type QueryApplicationOffersResults

type QueryApplicationOffersResults struct {
	// Results contains application offers matching each filter.
	Results []ApplicationOfferAdminDetails `json:"results"`
}

QueryApplicationOffersResults is a result of searching application offers.

type ReauthRequest

type ReauthRequest struct {
	Prompt string `json:"prompt"`
	Nonce  string `json:"nonce"`
}

ReauthRequest holds a challenge/response token meaningful to the identity provider.

type RebootAction

type RebootAction string

RebootAction defines the action a machine should take when a hook needs to reboot

const (
	// ShouldDoNothing instructs a machine agent that no action
	// is required on its part
	ShouldDoNothing RebootAction = "noop"
	// ShouldReboot instructs a machine to reboot
	// this happens when a hook running on a machine, requests
	// a reboot
	ShouldReboot RebootAction = "reboot"
	// ShouldShutdown instructs a machine to shut down. This usually
	// happens when running inside a container, and a hook on the parent
	// machine requests a reboot
	ShouldShutdown RebootAction = "shutdown"
)

type RebootActionResult

type RebootActionResult struct {
	Result RebootAction `json:"result,omitempty"`
	Error  *Error       `json:"error,omitempty"`
}

RebootActionResult holds the result of a single call to machine.ShouldRebootOrShutdown.

type RebootActionResults

type RebootActionResults struct {
	Results []RebootActionResult `json:"results,omitempty"`
}

RebootActionResults holds a list of RebootActionResult and any error.

type RecordAgentStartInformationArg

type RecordAgentStartInformationArg struct {
	Tag      string `json:"tag"`
	Hostname string `json:"hostname,omitempty"`
}

RecordAgentStartInformationArg holds the information reported by a machine agnet to the controller when it starts.

type RecordAgentStartInformationArgs

type RecordAgentStartInformationArgs struct {
	Args []RecordAgentStartInformationArg `json:"args"`
}

RecordAgentStartInformationArgs holds the parameters for updating the information reported by one or more machine agents when they start.

type RedirectErrorInfo

type RedirectErrorInfo struct {
	// Servers holds the sets of addresses of the redirected servers.
	Servers [][]HostPort `json:"servers"`

	// CACert holds the certificate of the remote server.
	CACert string `json:"ca-cert"`

	// ControllerTag uniquely identifies the controller being redirected to.
	ControllerTag string `json:"controller-tag,omitempty"`

	// An optional alias for the controller the model migrated to.
	ControllerAlias string `json:"controller-alias,omitempty"`
}

RedirectErrorInfo provides additional information for Redirect errors.

func (RedirectErrorInfo) AsMap

func (e RedirectErrorInfo) AsMap() map[string]interface{}

AsMap encodes the error info as a map that can be attached to an Error.

type RedirectInfoResult

type RedirectInfoResult struct {
	// Servers holds an entry for each server that holds the
	// addresses for the server.
	Servers [][]HostPort `json:"servers"`

	// CACert holds the CA certificate for the server.
	// TODO(rogpeppe) allow this to be empty if the
	// server has a globally trusted certificate?
	CACert string `json:"ca-cert"`
}

RedirectInfoResult holds the result of a RedirectInfo call.

type RegionDefaults

type RegionDefaults struct {
	RegionName string      `json:"region-name"`
	Value      interface{} `json:"value"`
}

RegionDefaults contains the settings for regions in a ModelDefaults.

type RegisterRemoteRelationArg

type RegisterRemoteRelationArg struct {
	// ApplicationToken is the application token on the remote model.
	ApplicationToken string `json:"application-token"`

	// SourceModelTag is the tag of the model hosting the application.
	SourceModelTag string `json:"source-model-tag"`

	// RelationToken is the relation token on the remote model.
	RelationToken string `json:"relation-token"`

	// RemoteEndpoint contains info about the endpoint in the remote model.
	RemoteEndpoint RemoteEndpoint `json:"remote-endpoint"`

	// RemoteSpace contains provider-level info about the space the
	// endpoint is bound to in the remote model.
	RemoteSpace RemoteSpace `json:"remote-space"`

	// OfferUUID is the UUID of the offer.
	OfferUUID string `json:"offer-uuid"`

	// LocalEndpointName is the name of the endpoint in the local model.
	LocalEndpointName string `json:"local-endpoint-name"`

	// ConsumeVersion is incremented each time a new consumer
	// proxy is created for an offer.
	ConsumeVersion int `json:"consume-version,omitempty"`

	// Macaroons are used for authentication.
	Macaroons macaroon.Slice `json:"macaroons,omitempty"`

	// BakeryVersion is the version of the bakery used to mint macaroons.
	BakeryVersion bakery.Version `json:"bakery-version,omitempty"`
}

RegisterRemoteRelationArg holds attributes used to register a remote relation.

type RegisterRemoteRelationArgs

type RegisterRemoteRelationArgs struct {
	Relations []RegisterRemoteRelationArg `json:"relations"`
}

RegisterRemoteRelationArgs holds args used to add remote relations.

type RegisterRemoteRelationResult

type RegisterRemoteRelationResult struct {
	Result *RemoteRelationDetails `json:"result,omitempty"`
	Error  *Error                 `json:"error,omitempty"`
}

RegisterRemoteRelationResult holds a remote relation details and an error.

type RegisterRemoteRelationResults

type RegisterRemoteRelationResults struct {
	Results []RegisterRemoteRelationResult `json:"results,omitempty"`
}

RemoteRemoteRelationResults has a set of remote relation results.

type RelationApplication

type RelationApplication struct {
	Relation    string `json:"relation"`
	Application string `json:"application"`
}

RelationApplication holds one (relation, application) pair.

type RelationApplications

type RelationApplications struct {
	RelationApplications []RelationApplication `json:"relation-applications"`
}

RelationApplications holds a set of pairs of relation & application tags.

type RelationData

type RelationData struct {
	InScope  bool                   `yaml:"in-scope"`
	UnitData map[string]interface{} `yaml:"data"`
}

RelationData holds information about a unit's relation.

type RelationIds

type RelationIds struct {
	RelationIds []int `json:"relation-ids"`
}

RelationIds holds multiple relation ids.

type RelationInfo

type RelationInfo struct {
	ModelUUID string     `json:"model-uuid"`
	Key       string     `json:"key"`
	Id        int        `json:"id"`
	Endpoints []Endpoint `json:"endpoints"`
}

RelationInfo holds the information about a relation that is tracked by multiwatcherStore.

func (*RelationInfo) EntityId

func (i *RelationInfo) EntityId() EntityId

EntityId returns a unique identifier for a relation across models.

type RelationLifeSuspendedStatusChange

type RelationLifeSuspendedStatusChange struct {
	// Key is the relation key of the changed relation.
	Key string `json:"key"`

	// Life is the life of the relation.
	Life life.Value `json:"life"`

	// Suspended is the suspended status of the relation.
	Suspended bool `json:"suspended"`

	// SuspendedReason is an optional message to explain why suspended is true.
	SuspendedReason string `json:"suspended-reason"`
}

RelationLifeSuspendedStatusChange describes the life and suspended status of a relation.

type RelationLifeSuspendedStatusWatchResult

type RelationLifeSuspendedStatusWatchResult struct {
	RelationStatusWatcherId string                              `json:"watcher-id"`
	Changes                 []RelationLifeSuspendedStatusChange `json:"changes"`
	Error                   *Error                              `json:"error,omitempty"`
}

RelationLifeSuspendedStatusWatchResult holds a RelationStatusWatcher id, baseline state (in the Changes field), and an error (if any).

type RelationResult

type RelationResult struct {
	Error            *Error     `json:"error,omitempty"`
	Life             life.Value `json:"life"`
	Suspended        bool       `json:"bool,omitempty"`
	Id               int        `json:"id"`
	Key              string     `json:"key"`
	Endpoint         Endpoint   `json:"endpoint"`
	OtherApplication string     `json:"other-application,omitempty"`
}

RelationResult returns information about a single relation, or an error.

type RelationResults

type RelationResults struct {
	Results []RelationResult `json:"results"`
}

RelationResults holds the result of an API call that returns information about multiple relations.

type RelationStatus

type RelationStatus struct {
	Id        int              `json:"id"`
	Key       string           `json:"key"`
	Interface string           `json:"interface"`
	Scope     string           `json:"scope"`
	Endpoints []EndpointStatus `json:"endpoints"`
	Status    DetailedStatus   `json:"status"`
}

RelationStatus holds status info about a relation.

type RelationStatusArg

type RelationStatusArg struct {
	UnitTag    string              `json:"unit-tag"`
	RelationId int                 `json:"relation-id"`
	Status     RelationStatusValue `json:"status"`
	Message    string              `json:"message"`
}

RelationStatusArg holds the new status value for a relation.

type RelationStatusArgs

type RelationStatusArgs struct {
	Args []RelationStatusArg `json:"args"`
}

RelationStatusArgs holds the parameters for updating the status of one or more relations.

type RelationStatusValue

type RelationStatusValue relation.Status

RelationStatusValue describes the status of a relation.

const (
	Joined    RelationStatusValue = "joined"
	Suspended RelationStatusValue = "suspended"
	Broken    RelationStatusValue = "broken"
)

type RelationStatusWatchResults

type RelationStatusWatchResults struct {
	Results []RelationLifeSuspendedStatusWatchResult `json:"results"`
}

RelationStatusWatchResults holds the results for any API call which ends up returning a list of RelationStatusWatchers.

type RelationSuspendedArg

type RelationSuspendedArg struct {
	RelationId int    `json:"relation-id"`
	Message    string `json:"message"`
	Suspended  bool   `json:"suspended"`
}

RelationSuspendedArg holds the new suspended status value for a relation.

type RelationSuspendedArgs

type RelationSuspendedArgs struct {
	Args []RelationSuspendedArg `json:"args"`
}

RelationSuspendedArgs holds the parameters for setting the suspended status of one or more relations.

type RelationUnit

type RelationUnit struct {
	Relation string `json:"relation"`
	Unit     string `json:"unit"`
}

RelationUnit holds a relation and a unit tag.

type RelationUnitPair

type RelationUnitPair struct {
	Relation   string `json:"relation"`
	LocalUnit  string `json:"local-unit"`
	RemoteUnit string `json:"remote-unit"`
}

RelationUnitPair holds a relation tag, a local and remote unit tags.

type RelationUnitPairs

type RelationUnitPairs struct {
	RelationUnitPairs []RelationUnitPair `json:"relation-unit-pairs"`
}

RelationUnitPairs holds the parameters for API calls expecting multiple sets of a relation tag, a local and remote unit tags.

type RelationUnitSettings

type RelationUnitSettings struct {
	Relation            string   `json:"relation"`
	Unit                string   `json:"unit"`
	Settings            Settings `json:"settings"`
	ApplicationSettings Settings `json:"application-settings"`
}

RelationUnitSettings holds a relation tag, a unit tag and local unit and app-level settings.

type RelationUnitStatus

type RelationUnitStatus struct {
	RelationTag string `json:"relation-tag"`
	InScope     bool   `json:"in-scope"`
	Suspended   bool   `json:"suspended"`
}

RelationUnitStatus holds details about scope and suspended status for a relation unit.

type RelationUnitStatusResult

type RelationUnitStatusResult struct {
	RelationResults []RelationUnitStatus `json:"results"`
	Error           *Error               `json:"error,omitempty"`
}

RelationUnitStatusResult holds details about scope and status for relation units, and an error.

type RelationUnitStatusResults

type RelationUnitStatusResults struct {
	Results []RelationUnitStatusResult `json:"results"`
}

RelationUnitStatusResults holds the results of a uniter RelationStatus API call.

type RelationUnits

type RelationUnits struct {
	RelationUnits []RelationUnit `json:"relation-units"`
}

RelationUnits holds the parameters for API calls expecting a pair of relation and unit tags.

type RelationUnitsChange

type RelationUnitsChange struct {

	// Changed holds a set of units that are known to be in scope, and the
	// latest known settings version for each.
	Changed map[string]UnitSettings `json:"changed"`

	// Changed holds the versions of each application data for applications related
	// to this unit.
	AppChanged map[string]int64 `json:"app-changed,omitempty"`

	// Departed holds a set of units that have previously been reported to
	// be in scope, but which no longer are.
	Departed []string `json:"departed,omitempty"`
}

RelationUnitsChange describes the membership and settings of; or changes to; some relation scope.

type RelationUnitsSettings

type RelationUnitsSettings struct {
	RelationUnits []RelationUnitSettings `json:"relation-units"`
}

RelationUnitsSettings holds the arguments for making a EnterScope or UpdateRelationSettings API calls.

type RelationUnitsWatchResult

type RelationUnitsWatchResult struct {
	RelationUnitsWatcherId string              `json:"watcher-id"`
	Changes                RelationUnitsChange `json:"changes"`
	Error                  *Error              `json:"error,omitempty"`
}

RelationUnitsWatchResult holds a RelationUnitsWatcher id, baseline state (in the Changes field), and an error (if any).

type RelationUnitsWatchResults

type RelationUnitsWatchResults struct {
	Results []RelationUnitsWatchResult `json:"results"`
}

RelationUnitsWatchResults holds the results for any API call which ends up returning a list of RelationUnitsWatchers.

type RemoteApplication

type RemoteApplication struct {
	// Name is the name of the application.
	Name string `json:"name"`

	// OfferUUID is the uuid of the application offer.
	OfferUUID string `json:"offer-uuid"`

	// Life is the current lifecycle state of the application.
	Life life.Value `json:"life,omitempty"`

	// Status is the current status of the application.
	Status string `json:"status,omitempty"`

	// ModelUUID is the UUID of the model hosting the application.
	ModelUUID string `json:"model-uuid"`

	// IsConsumerProxy returns if the application is created
	// from a registration operation by a consuming model.
	IsConsumerProxy bool `json:"is-consumer-proxy"`

	// ConsumeVersion is incremented each time a new consumer
	// proxy is created for an offer.
	ConsumeVersion int `json:"consume-version,omitempty"`

	// Macaroon is used for authentication.
	Macaroon *macaroon.Macaroon `json:"macaroon,omitempty"`
}

RemoteApplication describes the current state of an application involved in a cross- model relation, from the perspective of the local model.

type RemoteApplicationChange

type RemoteApplicationChange struct {
	// ApplicationTag is the tag of the application.
	ApplicationTag string `json:"application-tag"`

	// Life is the current lifecycle state of the application.
	Life life.Value `json:"life"`
}

RemoteApplicationChange describes changes to an application.

type RemoteApplicationChanges

type RemoteApplicationChanges struct {
	Changes []RemoteApplicationChange `json:"changes,omitempty"`
}

RemoteApplicationChanges describes a set of changes to remote applications.

type RemoteApplicationInfo

type RemoteApplicationInfo struct {
	ModelTag    string `json:"model-tag"`
	Name        string `json:"name"`
	Description string `json:"description"`
	OfferURL    string `json:"offer-url"`
	// SourceModelLabel is only populated if the application
	// originates from another model on the same controller
	// rather than via an offer URL.
	SourceModelLabel string           `json:"source-model-label,omitempty"`
	Endpoints        []RemoteEndpoint `json:"endpoints"`
	// IconURLPath is relative to the model api endpoint
	IconURLPath string `json:"icon-url-path"`
}

RemoteApplicationInfo has attributes for a remote application.

type RemoteApplicationInfoResult

type RemoteApplicationInfoResult struct {
	Result *RemoteApplicationInfo `json:"result,omitempty"`
	Error  *Error                 `json:"error,omitempty"`
}

RemoteApplicationInfoResult holds the result of loading remote application info at a URL.

type RemoteApplicationInfoResults

type RemoteApplicationInfoResults struct {
	Results []RemoteApplicationInfoResult `json:"results"`
}

RemoteApplicationInfoResults represents the result of a RemoteApplicationInfo call.

type RemoteApplicationResult

type RemoteApplicationResult struct {
	Result *RemoteApplication `json:"result,omitempty"`
	Error  *Error             `json:"error,omitempty"`
}

RemoteApplicationResult holds a remote application and an error.

type RemoteApplicationResults

type RemoteApplicationResults struct {
	Results []RemoteApplicationResult `json:"results,omitempty"`
}

RemoteApplicationResults holds a set of remote application results.

type RemoteApplicationStatus

type RemoteApplicationStatus struct {
	Err       *Error              `json:"err,omitempty"`
	OfferURL  string              `json:"offer-url"`
	OfferName string              `json:"offer-name"`
	Endpoints []RemoteEndpoint    `json:"endpoints"`
	Life      life.Value          `json:"life"`
	Relations map[string][]string `json:"relations"`
	Status    DetailedStatus      `json:"status"`
}

RemoteApplicationStatus holds status info about a remote application.

type RemoteApplicationUpdate

type RemoteApplicationUpdate struct {
	ModelUUID string     `json:"model-uuid"`
	Name      string     `json:"name"`
	OfferUUID string     `json:"offer-uuid"`
	OfferURL  string     `json:"offer-url"`
	Life      life.Value `json:"life"`
	Status    StatusInfo `json:"status"`
}

RemoteApplicationUpdate holds the information about a remote application that is tracked by multiwatcherStore.

func (*RemoteApplicationUpdate) EntityId

func (i *RemoteApplicationUpdate) EntityId() EntityId

EntityId returns a unique identifier for a remote application across models.

type RemoteApplicationWatchResult

type RemoteApplicationWatchResult struct {
	RemoteApplicationWatcherId string                   `json:"id"`
	Change                     *RemoteApplicationChange `json:"change,omitempty"`
	Error                      *Error                   `json:"error,omitempty"`
}

RemoteApplicationWatchResult holds a RemoteApplicationWatcher id, changes and an error (if any).

type RemoteApplicationWatchResults

type RemoteApplicationWatchResults struct {
	Results []RemoteApplicationWatchResult `json:"results,omitempty"`
}

RemoteApplicationWatchResults holds the results for any API call which ends up returning a list of RemoteServiceWatchers.

type RemoteEndpoint

type RemoteEndpoint struct {
	Name      string             `json:"name"`
	Role      charm.RelationRole `json:"role"`
	Interface string             `json:"interface"`
	Limit     int                `json:"limit"`
}

RemoteEndpoint represents a remote application endpoint.

type RemoteEntities

type RemoteEntities struct {
	Tokens []string `json:"tokens"`
}

RemoteEntities identifies multiple remote entities.

type RemoteEntityArg

type RemoteEntityArg struct {
	Token         string         `json:"relation-token"`
	Macaroons     macaroon.Slice `json:"macaroons,omitempty"`
	BakeryVersion bakery.Version `json:"bakery-version,omitempty"`
}

RemoteEntityArg holds a remote relation token corresponding macaroons.

type RemoteEntityArgs

type RemoteEntityArgs struct {
	Args []RemoteEntityArg `json:"args"`
}

RemoteEntityArgs holds arguments to an API call dealing with remote relations.

type RemoteEntityTokenArg

type RemoteEntityTokenArg struct {
	// Tag is the tag of the entity.
	Tag string `json:"tag"`

	// Token is the token of the entity.
	Token string `json:"token,omitempty"`
}

RemoteEntityTokenArg holds the entity and token to be operated on.

type RemoteEntityTokenArgs

type RemoteEntityTokenArgs struct {
	Args []RemoteEntityTokenArg
}

RemoteEntityTokenArgs holds the arguments to an API call dealing with remote entities and their tokens.

type RemoteRelation

type RemoteRelation struct {
	Life                  life.Value     `json:"life"`
	Suspended             bool           `json:"suspended"`
	Id                    int            `json:"id"`
	Key                   string         `json:"key"`
	ApplicationName       string         `json:"application-name"`
	Endpoint              RemoteEndpoint `json:"endpoint"`
	RemoteApplicationName string         `json:"remote-application-name"`
	RemoteEndpointName    string         `json:"remote-endpoint-name"`
	SourceModelUUID       string         `json:"source-model-uuid"`
}

RemoteRelation describes the current state of a cross-model relation from the perspective of the local model.

type RemoteRelationChangeEvent

type RemoteRelationChangeEvent struct {
	// RelationToken is the token of the relation.
	RelationToken string `json:"relation-token"`

	// ApplicationToken is the token of the application.
	ApplicationToken string `json:"application-token"`

	// Life is the current lifecycle state of the relation.
	Life life.Value `json:"life"`

	// ForceCleanup is true if the offering side should forcibly
	// ensure that all relation units have left scope.
	ForceCleanup *bool `json:"force-cleanup,omitempty"`

	// UnitCount is the number of units still in relation scope.
	UnitCount *int `json:"unit-count,omitempty"`

	// Suspended is the current suspended status of the relation.
	Suspended *bool `json:"suspended,omitempty"`

	SuspendedReason string `json:"suspended-reason,omitempty"`

	// ApplicationSettings represent the updated application-level settings in
	// this relation.
	ApplicationSettings map[string]interface{} `json:"application-settings,omitempty"`

	// ChangedUnits maps unit tokens to relation unit changes.
	ChangedUnits []RemoteRelationUnitChange `json:"changed-units,omitempty"`

	// DepartedUnits contains the ids of units that have departed
	// the relation since the last change.
	DepartedUnits []int `json:"departed-units,omitempty"`

	// Macaroons are used for authentication.
	Macaroons macaroon.Slice `json:"macaroons,omitempty"`

	// BakeryVersion is the version of the bakery used to mint macaroons.
	BakeryVersion bakery.Version `json:"bakery-version,omitempty"`
}

RemoteRelationChangeEvent is pushed to the remote model to communicate changes to relation units from the local model.

type RemoteRelationDetails

type RemoteRelationDetails struct {
	Token         string             `json:"relation-token"`
	Macaroon      *macaroon.Macaroon `json:"macaroon,omitempty"`
	BakeryVersion bakery.Version     `json:"bakery-version,omitempty"`
}

RemoteRelationDetails holds a remote relation token and corresponding macaroon.

type RemoteRelationResult

type RemoteRelationResult struct {
	Error  *Error          `json:"error,omitempty"`
	Result *RemoteRelation `json:"result,omitempty"`
}

RemoteRelationResult holds a remote relation and an error.

type RemoteRelationResults

type RemoteRelationResults struct {
	Results []RemoteRelationResult `json:"results"`
}

RemoteRelationResults holds the result of an API call that returns information about multiple remote relations.

type RemoteRelationUnit

type RemoteRelationUnit struct {
	RelationToken string         `json:"relation-token"`
	Unit          string         `json:"unit"`
	Macaroons     macaroon.Slice `json:"macaroons,omitempty"`
	BakeryVersion bakery.Version `json:"bakery-version,omitempty"`
}

RelationUnit holds a remote relation token and a unit tag.

type RemoteRelationUnitChange

type RemoteRelationUnitChange struct {
	// UnitId uniquely identifies the remote unit.
	UnitId int `json:"unit-id"`

	// Settings is the current settings for the relation unit.
	Settings map[string]interface{} `json:"settings,omitempty"`
}

RemoteRelationUnitChange describes a relation unit change which has occurred in a remote model.

type RemoteRelationUnits

type RemoteRelationUnits struct {
	RelationUnits []RemoteRelationUnit `json:"relation-units"`
}

RemoteRelationUnits identifies multiple remote relation units.

type RemoteRelationWatchResult

type RemoteRelationWatchResult struct {
	RemoteRelationWatcherId string                    `json:"watcher-id"`
	Changes                 RemoteRelationChangeEvent `json:"changes"`
	Error                   *Error                    `json:"error,omitempty"`
}

RemoteRelationWatchResult holds a RemoteRelationWatcher id, initial state (in the Changes field) or an error if the relation couldn't be watched.

type RemoteRelationWatchResults

type RemoteRelationWatchResults struct {
	Results []RemoteRelationWatchResult `json:"results"`
}

RemoteRelationWatchResults holds the results for any API call that ends up returning a list of RemoteRelationWatchers

type RemoteRelationsChanges

type RemoteRelationsChanges struct {
	Changes []RemoteRelationChangeEvent `json:"changes,omitempty"`
}

RemoteRelationsChanges holds a set of RemoteRelationsChange structures.

type RemoteSpace

type RemoteSpace struct {
	CloudType          string                 `json:"cloud-type"`
	Name               string                 `json:"name"`
	ProviderId         string                 `json:"provider-id"`
	ProviderAttributes map[string]interface{} `json:"provider-attributes"`
	Subnets            []Subnet               `json:"subnets"`
}

RemoteSpace represents a space in some remote model.

type RemoveBlocksArgs

type RemoveBlocksArgs struct {
	All bool `json:"all"`
}

RemoveBlocksArgs holds the arguments for the RemoveBlocks command. It is a struct to facilitate the easy addition of being able to remove blocks for individual models at a later date.

type RemoveFilesystemParams

type RemoveFilesystemParams struct {
	// Provider is the storage provider that manages the filesystem.
	Provider string `json:"provider"`

	// FilesystemId is the storage provider's unique ID for the filesystem.
	FilesystemId string `json:"filesystem-id"`

	// Destroy controls whether the filesystem should be completely
	// destroyed, or otherwise merely released from Juju's management.
	Destroy bool `json:"destroy,omitempty"`
}

RemoveFilesystemParams holds the parameters for destroying or releasing a filesystem.

type RemoveFilesystemParamsResult

type RemoveFilesystemParamsResult struct {
	Result RemoveFilesystemParams `json:"result"`
	Error  *Error                 `json:"error,omitempty"`
}

RemoveFilesystemParamsResult holds parameters for destroying or releasing a filesystem.

type RemoveFilesystemParamsResults

type RemoveFilesystemParamsResults struct {
	Results []RemoveFilesystemParamsResult `json:"results,omitempty"`
}

RemoveFilesystemParamsResults holds parameters for destroying or releasing multiple filesystems.

type RemoveSpaceParam

type RemoveSpaceParam struct {
	Space Entity `json:"space"`
	// Force specifies whether the space removal will be forced, even if existing bindings, constraints or configurations are found.
	Force bool `json:"force,omitempty"`
	// DryRun specifies whether this command should only be run to return which constraints, bindings and configs are using given space.
	// Without applying the remove operations.
	DryRun bool `json:"dry-run,omitempty"`
}

RemoveSpaceParam holds a single space tag and whether it should be forced.

type RemoveSpaceParams

type RemoveSpaceParams struct {
	SpaceParams []RemoveSpaceParam `json:"space-param"`
}

RemoveSpaceParams holds a single space tag and whether it should be forced.

type RemoveSpaceResult

type RemoveSpaceResult struct {
	Constraints        []Entity `json:"constraints,omitempty"`
	Bindings           []Entity `json:"bindings,omitempty"`
	ControllerSettings []string `json:"controller-settings,omitempty"`
	Error              *Error   `json:"error,omitempty"`
}

RemoveSpaceResult contains entries if removing a space is not possible. Constraints are a slice of entities which has constraints on the space. Bindings are a slice of entities which has bindings on that space. Error is filled if an error has occurred which is unexpected.

type RemoveSpaceResults

type RemoveSpaceResults struct {
	Results []RemoveSpaceResult `json:"results"`
}

RemoveSpaceResults contains multiple RemoveSpace results.

type RemoveStorage

type RemoveStorage struct {
	Storage []RemoveStorageInstance `json:"storage"`
}

RemoveStorage holds the parameters for removing storage from the model.

type RemoveStorageInstance

type RemoveStorageInstance struct {
	// Tag is the tag of the storage instance to be destroyed.
	Tag string `json:"tag"`

	// DestroyAttachments controls whether or not the storage attachments
	// will be destroyed automatically. If DestroyAttachments is false,
	// then the storage must already be detached.
	DestroyAttachments bool `json:"destroy-attachments,omitempty"`

	// DestroyStorage controls whether or not the associated cloud storage
	// is destroyed. If DestroyStorage is true, the cloud storage will be
	// destroyed; otherwise it will only be released from Juju's control.
	DestroyStorage bool `json:"destroy-storage,omitempty"`

	// Force specifies whether relation destruction will be forced, i.e.
	// keep going despite operational errors.
	Force *bool `json:"force,omitempty"`

	// MaxWait specifies the amount of time that each step in relation destroy process
	// will wait before forcing the next step to kick-off. This parameter
	// only makes sense in combination with 'force' set to 'true'.
	MaxWait *time.Duration `json:"max-wait,omitempty"`
}

RemoveStorageInstance holds the parameters for removing a storage instance.

type RemoveVolumeParams

type RemoveVolumeParams struct {
	// Provider is the storage provider that manages the volume.
	Provider string `json:"provider"`

	// VolumeId is the storage provider's unique ID for the volume.
	VolumeId string `json:"volume-id"`

	// Destroy controls whether the volume should be completely
	// destroyed, or otherwise merely released from Juju's management.
	Destroy bool `json:"destroy,omitempty"`
}

RemoveVolumeParams holds the parameters for destroying or releasing a storage volume.

type RemoveVolumeParamsResult

type RemoveVolumeParamsResult struct {
	Result RemoveVolumeParams `json:"result"`
	Error  *Error             `json:"error,omitempty"`
}

RemoveVolumeParamsResult holds parameters for destroying a volume.

type RemoveVolumeParamsResults

type RemoveVolumeParamsResults struct {
	Results []RemoveVolumeParamsResult `json:"results,omitempty"`
}

RemoveVolumeParamsResults holds parameters for destroying multiple volumes.

type RenameSpaceParams

type RenameSpaceParams struct {
	FromSpaceTag string `json:"from-space-tag"`
	ToSpaceTag   string `json:"to-space-tag"`
}

RenameSpaceParams holds params to rename a space. A `from` and `to` space tag.

type RenameSpacesParams

type RenameSpacesParams struct {
	Changes []RenameSpaceParams `json:"changes"`
}

RenameSpacesParams holds the arguments of the RenameSpaces API call.

type ResolveCharmResult

type ResolveCharmResult struct {
	// URL is a string representation of charm.URL.
	URL   string `json:"url,omitempty"`
	Error string `json:"error,omitempty"`
}

ResolveCharmResult holds the result of resolving a charm reference to a URL, or any error that occurred.

type ResolveCharmResults

type ResolveCharmResults struct {
	URLs []ResolveCharmResult `json:"urls"`
}

ResolveCharmResults holds results of the ResolveCharms call.

type ResolveCharmWithChannel

type ResolveCharmWithChannel struct {
	Reference string      `json:"reference"`
	Origin    CharmOrigin `json:"charm-origin"`

	// SwitchCharm is set to true when the purpose of this resolve request
	// is to switch a different charm (potentially from a different store).
	SwitchCharm bool `json:"switch-charm,omitempty"`
}

ResolveCharmWithChannel contains a charm reference with the desired channel to be resolved.

type ResolveCharmWithChannelResult

type ResolveCharmWithChannelResult struct {
	URL             string      `json:"url"`
	Origin          CharmOrigin `json:"charm-origin"`
	SupportedSeries []string    `json:"supported-series"`
	Error           *Error      `json:"error,omitempty"`
}

ResolveCharmWithChannelResult is the result of a single charm resolution.

type ResolveCharmWithChannelResults

type ResolveCharmWithChannelResults struct {
	Results []ResolveCharmWithChannelResult
}

ResolveCharmWithChannelResults holds the results of ResolveCharmsWithChannel.

type ResolveCharms

type ResolveCharms struct {
	References []string `json:"references"`
}

ResolveCharms stores charm references for a ResolveCharms call.

type ResolveCharmsWithChannel

type ResolveCharmsWithChannel struct {
	Resolve  []ResolveCharmWithChannel `json:"resolve"`
	Macaroon *macaroon.Macaroon        `json:"macaroon,omitempty"`
}

ResolveCharmsWithChannel contains of slice of data on charms to be resolved.

type Resolved

type Resolved struct {
	UnitName string `json:"unit-name"`
	Retry    bool   `json:"retry"`
}

Resolved holds parameters for the Resolved call.

type ResolvedMode

type ResolvedMode string

ResolvedMode describes the way state transition errors are resolved.

const (
	ResolvedNone       ResolvedMode = ""
	ResolvedRetryHooks ResolvedMode = "retry-hooks"
	ResolvedNoHooks    ResolvedMode = "no-hooks"
)

type ResolvedModeResult

type ResolvedModeResult struct {
	Error *Error       `json:"error,omitempty"`
	Mode  ResolvedMode `json:"mode"`
}

ResolvedModeResult holds a resolved mode or an error.

type ResolvedModeResults

type ResolvedModeResults struct {
	Results []ResolvedModeResult `json:"results"`
}

ResolvedModeResults holds the bulk operation result of an API call that returns a resolved mode or an error.

type ResolvedResults

type ResolvedResults struct {
	Application string                 `json:"application"`
	Charm       string                 `json:"charm"`
	Settings    map[string]interface{} `json:"settings"`
}

ResolvedResults holds results of the Resolved call.

type Resource

type Resource struct {
	CharmResource

	// ID uniquely identifies a resource-application pair within the model.
	// Note that the model ignores pending resources (those with a
	// pending ID) except for in a few clearly pending-related places.
	ID string `json:"id"`

	// PendingID identifies that this resource is pending and
	// distinguishes it from other pending resources with the same model
	// ID (and from the active resource).
	PendingID string `json:"pending-id"`

	// ApplicationID identifies the application for the resource.
	ApplicationID string `json:"application"`

	// Username is the ID of the user that added the revision
	// to the model (whether implicitly or explicitly).
	Username string `json:"username"`

	// Timestamp indicates when the resource was added to the model.
	Timestamp time.Time `json:"timestamp"`
}

Resource contains info about a Resource.

type ResourceUploadResult

type ResourceUploadResult struct {
	// Error will contain details about a failed upload attempt.
	Error *Error `json:"error,omitempty"`

	// ID uniquely identifies a resource-application pair within the model.
	ID string `json:"id"`

	// Timestamp indicates when the resource was added to the model.
	Timestamp time.Time `json:"timestamp"`
}

ResourceUploadResult is used to return some details about an uploaded resource.

type ResourcesResult

type ResourcesResult struct {
	ErrorResult

	// Resources is the list of resources for the application.
	Resources []Resource `json:"resources"`

	// CharmStoreResources is the list of resources associated with the charm in
	// the charmstore.
	CharmStoreResources []CharmResource `json:"charm-store-resources"`

	// UnitResources contains a list of the resources for each unit in the
	// application.
	UnitResources []UnitResources `json:"unit-resources"`
}

ResourcesResult holds the resources that result from an API call for a single application.

type ResourcesResults

type ResourcesResults struct {
	// Results is the list of resource results.
	Results []ResourcesResult `json:"results"`
}

ResourcesResults holds the resources that result from a bulk API call.

type RetryStrategy

type RetryStrategy struct {
	ShouldRetry     bool          `json:"should-retry"`
	MinRetryTime    time.Duration `json:"min-retry-time"`
	MaxRetryTime    time.Duration `json:"max-retry-time"`
	JitterRetryTime bool          `json:"jitter-retry-time"`
	RetryTimeFactor int64         `json:"retry-time-factor"`
}

RetryStrategy holds the necessary information to configure retries.

type RetryStrategyResult

type RetryStrategyResult struct {
	Error  *Error         `json:"error,omitempty"`
	Result *RetryStrategy `json:"result,omitempty"`
}

RetryStrategyResult holds a RetryStrategy or an error.

type RetryStrategyResults

type RetryStrategyResults struct {
	Results []RetryStrategyResult `json:"results"`
}

RetryStrategyResults holds the bulk operation result of an API call that returns a RetryStrategy or an error.

type RevokeCredentialArg

type RevokeCredentialArg struct {
	// Tag holds credential tag to revoke.
	Tag string `json:"tag"`

	// Force indicates whether the credential can be revoked forcefully.
	Force bool `json:"force"`
}

RevokeCredentialArg contains data needed to revoke credential.

type RevokeCredentialArgs

type RevokeCredentialArgs struct {
	// Credentials holds credentials to revoke.
	Credentials []RevokeCredentialArg `json:"credentials"`
}

RevokeCredentialArgs contains credentials to revoke.

type RunParams

type RunParams struct {
	Commands       string        `json:"commands"`
	Timeout        time.Duration `json:"timeout"`
	Machines       []string      `json:"machines,omitempty"`
	Applications   []string      `json:"applications,omitempty"`
	Units          []string      `json:"units,omitempty"`
	Parallel       *bool         `json:"parallel,omitempty"`
	ExecutionGroup *string       `json:"execution-group,omitempty"`

	// WorkloadContext for CAAS is true when the Commands should be run on
	// the workload not the operator.
	WorkloadContext bool `json:"workload-context,omitempty"`
}

RunParams is used to provide the parameters to the Run method. Commands and Timeout are expected to have values, and one or more values should be in the Machines, Applications, or Units slices.

type RunResult

type RunResult struct {
	Code   int    `json:"code-id"`
	Stdout []byte `json:"stdout,omitempty"`
	Stderr []byte `json:"stderr,omitempty"`
	// FIXME: should be tags not id strings
	MachineId string `json:"machine-id"`
	UnitId    string `json:"unit-id"`
	Error     string `json:"error"`
}

RunResult contains the result from an individual run call on a machine. UnitId is populated if the command was run inside the unit context.

type RunResults

type RunResults struct {
	Results []RunResult `json:"results"`
}

RunResults is used to return the slice of results. API server side calls need to return single structure values.

type SSHAddressResult

type SSHAddressResult struct {
	Error   *Error `json:"error,omitempty"`
	Address string `json:"address,omitempty"`
}

SSHAddressResult defines a single SSH address result (see SSHAddressResults).

type SSHAddressResults

type SSHAddressResults struct {
	Results []SSHAddressResult `json:"results"`
}

SSHAddressResults defines the response from various APIs on the SSHClient facade.

type SSHAddressesResult

type SSHAddressesResult struct {
	Error     *Error   `json:"error,omitempty"`
	Addresses []string `json:"addresses"`
}

SSHAddressesResult defines a single result with multiple addresses (see SSHAddressesResults).

type SSHAddressesResults

type SSHAddressesResults struct {
	Results []SSHAddressesResult `json:"results"`
}

SSHAddressesResults defines the response from AllAddresses on the SSHClient API facade.

type SSHHostKeySet

type SSHHostKeySet struct {
	EntityKeys []SSHHostKeys `json:"entity-keys"`
}

SSHHostKeySet defines SSH host keys for one or more entities (typically machines).

type SSHHostKeys

type SSHHostKeys struct {
	Tag        string   `json:"tag"`
	PublicKeys []string `json:"public-keys"`
}

SSHHostKeys defines the SSH host keys for one entity.

type SSHProxyResult

type SSHProxyResult struct {
	UseProxy bool `json:"use-proxy"`
}

SSHProxyResult defines the response from the SSHClient.Proxy API.

type SSHPublicKeysResult

type SSHPublicKeysResult struct {
	Error      *Error   `json:"error,omitempty"`
	PublicKeys []string `json:"public-keys,omitempty"`
}

SSHPublicKeysResult is used to return the SSH public host keys for one SSH target (see SSHPublicKeysResults).

type SSHPublicKeysResults

type SSHPublicKeysResults struct {
	Results []SSHPublicKeysResult `json:"results"`
}

SSHPublicKeysResults is used to return SSH public host keys for one or more target for the SSHClient.PublicKeys API.

type ScaleApplicationInfo

type ScaleApplicationInfo struct {
	// Scale is the number of units which should be running.
	Scale int `json:"num-units"`
}

ScaleApplicationInfo contains information related to the scaling of an application.

type ScaleApplicationParams

type ScaleApplicationParams struct {
	// ApplicationTag holds the tag of the application to scale.
	ApplicationTag string `json:"application-tag"`

	// Scale is the number of units which should be running.
	Scale int `json:"scale"`

	// Scale is the number of units which should be added/removed from the existing count.
	ScaleChange int `json:"scale-change,omitempty"`

	// Force controls whether or not scaling of an application
	// will be forced, i.e. ignore operational errors.
	Force bool `json:"force"`
}

ScaleApplicationParams holds parameters for the Application.ScaleApplication call.

type ScaleApplicationResult

type ScaleApplicationResult struct {
	Error *Error                `json:"error,omitempty"`
	Info  *ScaleApplicationInfo `json:"info,omitempty"`
}

ScaleApplicationResult contains one of the results of a ScaleApplication API request.

type ScaleApplicationResults

type ScaleApplicationResults struct {
	Results []ScaleApplicationResult `json:"results,omitempty"`
}

ScaleApplicationResults contains the results of a ScaleApplication API request.

type ScaleApplicationsParams

type ScaleApplicationsParams struct {
	Applications []ScaleApplicationParams `json:"applications"`
}

ScaleApplicationsParams holds bulk parameters for the Application.ScaleApplication call.

type SecretKeyLoginRequest

type SecretKeyLoginRequest struct {
	// User is the tag-representation of the user that the
	// requester wishes to authenticate as.
	User string `json:"user"`

	// Nonce is the nonce used by the client to encrypt
	// and authenticate PayloadCiphertext.
	Nonce []byte `json:"nonce"`

	// PayloadCiphertext is the encrypted and authenticated
	// payload. The payload is encrypted/authenticated using
	// NaCl Secretbox.
	PayloadCiphertext []byte `json:"cipher-text"`
}

SecretKeyLoginRequest contains the parameters for completing the registration of a user. The request contains the tag of the user, and an encrypted and authenticated payload that proves that the requester has a secret key recorded on the controller.

type SecretKeyLoginRequestPayload

type SecretKeyLoginRequestPayload struct {
	// Password is the new password to set for the user.
	Password string `json:"password"`
}

SecretKeyLoginRequestPayload is JSON-encoded and then encrypted and authenticated with the NaCl Secretbox algorithm.

type SecretKeyLoginResponse

type SecretKeyLoginResponse struct {
	// Nonce is the nonce used by the server to encrypt and
	// authenticate PayloadCiphertext.
	Nonce []byte `json:"nonce"`

	// PayloadCiphertext is the encrypted and authenticated
	// payload, which is a JSON-encoded SecretKeyLoginResponsePayload.
	PayloadCiphertext []byte `json:"cipher-text"`
}

SecretKeyLoginResponse contains the result of completing a user registration. This contains an encrypted and authenticated payload, containing the information necessary to securely log into the controller via the standard password authentication method.

type SecretKeyLoginResponsePayload

type SecretKeyLoginResponsePayload struct {
	// CACert is the CA certificate, required to establish a secure
	// TLS connection to the Juju controller
	CACert string `json:"ca-cert"`

	// ControllerUUID is the UUID of the Juju controller.
	ControllerUUID string `json:"controller-uuid"`
}

SecretKeyLoginResponsePayload is JSON-encoded and then encrypted and authenticated with the NaCl Secretbox algorithm.

type SecretRotatedArg

type SecretRotatedArg struct {
	URL  string    `json:"url"`
	When time.Time `json:"when"`
}

SecretRotatedArg holds the args for updating rotated secret info.

type SecretRotatedArgs

type SecretRotatedArgs struct {
	Args []SecretRotatedArg `json:"args"`
}

SecretRotatedArgs holds the args for updating rotated secret info.

type SecretRotationChange

type SecretRotationChange struct {
	ID             int           `json:"secret-id"`
	URL            string        `json:"url"`
	RotateInterval time.Duration `json:"rotate-interval"`
	LastRotateTime time.Time     `json:"last-rotate-time"`
}

SecretRotationChange describes a change to a secret rotation config.

type SecretRotationWatchResult

type SecretRotationWatchResult struct {
	SecretRotationWatcherId string                 `json:"watcher-id"`
	Changes                 []SecretRotationChange `json:"changes"`
	Error                   *Error                 `json:"error,omitempty"`
}

SecretRotationWatchResult holds secret rotation change events.

type SecretRotationWatchResults

type SecretRotationWatchResults struct {
	Results []SecretRotationWatchResult `json:"results"`
}

SecretRotationWatchResults holds the results for any API call which ends up returning a list of SecretRotationWatchResult.

type SecretValueResult

type SecretValueResult struct {
	Data  map[string]string `json:"data,omitempty"`
	Error *Error            `json:"error,omitempty"`
}

SecretValueResult is the result of getting a secret value.

type SecretValueResults

type SecretValueResults struct {
	Results []SecretValueResult `json:"results"`
}

SecretValueResults holds secret value results.

type SerializedModel

type SerializedModel struct {
	Bytes     []byte                    `json:"bytes"`
	Charms    []string                  `json:"charms"`
	Tools     []SerializedModelTools    `json:"tools"`
	Resources []SerializedModelResource `json:"resources"`
}

SerializedModel wraps a buffer contain a serialised Juju model. It also contains lists of the charms and tools used in the model.

type SerializedModelResource

type SerializedModelResource struct {
	Application         string                                     `json:"application"`
	Name                string                                     `json:"name"`
	ApplicationRevision SerializedModelResourceRevision            `json:"application-revision"`
	CharmStoreRevision  SerializedModelResourceRevision            `json:"charmstore-revision"`
	UnitRevisions       map[string]SerializedModelResourceRevision `json:"unit-revisions"`
}

SerializedModelResource holds the details for a single resource for an application in a serialized model.

type SerializedModelResourceRevision

type SerializedModelResourceRevision struct {
	Revision       int       `json:"revision"`
	Type           string    `json:"type"`
	Path           string    `json:"path"`
	Description    string    `json:"description"`
	Origin         string    `json:"origin"`
	FingerprintHex string    `json:"fingerprint"`
	Size           int64     `json:"size"`
	Timestamp      time.Time `json:"timestamp"`
	Username       string    `json:"username,omitempty"`
}

SerializedModelResourceRevision holds the details for a single resource revision for an application in a serialized model.

type SerializedModelTools

type SerializedModelTools struct {
	Version string `json:"version"`

	// URI holds the URI were a client can download the tools
	// (e.g. "/tools/1.2.3-xenial-amd64"). It will need to prefixed
	// with the API server scheme, address and model prefix before it
	// can be used.
	URI string `json:"uri"`
}

SerializedModelTools holds the version and URI for a given tools version.

type SetAnnotations

type SetAnnotations struct {
	Tag   string            `json:"tag"`
	Pairs map[string]string `json:"annotations"`
}

SetAnnotations stores parameters for making the SetAnnotations call.

type SetConstraints

type SetConstraints struct {
	ApplicationName string            `json:"application"` //optional, if empty, model constraints are set.
	Constraints     constraints.Value `json:"constraints"`
}

SetConstraints stores parameters for making the SetConstraints call.

type SetExternalControllerInfoParams

type SetExternalControllerInfoParams struct {
	Info ExternalControllerInfo `json:"info"`
}

SetExternalControllerInfoParams contains the parameters for setting the info for an external controller.

type SetExternalControllersInfoParams

type SetExternalControllersInfoParams struct {
	Controllers []SetExternalControllerInfoParams `json:"controllers"`
}

SetControllersInfoParams contains the parameters for setting the info for a set of external controllers.

type SetMachineBlockDevices

type SetMachineBlockDevices struct {
	MachineBlockDevices []MachineBlockDevices `json:"machine-block-devices"`
}

SetMachineBlockDevices holds the arguments for recording the block devices present on a set of machines.

type SetMachineNetworkConfig

type SetMachineNetworkConfig struct {
	Tag    string          `json:"tag"`
	Config []NetworkConfig `json:"config"`
}

SetMachineNetworkConfig holds the parameters for making an API call to update machine network config.

func (*SetMachineNetworkConfig) BackFillMachineOrigin

func (c *SetMachineNetworkConfig) BackFillMachineOrigin()

BackFillMachineOrigin sets all empty NetworkOrigin entries to indicate that they are sourced from the local machine. TODO (manadart 2020-05-12): This is used by superseded methods on the Machiner and NetworkConfig APIs, which along with this should considered for removing for Juju 3.0.

type SetMachinesAddresses

type SetMachinesAddresses struct {
	MachineAddresses []MachineAddresses `json:"machine-addresses"`
}

SetMachinesAddresses holds the parameters for making an API call to update machine addresses.

type SetMigrationPhaseArgs

type SetMigrationPhaseArgs struct {
	Phase string `json:"phase"`
}

SetMigrationPhaseArgs provides a migration phase to the migrationmaster.SetPhase API method.

type SetMigrationStatusMessageArgs

type SetMigrationStatusMessageArgs struct {
	Message string `json:"message"`
}

SetMigrationStatusMessageArgs provides a migration status message to the migrationmaster.SetStatusMessage API method.

type SetModelAgentVersion

type SetModelAgentVersion struct {
	Version             version.Number `json:"version"`
	IgnoreAgentVersions bool           `json:"force,omitempty"`
}

SetModelAgentVersion contains the arguments for SetModelAgentVersion client API call.

type SetModelDefaults

type SetModelDefaults struct {
	Config []ModelDefaultValues `json:"config"`
}

SetModelDefaults contains the arguments for SetModelDefaults client API call.

type SetModelEnvironVersion

type SetModelEnvironVersion struct {
	// ModelTag is the string representation of a model tag, which
	// should be parsable using names.ParseModelTag.
	ModelTag string `json:"model-tag"`

	// Version is the environ version to set for the model.
	Version int `json:"version"`
}

SetModelEnvironVersion holds the tag and associated environ version of a model.

type SetModelEnvironVersions

type SetModelEnvironVersions struct {
	Models []SetModelEnvironVersion `json:"models,omitempty"`
}

SetModelEnvironVersions holds the tags and associated environ versions of a collection of models.

type SetPayloadStatusArg

type SetPayloadStatusArg struct {
	Entity

	// Status is the new status of the payload.
	Status string `json:"status"`
}

SetPayloadStatusArg are the arguments for a single call to the SetStatus endpoint.

type SetPayloadStatusArgs

type SetPayloadStatusArgs struct {
	// Args is the list of arguments to pass to this function.
	Args []SetPayloadStatusArg `json:"args"`
}

SetPayloadStatusArgs are the arguments for the PayloadsHookContext.SetStatus endpoint.

type SetPodSpecParams

type SetPodSpecParams struct {
	Specs []EntityString `json:"specs"`
}

SetPodSpecParams holds the arguments for setting the pod spec for a set of applications. TODO(juju3) - remove

type SetProfileArg

type SetProfileArg struct {
	Entity   Entity   `json:"entity"`
	Profiles []string `json:"profiles"`
}

type SetProfileArgs

type SetProfileArgs struct {
	Args []SetProfileArg `json:"args"`
}

type SetProfileUpgradeCompleteArg

type SetProfileUpgradeCompleteArg struct {
	Entity   Entity `json:"entity"`
	UnitName string `json:"unit-name"`
	Message  string `json:"message"`
}

type SetProfileUpgradeCompleteArgs

type SetProfileUpgradeCompleteArgs struct {
	Args []SetProfileUpgradeCompleteArg `json:"args"`
}

type SetProviderNetworkConfig

type SetProviderNetworkConfig struct {
	Args []ProviderNetworkConfig `json:"args"`
}

SetProviderNetworkConfig holds a slice of machine network configs sourced from a provider.

type SetProviderNetworkConfigResult

type SetProviderNetworkConfigResult struct {
	Error     *Error    `json:"error,omitempty"`
	Addresses []Address `json:"addresses"`

	// Modified will be set to true if the provider address list has been
	// updated.
	Modified bool `json:"modified"`
}

SetProviderNetworkConfigResult holds a list of provider addresses or an error.

type SetProviderNetworkConfigResults

type SetProviderNetworkConfigResults struct {
	Results []SetProviderNetworkConfigResult `json:"results"`
}

SetProviderNetworkConfigResults holds a list of SetProviderNetwork config results.

type SetStatus

type SetStatus struct {
	Entities []EntityStatusArgs `json:"entities"`
}

SetStatus holds the parameters for making a SetStatus/UpdateStatus call.

type SetUnitStateArg

type SetUnitStateArg struct {
	Tag              string             `json:"tag"`
	CharmState       *map[string]string `json:"charm-state,omitempty"`
	UniterState      *string            `json:"uniter-state,omitempty"`
	RelationState    *map[int]string    `json:"relation-state,omitempty"`
	StorageState     *string            `json:"storage-state,omitempty"`
	MeterStatusState *string            `json:"meter-status-state,omitempty"`
}

SetUnitStateArg holds a unit tag and pointers to data persisted from or via the uniter. State is a map with KV-pairs that represent a local charm state to be persisted by the controller. The other fields represent uniter internal data.

Each field with omitempty is optional, setting it will cause the field to be evaluated for changes to the persisted data. A pointer to nil or empty data will cause the persisted data to be deleted.

type SetUnitStateArgs

type SetUnitStateArgs struct {
	Args []SetUnitStateArg `json:"args"`
}

SetUnitStateArgs holds multiple SetUnitStateArg objects to be persisted by the controller.

type Settings

type Settings map[string]string

Settings holds relation settings names and values.

type SettingsResult

type SettingsResult struct {
	Error    *Error   `json:"error,omitempty"`
	Settings Settings `json:"settings"`
}

SettingsResult holds a relation settings map or an error.

type SettingsResults

type SettingsResults struct {
	Results []SettingsResult `json:"results"`
}

SettingsResults holds the result of an API calls that returns settings for multiple relations.

type ShowSpaceResult

type ShowSpaceResult struct {
	// Information about a given space.
	Space Space `json:"space"`
	// Application names which are bound to a given space.
	Applications []string `json:"applications"`
	// MachineCount is the number of machines connected to a given space.
	MachineCount int    `json:"machine-count"`
	Error        *Error `json:"error,omitempty"`
}

ShowSpaceResult holds the list of all available spaces.

type ShowSpaceResults

type ShowSpaceResults struct {
	Results []ShowSpaceResult `json:"results"`
}

ShowSpaceResults holds the list of all available spaces.

type SingularClaim

type SingularClaim struct {
	EntityTag   string        `json:"entity-tag"`
	ClaimantTag string        `json:"claimant-tag"`
	Duration    time.Duration `json:"duration"`
}

SingularClaim represents a request for exclusive administrative access to an entity (model or controller) on the part of the claimant.

type SingularClaims

type SingularClaims struct {
	Claims []SingularClaim `json:"claims"`
}

SingularClaims holds any number of SingularClaim~s.

type Space

type Space struct {
	Id      string   `json:"id"`
	Name    string   `json:"name"`
	Subnets []Subnet `json:"subnets"`
	Error   *Error   `json:"error,omitempty"`
}

Space holds the information about a single space and its associated subnets.

type SpaceInfo

type SpaceInfo struct {
	ID         string     `json:"id"`
	Name       string     `json:"name"`
	ProviderID string     `json:"provider-id,omitempty"`
	Subnets    []SubnetV3 `json:"subnets,omitempty"`
}

SpaceInfo describes a space and its subnets.

type SpaceInfos

type SpaceInfos struct {
	Infos []SpaceInfo `json:"space-infos,omitempty"`
}

SpaceInfos represents the result of a SpaceInfos API call.

func FromNetworkSpaceInfos

func FromNetworkSpaceInfos(allInfos network.SpaceInfos) SpaceInfos

FromNetworkSpaceInfos converts a network.SpaceInfos into a serializable payload that can be sent over the wire.

type SpaceInfosParams

type SpaceInfosParams struct {
	// A list of space IDs for filtering the returned set of results. If
	// empty, all spaces will be returned.
	FilterBySpaceIDs []string `json:"space-ids,omitempty"`
}

SpaceInfosParams provides the arguments for a SpaceInfos call.

type SpaceResult

type SpaceResult struct {
	Error *Error `json:"error,omitempty"`
	Tag   string `json:"tag"`
}

SpaceResult holds a single space tag or an error.

type SpaceResults

type SpaceResults struct {
	Results []SpaceResult `json:"results"`
}

SpaceResults holds the bulk operation result of an API call that returns space tags or an errors.

type StateServingInfo

type StateServingInfo struct {
	APIPort           int `json:"api-port"`
	ControllerAPIPort int `json:"controller-api-port,omitempty"`
	StatePort         int `json:"state-port"`
	// The controller cert and corresponding private key.
	Cert       string `json:"cert"`
	PrivateKey string `json:"private-key"`
	// The private key for the CA cert so that a new controller
	// cert can be generated when needed.
	CAPrivateKey string `json:"ca-private-key"`
	// this will be passed as the KeyFile argument to MongoDB
	SharedSecret   string `json:"shared-secret"`
	SystemIdentity string `json:"system-identity"`
}

StateServingInfo holds information needed by a state server.

type StatusHistoryFilter

type StatusHistoryFilter struct {
	Size    int            `json:"size"`
	Date    *time.Time     `json:"date"`
	Delta   *time.Duration `json:"delta"`
	Exclude []string       `json:"exclude"`
}

StatusHistoryFilter holds arguments that can be use to filter a status history backlog.

type StatusHistoryPruneArgs

type StatusHistoryPruneArgs struct {
	MaxHistoryTime time.Duration `json:"max-history-time"`
	MaxHistoryMB   int           `json:"max-history-mb"`
}

StatusHistoryPruneArgs holds arguments for status history prunning process.

type StatusHistoryRequest

type StatusHistoryRequest struct {
	Kind   string              `json:"historyKind"`
	Size   int                 `json:"size"`
	Filter StatusHistoryFilter `json:"filter"`
	Tag    string              `json:"tag"`
}

StatusHistoryRequest holds the parameters to filter a status history query.

type StatusHistoryRequests

type StatusHistoryRequests struct {
	Requests []StatusHistoryRequest `json:"requests"`
}

StatusHistoryRequests holds a slice of StatusHistoryArgs.

type StatusHistoryResult

type StatusHistoryResult struct {
	History History `json:"history"`
	Error   *Error  `json:"error,omitempty"`
}

StatusHistoryResult holds a slice of statuses.

type StatusHistoryResults

type StatusHistoryResults struct {
	Results []StatusHistoryResult `json:"results"`
}

StatusHistoryResults holds a slice of StatusHistoryResult.

type StatusInfo

type StatusInfo struct {
	Err     error                  `json:"err,omitempty"`
	Current status.Status          `json:"current"`
	Message string                 `json:"message"`
	Since   *time.Time             `json:"since,omitempty"`
	Version string                 `json:"version"`
	Data    map[string]interface{} `json:"data,omitempty"`
}

StatusInfo holds the unit and machine status information. It is used by ApplicationInfo and UnitInfo.

type StatusParams

type StatusParams struct {
	Patterns []string `json:"patterns"`
}

StatusParams holds parameters for the Status call.

type StatusResult

type StatusResult struct {
	Error  *Error                 `json:"error,omitempty"`
	Id     string                 `json:"id"`
	Life   life.Value             `json:"life"`
	Status string                 `json:"status"`
	Info   string                 `json:"info"`
	Data   map[string]interface{} `json:"data"`
	Since  *time.Time             `json:"since"`
}

StatusResult holds an entity status, extra information, or an error.

type StatusResults

type StatusResults struct {
	Results []StatusResult `json:"results"`
}

StatusResults holds multiple status results.

type StorageAddParams

type StorageAddParams struct {
	// UnitTag  is unit name.
	UnitTag string `json:"unit"`

	// StorageName is the name of the storage as specified in the charm.
	StorageName string `json:"name"`

	// Constraints are specified storage constraints.
	Constraints StorageConstraints `json:"storage"`
}

StorageAddParams holds storage details to add to a unit dynamically.

type StorageAttachment

type StorageAttachment struct {
	StorageTag string `json:"storage-tag"`
	OwnerTag   string `json:"owner-tag"`
	UnitTag    string `json:"unit-tag"`

	Kind     StorageKind `json:"kind"`
	Location string      `json:"location"`
	Life     life.Value  `json:"life"`
}

StorageAttachment describes a unit's attached storage instance.

type StorageAttachmentDetails

type StorageAttachmentDetails struct {
	// StorageTag is the tag of the storage instance.
	StorageTag string `json:"storage-tag"`

	// UnitTag is the tag of the unit attached to the storage instance.
	UnitTag string `json:"unit-tag"`

	// MachineTag is the tag of the machine that the attached unit is assigned to.
	MachineTag string `json:"machine-tag"`

	// Location holds location (mount point/device path) of
	// the attached storage.
	Location string `json:"location,omitempty"`

	// Life contains the lifecycle state of the storage attachment.
	// Juju controllers older than 2.2 do not populate this
	// field, so it may be omitted.
	Life life.Value `json:"life,omitempty"`
}

StorageAttachmentDetails holds detailed information about a storage attachment.

type StorageAttachmentId

type StorageAttachmentId struct {
	StorageTag string `json:"storage-tag"`
	UnitTag    string `json:"unit-tag"`
}

StorageAttachmentId identifies a storage attachment by the tags of the related unit and storage instance.

type StorageAttachmentIds

type StorageAttachmentIds struct {
	Ids []StorageAttachmentId `json:"ids"`
}

StorageAttachmentIds holds a set of storage attachment identifiers.

type StorageAttachmentIdsResult

type StorageAttachmentIdsResult struct {
	Result StorageAttachmentIds `json:"result"`
	Error  *Error               `json:"error,omitempty"`
}

StorageAttachmentIdsResult holds the result of an API call to retrieve the IDs of a unit's attached storage instances.

type StorageAttachmentIdsResults

type StorageAttachmentIdsResults struct {
	Results []StorageAttachmentIdsResult `json:"results,omitempty"`
}

StorageAttachmentIdsResults holds the result of an API call to retrieve the IDs of multiple units attached storage instances.

type StorageAttachmentResult

type StorageAttachmentResult struct {
	Result StorageAttachment `json:"result"`
	Error  *Error            `json:"error,omitempty"`
}

StorageAttachmentResult holds the result of an API call to retrieve details of a storage attachment.

type StorageAttachmentResults

type StorageAttachmentResults struct {
	Results []StorageAttachmentResult `json:"results,omitempty"`
}

StorageAttachmentResults holds the result of an API call to retrieve details of multiple storage attachments.

type StorageAttachmentsResult

type StorageAttachmentsResult struct {
	Result []StorageAttachment `json:"result"`
	Error  *Error              `json:"error,omitempty"`
}

StorageAttachmentsResult holds the result of an API call to retrieve details of a unit's attached storage instances.

type StorageAttachmentsResults

type StorageAttachmentsResults struct {
	Results []StorageAttachmentsResult `json:"results,omitempty"`
}

StorageAttachmentsResults holds the result of an API call to retrieve details of multiple units' attached storage instances.

type StorageConstraints

type StorageConstraints struct {
	// Pool is the name of the storage pool from which to provision the
	// storage instance.
	Pool string `json:"pool,omitempty"`

	// Size is the required size of the storage instance, in MiB.
	Size *uint64 `json:"size,omitempty"`

	// Count is the required number of storage instances.
	Count *uint64 `json:"count,omitempty"`
}

StorageConstraints contains constraints for storage instance.

type StorageDetachmentParams

type StorageDetachmentParams struct {
	// StorageIds to detach
	StorageIds StorageAttachmentIds `json:"ids"`

	// Force specifies whether relation destruction will be forced, i.e.
	// keep going despite operational errors.
	Force *bool `json:"force,omitempty"`

	// MaxWait specifies the amount of time that each step in relation destroy process
	// will wait before forcing the next step to kick-off. This parameter
	// only makes sense in combination with 'force' set to 'true'.
	MaxWait *time.Duration `json:"max-wait,omitempty"`
}

type StorageDetails

type StorageDetails struct {
	// StorageTag holds tag for this storage.
	StorageTag string `json:"storage-tag"`

	// OwnerTag holds tag for the owner of this storage, unit or application.
	OwnerTag string `json:"owner-tag"`

	// Kind holds what kind of storage this instance is.
	Kind StorageKind `json:"kind"`

	// Status contains the status of the storage instance.
	Status EntityStatus `json:"status"`

	// Life contains the lifecycle state of the storage.
	// Juju controllers older than 2.2 do not populate this
	// field, so it may be omitted.
	Life life.Value `json:"life,omitempty"`

	// Persistent reports whether or not the underlying volume or
	// filesystem is persistent; i.e. whether or not it outlives
	// the machine that it is attached to.
	Persistent bool `json:"persistent"`

	// Attachments contains a mapping from unit tag to
	// storage attachment details.
	Attachments map[string]StorageAttachmentDetails `json:"attachments,omitempty"`
}

StorageDetails holds information about storage.

type StorageDetailsListResult

type StorageDetailsListResult struct {
	Result []StorageDetails `json:"result,omitempty"`
	Error  *Error           `json:"error,omitempty"`
}

StorageDetailsListResult holds a collection of storage details.

type StorageDetailsListResults

type StorageDetailsListResults struct {
	Results []StorageDetailsListResult `json:"results,omitempty"`
}

StorageDetailsListResults holds a collection of collections of storage details.

type StorageDetailsResult

type StorageDetailsResult struct {
	Result *StorageDetails `json:"result,omitempty"`
	Error  *Error          `json:"error,omitempty"`
}

StorageDetailsResult holds information about a storage instance or error related to its retrieval.

type StorageDetailsResults

type StorageDetailsResults struct {
	Results []StorageDetailsResult `json:"results,omitempty"`
}

StorageDetailsResults holds results for storage details or related storage error.

type StorageFilter

type StorageFilter struct {
}

StorageFilter holds filter terms for listing storage details.

type StorageFilters

type StorageFilters struct {
	Filters []StorageFilter `json:"filters,omitempty"`
}

StorageFilters holds a set of storage filters.

type StorageInstance

type StorageInstance struct {
	StorageTag string      `json:"storage-tag"`
	OwnerTag   string      `json:"owner-tag"`
	Kind       StorageKind `json:"kind"`
}

StorageInstance describes a storage instance.

type StorageInstanceResult

type StorageInstanceResult struct {
	Result StorageInstance `json:"result"`
	Error  *Error          `json:"error,omitempty"`
}

StorageInstanceResult holds the result of an API call to retrieve details of a storage instance.

type StorageInstanceResults

type StorageInstanceResults struct {
	Results []StorageInstanceResult `json:"results,omitempty"`
}

StorageInstanceResults holds the result of an API call to retrieve details of multiple storage instances.

type StorageKind

type StorageKind int

StorageKind is the kind of a storage instance.

const (
	StorageKindUnknown StorageKind = iota
	StorageKindBlock
	StorageKindFilesystem
)

func (*StorageKind) String

func (k *StorageKind) String() string

String returns representation of StorageKind for readability.

type StoragePool

type StoragePool struct {
	// Name is the pool's name.
	Name string `json:"name"`

	// Provider is the type of storage provider this pool represents, eg "loop", "ebs".
	Provider string `json:"provider"`

	// Attrs are the pool's configuration attributes.
	Attrs map[string]interface{} `json:"attrs"`
}

StoragePool holds data for a pool instance.

type StoragePoolArgs

type StoragePoolArgs struct {
	Pools []StoragePool `json:"pools"`
}

StoragePoolArgs contains a set of StoragePool.

type StoragePoolDeleteArg

type StoragePoolDeleteArg struct {
	Name string `json:"name"`
}

StoragePoolDeleteArg holds data for a pool instance to be deleted.

type StoragePoolDeleteArgs

type StoragePoolDeleteArgs struct {
	Pools []StoragePoolDeleteArg `json:"pools"`
}

StoragePoolDeleteArgs contains a set of StorageDeleteArg.

type StoragePoolFilter

type StoragePoolFilter struct {
	// Names are pool's names to filter on.
	Names []string `json:"names,omitempty"`

	// Providers are pool's storage provider types to filter on.
	Providers []string `json:"providers,omitempty"`
}

StoragePoolFilter holds a filter for matching storage pools.

type StoragePoolFilters

type StoragePoolFilters struct {
	Filters []StoragePoolFilter `json:"filters,omitempty"`
}

StoragePoolFilters holds a collection of storage pool filters.

type StoragePoolsResult

type StoragePoolsResult struct {
	Result []StoragePool `json:"storage-pools,omitempty"`
	Error  *Error        `json:"error,omitempty"`
}

StoragePoolsResult holds a collection of storage pools.

type StoragePoolsResults

type StoragePoolsResults struct {
	Results []StoragePoolsResult `json:"results,omitempty"`
}

StoragePoolsResults holds a collection of storage pools results.

type StoragesAddParams

type StoragesAddParams struct {
	Storages []StorageAddParams `json:"storages"`
}

StoragesAddParams holds storage details to add to units dynamically.

type StringBoolResult

type StringBoolResult struct {
	Error  *Error `json:"error,omitempty"`
	Result string `json:"result"`
	Ok     bool   `json:"ok"`
}

StringBoolResult holds the result of an API call that returns a string and a boolean.

type StringBoolResults

type StringBoolResults struct {
	Results []StringBoolResult `json:"results"`
}

StringBoolResults holds multiple results with a string and a bool each.

type StringResult

type StringResult struct {
	Error  *Error `json:"error,omitempty"`
	Result string `json:"result"`
}

StringResult holds a string or an error.

type StringResults

type StringResults struct {
	Results []StringResult `json:"results"`
}

StringResults holds the bulk operation result of an API call that returns a string or an error.

type StringsResult

type StringsResult struct {
	Error  *Error   `json:"error,omitempty"`
	Result []string `json:"result,omitempty"`
}

StringsResult holds the result of an API call that returns a slice of strings or an error.

type StringsResults

type StringsResults struct {
	Results []StringsResult `json:"results"`
}

StringsResults holds the bulk operation result of an API call that returns a slice of strings or an error.

type StringsWatchResult

type StringsWatchResult struct {
	StringsWatcherId string   `json:"watcher-id"`
	Changes          []string `json:"changes,omitempty"`
	Error            *Error   `json:"error,omitempty"`
}

StringsWatchResult holds a StringsWatcher id, changes and an error (if any).

type StringsWatchResults

type StringsWatchResults struct {
	Results []StringsWatchResult `json:"results"`
}

StringsWatchResults holds the results for any API call which ends up returning a list of StringsWatchers.

type Subnet

type Subnet struct {
	// CIDR of the subnet in IPv4 or IPv6 notation.
	CIDR string `json:"cidr"`

	// ProviderId is the provider-specific subnet ID (if applicable).
	ProviderId string `json:"provider-id,omitempty"`

	// ProviderNetworkId is the id of the network containing this
	// subnet from the provider's perspective. It can be empty if the
	// provider doesn't support distinct networks.
	ProviderNetworkId string `json:"provider-network-id,omitempty"`

	// ProviderSpaceId is the id of the space containing this subnet
	// from the provider's perspective. It can be empty if the
	// provider doesn't support spaces (in which case all subnets are
	// effectively in the default space).
	ProviderSpaceId string `json:"provider-space-id,omitempty"`

	// VLANTag needs to be between 1 and 4094 for VLANs and 0 for
	// normal networks. It's defined by IEEE 802.1Q standard.
	VLANTag int `json:"vlan-tag"`

	// Life is the subnet's life cycle value - Alive means the subnet
	// is in use by one or more machines, Dying or Dead means the
	// subnet is about to be removed.
	Life life.Value `json:"life"`

	// SpaceTag is the Juju network space this subnet is associated
	// with.
	SpaceTag string `json:"space-tag"`

	// Zones contain one or more availability zones this subnet is
	// associated with.
	Zones []string `json:"zones"`

	// Status returns the status of the subnet, whether it is in use, not
	// in use or terminating.
	Status string `json:"status,omitempty"`
}

Subnet describes a single subnet within a network.

type SubnetV2

type SubnetV2 struct {
	Subnet

	// ID uniquely identifies the subnet.
	ID string `json:"id,omitempty"`
}

SubnetV2 is used by versions of spaces/subnets APIs that must include subnet ID in payloads.

type SubnetV3

type SubnetV3 struct {
	SubnetV2

	SpaceID  string          `json:"space-id"`
	FanInfo  *FanConfigEntry `json:"fan-info,omitempty"`
	IsPublic bool            `json:"is-public,omitempty"`
}

SubnetV3 is used by the SpaceInfos API call. Its payload matches the fields of the core/network.SubnetInfo struct.

type SubnetsFilters

type SubnetsFilters struct {
	SpaceTag string `json:"space-tag,omitempty"`
	Zone     string `json:"zone,omitempty"`
}

SubnetsFilters holds an optional SpaceTag and Zone for filtering the subnets returned by a ListSubnets call.

type SubnetsResult

type SubnetsResult struct {
	Subnets []SubnetV2 `json:"subnets,omitempty"`
	Error   *Error     `json:"error,omitempty"`
}

SubnetsResult contains a collection of subnets or an error.

type SubnetsResults

type SubnetsResults struct {
	Results []SubnetsResult `json:"results"`
}

SubnetsResults contains a collection of subnets results.

type SummaryWatcherID

type SummaryWatcherID struct {
	WatcherID string `json:"watcher-id"`
}

SummaryWatcherID holds the id of a model summary watcher.

type SummaryWatcherNextResults

type SummaryWatcherNextResults struct {
	Models []ModelAbstract `json:"models"`
}

SummaryWatcherNextResults holds deltas returned from calling AllWatcher.Next().

type SupportedFeature

type SupportedFeature struct {
	Name        string `json:"name"`
	Description string `json:"description"`

	// Version is optional; some features might simply be booleans with
	// no particular version attached.
	Version string `json:"version,omitempty"`
}

SupportedFeature describes a feature that is supported by a particular model.

type TaggedCredential

type TaggedCredential struct {
	Tag        string          `json:"tag"`
	Credential CloudCredential `json:"credential"`
}

TaggedCredential contains a cloud credential and its tag.

type TaggedCredentials

type TaggedCredentials struct {
	Credentials []TaggedCredential `json:"credentials,omitempty"`
}

TaggedCredentials contains a set of tagged cloud credentials.

type TokenResult

type TokenResult struct {
	Token string `json:"token,omitempty"`
	Error *Error `json:"error,omitempty"`
}

TokenResult holds a token and an error.

type TokenResults

type TokenResults struct {
	Results []TokenResult `json:"results,omitempty"`
}

TokenResults has a set of token results.

type ToolsResult

type ToolsResult struct {
	ToolsList tools.List `json:"tools"`
	Error     *Error     `json:"error,omitempty"`
}

ToolsResult holds the tools and possibly error for a given Tools() API call.

type ToolsResults

type ToolsResults struct {
	Results []ToolsResult `json:"results"`
}

ToolsResults is a list of tools for various requested agents.

type TrackPayloadArgs

type TrackPayloadArgs struct {
	// Payloads is the list of Payloads to track
	Payloads []Payload `json:"payloads"`
}

TrackPayloadArgs are the arguments for the PayloadsHookContext.Track endpoint.

type UndertakerModelInfo

type UndertakerModelInfo struct {
	UUID           string         `json:"uuid"`
	Name           string         `json:"name"`
	GlobalName     string         `json:"global-name"`
	IsSystem       bool           `json:"is-system"`
	Life           life.Value     `json:"life"`
	ForceDestroyed bool           `json:"force-destroyed,omitempty"`
	DestroyTimeout *time.Duration `json:"destroy-timeout,omitempty"`
}

UndertakerModelInfo returns information on an model needed by the undertaker worker.

type UndertakerModelInfoResult

type UndertakerModelInfoResult struct {
	Error  *Error              `json:"error,omitempty"`
	Result UndertakerModelInfo `json:"result"`
}

UndertakerModelInfoResult holds the result of an API call that returns an UndertakerModelInfoResult or an error.

type UnitInfo

type UnitInfo struct {
	ModelUUID      string      `json:"model-uuid"`
	Name           string      `json:"name"`
	Application    string      `json:"application"`
	Series         string      `json:"series"`
	CharmURL       string      `json:"charm-url"`
	Life           life.Value  `json:"life"`
	PublicAddress  string      `json:"public-address"`
	PrivateAddress string      `json:"private-address"`
	MachineId      string      `json:"machine-id"`
	Ports          []Port      `json:"ports"`
	PortRanges     []PortRange `json:"port-ranges"`
	Principal      string      `json:"principal"`
	Subordinate    bool        `json:"subordinate"`
	// Workload and agent state are modelled separately.
	WorkloadStatus StatusInfo `json:"workload-status"`
	AgentStatus    StatusInfo `json:"agent-status"`
}

UnitInfo holds the information about a unit that is tracked by multiwatcherStore.

func (*UnitInfo) EntityId

func (i *UnitInfo) EntityId() EntityId

EntityId returns a unique identifier for a unit across models.

type UnitInfoResult

type UnitInfoResult struct {
	Result *UnitResult `json:"result,omitempty"`
	Error  *Error      `json:"error,omitempty"`
}

UnitInfoResults holds an unit info result or a retrieval error.

type UnitInfoResults

type UnitInfoResults struct {
	Results []UnitInfoResult `json:"results"`
}

UnitInfoResults holds units associated with entities.

type UnitNetworkConfigResult

type UnitNetworkConfigResult struct {
	Error *Error `json:"error,omitempty"`

	// Tagged to Info due to compatibility reasons.
	Config []NetworkConfig `json:"info"`
}

UnitNetworkConfigResult holds network configuration for a single unit.

type UnitNetworkConfigResults

type UnitNetworkConfigResults struct {
	Results []UnitNetworkConfigResult `json:"results"`
}

UnitNetworkConfigResults holds network configuration for multiple units.

type UnitRefreshResult

type UnitRefreshResult struct {
	Life       life.Value
	Resolved   ResolvedMode
	Error      *Error
	ProviderID string `json:"provider-id,omitempty"`
}

UnitRefreshResult is used to return the latest values for attributes on a unit.

type UnitRefreshResults

type UnitRefreshResults struct {
	Results []UnitRefreshResult
}

UnitRefreshResults holds the results for any API call which ends up returning a list of UnitRefreshResult.

type UnitResourceResult

type UnitResourceResult struct {
	ErrorResult

	// Resource is the info for the requested resource.
	Resource Resource `json:"resource"`
}

UnitResourceResult is the result for a single requested resource.

type UnitResources

type UnitResources struct {
	Entity

	// Resources is a list of resources for the unit.
	Resources []Resource `json:"resources"`

	// DownloadProgress indicates the number of bytes of a resource file
	// have been downloaded so far the uniter. Only currently downloading
	// resources are included.
	DownloadProgress map[string]int64 `json:"download-progress"`
}

A UnitResources contains a list of the resources the unit defined by Entity.

type UnitResourcesResult

type UnitResourcesResult struct {
	ErrorResult

	// Resources is the list of results for the requested resources,
	// in the same order as requested.
	Resources []UnitResourceResult `json:"resources"`
}

UnitResourcesResult holds the resource info for a list of requested resources.

type UnitResult

type UnitResult struct {
	Tag             string                 `json:"tag"`
	WorkloadVersion string                 `json:"workload-version"`
	Machine         string                 `json:"machine,omitempty"`
	OpenedPorts     []string               `json:"opened-ports"`
	PublicAddress   string                 `json:"public-address,omitempty"`
	Charm           string                 `json:"charm"`
	Leader          bool                   `json:"leader,omitempty"`
	RelationData    []EndpointRelationData `json:"relation-data,omitempty"`

	// The following are for CAAS models.
	ProviderId string `json:"provider-id,omitempty"`
	Address    string `json:"address,omitempty"`
}

UnitResult holds unit info.

type UnitSettings

type UnitSettings struct {
	Version int64 `json:"version"`
}

UnitSettings specifies the version of some unit's settings in some relation.

type UnitStateResult

type UnitStateResult struct {
	Error *Error `json:"error,omitempty"`
	// Charm state set by the unit via hook tool.
	CharmState map[string]string `json:"charm-state,omitempty"`
	// Uniter internal state for this unit.
	UniterState string `json:"uniter-state,omitempty"`
	// RelationState is a internal relation state for this unit.
	RelationState map[int]string `json:"relation-state,omitempty"`
	// StorageState is a internal storage state for this unit.
	StorageState string `json:"storage-state,omitempty"`
	// MeterStatusState encodes the meter status state for this unit.
	MeterStatusState string `json:"meter-status-state,omitempty"`
}

UnitStateResult holds a unit's state map or an error.

type UnitStateResults

type UnitStateResults struct {
	Results []UnitStateResult `json:"results"`
}

UnitStateResults holds multiple unit state maps or errors.

type UnitStatus

type UnitStatus struct {
	// AgentStatus holds the status for a unit's agent.
	AgentStatus DetailedStatus `json:"agent-status"`

	// WorkloadStatus holds the status for a unit's workload.
	WorkloadStatus  DetailedStatus `json:"workload-status"`
	WorkloadVersion string         `json:"workload-version"`

	Machine       string                `json:"machine"`
	OpenedPorts   []string              `json:"opened-ports"`
	PublicAddress string                `json:"public-address"`
	Charm         string                `json:"charm"`
	Subordinates  map[string]UnitStatus `json:"subordinates"`
	Leader        bool                  `json:"leader,omitempty"`

	// The following are for CAAS models.
	ProviderId string `json:"provider-id,omitempty"`
	Address    string `json:"address,omitempty"`
}

UnitStatus holds status info about a unit.

type UnitsGoalState

type UnitsGoalState map[string]GoalStateStatus

UnitsGoalState collection of GoalStatesStatus with unit name

type UnitsResolved

type UnitsResolved struct {
	Tags  Entities `json:"tags,omitempty"`
	Retry bool     `json:"retry,omitempty"`
	All   bool     `json:"all,omitempty"`
}

UnitsResolved holds parameters for the ResolveUnitErrors call.

type UnsetModelDefaults

type UnsetModelDefaults struct {
	Keys []ModelUnsetKeys `json:"keys"`
}

UnsetModelDefaults contains the arguments for UnsetModelDefaults client API call.

type UpdateApplicationServiceArg

type UpdateApplicationServiceArg struct {
	ApplicationTag string    `json:"application-tag"`
	ProviderId     string    `json:"provider-id"`
	Addresses      []Address `json:"addresses"`

	Scale      *int   `json:"scale,omitempty"`
	Generation *int64 `json:"generation,omitempty"`
}

UpdateApplicationServiceArg holds parameters used to update an application's service definition for the cloud.

type UpdateApplicationServiceArgs

type UpdateApplicationServiceArgs struct {
	Args []UpdateApplicationServiceArg `json:"args"`
}

UpdateApplicationServiceArgs holds the parameters for updating application services.

type UpdateApplicationUnitArgs

type UpdateApplicationUnitArgs struct {
	Args []UpdateApplicationUnits `json:"args"`
}

UpdateApplicationUnitArgs holds the parameters for updating application units.

type UpdateApplicationUnitResult

type UpdateApplicationUnitResult struct {
	Info  *UpdateApplicationUnitsInfo `json:"info,omitempty"`
	Error *Error                      `json:"error,omitempty"`
}

UpdateApplicationUnitResult holds a single result from UpdateApplicationUnits

type UpdateApplicationUnitResults

type UpdateApplicationUnitResults struct {
	Results []UpdateApplicationUnitResult `json:"results"`
}

UpdateApplicationUnitResults holds results from UpdateApplicationUnits

type UpdateApplicationUnits

type UpdateApplicationUnits struct {
	ApplicationTag string                  `json:"application-tag"`
	Scale          *int                    `json:"scale,omitempty"`
	Generation     *int64                  `json:"generation,omitempty"`
	Status         EntityStatus            `json:"status,omitempty"`
	Units          []ApplicationUnitParams `json:"units"`
}

UpdateApplicationUnits holds unit parameters for a specified application.

type UpdateApplicationUnitsInfo

type UpdateApplicationUnitsInfo struct {
	Units []ApplicationUnitInfo `json:"units"`
}

UpdateApplicationUnitsInfo holds info about the application units after a call to UpdateApplicationUnits

type UpdateBehavior

type UpdateBehavior struct {
	EnableOSRefreshUpdate bool `json:"enable-os-refresh-update"`
	EnableOSUpgrade       bool `json:"enable-os-upgrade"`
}

UpdateBehavior contains settings that are duplicated in several places. Let's just embed this instead.

type UpdateCloudArgs

type UpdateCloudArgs struct {
	Clouds []AddCloudArgs `json:"clouds"`
}

UpdateCloudArgs holds a cloud to be updated with its name.

type UpdateControllerForModel

type UpdateControllerForModel struct {
	// ModelTag identifies the model for which to change the
	// external controller info
	ModelTag string `json:"model-tag"`

	// Info is the new controller info for the accompanying model.
	Info ExternalControllerInfo `json:"info"`
}

UpdateControllerForModel contains the parameters for setting a new external controller for the supplied model.

type UpdateControllersForModelsParams

type UpdateControllersForModelsParams struct {
	// Changes is a collection of model tag and new controller info.
	Changes []UpdateControllerForModel `json:"changes"`
}

UpdateControllersForModelsParams contains the parameters for setting new external controllers for the associated models.

type UpdateCredentialArgs

type UpdateCredentialArgs struct {
	// Credentials holds credentials to update.
	Credentials []TaggedCredential `json:"credentials"`

	// Force indicates whether the update should be forced.
	Force bool `json:"force"`
}

UpdateCredentialArgs contains a TaggedCredential set and is used in the call to update credentials.

type UpdateCredentialModelResult

type UpdateCredentialModelResult struct {
	// ModelUUID contains model's UUID.
	ModelUUID string `json:"uuid"`

	// ModelName contains model name.
	ModelName string `json:"name"`

	// Errors contains the errors accumulated while trying to update a credential.
	Errors []ErrorResult `json:"errors,omitempty"`
}

UpdateCredentialModelResult contains results for a model credential validation check from a cloud credential update.

type UpdateCredentialResult

type UpdateCredentialResult struct {
	// CredentialTag holds credential tag.
	CredentialTag string `json:"tag"`

	// Errors contains an error that may have occurred while trying to update a credential.
	Error *Error `json:"error,omitempty"`

	// Models contains results of credential check against models that use this cloud credential.
	Models []UpdateCredentialModelResult `json:"models,omitempty"`
}

UpdateCredentialResult stores the result of updating one cloud credential.

type UpdateCredentialResults

type UpdateCredentialResults struct {
	Results []UpdateCredentialResult `json:"results,omitempty"`
}

UpdateCredentialResults contains a set of UpdateCredentialResult.

type UpdateSecretArg

type UpdateSecretArg struct {
	// URL identifies the secret to update.
	URL string `json:"url"`
	// RotateInterval is how often a secret should be rotated.
	RotateInterval *time.Duration `json:"rotate-interval"`
	// Status represents the secret's status.
	Status *string `json:"status"`
	// Description represents the secret's description.
	Description *string `json:"description,omitempty"`
	// Tags are the secret tags.
	Tags *map[string]string `json:"tags,omitempty"`
	// Params are used when generating secrets server side.
	// See core/secrets/secret.go.
	Params map[string]interface{} `json:"params,omitempty"`
	// Data is the key values of the secret value itself.
	// Use an empty value to keep the current value.
	Data map[string]string `json:"data,omitempty"`
}

UpdateSecretArg holds the args for creating a secret.

type UpdateSecretArgs

type UpdateSecretArgs struct {
	Args []UpdateSecretArg `json:"args"`
}

UpdateSecretArgs holds args for creating secrets.

type UpdateSeriesArg

type UpdateSeriesArg struct {
	Entity Entity `json:"tag"`
	Force  bool   `json:"force"`
	Series string `json:"series"`
}

UpdateSeriesArg holds the parameters for updating the series for the specified application or machine. For Application, only known by facade version 5 and greater. For MachineManger, only known by facade version 4 or greater.

type UpdateSeriesArgs

type UpdateSeriesArgs struct {
	Args []UpdateSeriesArg `json:"args"`
}

UpdateSeriesArgs holds the parameters for updating the series of one or more applications or machines. For Application, only known by facade version 5 and greater. For MachineManger, only known by facade version 4 or greater.

type UpgradeCharmProfileStatusResult

type UpgradeCharmProfileStatusResult struct {
	Error  *Error `json:"error,omitempty"`
	Status string `json:"status,omitempty"`
}

UpgradeCharmProfileStatusResult contains the lxd profile status result for an upgrading machine or container.

type UpgradeCharmProfileStatusResults

type UpgradeCharmProfileStatusResults struct {
	Results []UpgradeCharmProfileStatusResult `json:"results,omitempty"`
}

UpgradeCharmProfileStatusResults contains the lxd profile status results for upgrading machines or container.

type UpgradeSeriesNotificationParam

type UpgradeSeriesNotificationParam struct {
	Entity    Entity `json:"entity"`
	WatcherId string `json:"watcher-id"`
}

type UpgradeSeriesNotificationParams

type UpgradeSeriesNotificationParams struct {
	Params []UpgradeSeriesNotificationParam `json:"params"`
}

type UpgradeSeriesStartUnitCompletionParam

type UpgradeSeriesStartUnitCompletionParam struct {
	Entities []Entity `json:"entities"`
	Message  string   `json:"message"`
}

UpgradeSeriesStartUnitCompletionParam contains entities and a context message.

type UpgradeSeriesStatusParam

type UpgradeSeriesStatusParam struct {
	Entity  Entity                    `json:"entity"`
	Status  model.UpgradeSeriesStatus `json:"status"`
	Message string                    `json:"message"`
}

UpgradeSeriesStatusParam contains the entity and desired status for that entity along with a context message describing why the change to the status is being requested.

type UpgradeSeriesStatusParams

type UpgradeSeriesStatusParams struct {
	Params []UpgradeSeriesStatusParam `json:"params"`
}

UpgradeSeriesStatusParams contains the entities and desired statuses for those entities.

type UpgradeSeriesStatusResult

type UpgradeSeriesStatusResult struct {
	Error  *Error                    `json:"error,omitempty"`
	Status model.UpgradeSeriesStatus `json:"status,omitempty"`
	Target string                    `json:"target,omitempty"`
}

UpgradeSeriesStatusResult contains the upgrade series status result for an upgrading machine or unit

type UpgradeSeriesStatusResults

type UpgradeSeriesStatusResults struct {
	Results []UpgradeSeriesStatusResult `json:"results,omitempty"`
}

UpgradeSeriesStatusResults contains the upgrade series status results for upgrading machines or units.

type UpgradeSeriesUnitsResult

type UpgradeSeriesUnitsResult struct {
	Error     *Error   `json:"error,omitempty"`
	UnitNames []string `json:"unit-names"`
}

UpgradeSeriesUnitsResults contains the units affected by a series for a given machine.

type UpgradeSeriesUnitsResults

type UpgradeSeriesUnitsResults struct {
	Results []UpgradeSeriesUnitsResult
}

UpgradeSeriesUnitsResults contains the units affected by a series per machine entity.

type UpgradeSeriesValidationErrorInfo

type UpgradeSeriesValidationErrorInfo struct {
	Status string
}

func (UpgradeSeriesValidationErrorInfo) AsMap

func (e UpgradeSeriesValidationErrorInfo) AsMap() map[string]interface{}

AsMap encodes the error info as a map that can be attached to an Error.

type UploadResult

type UploadResult struct {
	ErrorResult

	// Resource describes the resource that was stored in the model.
	Resource Resource `json:"resource"`
}

UploadResult is the response from an upload request.

type UserAccess

type UserAccess struct {
	UserTag string `json:"user-tag"`
	Access  string `json:"access"`
}

UserAccess holds the level of access a user has on a controller or model.

type UserAccessPermission

type UserAccessPermission string

UserAccessPermission is the type of permission that a user has to access a model.

const (
	ModelAdminAccess UserAccessPermission = "admin"
	ModelReadAccess  UserAccessPermission = "read"
	ModelWriteAccess UserAccessPermission = "write"
)

Model access permissions that may be set on a user.

type UserAccessResult

type UserAccessResult struct {
	Result *UserAccess `json:"result,omitempty"`
	Error  *Error      `json:"error,omitempty"`
}

UserAccessResult holds an access level for a user, or an error.

type UserAccessResults

type UserAccessResults struct {
	Results []UserAccessResult `json:"results,omitempty"`
}

UserAccessResults holds the results of an api call to look up access for users.

type UserCloud

type UserCloud struct {
	UserTag  string `json:"user-tag"`
	CloudTag string `json:"cloud-tag"`
}

UserCloud contains a user/cloud tag pair, typically used for identifying a user's credentials for a cloud.

type UserClouds

type UserClouds struct {
	UserClouds []UserCloud `json:"user-clouds,omitempty"`
}

UserClouds contains a set of UserClouds.

type UserInfo

type UserInfo struct {
	Username       string     `json:"username"`
	DisplayName    string     `json:"display-name"`
	Access         string     `json:"access"`
	CreatedBy      string     `json:"created-by"`
	DateCreated    time.Time  `json:"date-created"`
	LastConnection *time.Time `json:"last-connection,omitempty"`
	Disabled       bool       `json:"disabled"`
}

UserInfo holds information on a user.

type UserInfoRequest

type UserInfoRequest struct {
	Entities        []Entity `json:"entities"`
	IncludeDisabled bool     `json:"include-disabled"`
}

UserInfoRequest defines the users to return. An empty Entities list indicates that all matching users should be returned.

type UserInfoResult

type UserInfoResult struct {
	Result *UserInfo `json:"result,omitempty"`
	Error  *Error    `json:"error,omitempty"`
}

UserInfoResult holds the result of a UserInfo call.

type UserInfoResults

type UserInfoResults struct {
	Results []UserInfoResult `json:"results"`
}

UserInfoResults holds the result of a bulk UserInfo API call.

type UserModel

type UserModel struct {
	Model          `json:"model"`
	LastConnection *time.Time `json:"last-connection"`
}

UserModel holds information about a model and the last time the model was accessed for a particular user.

type UserModelList

type UserModelList struct {
	UserModels []UserModel `json:"user-models"`
}

UserModelList holds information about a list of models for a particular user.

type ValidateCredentialArg

type ValidateCredentialArg struct {
	CredentialTag string `json:"tag"`
	Valid         bool   `json:"valid"`
	Reason        string `json:"reason,omitempty"`
}

ValidateCredentialArg contains collection of cloud credentials identified by their tags to mark as valid or not.

type ValidateCredentialArgs

type ValidateCredentialArgs struct {
	All []ValidateCredentialArg `json:"credentials,omitempty"`
}

ValidateCredentialArgs contains a set of ValidateCredentialArg.

type ValidateModelUpgradeParam

type ValidateModelUpgradeParam struct {
	// ModelTag is a tag for the model that you want to upgrade.
	ModelTag string `json:"model-tag"`
}

ValidateModelUpgradeParam is used to identify which model needs to be checked for upgrading.

type ValidateModelUpgradeParams

type ValidateModelUpgradeParams struct {
	Models []ValidateModelUpgradeParam `json:"model"`
	Force  bool                        `json:"force"`
}

ValidateModelUpgradeParams is used to ensure that a model can be upgraded.

type Version

type Version struct {
	Version version.Binary `json:"version"`
}

Version holds a specific binary version.

type VersionResult

type VersionResult struct {
	Version *version.Number `json:"version,omitempty"`
	Error   *Error          `json:"error,omitempty"`
}

VersionResult holds the version and possibly error for a given DesiredVersion() API call.

type VersionResults

type VersionResults struct {
	Results []VersionResult `json:"results"`
}

VersionResults is a list of versions for the requested entities.

type Volume

type Volume struct {
	VolumeTag string     `json:"volume-tag"`
	Info      VolumeInfo `json:"info"`
}

Volume identifies and describes a storage volume in the model.

type VolumeAttachment

type VolumeAttachment struct {
	VolumeTag  string               `json:"volume-tag"`
	MachineTag string               `json:"machine-tag"`
	Info       VolumeAttachmentInfo `json:"info"`
}

VolumeAttachment identifies and describes a volume attachment.

type VolumeAttachmentDetails

type VolumeAttachmentDetails struct {
	// NOTE(axw) for backwards-compatibility, this must not be given a
	// json tag. This ensures that we collapse VolumeAttachmentInfo.
	//
	// TODO(axw) when we can break backwards-compatibility (Juju 3.0),
	// give this a field name of "info", like we have in VolumeDetails
	// above.
	VolumeAttachmentInfo

	// Life contains the lifecycle state of the volume attachment.
	// Juju controllers older than 2.2 do not populate this
	// field, so it may be omitted.
	Life life.Value `json:"life,omitempty"`
}

VolumeAttachmentDetails describes a volume attachment.

type VolumeAttachmentInfo

type VolumeAttachmentInfo struct {
	DeviceName string                    `json:"device-name,omitempty"`
	DeviceLink string                    `json:"device-link,omitempty"`
	BusAddress string                    `json:"bus-address,omitempty"`
	ReadOnly   bool                      `json:"read-only,omitempty"`
	PlanInfo   *VolumeAttachmentPlanInfo `json:"plan-info,omitempty"`
}

VolumeAttachmentInfo describes a volume attachment.

type VolumeAttachmentParams

type VolumeAttachmentParams struct {
	VolumeTag  string `json:"volume-tag"`
	MachineTag string `json:"machine-tag"`
	VolumeId   string `json:"volume-id,omitempty"`
	InstanceId string `json:"instance-id,omitempty"`
	Provider   string `json:"provider"`
	ReadOnly   bool   `json:"read-only,omitempty"`
}

VolumeAttachmentParams holds the parameters for creating a volume attachment.

type VolumeAttachmentParamsResult

type VolumeAttachmentParamsResult struct {
	Result VolumeAttachmentParams `json:"result"`
	Error  *Error                 `json:"error,omitempty"`
}

VolumeAttachmentParamsResult holds provisioning parameters for a volume attachment.

type VolumeAttachmentParamsResults

type VolumeAttachmentParamsResults struct {
	Results []VolumeAttachmentParamsResult `json:"results,omitempty"`
}

VolumeAttachmentParamsResults holds provisioning parameters for multiple volume attachments.

type VolumeAttachmentPlan

type VolumeAttachmentPlan struct {
	VolumeTag  string                   `json:"volume-tag"`
	MachineTag string                   `json:"machine-tag"`
	Life       life.Value               `json:"life,omitempty"`
	PlanInfo   VolumeAttachmentPlanInfo `json:"plan-info"`
	// BlockDevice should only be set by machine agents after
	// the AttachVolume() function is called. It represents the machines
	// view of the block device represented by the plan.
	BlockDevice storage.BlockDevice `json:"block-device,omitempty"`
}

VolumeAttachmentPlan identifies and describes a volume attachment plan.

type VolumeAttachmentPlanInfo

type VolumeAttachmentPlanInfo struct {
	DeviceType       storage.DeviceType `json:"device-type,omitempty"`
	DeviceAttributes map[string]string  `json:"device-attributes,omitempty"`
}

VolumeAttachmentPlanInfo describes info needed by machine agents to initialize attached volumes

type VolumeAttachmentPlanResult

type VolumeAttachmentPlanResult struct {
	Result VolumeAttachmentPlan `json:"result"`
	Error  *Error               `json:"error,omitempty"`
}

VolumeAttachmentPlanResult holds the details of a single volume attachment plan, or an error.

type VolumeAttachmentPlanResults

type VolumeAttachmentPlanResults struct {
	Results []VolumeAttachmentPlanResult `json:"results,omitempty"`
}

VolumeAttachmentPlanResults holds a set of VolumeAttachmentPlanResult.

type VolumeAttachmentPlans

type VolumeAttachmentPlans struct {
	VolumeAttachmentPlans []VolumeAttachmentPlan `json:"volume-plans"`
}

type VolumeAttachmentResult

type VolumeAttachmentResult struct {
	Result VolumeAttachment `json:"result"`
	Error  *Error           `json:"error,omitempty"`
}

VolumeAttachmentResult holds the details of a single volume attachment, or an error.

type VolumeAttachmentResults

type VolumeAttachmentResults struct {
	Results []VolumeAttachmentResult `json:"results,omitempty"`
}

VolumeAttachmentResults holds a set of VolumeAttachmentResults.

type VolumeAttachments

type VolumeAttachments struct {
	VolumeAttachments []VolumeAttachment `json:"volume-attachments"`
}

VolumeAttachments describes a set of storage volume attachments.

type VolumeAttachmentsResult

type VolumeAttachmentsResult struct {
	Attachments []VolumeAttachment `json:"attachments,omitempty"`
	Error       *Error             `json:"error,omitempty"`
}

VolumeAttachmentsResult holds the volume attachments for a single machine, or an error.

type VolumeAttachmentsResults

type VolumeAttachmentsResults struct {
	Results []VolumeAttachmentsResult `json:"results,omitempty"`
}

VolumeAttachmentsResults holds a set of VolumeAttachmentsResults for a set of machines.

type VolumeDetails

type VolumeDetails struct {
	// VolumeTag is the tag for the volume.
	VolumeTag string `json:"volume-tag"`

	// Info contains information about the volume.
	Info VolumeInfo `json:"info"`

	// Life contains the lifecycle state of the volume.
	// Juju controllers older than 2.2 do not populate this
	// field, so it may be omitted.
	Life life.Value `json:"life,omitempty"`

	// Status contains the status of the volume.
	Status EntityStatus `json:"status"`

	// MachineAttachments contains a mapping from
	// machine tag to volume attachment information.
	MachineAttachments map[string]VolumeAttachmentDetails `json:"machine-attachments,omitempty"`

	// UnitAttachments contains a mapping from
	// unit tag to volume attachment information (CAAS models).
	UnitAttachments map[string]VolumeAttachmentDetails `json:"unit-attachments,omitempty"`

	// Storage contains details about the storage instance
	// that the volume is assigned to, if any.
	Storage *StorageDetails `json:"storage,omitempty"`
}

VolumeDetails describes a storage volume in the model for the purpose of volume CLI commands.

This is kept separate from Volume which contains only information specific to the volume model, whereas VolumeDetails is intended to contain complete information about a volume and related information (status, attachments, storage).

type VolumeDetailsListResult

type VolumeDetailsListResult struct {
	Result []VolumeDetails `json:"result,omitempty"`
	Error  *Error          `json:"error,omitempty"`
}

VolumeDetailsListResult holds a collection of volume details.

type VolumeDetailsListResults

type VolumeDetailsListResults struct {
	Results []VolumeDetailsListResult `json:"results,omitempty"`
}

VolumeDetailsListResults holds a collection of collections of volume details.

type VolumeDetailsResult

type VolumeDetailsResult struct {
	// Result describes the volume in detail.
	Result *VolumeDetails `json:"details,omitempty"`

	// Error contains volume retrieval error.
	Error *Error `json:"error,omitempty"`
}

VolumeDetailsResult contains details about a volume, its attachments or an error preventing retrieving those details.

type VolumeDetailsResults

type VolumeDetailsResults struct {
	Results []VolumeDetailsResult `json:"results,omitempty"`
}

VolumeDetailsResults holds volume details.

type VolumeFilter

type VolumeFilter struct {
	// Machines are machine tags to filter on.
	Machines []string `json:"machines,omitempty"`
}

VolumeFilter holds a filter for volume list API call.

func (*VolumeFilter) IsEmpty

func (f *VolumeFilter) IsEmpty() bool

IsEmpty determines if filter is empty

type VolumeFilters

type VolumeFilters struct {
	Filters []VolumeFilter `json:"filters,omitempty"`
}

VolumeFilters holds a collection of volume filters.

type VolumeInfo

type VolumeInfo struct {
	VolumeId   string `json:"volume-id"`
	HardwareId string `json:"hardware-id,omitempty"`
	WWN        string `json:"wwn,omitempty"`
	// Pool is the name of the storage pool used to
	// allocate the volume. Juju controllers older
	// than 2.2 do not populate this field, so it may
	// be omitted.
	Pool string `json:"pool,omitempty"`
	// Size is the size of the volume in MiB.
	Size       uint64 `json:"size"`
	Persistent bool   `json:"persistent"`
}

VolumeInfo describes a storage volume in the model.

type VolumeParams

type VolumeParams struct {
	VolumeTag  string                  `json:"volume-tag"`
	Size       uint64                  `json:"size"`
	Provider   string                  `json:"provider"`
	Attributes map[string]interface{}  `json:"attributes,omitempty"`
	Tags       map[string]string       `json:"tags,omitempty"`
	Attachment *VolumeAttachmentParams `json:"attachment,omitempty"`
}

VolumeParams holds the parameters for creating a storage volume.

type VolumeParamsResult

type VolumeParamsResult struct {
	Result VolumeParams `json:"result"`
	Error  *Error       `json:"error,omitempty"`
}

VolumeParamsResult holds provisioning parameters for a volume.

type VolumeParamsResults

type VolumeParamsResults struct {
	Results []VolumeParamsResult `json:"results,omitempty"`
}

VolumeParamsResults holds provisioning parameters for multiple volumes.

type VolumeResult

type VolumeResult struct {
	Result Volume `json:"result"`
	Error  *Error `json:"error,omitempty"`
}

VolumeResult holds information about a volume.

type VolumeResults

type VolumeResults struct {
	Results []VolumeResult `json:"results,omitempty"`
}

VolumeResults holds information about multiple volumes.

type Volumes

type Volumes struct {
	Volumes []Volume `json:"volumes"`
}

Volumes describes a set of storage volumes in the model.

type WatchContainer

type WatchContainer struct {
	MachineTag    string `json:"machine-tag"`
	ContainerType string `json:"container-type"`
}

WatchContainer identifies a single container type within a machine.

type WatchContainerStartArg

type WatchContainerStartArg struct {
	Entity    Entity `json:"entity"`
	Container string `json:"container,omitempty"`
}

WatchContainerStartArg contains arguments for watching for container start events on a CAAS application.

type WatchContainerStartArgs

type WatchContainerStartArgs struct {
	Args []WatchContainerStartArg `json:"args"`
}

WatchContainerStartArgs holds the details to watch many containers for start events.

type WatchContainers

type WatchContainers struct {
	Params []WatchContainer `json:"params"`
}

WatchContainers holds the arguments for making a WatchContainers API call.

type ZoneResult

type ZoneResult struct {
	Error     *Error `json:"error,omitempty"`
	Name      string `json:"name"`
	Available bool   `json:"available"`
}

ZoneResult holds the result of an API call that returns an availability zone name and whether it's available for use.

type ZoneResults

type ZoneResults struct {
	Results []ZoneResult `json:"results"`
}

ZoneResults holds multiple ZoneResult results

Jump to

Keyboard shortcuts

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