params

package
v0.0.0-...-b9bb202 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0 Imports: 35 Imported by: 12

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"
	CodeModelNotFound              = "model not found"
	CodeSecretNotFound             = "secret not found"
	CodeSecretRevisionNotFound     = "secret revision not found"
	CodeSecretBackendNotFound      = "secret backend not found"
	CodeSecretConsumerNotFound     = "secret consumer not found"
	CodeUnauthorized               = "unauthorized access"
	CodeSessionTokenInvalid        = "session token invalid"
	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"
	CodeSecretBackendAlreadyExists = "secret backend already exists"
	CodeUpgradeInProgress          = "upgrade in progress"
	CodeMigrationInProgress        = "model migration in progress"
	CodeActionNotAvailable         = "action no longer available"
	CodeOperationBlocked           = "operation is blocked"
	CodeLeadershipClaimDenied      = "leadership claim denied"
	CodeLeaseClaimDenied           = "lease claim denied"
	CodeNotSupported               = "not supported"
	CodeSecretBackendNotSupported  = "secret backend not supported"
	CodeBadRequest                 = "bad request"
	CodeMethodNotAllowed           = "method not allowed"
	CodeForbidden                  = "forbidden"
	CodeSecretBackendForbidden     = "secret backend forbidden"
	CodeDischargeRequired          = "macaroon discharge required"
	CodeRedirect                   = "redirection required"
	CodeIncompatibleBase           = "incompatible base"
	CodeCloudRegionRequired        = "cloud region required"
	CodeIncompatibleClouds         = "incompatible clouds"
	CodeQuotaLimitExceeded         = "quota limit exceeded"
	CodeNotLeader                  = "not leader"
	CodeDeadlineExceeded           = "deadline exceeded"
	CodeNotYetAvailable            = "not yet available; try again later"
	CodeNotValid                   = "not valid"
	CodeSecretBackendNotValid      = "secret backend not valid"
	CodeAccessRequired             = "access required"
	CodeAppShouldNotHaveUnits      = "application should not have units"

	// CodeTagInvalid represents an error code when the tag supplied by the
	// caller is not parsable.
	CodeTagInvalid = "invalid tag"

	// CodeTagKindNotSupport represents an error code when a tag has been
	// provided to a facade call and the tags kind is unsupported by the facade.
	CodeTagKindNotSupported = "tag kind not supported"

	// CodeMachineInvalidID represents an error code that indicates a supplied
	// machine id is invalid.
	CodeMachineInvalidID = "invalid machine id"

	// CodeMachineNotFound represents an error code that indicates the machine
	// requested does not exist.
	CodeMachineNotFound = "machine not found"

	// CodeUserInvalidName represents an error that happens when a user name
	// has been supplied that is invalid.
	CodeUserInvalidName = "invalid user name"

	// CodeUserNotFound represents an error that happens when a user requested
	// does not exist.
	CodeUserNotFound = "user not found"

	// CodeUserKeyInvalidComment represents an error where a requested key to be
	// added by a user violates the Juju comment restrictions.
	CodeUserKeyInvalidComment = "invalid public key comment"

	// CodeUserKeyInvalidKey represents an error where a requested key to be
	// added is not considered valid.
	CodeUserKeyInvalidKey = "invalid public key"

	// CodeUserKeyAlreadyExists represents an error where a requested key to be
	// added already exists for the user.
	CodeUserKeyAlreadyExists = "public key already exists"

	// CodeUserKeyInvalidKeySource represents an error where by a public key
	// ssh import source is not valid.
	CodeUserKeyInvalidKeySource = "invalid user public key source"

	// CodeUserKeyUnknownKeySource represents an error where the public key
	// source being asked to import for is unknown and not supported.
	CodeUserKeyUnknownKeySource = "unknown user public key source"

	// CodeUserKeySourceSubjectNotFound represents an error where the key source
	// has told us the subject being imported does not exist.
	CodeUserKeySourceSubjectNotFound = "key source subject not found"
)

The Code constants hold error codes for well known errors.

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 (
	// SSHListModeFull is a [SSHListMode] that list ssh keys with their full raw
	// value. This const comes from [github.com/juju/utils/ssh.FullKeys]
	SSHListModeFull = SSHListMode(true)

	// SSHListModeFingerprint is a [SSHListMode] that list ssh keys with just
	// their fingerprint value. This const comes from
	// [github.com/juju/utils/ssh.Fingerprints]
	SSHListModeFingerprint = SSHListMode(false)
)
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.

View Source
const (
	UpgradeInProgressError = errors.ConstError(CodeUpgradeInProgress)
)

Variables

View Source
var MigrationInProgressError = errors.New(CodeMigrationInProgress)

MigrationInProgressError signifies a migration is in progress.

Functions

func ConvertDockerImageInfo

func ConvertDockerImageInfo(info DockerImageInfo) resource.DockerImageDetails

ConvertDockerImageInfo converts DockerImageInfo to resources.ImageRepoDetails.

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 IsCodeAppShouldNotHaveUnits

func IsCodeAppShouldNotHaveUnits(err error) bool

func IsCodeCannotEnterScope

func IsCodeCannotEnterScope(err error) bool

func IsCodeCannotEnterScopeYet

func IsCodeCannotEnterScopeYet(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 IsCodeLeadershipClaimDenied

func IsCodeLeadershipClaimDenied(err error) bool

func IsCodeLeaseClaimDenied

func IsCodeLeaseClaimDenied(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 IsCodeSecretBackendForbidden

func IsCodeSecretBackendForbidden(err error) bool

func IsCodeSecretBackendNotFound

func IsCodeSecretBackendNotFound(err error) bool

func IsCodeSecretConsumerNotFound

func IsCodeSecretConsumerNotFound(err error) bool

func IsCodeSecretNotFound

func IsCodeSecretNotFound(err error) bool

func IsCodeSecretRevisionNotFound

func IsCodeSecretRevisionNotFound(err error) bool

func IsCodeSessionTokenInvalid

func IsCodeSessionTokenInvalid(err error) bool

IsCodeSessionTokenInvalid returns true if err includes a SessionTokenInvalid 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 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.

func TranslateWellKnownError

func TranslateWellKnownError(err error) error

TranslateWellKnownError translates well known wire error codes into a github.com/juju/errors error that matches the error code.

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 AccessInfo

type AccessInfo struct {
	TargetTag string             `json:"target-tag"`
	ScopeTag  string             `json:"scope-tag"`
	Role      secrets.SecretRole `json:"role"`
}

AccessInfo holds info about a secret access information.

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 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 ActivateModelArgs

type ActivateModelArgs struct {
	// ModelTag is the model being migrated.
	ModelTag string `json:"model-tag"`

	// ControllerTag is the tag of the source controller.
	ControllerTag string `json:"controller-tag"`
	// ControllerAlias is the name of the source controller.
	ControllerAlias string `json:"controller-alias,omitempty"`
	// SourceAPIAddrs are the api addresses of the source controller.
	SourceAPIAddrs []string `json:"source-api-addrs"`
	// SourceCACert is the CA certificate used to connect to the source controller.
	SourceCACert string `json:"source-ca-cert"`
	// CrossModelUUIDs are the UUIDs of models containing offers to which
	// consumers in the migrated model are related.
	CrossModelUUIDs []string `json:"cross-model-uuids"`
}

ActivateModelArgs holds args used to activate a newly migrated model.

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"`
	OwnerTag               string            `json:"owner-tag,omitempty"`
}

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"`
}

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"`
}

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.
	Base        *Base              `json:"base,omitempty"`
	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.Directive `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 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 AddSecretBackendArg

type AddSecretBackendArg struct {
	SecretBackend
	// Include the ID so we can optionally
	// import existing backend metadata.
	ID string `json:"id,omitempty"`
}

AddSecretBackendArg holds args for adding a secret backend.

type AddSecretBackendArgs

type AddSecretBackendArgs struct {
	Args []AddSecretBackendArg `json:"args"`
}

AddSecretBackendArgs holds args for adding secret backends.

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 AddSubnetsParams

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

AddSubnetsParams holds the arguments of AddSubnets API 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 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"`
	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.Directive   `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 GetCharmURLOrigin 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"`
	Base              Base                   `json:"base"`
	Channel           string                 `json:"channel"`
	EndpointBindings  map[string]string      `json:"endpoint-bindings,omitempty"`
}

ApplicationGetResults holds results of the application Get call.

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 ApplicationOfferAdminDetailsV5

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

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

type ApplicationOfferDetailsV5

type ApplicationOfferDetailsV5 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"`
	Users                  []OfferUserDetails `json:"users,omitempty"`
}

ApplicationOfferDetailsV5 represents an application offering from an external model.

type ApplicationOfferResult

type ApplicationOfferResult struct {
	// Result contains application offer information.
	Result *ApplicationOfferAdminDetailsV5 `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 ApplicationOpenedPorts

type ApplicationOpenedPorts struct {
	Endpoint   string      `json:"endpoint"`
	PortRanges []PortRange `json:"port-ranges"`
}

ApplicationOpenedPorts describes the set of port ranges that have been opened by an application for an endpoint.

type ApplicationOpenedPortsResult

type ApplicationOpenedPortsResult struct {
	Error                 *Error                   `json:"error,omitempty"`
	ApplicationPortRanges []ApplicationOpenedPorts `json:"application-port-ranges"`
}

ApplicationOpenedPortsResult holds a single result of the CAASFirewallerEmbedded.GetOpenedPorts() API calls.

type ApplicationOpenedPortsResults

type ApplicationOpenedPortsResults struct {
	Results []ApplicationOpenedPortsResult `json:"results"`
}

ApplicationOpenedPortsResults holds all the results of the CAASFirewallerEmbedded.GetOpenedPorts() API calls.

type ApplicationResult

type ApplicationResult struct {
	Tag              string                     `json:"tag"`
	Charm            string                     `json:"charm,omitempty"`
	Base             Base                       `json:"base,omitempty"`
	Channel          string                     `json:"channel,omitempty"`
	Constraints      constraints.Value          `json:"constraints,omitempty"`
	Principal        bool                       `json:"principal"`
	Exposed          bool                       `json:"exposed"`
	Remote           bool                       `json:"remote"`
	Life             string                     `json:"life"`
	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 ApplicationSetCharmV1

type ApplicationSetCharmV1 struct {
	ApplicationSetCharmV2 `json:",inline"`

	// StorageDirectives is a map of storage names to storage directives to
	// update during the upgrade. This field is only understood by Application
	// facade version < 20. After that it is renamed to "storage-directives" on the wire.
	StorageDirectives map[string]StorageDirectives `json:"storage-constraints,omitempty"`
}

ApplicationSetCharmV1 sets the charm for a given application.

type ApplicationSetCharmV2

type ApplicationSetCharmV2 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"`

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

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

	// StorageDirectives is a map of storage names to storage directives to
	// update during the upgrade.
	StorageDirectives map[string]StorageDirectives `json:"storage-directives,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"`
}

ApplicationSetCharmV2 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"`
	CharmRev         int                        `json:"charm-rev,omitempty"`
	Base             Base                       `json:"base"`
	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"`
	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.

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"`
	ForceBase       bool               `json:"force-base"`
	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"`
	Base     string         `json:"base"`

	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).

func CreateResult

func CreateResult(meta *corebackups.Metadata, filename string) BackupsMetadataResult

CreateResult updates the result with the information in the metadata value.

type Base

type Base struct {
	Name    string `json:"name"`
	Channel string `json:"channel"`
}

Base holds the name of an OS name and its version.

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 BlockDevice

type BlockDevice struct {
	DeviceName     string   `json:"DeviceName"`
	DeviceLinks    []string `json:"DeviceLinks"`
	Label          string   `json:"Label"`
	UUID           string   `json:"UUID"`
	HardwareId     string   `json:"HardwareId"`
	WWN            string   `json:"WWN"`
	BusAddress     string   `json:"BusAddress"`
	Size           uint64   `json:"Size"`
	FilesystemType string   `json:"FilesystemType"`
	InUse          bool     `json:"InUse"`
	MountPoint     string   `json:"MountPoint"`
	SerialId       string   `json:"SerialId"`
}

BlockDevice is a block device present on a machine. NB: the json labels are camel case not lower case because originally a mistake was made and we need to retain on the wire compatibility.

type BlockDeviceResult

type BlockDeviceResult struct {
	Result 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 []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 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 BlockType

type BlockType = string

BlockType values define model block type, which can be used to prevent accidental damage to Juju deployments.

const (
	// BlockDestroy type identifies destroy blocks.
	BlockDestroy BlockType = "BlockDestroy"

	// BlockRemove type identifies remove blocks.
	BlockRemove BlockType = "BlockRemove"

	// BlockChange type identifies change blocks.
	BlockChange BlockType = "BlockChange"
)

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 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 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 BytesResult

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

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

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 CAASApplicationProvisionerConfig

type CAASApplicationProvisionerConfig struct {
	UnmanagedApplications Entities `json:"unmanaged-applications,omitempty"`
}

CAASApplicationProvisionerConfig holds the configuration for the caasapplicationprovisioner worker.

type CAASApplicationProvisionerConfigResult

type CAASApplicationProvisionerConfigResult struct {
	ProvisionerConfig *CAASApplicationProvisionerConfig `json:"provisioner-config,omitempty"`
	Error             *Error                            `json:"error,omitempty"`
}

CAASApplicationProvisionerConfigResult is the result of getting the caasapplicationprovisioner worker's configuration for the current model.

type CAASApplicationProvisioningInfo

type CAASApplicationProvisioningInfo struct {
	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"`
	Base                 Base                         `json:"base,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 CAASApplicationProvisioningState

type CAASApplicationProvisioningState struct {
	Scaling     bool `json:"scaling"`
	ScaleTarget int  `json:"scale-target"`
}

CAASApplicationProvisioningState represents the provisioning state for a CAAS application.

type CAASApplicationProvisioningStateArg

type CAASApplicationProvisioningStateArg struct {
	Application       Entity                           `json:"application"`
	ProvisioningState CAASApplicationProvisioningState `json:"provisioning-state"`
}

CAASApplicationProvisioningStateArg holds the arguments for setting a CAAS application's provisioning state.

type CAASApplicationProvisioningStateResult

type CAASApplicationProvisioningStateResult struct {
	ProvisioningState *CAASApplicationProvisioningState `json:"provisioning-state,omitempty"`
	Error             *Error                            `json:"error,omitempty"`
}

CAASApplicationProvisioningStateResult represents the result of getting the provisioning state for a CAAS application.

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 ChangeSecretBackendArg

type ChangeSecretBackendArg struct {
	URI      string              `json:"uri"`
	Revision int                 `json:"revision"`
	Content  SecretContentParams `json:"content,omitempty"`
}

ChangeSecretBackendArg holds the arg for updating a secret backend for a secret. It holds the secret contents as well if the new backend is the internal backend.

type ChangeSecretBackendArgs

type ChangeSecretBackendArgs struct {
	Args []ChangeSecretBackendArg `json:"args"`
}

ChangeSecretBackendArgs holds a slice of args for updating secret backend IDs.

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"`
	Manifest   *CharmManifest         `json:"manifest,omitempty"`
	LXDProfile *CharmLXDProfile       `json:"lxd-profile,omitempty"`
	Version    string                 `json:"version,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"`
	Parallel       bool                   `json:"parallel,omitempty"`
	Params         map[string]interface{} `json:"params"`
	ExecutionGroup string                 `json:"execution-group,omitempty"`
}

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"`
	Uid      *int         `json:"uid,omitempty"`
	Gid      *int         `json:"gid,omitempty"`
}

CharmContainer mirrors charm.Container

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 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"`
	Storage        map[string]CharmStorage      `json:"storage,omitempty"`
	Devices        map[string]CharmDevice       `json:"devices,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"`
	CharmUser      string                       `json:"charm-user,omitempty"`
}

CharmMeta mirrors charm.Meta.

type CharmMetric

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

CharmMetric mirrors charm.Metric.

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"`
	Branch   *string `json:"branch,omitempty"`

	Architecture string `json:"architecture,omitempty"`
	Base         Base   `json:"base,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. "22.04".
	Version string `json:"version"`

	// 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"`
	SecretCreates        []CreateSecretArg      `json:"secret-creates,omitempty"`
	TrackLatest          []string               `json:"secret-track-latest,omitempty"`
	SecretUpdates        []UpdateSecretArg      `json:"secret-updates,omitempty"`
	SecretGrants         []GrantRevokeSecretArg `json:"secret-grants,omitempty"`
	SecretRevokes        []GrantRevokeSecretArg `json:"secret-revokes,omitempty"`
	SecretDeletes        []DeleteSecretArg      `json:"secret-deletes,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"`
}

ConfigResult 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 ConsumeApplicationArgV5

type ConsumeApplicationArgV5 struct {
	// The offer to be consumed.
	ApplicationOfferDetailsV5

	// 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"`
}

ConsumeApplicationArgV5 holds the arguments for consuming a remote application.

type ConsumeApplicationArgsV5

type ConsumeApplicationArgsV5 struct {
	Args []ConsumeApplicationArgV5 `json:"args,omitempty"`
}

ConsumeApplicationArgsV5 is a collection of arg for consuming applications.

type ConsumeOfferDetails

type ConsumeOfferDetails struct {
	Offer          *ApplicationOfferDetailsV5 `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.

func (ControllerAction) AccessChange

func (c ControllerAction) AccessChange() permission.AccessChange

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 ControllerDetails

type ControllerDetails struct {
	ControllerId string   `json:"controller-id"`
	APIAddresses []string `json:"api-addresses"`
	Error        *Error   `json:"error,omitempty"`
}

ControllerDetails contains the details about a controller.

type ControllerDetailsResults

type ControllerDetailsResults struct {
	Results []ControllerDetails `json:"results"`
}

ControllerDetailsResults contains the results of a call to fetch controller config details.

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"`
	// Placement defines specific machines to become new controller machines.
	Placement []string `json:"placement,omitempty"`
}

ControllersSpec contains arguments for the EnableHA client API call.

type ControllersSpecs

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

ControllersSpecs 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 {
	UpsertSecretArg

	// URI identifies the secret to create.
	// If empty, the controller generates a URI.
	URI *string `json:"uri,omitempty"`
	// OwnerTag is the owner of the secret.
	OwnerTag string `json:"owner-tag"`
}

CreateSecretArg holds the args for creating a secret.

type CreateSecretArgs

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

CreateSecretArgs holds args for creating secrets.

type CreateSecretURIsArg

type CreateSecretURIsArg struct {
	Count int `json:"count"`
}

CreateSecretURIsArg holds args for creating secret URIs.

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 CreateSpacesParams

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

CreateSpacesParams 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 DashboardConnectionInfo

type DashboardConnectionInfo struct {
	ProxyConnection *Proxy                        `json:"proxy-connection"`
	SSHConnection   *DashboardConnectionSSHTunnel `json:"ssh-connection"`
	Error           *Error                        `json:"error,omitempty"`
}

DashboardConnectionInfo holds the information necessary

type DashboardConnectionSSHTunnel

type DashboardConnectionSSHTunnel struct {
	Model  string `json:"model,omitempty"`
	Entity string `json:"entity,omitempty"`
	Host   string `json:"host"`
	Port   string `json:"port"`
}

DashboardConnectionSSHTunnel represents an ssh tunnel connection to the Juju Dashboard

type DeleteSecretArg

type DeleteSecretArg struct {
	URI       string `json:"uri"`
	Label     string `json:"label"`
	Revisions []int  `json:"revisions,omitempty"`
}

DeleteSecretArg holds the args for deleting a secret.

type DeleteSecretArgs

type DeleteSecretArgs struct {
	Args []DeleteSecretArg `json:"args"`
}

DeleteSecretArgs holds args for deleting secrets.

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 DeployFromRepositoryArg

type DeployFromRepositoryArg struct {
	// CharmName is a string identifying the name of the thing to deploy.
	// Required.
	CharmName string

	// ApplicationName is the name to give the application. Optional. By
	// default, the charm name and the application name will be the same.
	ApplicationName string

	// AttachStorage contains IDs of existing storage that should be
	// attached to the application unit that will be deployed. This
	// may be non-empty only if NumUnits is 1.
	AttachStorage []string

	// Base describes the OS base intended to be used by the charm.
	Base *Base `json:"base,omitempty"`

	// Channel is the channel in the repository to deploy from.
	// This is an optional value. Required if revision is provided.
	// Defaults to “stable” if not defined nor required.
	Channel *string `json:"channel,omitempty"`

	// ConfigYAML is a string that overrides the default config.yml.
	ConfigYAML string

	// Cons contains constraints on where units of this application
	// may be placed.
	Cons constraints.Value

	// Devices contains Constraints specifying how devices should be
	// handled.
	Devices map[string]devices.Constraints

	// DryRun just shows what the deploy would do, including finding the
	// charm; determining version, channel and base to use; validation
	// of the config. Does not actually download or deploy the charm.
	DryRun bool

	// EndpointBindings
	EndpointBindings map[string]string `json:"endpoint-bindings,omitempty"`

	// Force can be set to true to bypass any checks for charm-specific
	// requirements ("assumes" sections in charm metadata, supported series,
	// LXD profile allow list)
	Force bool `json:"force,omitempty"`

	// NumUnits is the number of units to deploy. Defaults to 1 if no
	// value provided. Synonymous with scale for kubernetes charms.
	NumUnits *int `json:"num-units,omitempty"`

	// Placement directives define on which machines the unit(s) must be
	// created.
	Placement []*instance.Placement

	// Revision is the charm revision number. Requires the channel
	// be explicitly set.
	Revision *int `json:"revision,omitempty"`

	// Resources is a collection of resource names for the
	// application, with the value being the revision of the
	// resource to use if default revision is not desired.
	Resources map[string]string `json:"resources,omitempty"`

	// Storage contains Directives specifying how storage should be
	// handled.
	Storage map[string]storage.Directive `json:"storage"`

	//  Trust allows charm to run hooks that require access credentials
	Trust bool
}

DeployFromRepositoryArg is all data required to deploy a charm from a repository.

type DeployFromRepositoryArgs

type DeployFromRepositoryArgs struct {
	Args []DeployFromRepositoryArg
}

DeployFromRepositoryArgs holds arguments for multiple charms to be deployed.

type DeployFromRepositoryInfo

type DeployFromRepositoryInfo struct {
	// Architecture is the architecture used to deploy the charm.
	Architecture string `json:"architecture"`
	// Base is the base used to deploy the charm.
	Base Base `json:"base,omitempty"`
	// Channel is a string representation of the channel used to
	// deploy the charm.
	Channel string `json:"channel"`
	// EffectiveChannel is the channel actually deployed from as determined
	// by the charmhub response.
	EffectiveChannel *string `json:"effective-channel,omitempty"`
	// Is the name of the application deployed. This may vary from
	// the charm name provided if differs in the metadata.yaml and
	// no provided on the cli.
	Name string `json:"name"`
	// Revision is the revision of the charm deployed.
	Revision int `json:"revision"`
}

DeployFromRepositoryInfo describes the charm deployed.

type DeployFromRepositoryResult

type DeployFromRepositoryResult struct {
	// Errors holds errors accumulated during validation of
	// deployment, or errors during deployment
	Errors []*Error

	// Info
	Info DeployFromRepositoryInfo

	// PendingResourceUploads returns a collection of data
	// required to upload a specific resource for this charm.
	// Deploy will validate the resource request against the
	// charm, but not the upload data. Only resources indicated
	// as local upload will be included. They have already been
	// added as Pending.
	PendingResourceUploads []*PendingResourceUpload
}

DeployFromRepositoryResult contains the result of deploying a repository charm.

type DeployFromRepositoryResults

type DeployFromRepositoryResults struct {
	Results []DeployFromRepositoryResult
}

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"`

	// DryRun specifies whether this should perform this destroy
	// action or just return what this action will destroy
	DryRun bool `json:"dry-run,omitempty"`
}

DestroyApplicationParams holds parameters for the Application.DestroyApplication call.

type DestroyApplicationParamsV15

type DestroyApplicationParamsV15 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"`
}

DestroyApplicationParamsV15 holds parameters for the Application.DestroyApplication call on the v15 facade.

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 DestroyApplicationsParamsV15

type DestroyApplicationsParamsV15 struct {
	Applications []DestroyApplicationParamsV15 `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 {
	// MachineId is the ID if the machine that will be destroyed
	MachineId string `json:"machine-id"`

	// 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"`

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

	// DestroyedContainers are the results of the destroyed containers hosted
	// on a machine, destroyed as a result of destroying the machine
	DestroyedContainers []DestroyMachineResult `json:"destroyed-containers,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 DestroyMachinesParams

type DestroyMachinesParams struct {
	MachineTags []string `json:"machine-tags"`
	Force       bool     `json:"force,omitempty"`
	Keep        bool     `json:"keep,omitempty"`
	DryRun      bool     `json:"dry-run,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 latest 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,omitempty"`

	// 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"`

	// DryRun specifies whether to perform the destroy action or
	// just return what this action will destroy
	DryRun bool `json:"dry-run,omitempty"`
}

DestroyUnitParams holds parameters for the Application.DestroyUnit call.

type DestroyUnitParamsV15

type DestroyUnitParamsV15 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 DestroyUnitsParamsV15

type DestroyUnitsParamsV15 struct {
	Units []DestroyUnitParamsV15 `json:"units"`
}

DestroyUnitsParamsV15 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.

func NewDockerImageInfo

func NewDockerImageInfo(info resource.ImageRepoDetails, registryPath string) DockerImageInfo

NewDockerImageInfo converts docker.ImageRepoDetails to DockerImageInfo.

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 {
	RelationId       int                     `json:"relation-id"`
	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 EnqueuedActionsV2

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

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 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 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 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]any `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.

func (Error) WithInfo

func (e Error) WithInfo(info map[string]any) *Error

WithInfo is responsible for setting the [Error.Info] information

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.
	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 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.
	// TODO(juju 3.1) - remove
	MajorVersion int `json:"major"`

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

	// 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 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"`
	Storage             []StorageDetails                   `json:"storage,omitempty"`
	Filesystems         []FilesystemDetails                `json:"filesystems,omitempty"`
	Volumes             []VolumeDetails                    `json:"volumes,omitempty"`
}

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 GetRemoteSecretAccessArg

type GetRemoteSecretAccessArg struct {
	// ApplicationToken is the application token on the remote model.
	ApplicationToken string `json:"application-token"`

	// UnitId uniquely identifies the remote unit.
	UnitId int `json:"unit-id"`

	// URI is the secret URI.
	URI string `json:"uri"`
}

GetRemoteSecretAccessArg holds args for fetching info about access to a remote secret.

type GetRemoteSecretAccessArgs

type GetRemoteSecretAccessArgs struct {
	Args []GetRemoteSecretAccessArg `json:"relations"`
}

GetRemoteSecretAccessArgs holds args for fetching info about access to a remote secret.

type GetRemoteSecretContentArg

type GetRemoteSecretContentArg struct {
	// SourceControllerUUID is the UUID of the controller making this API call.
	SourceControllerUUID string `json:"source-controller-uuid"`

	// ApplicationToken is the application token on the remote model.
	ApplicationToken string `json:"application-token"`

	// UnitId uniquely identifies the remote unit.
	UnitId int `json:"unit-id"`

	// Revision, if specified, is the secret revision to fetch.
	Revision *int `json:"revision,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"`

	// URI is the secret URI.
	URI string `json:"uri"`

	// Refresh is true if the latest revision should be used from here on.
	Refresh bool `json:"refresh,omitempty"`

	// Peek is true if we want the latest revision just this once.
	Peek bool `json:"peek,omitempty"`
}

GetRemoteSecretContentArg holds ares for fetching a remote secret.

type GetRemoteSecretContentArgs

type GetRemoteSecretContentArgs struct {
	Args []GetRemoteSecretContentArg `json:"relations"`
}

GetRemoteSecretContentArgs holds args for fetching remote secret contents.

type GetSecretConsumerInfoArgs

type GetSecretConsumerInfoArgs struct {
	ConsumerTag string   `json:"consumer-tag"`
	URIs        []string `json:"uris"`
}

GetSecretConsumerInfoArgs holds the args for getting secret consumer metadata.

type GetSecretContentArg

type GetSecretContentArg struct {
	URI     string `json:"uri"`
	Label   string `json:"label,omitempty"`
	Refresh bool   `json:"refresh,omitempty"`
	Peek    bool   `json:"peek,omitempty"`
}

GetSecretContentArg holds the args for getting a secret value.

type GetSecretContentArgs

type GetSecretContentArgs struct {
	Args []GetSecretContentArg `json:"args"`
}

GetSecretContentArgs holds the args for getting secret values.

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 GrantRevokeSecretArg

type GrantRevokeSecretArg struct {
	// URI identifies the secret to grant.
	URI string `json:"uri"`

	// ScopeTag is defines the entity to which the access is scoped.
	ScopeTag string `json:"scope-tag"`

	// SubjectTags are the target tag of the secret grant/revoke request.
	// TODO: rename this field to TargetTags and bump facade version.
	SubjectTags []string `json:"subject-tags"`

	// Role is the role being granted.
	Role string `json:"role"`
}

GrantRevokeSecretArg holds the args for changing access to a secret.

type GrantRevokeSecretArgs

type GrantRevokeSecretArgs struct {
	Args []GrantRevokeSecretArg `json:"args"`
}

GrantRevokeSecretArgs holds args for changing access to secrets.

type GrantRevokeUserSecretArg

type GrantRevokeUserSecretArg struct {

	// URI identifies the secret to grant.
	URI string `json:"uri"`
	// Label identifies the secret to grant.
	Label string `json:"label"`

	Applications []string `json:"applications"`
}

GrantRevokeUserSecretArg holds the args for changing access to a user secret.

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 ImageMetadataFilter

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

	// Versions stores all desired versions.
	Versions []string `json:"versions,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 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 IngressNetworksChangeEvent

type IngressNetworksChangeEvent struct {
	// RelationToken is the token of the relation.
	RelationToken string `json:"relation-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"`
}

func (*IngressNetworksChangeEvent) GoString

func (e *IngressNetworksChangeEvent) GoString() string

type IngressNetworksChanges

type IngressNetworksChanges struct {
	Changes []IngressNetworksChangeEvent `json:"changes,omitempty"`
}

IngressNetworksChanges holds a set of IngressNetworksChangeEvent structures.

type IngressRule

type IngressRule struct {
	PortRange   PortRange `json:"port-range"`
	SourceCIDRs []string  `json:"source-cidrs"`
}

type IngressRulesResult

type IngressRulesResult struct {
	Rules []IngressRule `json:"rules"`
	Error *Error        `json:"error,omitempty"`
}

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"`
	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 IsControllerResult

type IsControllerResult struct {
	IsController bool   `json:"is-controller"`
	Error        *Error `json:"error,omitempty"`
}

IsControllerResult holds the result of an IsController call, which returns whether a given machine is a controller machine.

type IsControllerResults

type IsControllerResults struct {
	Results []IsControllerResult `json:"results"`
}

IsControllerResults holds the result of a call to IsController

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 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 JobsResult

type JobsResult struct {
	Jobs  []string `json:"jobs"`
	Error *Error   `json:"error,omitempty"`
}

JobsResult holds the jobs for a machine that are returned by a call to Jobs. Deprecated: Jobs is being deprecated. Use IsController instead.

type JobsResults

type JobsResults struct {
	Results []JobsResult `json:"results"`
}

JobsResults holds the result of a call to Jobs.

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 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"`
}

KubernetesVolumeInfo 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 LatestSecretRevisionChanges

type LatestSecretRevisionChanges struct {
	Changes []SecretRevisionChange `json:"changes"`
}

LatestSecretRevisionChanges holds a collection of secret revision changes for updating consumers when secrets get new revisions added.

type LeaseOperation

type LeaseOperation struct {
	Command string `json:"command"`
}

LeaseOperation is used to send raft operational messages between controllers.

type LeaseOperationCommand

type LeaseOperationCommand struct {
	// Version of the command format in case it changes,
	// and we need to handle multiple formats.
	Version int `json:"version"`

	// Operation is one of claim, extend, expire or setTime.
	Operation string `json:"operation"`

	// Namespace is the kind of lease.
	Namespace string `json:"namespace,omitempty"`

	// ModelUUID identifies the model the lease belongs to.
	ModelUUID string `json:"model-uuid,omitempty"`

	// Lease is the name of the lease the command affects.
	Lease string `json:"lease,omitempty"`

	// Holder is the name of the party claiming or extending the
	// lease.
	Holder string `json:"holder,omitempty"`

	// Duration is how long the lease should last.
	Duration time.Duration `json:"duration,omitempty"`

	// OldTime is the previous time for time updates (to avoid
	// applying stale ones).
	OldTime time.Time `json:"old-time,omitempty"`

	// NewTime is the time to store as the global time.
	NewTime time.Time `json:"new-time,omitempty"`

	// PinEntity is a tag representing an entity concerned
	// with a pin or unpin operation.
	PinEntity string `json:"pin-entity,omitempty"`
}

LeaseOperationCommand 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 LeaseOperationsV2

type LeaseOperationsV2 struct {
	Operations []LeaseOperationCommand `json:"commands"`
}

LeaseOperationsV2 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 ListResourcesArgs

type ListResourcesArgs Entities

ListResourcesArgs are the arguments for the ListResources endpoint.

type ListSSHKeys

type ListSSHKeys struct {
	Entities `json:"entities"`
	Mode     SSHListMode `json:"mode"`
}

ListSSHKeys stores parameters used for a KeyManager.ListKeys call.

type ListSecretBackendsArgs

type ListSecretBackendsArgs struct {
	Names  []string `json:"names"`
	Reveal bool     `json:"reveal"`
}

ListSecretBackendsArgs holds the args for listing secret backends.

type ListSecretBackendsResults

type ListSecretBackendsResults struct {
	Results []SecretBackendResult `json:"results"`
}

ListSecretBackendsResults holds secret backend results.

type ListSecretResult

type ListSecretResult struct {
	URI                    string             `json:"uri"`
	Version                int                `json:"version"`
	OwnerTag               string             `json:"owner-tag"`
	RotatePolicy           string             `json:"rotate-policy,omitempty"`
	NextRotateTime         *time.Time         `json:"next-rotate-time,omitempty"`
	Description            string             `json:"description,omitempty"`
	Label                  string             `json:"label,omitempty"`
	LatestRevision         int                `json:"latest-revision"`
	LatestRevisionChecksum string             `json:"latest-revision-checksum"`
	LatestExpireTime       *time.Time         `json:"latest-expire-time,omitempty"`
	CreateTime             time.Time          `json:"create-time"`
	UpdateTime             time.Time          `json:"update-time"`
	Revisions              []SecretRevision   `json:"revisions"`
	Value                  *SecretValueResult `json:"value,omitempty"`
	Access                 []AccessInfo       `json:"access,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"`
	Filter      SecretsFilter `json:"filter"`
}

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"`
}

ListUnitResourcesArgs holds the arguments for an API request to list resources for an application. The application is implicit to the uniter- specific HTTP connection.

type LogMessage

type LogMessage struct {
	ModelUUID string            `json:"uuid,omitempty"`
	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    map[string]string `json:"lab,omitempty"`
}

LogMessage is a structured logging entry. It is used to stream log records to the log streamer client from the api server /logs endpoint. The client is used for model migration and debug-log.

func (*LogMessage) UnmarshalJSON

func (m *LogMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshalls an incoming log message in either v1 or later format.

type LogMessageV1

type LogMessageV1 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"`
}

LogMessageV1 is a structured logging entry for older clients expecting an array of labels.

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   map[string]string `json:"b,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. The log messages are sent by the log sender worker, used by agents to send logs to the controller.

func (*LogRecord) UnmarshalJSON

func (m *LogRecord) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshalls an incoming log record which may have been generated by an older client.

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"`

	// Token represents a JSON Web Token (JWT).
	Token         string `json:"token,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 []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"`
	VirtType         *string   `json:"virt-type,omitempty"`
}

MachineHardware holds information about a machine's hardware characteristics.

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 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"`

	// Base holds the details of the operating system release installed on
	// this machine.
	Base Base `json:"base"`

	// 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 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"`
	FacadeVersions         map[string][]int `json:"facade-versions,omitempty"`
	ModelDescription       []byte           `json:"model-description,omitempty"`
}

MigrationModelInfo is used to report basic model information to the migrationmaster worker.

type MigrationSourceInfo

type MigrationSourceInfo struct {
	LocalRelatedModels []string `json:"local-related-models"`
	ControllerTag      string   `json:"controller-tag"`
	ControllerAlias    string   `json:"controller-alias,omitempty"`
	Addrs              []string `json:"addrs"`
	CACert             string   `json:"ca-cert"`
}

MigrationSourceInfo holds the details required to connect to the source controller for model migration.

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 ModelApplicationInfo

type ModelApplicationInfo struct {
	Name string `json:"name"`
}

ModelApplicationInfo holds information about an application in 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 a 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"`
	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"`

	// SecretBackends contains information about the secret backends
	// currently in use by the model.
	SecretBackends []SecretBackendResult `json:"secret-backends"`

	// 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"`

	// 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 holds infor needed for a model operator.

type ModelParam

type ModelParam struct {
	// ModelTag is a tag for the model.
	ModelTag string `json:"model-tag"`
}

ModelParam is used to identify a model.

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 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"`
	Applications       []ModelApplicationInfo `json:"applications,omitempty"`
	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"`
}

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"`
	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"`

	// 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 ModelUserInfo

type ModelUserInfo struct {
	ModelTag       string               `json:"model-tag"`
	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"`
}

ModifyOfferAccessRequest 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 NetworkInfoResults

type NetworkInfoResults struct {
	Results map[string]NetworkInfoResult `json:"results"`
}

NetworkInfoResults holds a mapping from binding name to NetworkInfoResult.

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"`
}

NetworkInterface 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 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 OpenPortRangesByEndpointResult

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

	// The set of opened port ranges grouped by unit tag.
	UnitPortRanges map[string][]OpenUnitPortRangesByEndpoint `json:"unit-port-ranges"`
}

OpenPortRangesByEndpointResult holds a single result of a request to the uniter's OpenedMachinePortRangesByEndpoint and OpenedPortRangesByEndpoint API.

type OpenPortRangesByEndpointResults

type OpenPortRangesByEndpointResults struct {
	Results []OpenPortRangesByEndpointResult `json:"results"`
}

OpenPortRangesByEndpointResults holds the results of a request to the uniter's OpenedMachinePortRangesByEndpoint and OpenedPortRangesByEndpoint 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 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 PendingResourceUpload

type PendingResourceUpload struct {
	// Name is the name of the resource.
	Name string

	// Filename is the name of the file as it exists on disk.
	// Sometimes referred to as the path.
	Filename string

	// Type of the resource, a string matching one of the resource.Type
	Type string
}

PendingResourceUpload holds data required to upload a local resource if required.

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"`
}

PhaseResults 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"`

	// Error will contain a reference to an error resulting from
	// reading lease data, if one occurred.
	Error *Error `json:"error,omitempty"`
}

PinnedLeadershipResult holds data representing the current applications for which leadership is pinned

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 PrechecksArgs

type PrechecksArgs struct {
	TargetControllerVersion version.Number `json:"target-controller-version"`
}

PrechecksArgs provides the target controller version to the migrationmaster.Prechecks API method.

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 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"`
	Base              Base                     `json:"base"`
	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 Proxy

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

Proxy represents a proxy connection info.

func NewProxy

func NewProxy(proxier proxy.Proxier) (*Proxy, error)

NewProxy constructs a new Proxy from the supplied proxier.

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 QueryApplicationOffersResultsV5

type QueryApplicationOffersResultsV5 struct {
	// Results contains application offers matching each filter.
	Results []ApplicationOfferAdminDetailsV5 `json:"results"`
}

QueryApplicationOffersResultsV5 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"`

	// 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"`
}

RegisterRemoteRelationResults has a set of remote relation results.

type RelatedApplicationDetails

type RelatedApplicationDetails struct {
	ModelUUID       string `json:"model-uuid"`
	ApplicationName string `json:"application"`
}

RelatedApplicationDetails holds information about an application related to a unit.

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 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 RelationResultV2

type RelationResultV2 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 RelatedApplicationDetails `json:"other-application,omitempty"`
}

RelationResultV2 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 RelationResultsV2

type RelationResultsV2 struct {
	Results []RelationResultV2 `json:"results"`
}

RelationResultsV2 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. TODO(juju3) - remove

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. TODO(juju3) - remove

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 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"`
	UnitCount             int            `json:"unit-count"`
	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"`

	// ApplicationOrOfferToken is the token of the application or offer.
	// Note we can't easily change the json tag for compatibility reasons.
	ApplicationOrOfferToken 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"`

	// 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.

func (*RemoteRelationChangeEvent) GoString

func (e *RemoteRelationChangeEvent) GoString() string

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"`
}

RemoteRelationUnit 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 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 RemoveSecretBackendArg

type RemoveSecretBackendArg struct {
	Name  string `json:"name"`
	Force bool   `json:"force,omitempty"`
}

RemoveSecretBackendArg holds args for removing a secret backend.

type RemoveSecretBackendArgs

type RemoveSecretBackendArgs struct {
	Args []RemoveSecretBackendArg `json:"args"`
}

RemoveSecretBackendArgs holds args for removing secret backends.

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"`
	SupportedBases []Base      `json:"supported-bases"`
	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 RetryProvisioningArgs

type RetryProvisioningArgs struct {
	Machines []string `json:"machines,omitempty"`
	All      bool     `json:"all"`
}

RetryProvisioningArgs holds args for retrying machine provisioning.

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 RotateSecretBackendArgs

type RotateSecretBackendArgs struct {
	BackendIDs []string `json:"backend-ids"`
}

RotateSecretBackendArgs holds the args for updating rotated secret backend info.

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 SSHListMode

type SSHListMode bool

SSHListMode describes the mode to use when list ssh keys. This value has been brought over from github.com/juju/utils/ssh.

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 SecretBackend

type SecretBackend struct {
	// Name is the name of the backend.
	Name string `json:"name"`

	// Backend is the backend provider, eg "vault".
	BackendType string `json:"backend-type"`

	// TokenRotateInterval is the interval to rotate
	// the backend master access token.
	TokenRotateInterval *time.Duration `json:"token-rotate-interval,omitempty"`

	// Config are the backend's configuration attributes.
	Config map[string]interface{} `json:"config"`
}

SecretBackend holds secret backend details.

type SecretBackendArgs

type SecretBackendArgs struct {
	ForDrain   bool     `json:"for-drain"`
	BackendIDs []string `json:"backend-ids"`
}

SecretBackendArgs holds args for querying secret backends.

type SecretBackendConfig

type SecretBackendConfig struct {
	BackendType string                 `json:"type"`
	Params      map[string]interface{} `json:"params,omitempty"`
}

SecretBackendConfig holds config for creating a secret backend client.

type SecretBackendConfigResult

type SecretBackendConfigResult struct {
	ControllerUUID string              `json:"model-controller"`
	ModelUUID      string              `json:"model-uuid"`
	ModelName      string              `json:"model-name"`
	Draining       bool                `json:"draining"`
	Config         SecretBackendConfig `json:"config,omitempty"`
}

SecretBackendConfigResult holds config info for creating secret backend clients for a specific model.

type SecretBackendConfigResults

type SecretBackendConfigResults struct {
	ActiveID string                               `json:"active-id"`
	Results  map[string]SecretBackendConfigResult `json:"results,omitempty"`
}

SecretBackendConfigResults holds config info for creating secret backend clients for a specific model.

type SecretBackendConfigResultsV1

type SecretBackendConfigResultsV1 struct {
	ControllerUUID string                         `json:"model-controller"`
	ModelUUID      string                         `json:"model-uuid"`
	ModelName      string                         `json:"model-name"`
	ActiveID       string                         `json:"active-id"`
	Configs        map[string]SecretBackendConfig `json:"configs,omitempty"`
}

SecretBackendConfigResultsV1 holds config info for creating secret backend clients for a specific model.

type SecretBackendResult

type SecretBackendResult struct {
	Result SecretBackend `json:"result"`
	// Include the ID so we can report on backends with errors.
	ID         string `json:"id"`
	NumSecrets int    `json:"num-secrets"`
	Status     string `json:"status"`
	Message    string `json:"message,omitempty"`
	Error      *Error `json:"error,omitempty"`
}

SecretBackendResult holds a secret backend and related info.

type SecretBackendRotateChange

type SecretBackendRotateChange struct {
	ID              string    `json:"id"`
	Name            string    `json:"backend-name"`
	NextTriggerTime time.Time `json:"next-trigger-time"`
}

SecretBackendRotateChange describes a change to a secret backend rotation.

type SecretBackendRotateWatchResult

type SecretBackendRotateWatchResult struct {
	WatcherId string                      `json:"watcher-id"`
	Changes   []SecretBackendRotateChange `json:"changes"`
	Error     *Error                      `json:"error,omitempty"`
}

SecretBackendRotateWatchResult holds secret backend rotate change events.

type SecretConsumerInfoResult

type SecretConsumerInfoResult struct {
	Revision int    `json:"revision"`
	Label    string `json:"label"`
	Error    *Error `json:"error,omitempty"`
}

SecretConsumerInfoResult is the result of getting a secret value.

type SecretConsumerInfoResults

type SecretConsumerInfoResults struct {
	Results []SecretConsumerInfoResult `json:"results"`
}

SecretConsumerInfoResults holds secret value results.

type SecretContentParams

type SecretContentParams struct {
	// Data is the key values of the secret value itself.
	Data map[string]string `json:"data,omitempty"`
	// ValueRef is the content reference for when a secret
	// backend like vault is used.
	ValueRef *SecretValueRef `json:"value-ref,omitempty"`
	// Checksum is the hash of the secret context.
	Checksum string `json:"checksum,omitempty"`
}

SecretContentParams holds params for representing the content of a secret.

type SecretContentResult

type SecretContentResult struct {
	Content        SecretContentParams        `json:"content"`
	BackendConfig  *SecretBackendConfigResult `json:"backend-config,omitempty"`
	LatestRevision *int                       `json:"latest-revision,omitempty"`
	Error          *Error                     `json:"error,omitempty"`
}

SecretContentResult is the result of getting secret content.

type SecretContentResults

type SecretContentResults struct {
	Results []SecretContentResult `json:"results"`
}

SecretContentResults holds secret value results.

type SecretExternalRevision

type SecretExternalRevision struct {
	Revision int             `json:"revision"`
	ValueRef *SecretValueRef `json:"value-ref,omitempty"`
}

SecretExternalRevision holds secret revision metadata for an external revision.

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"`

	// ProxyConfig is a config around a real proxier interface that should
	// be used to connect to the controller.
	ProxyConfig *Proxy `json:"proxy-config"`
}

SecretKeyLoginResponsePayload is JSON-encoded and then encrypted and authenticated with the NaCl Secretbox algorithm.

type SecretRevision

type SecretRevision struct {
	Revision    int             `json:"revision"`
	ValueRef    *SecretValueRef `json:"value-ref,omitempty"`
	BackendName *string         `json:"backend-name,omitempty"`
	CreateTime  time.Time       `json:"create-time,omitempty"`
	UpdateTime  time.Time       `json:"update-time,omitempty"`
	ExpireTime  *time.Time      `json:"expire-time,omitempty"`
}

SecretRevision holds secret revision metadata.

type SecretRevisionArg

type SecretRevisionArg struct {
	URI           string `json:"uri"`
	Revisions     []int  `json:"revisions"`
	PendingDelete bool   `json:"pending-delete"`
}

SecretRevisionArg holds the args for secret revisions.

type SecretRevisionChange

type SecretRevisionChange struct {
	URI            string `json:"uri"`
	LatestRevision int    `json:"revision"`
}

SecretRevisionChange describes a secret revision change.

type SecretRevisionWatchResult

type SecretRevisionWatchResult struct {
	WatcherId string                 `json:"watcher-id"`
	Changes   []SecretRevisionChange `json:"changes"`
	Error     *Error                 `json:"error,omitempty"`
}

SecretRevisionWatchResult holds a SecretRevisionWatcher id, baseline state (in the Changes field), and an error (if any).

type SecretRevisionWatchResults

type SecretRevisionWatchResults struct {
	Results []SecretRevisionWatchResult `json:"results"`
}

SecretRevisionWatchResults holds the results for any API call which ends up returning a list of SecretRevisionWatchers.

type SecretRevisionsToDrainResult

type SecretRevisionsToDrainResult struct {
	URI       string           `json:"uri"`
	Revisions []SecretRevision `json:"revisions"`
}

SecretRevisionsToDrainResult holds secret revisions to drain for a given secret.

type SecretRevisionsToDrainResults

type SecretRevisionsToDrainResults struct {
	Results []SecretRevisionsToDrainResult `json:"results"`
}

SecretRevisionsToDrainResults holds secret revisions to drain results.

type SecretRotatedArg

type SecretRotatedArg struct {
	URI              string `json:"uri"`
	OriginalRevision int    `json:"original-revision"`
	Skip             bool   `json:"skip"`
}

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 SecretTriggerChange

type SecretTriggerChange struct {
	URI             string    `json:"uri"`
	Revision        int       `json:"revision,omitempty"`
	NextTriggerTime time.Time `json:"next-trigger-time"`
}

SecretTriggerChange describes a change to a secret trigger.

type SecretTriggerWatchResult

type SecretTriggerWatchResult struct {
	WatcherId string                `json:"watcher-id"`
	Changes   []SecretTriggerChange `json:"changes"`
	Error     *Error                `json:"error,omitempty"`
}

SecretTriggerWatchResult holds secret trigger change events.

type SecretValueRef

type SecretValueRef struct {
	BackendID  string `json:"backend-id"`
	RevisionID string `json:"revision-id"`
}

SecretValueRef holds a reference to a secret value in a secret backend.

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 SecretsFilter

type SecretsFilter struct {
	URI      *string `json:"uri,omitempty"`
	Label    *string `json:"label,omitempty"`
	Revision *int    `json:"revision,omitempty"`
	OwnerTag *string `json:"owner-tag,omitempty"`
}

SecretsFilter is used when querying secrets.

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"`
}

SetExternalControllersInfoParams 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"`
	AgentStream         string         `json:"agent-stream,omitempty"`
	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 SetModelSecretBackendArg

type SetModelSecretBackendArg struct {
	// SecretBackendName is the name of the secret backend.
	SecretBackendName string `json:"secret-backend-name"`
}

SetModelSecretBackendArg holds the arg for setting the model secret backend.

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 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"`
	SecretState   *string            `json:"secret-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 StatusParams

type StatusParams struct {
	Patterns       []string `json:"patterns"`
	IncludeStorage bool     `json:"include-storage,omitempty"`
}

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"`

	// Directives are specified storage directives.
	Directives StorageDirectives `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 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 StorageDirectives

type StorageDirectives 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"`
}

StorageDirectives contains directives for storage instance.

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"`

	// TODO (jack-w-shaw 2022-02-22): Remove this. It is unused
	//
	// 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"`
	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 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"`
	Life            string                 `json:"life,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"`
	// SecretState is internal secret state for this unit.
	SecretState string `json:"secret-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"`
}

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 UpdateChannelArg

type UpdateChannelArg struct {
	Entity  Entity `json:"tag"`
	Force   bool   `json:"force"`
	Channel string `json:"channel"`
}

UpdateChannelArg 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 UpdateChannelArgs

type UpdateChannelArgs struct {
	Args []UpdateChannelArg `json:"args"`
}

UpdateChannelArgs 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 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 {
	UpsertSecretArg

	// URI identifies the secret to update.
	URI string `json:"uri"`
}

UpdateSecretArg holds the args for updating a secret.

type UpdateSecretArgs

type UpdateSecretArgs struct {
	Args []UpdateSecretArg `json:"args"`
}

UpdateSecretArgs holds args for updating secrets.

type UpdateSecretBackendArg

type UpdateSecretBackendArg struct {
	// Name is the name of the backend to update.
	Name string `json:"name"`

	// NameChange if set, renames the backend.
	NameChange *string `json:"name-change,omitempty"`

	// TokenRotateInterval is the interval to rotate
	// the backend master access token.
	TokenRotateInterval *time.Duration `json:"token-rotate-interval"`

	// Config are the backend's updated configuration attributes.
	Config map[string]interface{} `json:"config"`

	// Reset contains attributes to clear or reset.
	Reset []string `json:"reset"`

	// Force means to update the backend even if a ping fails.
	Force bool `json:"force,omitempty"`
}

UpdateSecretBackendArg holds args for updating a secret backend.

type UpdateSecretBackendArgs

type UpdateSecretBackendArgs struct {
	Args []UpdateSecretBackendArg `json:"args"`
}

UpdateSecretBackendArgs holds args for updating secret backends.

type UpdateUserSecretArg

type UpdateUserSecretArg struct {
	UpsertSecretArg

	// URI identifies the secret to update.
	URI string `json:"uri"`

	// ExistingLabel is the label of an existing secret.
	ExistingLabel string `json:"existing-label"`

	// AutoPrune indicates whether the staled secret revisions should be pruned automatically.
	AutoPrune *bool `json:"auto-prune,omitempty"`
}

UpdateUserSecretArg holds the args for updating a user secret.

func (UpdateUserSecretArg) HasUpdate

func (arg UpdateUserSecretArg) HasUpdate() bool

HasUpdate returns true if arg contains at least one attribute to update.

func (UpdateUserSecretArg) Validate

func (arg UpdateUserSecretArg) Validate() error

Validate validates the UpdateUserSecretArg.

type UpdateUserSecretArgs

type UpdateUserSecretArgs struct {
	Args []UpdateUserSecretArg `json:"args"`
}

UpdateUserSecretArgs holds args for updating user secrets.

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 UpgradeModelParams

type UpgradeModelParams struct {
	ModelTag            string         `json:"model-tag"`
	TargetVersion       version.Number `json:"target-version"`
	AgentStream         string         `json:"agent-stream,omitempty"`
	IgnoreAgentVersions bool           `json:"ignore-agent-versions,omitempty"`
	DryRun              bool           `json:"dry-run,omitempty"`
}

UpgradeModel contains the arguments for UpgradeModel API call.

type UpgradeModelResult

type UpgradeModelResult struct {
	ChosenVersion version.Number `json:"chosen-version"`
	Error         *Error         `json:"error,omitempty"`
}

UpgradeModelResult holds the result of a UpgradeModel API call.

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 UpsertSecretArg

type UpsertSecretArg struct {
	// RotatePolicy is how often a secret should be rotated.
	RotatePolicy *secrets.RotatePolicy `json:"rotate-policy,omitempty"`
	// ExpireTime is when a secret should expire.
	ExpireTime *time.Time `json:"expire-time,omitempty"`
	// Description represents the secret's description.
	Description *string `json:"description,omitempty"`
	// Tags are the secret tags.
	Label *string `json:"label,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.
	Content SecretContentParams `json:"content,omitempty"`
}

UpsertSecretArg holds the args for creating or updating a secret.

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 ValidateModelUpgradeParams

type ValidateModelUpgradeParams struct {
	Models []ModelParam `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 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 WatchRemoteSecretChangesArg

type WatchRemoteSecretChangesArg struct {
	// ApplicationToken is the application token on the remote model.
	ApplicationToken string `json:"application-token"`

	// RelationToken is the relation token on the remote model.
	RelationToken string `json:"relation-token"`

	// 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"`
}

WatchRemoteSecretChangesArg holds info for watching changes to a remote secret.

type WatchRemoteSecretChangesArgs

type WatchRemoteSecretChangesArgs struct {
	Args []WatchRemoteSecretChangesArg `json:"relations"`
}

WatchRemoteSecretChangesArgs holds args for watching changes to a remote secret.

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