import "github.com/juju/juju/apiserver/params"
actions.go annotations.go apierror.go applications.go backups.go block.go charms.go cloud.go constants.go controller.go crossmodel.go firewall.go http.go image_metadata.go instance_information.go internal.go kubernetes.go leadership.go logfwd.go logstream.go metrics.go migration.go model.go multiwatcher.go network.go params.go payloads.go payloads_unit.go registration.go resources.go resources_unit.go retrystrategy.go ssh.go status.go storage.go undertaker.go usermanager.go
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" )
const ( CodeNotFound = "not found" CodeUserNotFound = "user not found" CodeModelNotFound = "model not found" = "unauthorized access" CodeLoginExpired = "login expired" CodeNoCreds = "no credentials provided" CodeCannotEnterScope = "cannot enter scope" CodeCannotEnterScopeYet = "cannot enter scope yet" CodeExcessiveContention = "excessive contention" CodeUnitHasSubordinates = "unit has subordinates" CodeNotAssigned = "not assigned" CodeStopped = "stopped" CodeDead = "dead" CodeHasAssignedUnits = "machine has assigned units" CodeHasHostedModels = "controller has hosted models" CodeHasPersistentStorage = "controller/model has persistent storage" CodeModelNotEmpty = "model not empty" CodeMachineHasAttachedStorage = "machine has attached storage" CodeStorageAttached = "storage is attached" CodeNotProvisioned = "not provisioned" CodeNoAddressSet = "no address set" CodeTryAgain = "try again" CodeNotImplemented = "not implemented" // asserted to match rpc.codeNotImplemented in rpc/rpc_test.go CodeAlreadyExists = "already exists" CodeUpgradeInProgress = "upgrade in progress" CodeMigrationInProgress = "model migration in progress" CodeActionNotAvailable = "action no longer available" CodeOperationBlocked = "operation is blocked" CodeLeadershipClaimDenied = "leadership claim denied" CodeLeaseClaimDenied = "lease claim denied" CodeNotSupported = "not supported" CodeBadRequest = "bad request" CodeMethodNotAllowed = "method not allowed" CodeForbidden = "forbidden" CodeDischargeRequired = "macaroon discharge required" CodeRedirect = "redirection required" CodeRetry = "retry" CodeIncompatibleSeries = "incompatible series" CodeCloudRegionRequired = "cloud region required" CodeIncompatibleClouds = "incompatible clouds" )
The Code constants hold error codes for some kinds of error.
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" )
const MachineNonceHeader = "X-Juju-Nonce"
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.
var MigrationInProgressError = errors.New(CodeMigrationInProgress)
MigrationInProgressError signifies a migration is in progress.
var UpgradeInProgressError = errors.New(CodeUpgradeInProgress)
UpgradeInProgressError signifies an upgrade is in progress.
EncodeChecksum base64 encodes a sha256 checksum according to RFC 4648 and returns a value that can be added to the "Digest" http header.
ErrCode returns the error code associated with the given error, or the empty string if there is none.
FromHostsPorts is a helper to create a parameter out of the network type, here for a nested slice of HostPort.
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(configs []NetworkConfig) []network.InterfaceInfo
InterfaceInfoFromNetworkConfig converts a slice of NetworkConfig into the equivalent network.InterfaceInfo slice.
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 ToMachineHostPorts(hps []HostPort) network.MachineHostPorts
ToMachineHostPorts transforms multiple Addresses into a MachineHostPort collection.
func ToMachineHostsPorts(hpm [][]HostPort) []network.MachineHostPorts
ToMachineHostsPorts transforms slices of HostPort grouped by server into a slice of MachineHostPorts collections.
func ToProviderAddresses(addrs ...Address) network.ProviderAddresses
ToProviderAddresses transforms multiple Addresses into a ProviderAddresses collection.
func ToProviderHostPorts(hps []HostPort) network.ProviderHostPorts
ToProviderHostPorts transforms multiple Addresses into a ProviderHostPorts collection.
func ToProviderHostsPorts(hpm [][]HostPort) []network.ProviderHostPorts
ToProviderHostsPorts transforms slices of HostPort grouped by server into a slice of ProviderHostPort collections.
APIHostPortsResult holds the result of an APIHostPorts call. Each element in the top level slice holds the addresses for one API server.
func (r APIHostPortsResult) MachineHostsPorts() []network.MachineHostPorts
MachineHostPorts transforms the APIHostPortsResult into a slice of MachineHostPorts.
type Action struct { Tag string `json:"tag"` Receiver string `json:"receiver"` Name string `json:"name"` Parameters map[string]interface{} `json:"parameters,omitempty"` }
Action describes an Action that will be or has been queued up.
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 struct { Results []ActionExecutionResult `json:"results,omitempty"` }
ActionExecutionResults holds a slice of ActionExecutionResult for a bulk action API call
type ActionInfo struct { ModelUUID string `json:"model-uuid"` Id string `json:"id"` Receiver string `json:"receiver"` Name string `json:"name"` Parameters map[string]interface{} `json:"parameters,omitempty"` Status string `json:"status"` Message string `json:"message"` Results map[string]interface{} `json:"results,omitempty"` Enqueued time.Time `json:"enqueued"` Started time.Time `json:"started"` Completed time.Time `json:"completed"` }
ActionInfo holds the information about a action that is tracked by multiwatcherStore.
func (i *ActionInfo) EntityId() EntityId
EntityId returns a unique identifier for an action across models.
type ActionMessage struct { Timestamp time.Time `json:"timestamp"` Message string `json:"message"` }
ActionMessage represents a logged message on an action.
type ActionMessageParams struct { Messages []EntityString `json:"messages"` }
ActionMessageParams holds the arguments for logging progress messages for some actions.
type ActionPruneArgs struct { MaxHistoryTime time.Duration `json:"max-history-time"` MaxHistoryMB int `json:"max-history-mb"` }
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 struct { Results []ActionResult `json:"results,omitempty"` }
ActionResults is a slice of ActionResult for bulk requests.
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)
Actions is a slice of Action for bulk requests.
type ActionsByName struct { Name string `json:"name,omitempty"` Actions []ActionResult `json:"actions,omitempty"` Error *Error `json:"error,omitempty"` }
ActionsByName is a bulk API call wrapper containing actions as results.
type ActionsByNames struct { Actions []ActionsByName `json:"actions,omitempty"` }
ActionsByNames wrap a slice of Actions for API calls.
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 struct { Actions []ActionsByReceiver `json:"actions,omitempty"` }
ActionsByReceivers wrap a slice of Actions for API calls.
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 struct { Results []ActionsQueryResult `json:"results,omitempty"` }
ActionsQueryResults holds a slice of responses from the Actions query.
type AddApplicationOffer struct { ModelTag string `json:"model-tag"` OfferName string `json:"offer-name"` ApplicationName string `json:"application-name"` ApplicationDescription string `json:"application-description"` Endpoints map[string]string `json:"endpoints"` }
AddApplicationOffer values are used to create an application offer.
type AddApplicationOffers struct { Offers []AddApplicationOffer }
AddApplicationOffers is used when adding offers to an application directory.
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.
AddApplicationUnitsResults holds the names of the units added by the AddUnits call.
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 struct { URL string `json:"url"` Channel string `json:"channel"` Force bool `json:"force"` }
AddCharm holds the arguments for making an AddCharm API call.
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 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 struct { // The following fields hold attributes that will be given to the // new machine when it is created. Series string `json:"series"` Constraints constraints.Value `json:"constraints"` Jobs []model.MachineJob `json:"jobs"` // Disks describes constraints for disks that must be attached to // the machine when it is provisioned. Disks []storage.Constraints `json:"disks,omitempty"` // If Placement is non-nil, it contains a placement directive // that will be used to decide how to instantiate the machine. Placement *instance.Placement `json:"placement,omitempty"` // If ParentId is non-empty, it specifies the id of the // parent machine within which the new machine will // be created. In that case, ContainerType must also be // set. ParentId string `json:"parent-id"` // ContainerType optionally gives the container type of the // new machine. If it is non-empty, the new machine // will be implemented by a container. If it is specified // but ParentId is empty, a new top level machine will // be created to hold the container with given series, // constraints and jobs. ContainerType instance.ContainerType `json:"container-type"` // If InstanceId is non-empty, it will be associated with // the new machine along with the given nonce, // hardware characteristics and addresses. // All the following fields will be ignored if ContainerType // is set. InstanceId instance.Id `json:"instance-id"` Nonce string `json:"nonce"` HardwareCharacteristics instance.HardwareCharacteristics `json:"hardware-characteristics"` Addrs []Address `json:"addresses"` }
AddMachineParams encapsulates the parameters used to create a new machine.
type AddMachines struct { MachineParams []AddMachineParams `json:"params"` }
AddMachines holds the parameters for making the AddMachines call.
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 struct { Machines []AddMachinesResult `json:"machines"` }
AddMachinesResults holds the results of an AddMachines call.
type AddPendingResourcesArgs struct { Entity AddCharmWithAuthorization // Resources is the list of resources to add as pending. Resources []CharmResource `json:"resources"` }
AddPendingResourcesArgs holds the arguments to the AddPendingResources API endpoint.
type 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 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 struct { Endpoints map[string]CharmRelation `json:"endpoints"` }
AddRelationResults holds the results of a AddRelation call. The Endpoints field maps application names to the involved endpoints.
type AddStorageDetails 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 struct { Result *AddStorageDetails `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
AddStorageResult contains the result of adding storage to a unit.
type AddStorageResults struct { Results []AddStorageResult `json:"results"` }
AddStorageResults contains the results of adding storage to units.
type AddSubnetParams struct { CIDR string `json:"cidr,omitempty"` SubnetProviderId string `json:"subnet-provider-id,omitempty"` ProviderNetworkId string `json:"provider-network-id,omitempty"` SpaceTag string `json:"space-tag"` VLANTag int `json:"vlan-tag,omitempty"` Zones []string `json:"zones,omitempty"` }
AddSubnetParams holds a cidr and space tags, subnet provider ID, and a list of zones to associate the subnet to. Either SubnetTag or SubnetProviderId must be set, but not both. Zones can be empty if they can be discovered
type AddSubnetParamsV2 struct { SubnetTag string `json:"subnet-tag,omitempty"` SubnetProviderId string `json:"subnet-provider-id,omitempty"` ProviderNetworkId string `json:"provider-network-id,omitempty"` SpaceTag string `json:"space-tag"` VLANTag int `json:"vlan-tag,omitempty"` Zones []string `json:"zones,omitempty"` }
AddSubnetParams holds a subnet and space tags, subnet provider ID, and a list of zones to associate the subnet to. Either SubnetTag or SubnetProviderId must be set, but not both. Zones can be empty if they can be discovered
type AddSubnetsParams struct { Subnets []AddSubnetParams `json:"subnets"` }
AddSubnetsParams holds the arguments of AddSubnets API call.
type AddSubnetsParamsV2 struct { Subnets []AddSubnetParamsV2 `json:"subnets"` }
AddSubnetsParams holds the arguments of AddSubnets APIv2 call.
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 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 struct { Results []AddUserResult `json:"results"` }
AddUserResults holds the results of the bulk AddUser API call.
AddUsers holds the parameters for adding new users.
type Address struct { Value string `json:"value"` Type string `json:"type"` Scope string `json:"scope"` SpaceName string `json:"space-name,omitempty"` ProviderSpaceID string `json:"space-id,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 which this type can be transformed to/from.
func FromMachineAddress(addr network.MachineAddress) Address
FromMachineAddress returns an Address for the input MachineAddress.
func FromMachineAddresses(mAddrs ...network.MachineAddress) []Address
FromMachineAddresses transforms multiple MachineAddresses into a slice of Address.
func FromProviderAddress(addr network.ProviderAddress) Address
FromProviderAddress returns an Address for the input ProviderAddress.
func FromProviderAddresses(pAddrs ...network.ProviderAddress) []Address
FromProviderAddresses transforms multiple ProviderAddresses into a slice of Address.
func (addr Address) MachineAddress() network.MachineAddress
MachineAddress transforms the Address to a MachineAddress, effectively ignoring the space fields.
func (addr Address) ProviderAddress() network.ProviderAddress
ProviderAddress transforms the Address to a ProviderAddress.
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 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 struct { Entities []AgentGetEntitiesResult `json:"entities"` }
AgentGetEntitiesResults holds the results of a agent.API.GetEntities call.
AgentVersionResult is used to return the current version number of the agent running the API server.
AllWatcherId holds the id of an AllWatcher.
AllWatcherNextResults holds deltas returned from calling AllWatcher.Next().
type AnnotationInfo struct { ModelUUID string `json:"model-uuid"` Tag string `json:"tag"` Annotations map[string]string `json:"annotations"` }
AnnotationInfo holds the information about an annotation that is tracked by multiwatcherStore.
func (i *AnnotationInfo) EntityId() EntityId
EntityId returns a unique identifier for an annotation across models.
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 struct { Results []AnnotationsGetResult `json:"results"` }
AnnotationsGetResults holds annotations associated with entities.
type AnnotationsSet struct { Annotations []EntityAnnotations `json:"annotations"` }
AnnotationsSet stores parameters for making Set call on Annotations client.
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"` }
ApplicationCharmInfo contains information about an application's charm.
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.
ApplicationCharmRelations holds parameters for making the application CharmRelations call.
ApplicationCharmRelationsResults holds the results of the application CharmRelations call.
type ApplicationCharmResult struct { Result *ApplicationCharm `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
ApplicationCharmResult contains an ApplicationCharm or an error.
type ApplicationCharmResults struct { Results []ApplicationCharmResult `json:"results"` }
ApplicationCharmResults contains a set of ApplicationCharmResults.
type ApplicationConfigSet 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"` }
ApplicationConfigSet holds the parameters for an application config set command.
type ApplicationConfigSetArgs struct { Args []ApplicationConfigSet }
ApplicationConfigSetArgs holds the parameters for setting application config values for specified applications.
type ApplicationConfigUnsetArgs struct { Args []ApplicationUnset }
ApplicationConfigUnsetArgs holds the parameters for resetting application config values for specified applications.
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 struct { ApplicationName string `json:"application"` Series string `json:"series"` CharmURL string `json:"charm-url"` Channel string `json:"channel"` NumUnits int `json:"num-units"` Config map[string]string `json:"config,omitempty"` ConfigYAML string `json:"config-yaml"` // Takes precedence over config if both are present. Constraints constraints.Value `json:"constraints"` Placement []*instance.Placement `json:"placement,omitempty"` Policy string `json:"policy,omitempty"` Storage map[string]storage.Constraints `json:"storage,omitempty"` Devices map[string]devices.Constraints `json:"devices,omitempty"` AttachStorage []string `json:"attach-storage,omitempty"` EndpointBindings map[string]string `json:"endpoint-bindings,omitempty"` Resources map[string]string `json:"resources,omitempty"` }
ApplicationDeploy holds the parameters for making the application Deploy call.
type ApplicationDeployV5 struct { ApplicationName string `json:"application"` Series string `json:"series"` CharmURL string `json:"charm-url"` Channel string `json:"channel"` NumUnits int `json:"num-units"` Config map[string]string `json:"config,omitempty"` ConfigYAML string `json:"config-yaml"` // Takes precedence over config if both are present. Constraints constraints.Value `json:"constraints"` Placement []*instance.Placement `json:"placement,omitempty"` Storage map[string]storage.Constraints `json:"storage,omitempty"` AttachStorage []string `json:"attach-storage,omitempty"` EndpointBindings map[string]string `json:"endpoint-bindings,omitempty"` Resources map[string]string `json:"resources,omitempty"` }
ApplicationDeployV5 holds the parameters for making the application Deploy call for application facades older than v6. Missing the newer Policy arg.
type ApplicationDeployV6 struct { ApplicationName string `json:"application"` Series string `json:"series"` CharmURL string `json:"charm-url"` Channel string `json:"channel"` NumUnits int `json:"num-units"` Config map[string]string `json:"config,omitempty"` ConfigYAML string `json:"config-yaml"` // Takes precedence over config if both are present. Constraints constraints.Value `json:"constraints"` Placement []*instance.Placement `json:"placement,omitempty"` Policy string `json:"policy,omitempty"` Storage map[string]storage.Constraints `json:"storage,omitempty"` AttachStorage []string `json:"attach-storage,omitempty"` EndpointBindings map[string]string `json:"endpoint-bindings,omitempty"` Resources map[string]string `json:"resources,omitempty"` }
ApplicationDeployV6 holds the parameters for making the application Deploy call for application facades older than v6. Missing the newer Device arg.
ApplicationDestroy holds the parameters for making the deprecated Application.Destroy call.
ApplicationExpose holds the parameters for making the application Expose call.
type ApplicationGet struct { ApplicationName string `json:"application"` // BranchName identifies the "in-flight" branch that this // request will retrieve application data for. BranchName string `json:"branch"` }
ApplicationGet holds parameters for making the singular Get or GetCharmURL calls, and bulk calls to CharmConfig in the V9 API.
type ApplicationGetArgs struct { Args []ApplicationGet `json:"args"` }
ApplicationGetArgs is used to request config for multiple application/generation pairs.
type ApplicationGetConfigResults struct { Results []ConfigResult }
ApplicationGetConfigResults holds the return values for application GetConfig.
type ApplicationGetConstraintsResults struct { Results []ApplicationConstraint `json:"results"` }
ApplicationGetConstraintsResults holds the multiple return values for GetConstraints call.
type ApplicationGetResults struct { Application string `json:"application"` Charm string `json:"charm"` CharmConfig map[string]interface{} `json:"config"` ApplicationConfig map[string]interface{} `json:"application-config,omitempty"` Constraints constraints.Value `json:"constraints"` Series string `json:"series"` Channel string `json:"channel"` EndpointBindings map[string]string `json:"endpoint-bindings,omitempty"` }
ApplicationGetResults holds results of the application Get call.
type ApplicationInfo struct { ModelUUID string `json:"model-uuid"` Name string `json:"name"` Exposed bool `json:"exposed"` CharmURL string `json:"charm-url"` OwnerTag string `json:"owner-tag"` Life life.Value `json:"life"` MinUnits int `json:"min-units"` Constraints constraints.Value `json:"constraints"` Config map[string]interface{} `json:"config,omitempty"` Subordinate bool `json:"subordinate"` Status StatusInfo `json:"status"` WorkloadVersion string `json:"workload-version"` }
ApplicationInfo holds the information about an application that is tracked by multiwatcherStore.
func (i *ApplicationInfo) EntityId() EntityId
EntityId returns a unique identifier for an application across models.
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 struct { Results []ApplicationInfoResult `json:"results"` }
ApplicationInfoResults holds applications associated with entities.
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 struct { Args []ApplicationMergeBindings `json:"args"` }
ApplicationMergeBindingsArgs holds the parameters for updating application bindings.
type ApplicationMetricCredential struct { ApplicationName string `json:"application"` MetricCredentials []byte `json:"metrics-credentials"` }
ApplicationMetricCredential holds parameters for the SetApplicationCredentials call.
type ApplicationMetricCredentials struct { Creds []ApplicationMetricCredential `json:"creds"` }
ApplicationMetricCredentials holds multiple ApplicationMetricCredential parameters.
type ApplicationOfferAdminDetails struct { ApplicationOfferDetails ApplicationName string `json:"application-name"` CharmURL string `json:"charm-url"` Connections []OfferConnection `json:"connections,omitempty"` }
ApplicationOfferAdminDetails represents an application offering, including details about how it has been deployed.
type ApplicationOfferDetails struct { SourceModelTag string `json:"source-model-tag"` OfferUUID string `json:"offer-uuid"` OfferURL string `json:"offer-url"` OfferName string `json:"offer-name"` ApplicationDescription string `json:"application-description"` Endpoints []RemoteEndpoint `json:"endpoints,omitempty"` Spaces []RemoteSpace `json:"spaces,omitempty"` Bindings map[string]string `json:"bindings,omitempty"` Users []OfferUserDetails `json:"users,omitempty"` }
ApplicationOfferDetails represents an application offering from an external model.
type ApplicationOfferInfo struct { ModelUUID string `json:"model-uuid"` OfferName string `json:"offer-name"` OfferUUID string `json:"offer-uuid"` ApplicationName string `json:"application-name"` CharmName string `json:"charm-name"` TotalConnectedCount int `json:"total-connected-count"` ActiveConnectedCount int `json:"active-connected-count"` }
ApplicationOfferInfo holds the information about an application offer that is tracked by multiwatcherStore.
func (i *ApplicationOfferInfo) EntityId() EntityId
EntityId returns a unique identifier for an application offer across models.
type ApplicationOfferResult struct { // Result contains application offer information. Result *ApplicationOfferAdminDetails `json:"result,omitempty"` // Error contains related error. Error *Error `json:"error,omitempty"` }
ApplicationOfferResult is a result of querying a remote application offer based on its URL.
type ApplicationOfferStatus 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 struct { // Results contains collection of remote application results. Results []ApplicationOfferResult `json:"results,omitempty"` }
ApplicationOffersResults is a result of listing remote application offers.
type ApplicationResult struct { Tag string `json:"tag"` Charm string `json:"charm,omitempty"` Series string `json:"series,omitempty"` Channel string `json:"channel,omitempty"` Constraints constraints.Value `json:"constraints,omitempty"` Principal bool `json:"principal"` Exposed bool `json:"exposed"` Remote bool `json:"remote"` EndpointBindings map[string]string `json:"endpoint-bindings,omitempty"` }
ApplicationResult holds an application info. NOTE: we should look to combine ApplicationResult and ApplicationInfo.
type ApplicationSet struct { ApplicationName string `json:"application"` // BranchName identifies the "in-flight" branch that this // request will set configuration for. BranchName string `json:"branch"` Options map[string]string `json:"options"` }
ApplicationSet holds the parameters for an application Set command. Options contains the configuration data.
type ApplicationSetCharm 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"` // Channel is the charm store channel from which the charm came. Channel string `json:"channel"` // ConfigSettings is the charm settings to set during the upgrade. // This field is only understood by Application facade version 2 // and greater. ConfigSettings map[string]string `json:"config-settings,omitempty"` // ConfigSettingsYAML is the charm settings in YAML format to set // during the upgrade. If this is non-empty, it will take precedence // over ConfigSettings. This field is only understood by Application // facade version 2 ConfigSettingsYAML string `json:"config-settings-yaml,omitempty"` // Force forces the lxd profile validation overriding even if it's fails. Force bool `json:"force"` // ForceUnits forces the upgrade on units in an error state. ForceUnits bool `json:"force-units"` // ForceSeries forces the use of the charm even if it doesn't match the // series of the unit. ForceSeries bool `json:"force-series"` // ResourceIDs is a map of resource names to resource IDs to activate during // the upgrade. ResourceIDs map[string]string `json:"resource-ids,omitempty"` // StorageConstraints is a map of storage names to storage constraints to // update during the upgrade. This field is only understood by Application // facade version 2 and greater. StorageConstraints map[string]StorageConstraints `json:"storage-constraints,omitempty"` // EndpointBindings is a map of operator-defined endpoint names to // space names to be merged with any existing endpoint bindings. This // field is only understood by Application facade version 10 and greater. EndpointBindings map[string]string `json:"endpoint-bindings,omitempty"` }
ApplicationSetCharm sets the charm for a given application.
type ApplicationStatus struct { Err *Error `json:"err,omitempty"` Charm string `json:"charm"` Series string `json:"series"` Exposed bool `json:"exposed"` Life life.Value `json:"life"` Relations map[string][]string `json:"relations"` CanUpgradeTo string `json:"can-upgrade-to"` SubordinateTo []string `json:"subordinate-to"` Units map[string]UnitStatus `json:"units"` MeterStatuses map[string]MeterStatus `json:"meter-statuses"` Status DetailedStatus `json:"status"` WorkloadVersion string `json:"workload-version"` CharmVersion string `json:"charm-verion"` CharmProfile string `json:"charm-profile"` 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 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 struct { Results []ApplicationStatusResult `json:"results"` }
ApplicationStatusResults holds multiple StatusResult.
ApplicationUnexpose holds parameters for the application Unexpose call.
type ApplicationUnitInfo struct { ProviderId string `json:"provider-id"` UnitTag string `json:"unit-tag"` }
ApplicationUnitInfo holds info about the unit in the application.
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 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 struct { ApplicationName string `json:"application"` CharmURL string `json:"charm-url"` ForceCharmURL bool `json:"force-charm-url"` ForceSeries bool `json:"force-series"` Force bool `json:"force"` MinUnits *int `json:"min-units,omitempty"` SettingsStrings map[string]string `json:"settings,omitempty"` SettingsYAML string `json:"settings-yaml"` // Takes precedence over SettingsStrings if both are present. 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 struct { Results []ApplicationCharmActionsResult `json:"results,omitempty"` }
ApplicationsCharmActionsResults holds a slice of ApplicationCharmActionsResult for a bulk result of charm Actions for Applications.
type ApplicationsDeploy struct { Applications []ApplicationDeploy `json:"applications"` }
ApplicationsDeploy holds the parameters for deploying one or more applications.
type ApplicationsDeployV5 struct { Applications []ApplicationDeployV5 `json:"applications"` }
ApplicationsDeployV5 holds the parameters for deploying one or more applications.
type ApplicationsDeployV6 struct { Applications []ApplicationDeployV6 `json:"applications"` }
ApplicationsDeployV6 holds the parameters for deploying one or more applications.
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 struct { Notes string `json:"notes"` KeepCopy bool `json:"keep-copy"` NoDownload bool `json:"no-download"` }
BackupsCreateArgs holds the args for the API Create method.
BackupsDownloadArgs holds the args for the API Download method.
BackupsInfoArgs holds the args for the API Info method.
type BackupsListArgs struct { }
BackupsListArgs holds the args for the API List method.
type BackupsListResult struct { List []BackupsMetadataResult `json:"list"` }
BackupsListResult holds the list of all stored backups.
type BackupsMetadataResult struct { ID string `json:"id"` Checksum string `json:"checksum"` ChecksumFormat string `json:"checksum-format"` Size int64 `json:"size"` Stored time.Time `json:"stored"` // May be zero... Started time.Time `json:"started"` Finished time.Time `json:"finished"` // May be zero... Notes string `json:"notes"` Model string `json:"model"` Machine string `json:"machine"` Hostname string `json:"hostname"` Version version.Number `json:"version"` Series string `json:"series"` CACert string `json:"ca-cert"` CAPrivateKey string `json:"ca-private-key"` Filename string `json:"filename"` }
BackupsMetadataResult holds the metadata for a backup as returned by an API backups method (such as Create).
BackupsRemoveArgs holds the args for the API Remove method.
type BackupsUploadArgs struct { Data []byte `json:"data"` Metadata BackupsMetadataResult `json:"metadata"` }
BackupsUploadArgs holds the args for the API Upload method.
BackupsListResult holds the list of all stored backups.
type Block struct { // Id is this blocks id. Id string `json:"id"` // Tag holds the tag of the entity that is blocked. Tag string `json:"tag"` // Type is block type as per model.BlockType. // Valid types are "BlockDestroy", "BlockRemove" and "BlockChange". Type string `json:"type"` // Message is a descriptive or an explanatory message // that the block was created with. Message string `json:"message,omitempty"` }
Block describes a Juju block that protects model from corruption.
type BlockDeviceResult struct { Result storage.BlockDevice `json:"result"` Error *Error `json:"error,omitempty"` }
BlockDeviceResult holds the result of an API call to retrieve details of a block device.
type BlockDeviceResults struct { Results []BlockDeviceResult `json:"results,omitempty"` }
BlockDeviceResults holds the result of an API call to retrieve details of multiple block devices.
type BlockDevicesResult struct { Result []storage.BlockDevice `json:"result"` Error *Error `json:"error,omitempty"` }
BlockDevicesResult holds the result of an API call to retrieve details of all block devices relating to some entity.
type BlockDevicesResults struct { Results []BlockDevicesResult `json:"results,omitempty"` }
BlockDevicseResults holds the result of an API call to retrieve details of all block devices relating to some entities.
type BlockInfo struct { ModelUUID string `json:"model-uuid"` Id string `json:"id"` Type model.BlockType `json:"type"` Message string `json:"message"` Tag string `json:"tag"` }
BlockInfo holds the information about a block that is tracked by multiwatcherStore.
EntityId returns a unique identifier for a block across models.
BlockResult holds the result of an API call to retrieve details for a block.
type BlockResults struct { Results []BlockResult `json:"results,omitempty"` }
BlockResults holds the result of an API call to list blocks.
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.
BoolResult holds the result of an API call that returns a a boolean or an error.
type BoolResults struct { Results []BoolResult `json:"results"` }
BoolResults holds multiple results with BoolResult each.
BranchArg represents an in-flight branch via its model and branch name.
type BranchInfo struct { ModelUUID string `json:"model-uuid"` Id string `json:"id"` Name string `json:"name"` AssignedUnits map[string][]string `json:"assigned-units"` Config map[string][]ItemChange `json:"charm-config"` Created int64 `json:"created"` CreatedBy string `json:"created-by"` Completed int64 `json:"completed"` CompletedBy string `json:"completed-by"` GenerationId int `json:"generation-id"` }
BranchInfo holds data about a model generation (branch) that is tracked by multiwatcherStore.
func (i *BranchInfo) EntityId() EntityId
EntityId returns a unique identifier for a generation.
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 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 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 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 struct { Storage []ImportStorageParams `json:"storage"` }
BulkImportStorageParams contains the parameters for importing a collection of storage entities.
type BundleChange struct { // Id is the unique identifier for this change. Id string `json:"id"` // Method is the action to be performed to apply this change. Method string `json:"method"` // Args holds a list of arguments to pass to the method. Args []interface{} `json:"args"` // Requires holds a list of dependencies for this change. Each dependency // is represented by the corresponding change id, and must be applied // before this change is applied. Requires []string `json:"requires"` }
BundleChange holds a single change required to deploy a bundle.
type BundleChangesMapArgs 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 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 struct { // BundleDataYAML is the YAML-encoded charm bundle data // (see "github.com/juju/charm.BundleData"). BundleDataYAML string `json:"yaml"` BundleURL string `json:"bundleURL"` }
BundleChangesParams holds parameters for making Bundle.GetChanges calls.
type BundleChangesResults struct { // Changes holds the list of changes required to deploy the bundle. // It is omitted if the provided bundle YAML has verification errors. Changes []*BundleChange `json:"changes,omitempty"` // Errors holds possible bundle verification errors. Errors []string `json:"errors,omitempty"` }
BundleChangesResults holds results of the Bundle.GetChanges call.
BytesResult holds the result of an API call that returns a slice of bytes.
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 struct { Models []ChangeModelCredentialParams `json:"model-credentials"` }
ChangeModelCredentialsParams holds the arguments for changing cloud credentials on models.
type Charm struct { Revision int `json:"revision"` URL string `json:"url"` Config map[string]CharmOption `json:"config"` Meta *CharmMeta `json:"meta,omitempty"` Actions *CharmActions `json:"actions,omitempty"` Metrics *CharmMetrics `json:"metrics,omitempty"` LXDProfile *CharmLXDProfile `json:"lxd-profile,omitempty"` }
Charm holds all the charm data that the client needs. To be honest, it probably returns way more than what is actually needed.
type CharmActionSpec struct { Description string `json:"description"` Params map[string]interface{} `json:"params"` }
CharmActionSpec mirrors charm.ActionSpec.
type CharmActions struct { ActionSpecs map[string]CharmActionSpec `json:"specs,omitempty"` }
CharmActions mirrors charm.Actions.
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 CharmInfo struct { ModelUUID string `json:"model-uuid"` CharmURL string `json:"charm-url"` CharmVersion string `json:"charm-version"` Life life.Value `json:"life"` LXDProfile *Profile `json:"profile"` // DefaultConfig is derived from state-stored *charm.Config. DefaultConfig map[string]interface{} `json:"config,omitempty"` }
CharmInfo holds the information about a charm that is tracked by the multiwatcher.
EntityId returns a unique identifier for an charm across models.
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 struct { LXDProfile *CharmLXDProfile `json:"lxd-profile"` }
CharmLXDProfileResult returns the result of finding the CharmLXDProfile
type CharmMeta struct { Name string `json:"name"` Summary string `json:"summary"` Description string `json:"description"` Subordinate bool `json:"subordinate"` Provides map[string]CharmRelation `json:"provides,omitempty"` Requires map[string]CharmRelation `json:"requires,omitempty"` Peers map[string]CharmRelation `json:"peers,omitempty"` ExtraBindings map[string]string `json:"extra-bindings,omitempty"` Categories []string `json:"categories,omitempty"` Tags []string `json:"tags,omitempty"` Series []string `json:"series,omitempty"` Storage map[string]CharmStorage `json:"storage,omitempty"` Devices map[string]CharmDevice `json:"devices,omitempty"` 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"` }
CharmMeta mirrors charm.Meta.
CharmMetric mirrors charm.Metric.
type CharmMetrics struct { Metrics map[string]CharmMetric `json:"metrics"` Plan CharmPlan `json:"plan"` }
CharmMetrics mirrors charm.Metrics.
type CharmOption struct { Type string `json:"type"` Description string `json:"description,omitempty"` Default interface{} `json:"default,omitempty"` }
CharmOption mirrors charm.Option
CharmPayloadClass mirrors charm.PayloadClass.
CharmPlan mirrors charm.Plan
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 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(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 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 struct { Name string `json:"name"` Type string `json:"type"` Path string `json:"path"` Description string `json:"description"` }
CharmResourceMeta mirrors charm.ResourceMeta.
type CharmStorage struct { Name string `json:"name"` Description string `json:"description"` Type string `json:"type"` 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.
CharmURL identifies a single charm URL.
CharmURLs identifies multiple charm URLs.
CharmsList stores parameters for a charms.List call
CharmsListResult stores result from a charms.List call
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 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 ErrorResults
ClaimLeadershipBulkResults is the collection of results from a bulk leadership claim.
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 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"` Config map[string]interface{} `json:"config,omitempty"` RegionConfig map[string]map[string]interface{} `json:"region-config,omitempty"` }
Cloud holds information about a cloud.
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 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 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 (p CloudCredentialArg) IsEmpty() bool
IsEmpty returns whether a cloud credential argument is empty.
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 struct { Result *CloudCredential `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
CloudCredentialResult contains a CloudCredential or an error.
type CloudCredentialResults struct { Results []CloudCredentialResult `json:"results,omitempty"` }
CloudCredentialResults contains a set of CloudCredentialResults.
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 struct { // ImageId is an image identifier. ImageId string `json:"image-id"` // Stream contains reference to a particular stream, // for e.g. "daily" or "released" Stream string `json:"stream,omitempty"` // Region is the name of cloud region associated with the image. Region string `json:"region"` // Version is OS version, for e.g. "12.04". Version string `json:"version"` // Series is OS series, for e.g. "trusty". Series string `json:"series"` // Arch is the architecture for this cloud image, for e.g. "amd64" Arch string `json:"arch"` // VirtType contains the virtualisation type of the cloud image, for e.g. "pv", "hvm". "kvm". VirtType string `json:"virt-type,omitempty"` // RootStorageType contains type of root storage, for e.g. "ebs", "instance". RootStorageType string `json:"root-storage-type,omitempty"` // RootStorageSize contains size of root storage in gigabytes (GB). RootStorageSize *uint64 `json:"root-storage-size,omitempty"` // Source describes where this image is coming from: is it public? custom? Source string `json:"source"` // Priority is an importance factor for image metadata. // Higher number means higher priority. // This will allow to sort metadata by importance. Priority int `json:"priority"` }
CloudImageMetadata holds cloud image metadata properties.
type CloudImageMetadataList struct { Metadata []CloudImageMetadata `json:"metadata,omitempty"` }
CloudImageMetadataList holds a list of cloud image metadata.
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 struct { Result *CloudInfo `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
CloudInfoResult holds the result of a CloudInfo call.
type CloudInfoResults struct { Results []CloudInfoResult `json:"results"` }
CloudInfoResults holds the result of a bulk CloudInfo call.
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 struct { Constraints []CloudInstanceTypesConstraint `json:"constraints"` }
CloudInstanceTypesConstraints contains a slice of CloudInstanceTypesConstraint.
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 struct { Cloud *Cloud `json:"cloud,omitempty"` Error *Error `json:"error,omitempty"` }
CloudResult contains a cloud definition or an error.
type CloudResults struct { Results []CloudResult `json:"results,omitempty"` }
CloudResults contains a set of CloudResults.
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"` }
CloudSpec holds a cloud specification.
type CloudSpecResult struct { Result *CloudSpec `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
CloudSpecResult contains a CloudSpec or an error.
type CloudSpecResults struct { Results []CloudSpecResult `json:"results,omitempty"` }
CloudSpecResults contains a set of CloudSpecResults.
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 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 ConfigResult struct { Config map[string]interface{} `json:"config"` Error *Error `json:"error,omitempty"` }
ConfigResults holds configuration values for an entity.
ConfigSettings holds unit, application or cham configuration settings with string keys and arbitrary values.
type ConfigSettingsResult struct { Error *Error `json:"error,omitempty"` Settings ConfigSettings `json:"settings"` }
ConfigSettingsResult holds a configuration map or an error.
type ConfigSettingsResults struct { Results []ConfigSettingsResult `json:"results"` }
ConfigSettingsResults holds multiple configuration maps or errors.
ConfigValue encapsulates a configuration value and its source.
type ConstraintsResult struct { Error *Error `json:"error,omitempty"` Constraints constraints.Value `json:"constraints"` }
ConstraintsResult holds machine constraints or an error.
type ConstraintsResults struct { Results []ConstraintsResult `json:"results"` }
ConstraintsResults holds multiple constraints results.
type ConsumeApplicationArg struct { // The offer to be consumed. ApplicationOfferDetails // Macaroon is used for authentication. Macaroon *macaroon.Macaroon `json:"macaroon,omitempty"` // ControllerInfo contains connection details to the controller // hosting the offer. ControllerInfo *ExternalControllerInfo `json:"external-controller,omitempty"` // ApplicationAlias is the name of the alias to use for the application name. ApplicationAlias string `json:"application-alias,omitempty"` }
ConsumeApplicationArg holds the arguments for consuming a remote application.
type ConsumeApplicationArgs struct { Args []ConsumeApplicationArg `json:"args,omitempty"` }
ConsumeApplicationArgs is a collection of arg for consuming applications.
type ConsumeOfferDetails struct { Offer *ApplicationOfferDetails `json:"offer,omitempty"` Macaroon *macaroon.Macaroon `json:"macaroon,omitempty"` ControllerInfo *ExternalControllerInfo `json:"external-controller,omitempty"` }
ConsumeOfferDetails contains the details necessary to consume an application offer.
type ConsumeOfferDetailsResult struct { ConsumeOfferDetails Error *Error `json:"error,omitempty"` }
ConsumeOfferDetailsResult contains the details necessary to consume an application offer or an error.
type ConsumeOfferDetailsResults struct { Results []ConsumeOfferDetailsResult `json:"results,omitempty"` }
ConsumeOfferDetailsResults represents the result of a ConsumeOfferDetails call.
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"` 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 ContainerConfigV5 struct { ProviderType string `json:"provider-type"` AuthorizedKeys string `json:"authorized-keys"` SSLHostnameVerification bool `json:"ssl-hostname-verification"` Proxy proxy.Settings `json:"proxy"` AptProxy proxy.Settings `json:"apt-proxy"` AptMirror string `json:"apt-mirror"` CloudInitUserData map[string]interface{} `json:"cloudinit-userdata,omitempty"` ContainerInheritProperties string `json:"container-inherit-properties,omitempty"` *UpdateBehavior }
ContainerConfigV5 contains information from the model config that is needed for container cloud-init for version 5 provisioner api calls.
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.
ContainerManagerConfig contains information from the model config that is needed for configuring the container manager.
type ContainerManagerConfigParams struct { Type instance.ContainerType `json:"type"` }
ContainerManagerConfigParams contains the parameters for the ContainerManagerConfig provisioner API call.
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 struct { Results []ContainerProfileResult `json:"results"` }
ContainerProfileResults returns the ContainerProfileResult for each unit to be placed on the container.
type ContainerTypeResult struct { Type instance.ContainerType `json:"container-type"` Error *Error `json:"error"` }
ContainerTypeResult holds the result of a machine's ContainerType.
type ControllerAPIInfoResult struct { Addresses []string `json:"addresses"` CACert string `json:"cacert"` Error *Error `json:"error,omitempty"` }
ControllerAPIInfoResult holds controller api address details.
type ControllerAPIInfoResults struct { Results []ControllerAPIInfoResult `json:"results"` }
ControllerAPIInfoResults holds controller api address details results.
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.
ControllerConfig holds a controller configuration.
type ControllerConfigResult struct { Config ControllerConfig `json:"config"` }
ControllerConfigResult holds controller configuration.
ControllerConfigSet holds new config values for Controller.ConfigSet.
type ControllerCredentialInfo struct { // Content has comprehensive credential content. Content CredentialContent `json:"content,omitempty"` // Models contains models that are using ths credential. Models []ModelAccess `json:"models,omitempty"` }
ControllerCredentialInfo contains everything Juju stores on the controller about the credential - its contents as well as what models use it and what access currently logged in user, a credential owner, has to these models.
type ControllerVersionResults 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 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 struct { Results []ControllersChangeResult `json:"results"` }
ControllersChangeResults contains the results of the EnableHA API call.
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 struct { NumControllers int `json:"num-controllers"` Constraints constraints.Value `json:"constraints,omitempty"` // Series is the series to associate with new controller machines. // If this is empty, then the model's default series is used. Series string `json:"series,omitempty"` // Placement defines specific machines to become new controller machines. Placement []string `json:"placement,omitempty"` }
ControllersServersSpec contains arguments for the EnableHA client API call.
type ControllersSpecs struct { Specs []ControllersSpec `json:"specs"` }
ControllersServersSpecs contains all the arguments for the EnableHA API call.
CountedEntity identifies an entity that has a count.
const ( Machines CountedEntity = "machines" Cores CountedEntity = "cores" Units CountedEntity = "units" )
type CreateSpaceParams struct { CIDRs []string `json:"cidrs"` SpaceTag string `json:"space-tag"` Public bool `json:"public"` ProviderId string `json:"provider-id,omitempty"` }
CreateSpaceParams holds the space tag and at least one subnet tag required to create a new space.
type CreateSpaceParamsV4 struct { SubnetTags []string `json:"subnet-tags"` 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 struct { Spaces []CreateSpaceParams `json:"spaces"` }
CreateSpacesParams olds the arguments of the AddSpaces API call.
type CreateSpacesParamsV4 struct { Spaces []CreateSpaceParamsV4 `json:"spaces"` }
CreateSpacesParams holds the arguments of the AddSpaces API call.
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 struct { Subnets []CreateSubnetParams `json:"subnets"` }
CreateSubnetsParams holds the arguments of CreateSubnets API call.
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 struct { Result *ControllerCredentialInfo `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
CredentialContentResult contains comprehensive information about stored credential or an error.
type CredentialContentResults struct { Results []CredentialContentResult `json:"results,omitempty"` }
CredentialContentResults contains a set of CredentialContentResults.
type Creds struct { AuthTag string `json:"auth-tag"` Password string `json:"password"` Nonce string `json:"nonce"` }
Creds holds credentials for identifying an entity.
type Delta struct { // If Removed is true, the entity has been removed; // otherwise it has been created or changed. Removed bool `json:"removed"` // Entity holds data about the entity that has changed. Entity EntityInfo `json:"entity"` }
Delta holds details of a change to the model.
MarshalJSON implements json.Marshaler.
UnmarshalJSON implements json.Unmarshaler.
DeployerConnectionValues containers the result of deployer.ConnectionInfo API call.
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 struct { OfferURLs []string `json:"offer-urls"` Force bool `json:"force,omitempty"` }
DestroyApplicationOffers holds parameters for the DestroyOffers call.
type DestroyApplicationParams struct { // ApplicationTag holds the tag of the application to destroy. ApplicationTag string `json:"application-tag"` // DestroyStorage controls whether or not storage attached to // units of the application should be destroyed. DestroyStorage bool `json:"destroy-storage,omitempty"` // Force controls whether or not the destruction of an application // will be forced, i.e. ignore operational errors. Force bool `json:"force"` // MaxWait specifies the amount of time that each step in application removal // will wait before forcing the next step to kick-off. This parameter // only makes sense in combination with 'force' set to 'true'. MaxWait *time.Duration `json:"max-wait,omitempty"` }
DestroyApplicationParams holds parameters for the Application.DestroyApplication call.
type DestroyApplicationResult struct { Error *Error `json:"error,omitempty"` Info *DestroyApplicationInfo `json:"info,omitempty"` }
DestroyApplicationResult contains one of the results of a DestroyApplication API request.
type DestroyApplicationResults struct { Results []DestroyApplicationResult `json:"results,omitempty"` }
DestroyApplicationResults contains the results of a DestroyApplication API request.
DestroyApplicationUnits holds parameters for the deprecated Application.DestroyUnits call.
type DestroyApplicationsParams struct { Applications []DestroyApplicationParams `json:"applications"` }
DestroyApplicationsParams holds bulk parameters for the Application.DestroyApplication call.
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 struct { Applications []DestroyConsumedApplicationParams `json:"applications"` }
DestroyConsumedApplicationsParams holds bulk parameters for the Application.DestroyConsumedApplication call.
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"` }
DestroyControllerArgs holds the arguments for destroying a controller.
type DestroyMachineInfo struct { // DetachedStorage is the tags of storage instances that will be // detached from the machine (assigned units) as a result of // destroying the machine, and will remain in the model after // the machine and unit are removed. DetachedStorage []Entity `json:"detached-storage,omitempty"` // DestroyedStorage is the tags of storage instances that will be // destroyed as a result of destroying the machine. DestroyedStorage []Entity `json:"destroyed-storage,omitempty"` // DestroyedStorage is the tags of units that will be destroyed // as a result of destroying the machine. DestroyedUnits []Entity `json:"destroyed-units,omitempty"` }
DestroyMachineInfo contains information related to the removal of a machine.
type DestroyMachineResult 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 struct { Results []DestroyMachineResult `json:"results,omitempty"` }
DestroyMachineResults contains the results of a MachineManager.Destroy API request.
type DestroyMachines struct { MachineNames []string `json:"machine-names"` Force bool `json:"force"` }
DestroyMachines holds parameters for the DestroyMachines call. This is the legacy params struct used with the client facade. TODO(wallyworld) - remove in Juju 3.0
type DestroyMachinesParams struct { MachineTags []string `json:"machine-tags"` Force bool `json:"force,omitempty"` Keep bool `json:"keep,omitempty"` // MaxWait specifies the amount of time that each step in machine destroy process // will wait before forcing the next step to kick-off. This parameter // only makes sense in combination with 'force' set to 'true'. MaxWait *time.Duration `json:"max-wait,omitempty"` }
DestroyMachinesParams holds parameters for the DestroyMachinesWithParams call.
type DestroyModelParams 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"` }
DestroyModelParams holds the arguments for destroying a model.
type DestroyModelsParams struct { Models []DestroyModelParams `json:"models"` }
DestroyModelsParams holds the arguments for destroying models.
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 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 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 struct { Error *Error `json:"error,omitempty"` Info *DestroyUnitInfo `json:"info,omitempty"` }
DestroyUnitResult contains one of the results of a DestroyUnit API request.
type DestroyUnitResults struct { Results []DestroyUnitResult `json:"results,omitempty"` }
DestroyUnitResults contains the results of a DestroyUnit API request.
type DestroyUnitsParams struct { Units []DestroyUnitParams `json:"units"` }
DestroyUnitsParams holds bulk parameters for the Application.DestroyUnit call.
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 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.
DeviceType defines a device type.
DigestAlgorithm is one of the values in the IANA registry. See RFC 3230 and 5843.
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"` // 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 (e DischargeRequiredErrorInfo) AsMap() map[string]interface{}
AsMap encodes the error info as a map that can be attached to an Error.
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 struct { Results []DistributionGroupResult `json:"results"` }
DistributionGroupResults is the bulk form of DistributionGroupResult.
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 struct { ApplicationName string `json:"application-name"` Relation CharmRelation `json:"relation"` }
Endpoint holds an application-relation pair.
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 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 (epStatus *EndpointStatus) String() string
Entities identifies multiple entities.
type EntitiesCharmURL struct { Entities []EntityCharmURL `json:"entities"` }
EntitiesCharmURL holds the parameters for making a SetCharmURL API call.
type EntitiesPortRanges struct { Entities []EntityPortRange `json:"entities"` }
EntitiesPortRanges holds the parameters for making an OpenPorts or ClosePorts on some entities.
type EntitiesPorts struct { Entities []EntityPort `json:"entities"` }
EntitiesPorts holds the parameters for making an OpenPort or ClosePort on some entities.
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 struct { Results []EntitiesResult `json:"results"` }
EntitiesResults contains multiple Entities results (where each Entities is the result of a query).
type EntitiesVersion struct { AgentTools []EntityVersion `json:"agent-tools"` }
EntitiesVersion specifies what tools are being run for multiple entities.
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 struct { Results []EntitiesWatchResult `json:"results"` }
EntitiesWatchResults holds the results for any API call which ends up returning a list of EntitiesWatchers.
Entity identifies a single entity.
type EntityAnnotations struct { EntityTag string `json:"entity"` Annotations map[string]string `json:"annotations"` }
EntityAnnotations stores annotations for an entity.
EntityCharmURL holds an entity's tag and a charm URL.
type EntityId struct { Kind string `json:"kind"` ModelUUID string `json:"model-uuid"` Id string `json:"id"` }
EntityId uniquely identifies an entity being tracked by the multiwatcherStore.
type EntityInfo interface { // EntityId returns an identifier that will uniquely // identify the entity within its kind EntityId() EntityId }
EntityInfo is implemented by all entity Info types.
type EntityMacaroonArg struct { Macaroon *macaroon.Macaroon `json:"macaroon"` Tag string `json:"tag"` }
EntityMacaroonArg holds a macaroon and entity which we want to save.
type EntityMacaroonArgs struct { Args []EntityMacaroonArg }
EntityMacaroonArgs holds the arguments to a SaveMacaroons API call.
type EntityMetrics struct { Metrics []MetricResult `json:"metrics,omitempty"` Error *Error `json:"error,omitempty"` }
EntityMetrics contains the results of a GetMetrics call for a single entity.
EntityPassword specifies a password change for the entity with the given tag.
type EntityPasswords struct { Changes []EntityPassword `json:"changes"` }
EntityPasswords holds the parameters for making a SetPasswords call.
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 struct { Tag string `json:"tag"` Protocol string `json:"protocol"` FromPort int `json:"from-port"` ToPort int `json:"to-port"` }
EntityPortRange holds an entity's tag, a protocol and a port range.
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 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.
EntityString holds an entity tag and a string value.
EntityVersion specifies the tools version to be set for an entity with the given tag. version.Binary directly.
type EntityWorkloadVersion struct { Tag string `json:"tag"` WorkloadVersion string `json:"workload-version"` }
EntityWorkloadVersion holds the workload version for an entity.
type EntityWorkloadVersions struct { Entities []EntityWorkloadVersion `json:"entities"` }
EntityWorkloadVersions holds the parameters for setting the workload version for a set of entities.
type Error struct { Message string `json:"message"` Code string `json:"code"` Info map[string]interface{} `json:"info,omitempty"` }
Error is the type of error returned by any call to the state API.
ErrorInfo implements the rpc.ErrorInfoProvider interface which enables API error attachments to be returned as part of RPC error responses.
GoString implements fmt.GoStringer. It means that a *Error shows its contents correctly when printed with %#v.
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.
ErrorResult holds the error status of a single operation.
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 (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 (result ErrorResults) OneError() error
OneError returns the error from the result of a bulk operation on a single value.
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 struct { Result *ExternalControllerInfo `json:"result"` Error *Error `json:"error"` }
ExternalControllerInfoResult contains the result of querying the information of external controllers.
type ExternalControllerInfoResults struct { Results []ExternalControllerInfoResult `json:"results"` }
ExternalControllerInfoResults contains the results of querying the information for a set of external controllers.
FacadeVersions describes the available Facades and what versions of each one are available
FanConfigEntry holds configuration for a single fan.
type FanConfigResult struct { Fans []FanConfigEntry `json:"fans"` }
FanConfigResult holds configuration for all fans in a model
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 struct { FilesystemTag string `json:"filesystem-tag"` MachineTag string `json:"machine-tag"` Info FilesystemAttachmentInfo `json:"info"` }
FilesystemAttachment identifies and describes a filesystem attachment.
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 struct { MountPoint string `json:"mount-point,omitempty"` ReadOnly bool `json:"read-only,omitempty"` }
FilesystemAttachmentInfo describes a filesystem attachment.
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 struct { Result FilesystemAttachmentParams `json:"result"` Error *Error `json:"error,omitempty"` }
FilesystemAttachmentParamsResults holds provisioning parameters for a filesystem attachment.
type FilesystemAttachmentParamsResults struct { Results []FilesystemAttachmentParamsResult `json:"results,omitempty"` }
FilesystemAttachmentParamsResults holds provisioning parameters for multiple filesystem attachments.
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 struct { Results []FilesystemAttachmentResult `json:"results,omitempty"` }
FilesystemAttachmentResults holds a set of FilesystemAttachmentResults.
type FilesystemAttachments struct { FilesystemAttachments []FilesystemAttachment `json:"filesystem-attachments"` }
FilesystemAttachments describes a set of storage filesystem attachments.
type FilesystemDetails struct { // FilesystemTag is the tag for the filesystem. FilesystemTag string `json:"filesystem-tag"` // VolumeTag is the tag for the volume backing the // filesystem, if any. VolumeTag string `json:"volume-tag,omitempty"` // Info contains information about the filesystem. Info FilesystemInfo `json:"info"` // Life contains the lifecycle state of the filesystem. // Juju controllers older than 2.2 do not populate this // field, so it may be omitted. Life life.Value `json:"life,omitempty"` // Status contains the status of the filesystem. Status EntityStatus `json:"status"` // MachineAttachments contains a mapping from // machine tag to filesystem attachment information (IAAS models). MachineAttachments map[string]FilesystemAttachmentDetails `json:"machine-attachments,omitempty"` // UnitAttachments contains a mapping from // unit tag to filesystem attachment information (CAAS models). UnitAttachments map[string]FilesystemAttachmentDetails `json:"unit-attachments,omitempty"` // Storage contains details about the storage instance // that the volume is assigned to, if any. Storage *StorageDetails `json:"storage,omitempty"` }
FilesystemDetails describes a storage filesystem in the model for the purpose of filesystem CLI commands.
This is kept separate from Filesystem which contains only information specific to the filesystem model, whereas FilesystemDetails is intended to contain complete information about a filesystem and related information (status, attachments, storage).
type FilesystemDetailsListResult struct { Result []FilesystemDetails `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
FilesystemDetailsListResult holds a collection of filesystem details.
type FilesystemDetailsListResults struct { Results []FilesystemDetailsListResult `json:"results,omitempty"` }
FilesystemDetailsListResults holds a collection of collections of filesystem details.
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 struct { Results []FilesystemDetailsResult `json:"results,omitempty"` }
FilesystemDetailsResults holds filesystem details.
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 (f *FilesystemFilter) IsEmpty() bool
IsEmpty determines if filter is empty
type FilesystemFilters struct { Filters []FilesystemFilter `json:"filters,omitempty"` }
FilesystemFilters holds a collection of filesystem filters.
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"` }
Filesystem describes a storage filesystem in the model.
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 struct { Result FilesystemParams `json:"result"` Error *Error `json:"error,omitempty"` }
FilesystemParamsResults holds provisioning parameters for a filesystem.
type FilesystemParamsResults struct { Results []FilesystemParamsResult `json:"results,omitempty"` }
FilesystemParamsResults holds provisioning parameters for multiple filesystems.
type FilesystemResult struct { Result Filesystem `json:"result"` Error *Error `json:"error,omitempty"` }
FilesystemResult holds information about a filesystem.
type FilesystemResults struct { Results []FilesystemResult `json:"results,omitempty"` }
FilesystemResults holds information about multiple filesystems.
type Filesystems struct { Filesystems []Filesystem `json:"filesystems"` }
Filesystems describes a set of storage filesystems in the model.
FindActionsByName finds actions given an action name.
FindTags wraps a slice of strings that are prefixes to use when searching for matching tags.
FindTagsResults wraps the mapping between the requested prefix and the matching tags for each requested prefix.
type FindToolsParams struct { // Number will be used to match tools versions exactly if non-zero. Number version.Number `json:"number"` // MajorVersion will be used to match the major version if non-zero. MajorVersion int `json:"major"` // MinorVersion will be used to match the major version if greater // than or equal to zero, and Number is zero. MinorVersion int `json:"minor"` // Arch will be used to match tools by architecture if non-empty. Arch string `json:"arch"` // Series will be used to match tools by series if non-empty. Series string `json:"series"` // AgentStream will be used to set agent stream to search AgentStream string `json:"agentstream"` }
FindToolsParams defines parameters for the FindTools method.
type FindToolsResult struct { List tools.List `json:"list"` Error *Error `json:"error,omitempty"` }
FindToolsResult holds a list of tools from FindTools and any error.
type FirewallRule struct { // KnownService is the well known service for a firewall rule. KnownService KnownServiceValue `json:"known-service"` // WhitelistCIDRS is the ist of subnets allowed access. WhitelistCIDRS []string `json:"whitelist-cidrs,omitempty"` }
FirewallRule is a rule for ingress through a firewall.
type FirewallRuleArgs struct { // Args holds the parameters for updating a firewall rule. Args []FirewallRule `json:"args"` }
FirewallRuleArgs holds the parameters for updating one or more firewall rules.
type FullStatus struct { Model ModelStatusInfo `json:"model"` Machines map[string]MachineStatus `json:"machines"` Applications map[string]ApplicationStatus `json:"applications"` RemoteApplications map[string]RemoteApplicationStatus `json:"remote-applications"` Offers map[string]ApplicationOfferStatus `json:"offers"` Relations []RelationStatus `json:"relations"` ControllerTimestamp *time.Time `json:"controller-timestamp"` Branches map[string]BranchStatus `json:"branches"` }
FullStatus holds information about the status of a juju model.
func (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 GUIArchiveResponse struct { Versions []GUIArchiveVersion `json:"versions"` }
GUIArchiveResponse holds the response to /gui-archive GET requests.
type GUIArchiveVersion struct { // Version holds the Juju GUI version number. Version version.Number `json:"version"` // SHA256 holds the SHA256 hash of the GUI tar.bz2 archive. SHA256 string `json:"sha256"` // Current holds whether this specific version is the current one served // by the controller. Current bool `json:"current"` }
GUIArchiveVersion holds information on a specific GUI archive version.
type GUIVersionRequest struct { // Version holds the Juju GUI version number. Version version.Number `json:"version"` }
GUIVersionRequest holds the body for /gui-version PUT requests.
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 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.
GenerationId represents an GenerationId from a branch.
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.
GetAnnotations stores parameters for making the GetAnnotations call.
GetAnnotationsResults holds annotations associated with an entity.
GetApplicationConstraints stores parameters for making the GetApplicationConstraints call.
type GetConstraintsResults struct { Constraints constraints.Value `json:"constraints"` }
GetConstraintsResults holds results of the GetConstraints call.
type GetLeadershipSettingsBulkResults struct { Results []GetLeadershipSettingsResult `json:"results"` }
GetLeadershipSettingsBulkResults is the collection of results from a bulk request for leadership settings.
type GetLeadershipSettingsResult struct { Settings Settings `json:"settings"` Error *Error `json:"error,omitempty"` }
GetLeadershipSettingsResult is the results from requesting leadership settings.
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 struct { Args []GetTokenArg }
GetTokenArgs holds the arguments to a GetTokens API call.
type GoalState struct { Units UnitsGoalState `json:"units"` Relations map[string]UnitsGoalState `json:"relations"` }
GoalState goal-state at application level, stores Units and Units-Relations
GoalStateResult the result of GoalStates per entity.
type GoalStateResults struct { Results []GoalStateResult `json:"results"` }
GoalStateResults holds the results of GoalStates API call
GoalStateStatus goal-state at unit level
type History struct { Statuses []DetailedStatus `json:"statuses"` Error *Error `json:"error,omitempty"` }
History holds many DetailedStatus.
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 struct { Results []HostNetworkChange `json:"results"` }
HostNetworkChangeResults holds the network changes that are necessary for multiple containers to be created.
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.
FromHostPort is a convenience helper to create a parameter out of the network type, here for HostPort.
FromHostPorts is a helper to create a parameter out of the network type, here for a slice of HostPort.
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(nhps network.ProviderHostPorts) []HostPort
FromProviderHostPorts is a helper to create a parameter out of the network type, here for a slice of HostPort.
func (hp HostPort) MachineHostPort() network.MachineHostPort
MachineHostPort transforms the HostPort to a MachineHostPort.
func (hp HostPort) ProviderHostPort() network.ProviderHostPort
ProviderHostPort transforms the HostPort to a ProviderHostPort.
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 struct { Models []HostedModelConfig `json:"models"` }
HostedModelConfigsResults contains an entry for each hosted model in the controller.
ImageFilterParams holds the parameters used to specify images to delete.
type ImageMetadata struct { Kind string `json:"kind"` Arch string `json:"arch"` Series string `json:"series"` URL string `json:"url"` Created time.Time `json:"created"` }
ImageMetadata represents an image in storage.
type ImageMetadataFilter struct { // Region stores metadata region. Region string `json:"region,omitempty"` // Series stores all desired series. Series []string `json:"series,omitempty"` // Arches stores all desired architectures. Arches []string `json:"arches,omitempty"` // Stream can be "" or "released" for the default "released" stream, // or "daily" for daily images, or any other stream that the available // simplestreams metadata supports. Stream string `json:"stream,omitempty"` // VirtType stores virtualisation type. VirtType string `json:"virt-type,omitempty"` // RootStorageType stores storage type. RootStorageType string `json:"root-storage-type,omitempty"` }
ImageMetadataFilter holds filter properties used to search for image metadata. It amalgamates both simplestreams.MetadataLookupParams and simplestreams.LookupParams and adds additional properties to satisfy existing and new use cases.
type ImageSpec struct { Kind string `json:"kind"` Arch string `json:"arch"` Series string `json:"series"` }
ImageSpec defines the parameters to select images list or delete.
type ImportStorageDetails 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 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 struct { Result *ImportStorageDetails `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
ImportStorageResult contains the result of importing a storage entity.
type ImportStorageResults struct { Results []ImportStorageResult `json:"results"` }
ImportStorageResults contains the results of importing a collection of storage entities.
type IngressNetworksChangeEvent struct { // RelationToken is the token of the relation. RelationToken string `json:"relation-token"` // ApplicationToken is the token of the application. ApplicationToken string `json:"application-token"` // Networks are the CIDRs for which ingress is required. Networks []string `json:"networks,omitempty"` // IngressRequired is true if ingress is needed, otherwise // ingress should be disabled. IngressRequired bool `json:"ingress-required"` // Macaroons are used for authentication. Macaroons macaroon.Slice `json:"macaroons,omitempty"` }
type IngressNetworksChanges struct { Changes []IngressNetworksChangeEvent `json:"changes,omitempty"` }
IngressNetworksChanges holds a set of IngressNetworksChangeEvent structures.
type InitiateMigrationArgs struct { Specs []MigrationSpec `json:"specs"` }
InitiateMigrationArgs holds the details required to start one or more model migrations.
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 struct { Results []InitiateMigrationResult `json:"results"` }
InitiateMigrationResults is used to return the result of one or more attempts to start model migrations.
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 struct { Name string `json:"name,omitempty"` Arches []string `json:"arches"` CPUCores int `json:"cpu-cores"` Memory int `json:"memory"` RootDiskSize int `json:"root-disk,omitempty"` VirtType string `json:"virt-type,omitempty"` Deprecated bool `json:"deprecated,omitempty"` Cost int `json:"cost,omitempty"` }
InstanceType represents an available instance type in a cloud.
type InstanceTypesResult 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 struct { Results []InstanceTypesResult `json:"results"` }
InstanceTypesResults contains the bulk result of prompting a cloud for its instance types.
type InstancesInfo struct { Machines []InstanceInfo `json:"machines"` }
InstancesInfo holds the parameters for making a SetInstanceInfo call for multiple machines.
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 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 struct { Hostname string `json:"hostname"` Address string `json:"value"` CIDR string `json:"cidr"` }
InterfaceAddress represents a single address attached to the interface.
type InvalidateCredentialArg struct { // Reason is the description of why we are invalidating credential. Reason string `json:"reason,omitempty"` }
InvalidateCredentialArg is used to invalidate a controller credential.
type IsMasterResult 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.
IsMeteredResult stores result from a charms.IsMetered call
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 struct { Results []IssueOperatorCertificateResult `json:"results"` }
IssueOperatorCertificateResults holds IssueOperatorCertificate results.
type ItemChange struct { Type int `json:"type"` Key string `json:"key"` OldValue interface{} `json:"old,omitempty"` NewValue interface{} `json:"new,omitempty"` }
ItemChange is the multiwatcher representation of a core settings ItemChange.
type JobsResult struct { Jobs []model.MachineJob `json:"jobs"` Error *Error `json:"error,omitempty"` }
JobsResult holds the jobs for a machine that are returned by a call to Jobs.
type JobsResults struct { Results []JobsResult `json:"results"` }
JobsResults holds the result of a call to Jobs.
type KnownServiceArgs struct { // KnownServices are the well known services for a firewall rule. KnownServices []KnownServiceValue `json:"known-services"` }
KnownServiceArgs holds the parameters for retrieving firewall rules.
KnownServiceValue describes a well known service for which a firewall rule can be set up.
const ( // SSHRule is a rule for SSH connections. SSHRule KnownServiceValue = "ssh" // JujuControllerRule is a rule for connections to the Juju controller. JujuControllerRule KnownServiceValue = "juju-controller" // JujuApplicationOfferRule is a rule for connections to a Juju offer. JujuApplicationOfferRule KnownServiceValue = "juju-application-offer" )
func (v KnownServiceValue) Validate() error
Validate returns an error if the service value is not valid.
type KubernetesDeploymentInfo struct { DeploymentType string `json:"deployment-type"` ServiceType string `json:"service-type"` }
KubernetesDeploymentInfo holds deployment info from charm metadata.
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 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 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 struct { StorageName string `json:"storagename"` Size uint64 `json:"size"` Provider string `json:"provider"` Attributes map[string]interface{} `json:"attributes,omitempty"` Tags map[string]string `json:"tags,omitempty"` Attachment *KubernetesFilesystemAttachmentParams `json:"attachment,omitempty"` }
KubernetesFilesystemParams holds the parameters for creating a storage filesystem.
type KubernetesProvisioningInfo struct { DeploymentInfo *KubernetesDeploymentInfo `json:"deployment-info,omitempty"` PodSpec string `json:"pod-spec"` Constraints constraints.Value `json:"constraints"` Tags map[string]string `json:"tags,omitempty"` Filesystems []KubernetesFilesystemParams `json:"filesystems,omitempty"` Volumes []KubernetesVolumeParams `json:"volumes,omitempty"` Devices []KubernetesDeviceParams `json:"devices,omitempty"` OperatorImagePath string `json:"operator-image-path,omitempty"` }
KubernetesProvisioningInfo holds unit provisioning info.
type KubernetesProvisioningInfoResult struct { Error *Error `json:"error,omitempty"` Result *KubernetesProvisioningInfo `json:"result"` }
KubernetesProvisioningInfoResult holds unit provisioning info or an error.
type KubernetesProvisioningInfoResults struct { Results []KubernetesProvisioningInfoResult `json:"results"` }
KubernetesProvisioningInfoResults holds multiple provisioning info results.
type KubernetesUpgradeArg struct { AgentTag string `json:"agent-tag"` Version version.Number `json:"version"` }
KubernetesUpgradeArg holds args used to upgrade an operator.
type KubernetesVolumeAttachmentParams struct { Provider string `json:"provider"` ReadOnly bool `json:"read-only,omitempty"` }
KubernetesVolumeAttachmentParams holds the parameters for creating a volume attachment.
type KubernetesVolumeInfo struct { VolumeId string `json:"volume-id"` Pool string `json:"pool,omitempty"` Size uint64 `json:"size"` Persistent bool `json:"persistent"` Status string `json:"status"` Info string `json:"info"` Data map[string]interface{} `json:"data,omitempty"` }
Volume describes a storage volume in the cloud as reported to the model.
type KubernetesVolumeParams 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 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 struct { Entities []Entity `json:"entities"` ApplicationName string `json:"application-name"` }
LXDProfileUpgrade holds the parameters for an application lxd profile machines
LifeResult holds the life status of a single entity, or an error indicating why it is not available.
type LifeResults struct { Results []LifeResult `json:"results"` }
LifeResults holds the life or error status of multiple entities.
type ListCloudImageMetadataResult struct { Result []CloudImageMetadata `json:"result"` }
ListCloudImageMetadataResult holds the results of querying cloud image metadata.
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 struct { Result *ListCloudInfo `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
ListCloudInfoResult holds the result of a ListCloudInfo call.
type ListCloudInfoResults struct { Results []ListCloudInfoResult `json:"results"` }
ListCloudInfoResults holds the result of a bulk ListCloudInfo call.
ListCloudsRequest encapsulates how we request a list of cloud details for a user.
type ListFirewallRulesResults struct { // Rules is a list of firewall rules. Rules []FirewallRule }
ListFirewallRulesResults holds the results of listing firewall rules.
type ListImageResult struct { Result []ImageMetadata `json:"result"` }
ListImageResult holds the results of querying images.
ListResourcesArgs are the arguments for the ListResources endpoint.
ListSSHKeys stores parameters used for a KeyManager.ListKeys call.
ListSpacesResults holds the list of all available spaces.
ListSubnetsResults holds the result of a ListSubnets API call.
type ListUnitResourcesArgs struct { // ResourceNames holds the names of the application's resources for // which information should be provided. ResourceNames []string `json:"resource-names"` }
ListResourcesArgs holds the arguments for an API request to list resources for an application. The application is implicit to the uniter- specific HTTP connection.
type LogForwardingGetLastSentParams struct { // IDs holds the list of IDs for which individual "last sent" // timestamps should be returned (in the same order). IDs []LogForwardingID `json:"ids"` }
LogForwardingGetLastSentParams holds the arguments for a call to the GetLastSent method of the LogForwarding facade.
type LogForwardingGetLastSentResult struct { // RecordID is the ID of the last log record that was // forwarded for a given model and sink. If Error is set then the // meaning of this value is undefined. RecordID int64 `json:"record-id"` // RecordTimestamp is the timestamp of the last log record that was // forwarded for a given model and sink. If Error is set then the // meaning of this value is undefined. RecordTimestamp int64 `json:"record-timestamp"` // Error holds the error, if any, that resulted while handling the // request for a specific ID. Error *Error `json:"err"` }
LogForwardingGetLastSentResult holds a single result from a call to the GetLastSent method of the LogForwarding facade.
type LogForwardingGetLastSentResults struct { // Results holds the list of results that correspond to the IDs // sent in a GetLastSent call. Results []LogForwardingGetLastSentResult `json:"results"` }
LogForwardingGetLastSentResults holds the results of a call to the GetLastSent method of the LogForwarding facade.
type LogForwardingID struct { // ModelTag identifies the model associated with the log record. ModelTag string `json:"model"` // Sink is the name of the log forwarding target to which a log // record was last sent. Sink string `json:"sink"` }
LogForwardingID is the API data that identifies a log forwarding "last sent" value. The controller has a mapping from a set of IDs to a timestamp (for each ID). The timestamp corresponds to the last log record that the specific log forwarding machinery sent to the identified "sink" (for a given model).
type LogForwardingSetLastSentParam struct { LogForwardingID // RecordID identifies the record ID to set for the given ID. RecordID int64 `json:"record-id"` // RecordTimestamp identifies the record timestamp to set for the given ID. RecordTimestamp int64 `json:"record-timestamp"` }
LogForwardingSetLastSentParams holds holds the info needed to set a new "last sent" value via a call to the SetLastSent method of the LogForwarding facade.
type LogForwardingSetLastSentParams struct { // Params holds the list of individual requests for "last sent" info. Params []LogForwardingSetLastSentParam `json:"params"` }
LogForwardingSetLastSentParams holds the arguments for a call to the SetLastSent method of the LogForwarding facade.
type LogMessage 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"` }
LogMessage is a structured logging entry.
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"` }
LogRecord is used to transmit log messages to the logsink API endpoint. Single character field names are used for serialisation to keep the size down. These messages are going to be sent a lot.
type LogStreamConfig struct { // Sink identifies the target to which log records will be streamed. // This is used as a bookmark for where to start the next time logs // are streamed for the same sink. Sink string `schema:"sink" url:"sink,omitempty"` // MaxLookbackDuration is the maximum time duration from the past to stream. // It must be a valid time duration string. MaxLookbackDuration string `schema:"maxlookbackduration" url:"maxlookbackduration,omitempty"` // MaxLookbackRecords is the maximum number of log records to stream from the past. MaxLookbackRecords int `schema:"maxlookbackrecords" url:"maxlookbackrecords,omitempty"` }
LogStreamConfig holds all the information necessary to open a streaming connection to the API endpoint for reading log records.
The field tags relate to the following 2 libraries:
github.com/google/go-querystring/query (encoding) github.com/gorilla/schema (decoding)
See apiserver/debuglog.go:debugLogParams for additional things we may consider supporting here.
type LogStreamRecord struct { ID int64 `json:"id"` ModelUUID string `json:"mid"` Entity string `json:"ent"` Version string `json:"ver,omitempty"` Timestamp time.Time `json:"ts"` Module string `json:"mod"` Location string `json:"lo"` Level string `json:"lv"` Message string `json:"msg"` }
LogStreamRecord describes a single log record being streamed from the server.
type LogStreamRecords struct { Records []LogStreamRecord `json:"records"` }
LogStreamRecord contains a slice of LogStreamRecords.
type LoginRequest struct { AuthTag string `json:"auth-tag"` Credentials string `json:"credentials"` Nonce string `json:"nonce"` Macaroons []macaroon.Slice `json:"macaroons"` CLIArgs string `json:"cli-args,omitempty"` UserData string `json:"user-data"` }
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 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 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"` // 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 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 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 struct { Result *macaroon.Macaroon `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
MacaroonResult contains a macaroon or an error.
type MacaroonResults struct { Results []MacaroonResult `json:"results"` }
MacaroonResults contains a set of MacaroonResults.
MachineAddresses holds an machine tag and addresses.
type MachineAddressesResult struct { Error *Error `json:"error,omitempty"` Addresses []Address `json:"addresses"` }
MachineAddressesResult holds a list of machine addresses or an error.
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 struct { Machine string `json:"machine"` BlockDevices []storage.BlockDevice `json:"block-devices,omitempty"` }
MachineBlockDevices holds a machine tag and the block devices present on that machine.
type MachineContainerResult 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 struct { Results []MachineContainerResult `json:"results"` }
MachineContainerResults holds the results from making the call to SupportedContainers on a given machine.
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 struct { Params []MachineContainers `json:"params"` }
MachineContainersParams holds the arguments for making a SetSupportedContainers API call.
type MachineHardware struct { Arch *string `json:"arch,omitempty"` Mem *uint64 `json:"mem,omitempty"` RootDisk *uint64 `json:"root-disk,omitempty"` Cores *uint64 `json:"cores,omitempty"` CpuPower *uint64 `json:"cpu-power,omitempty"` Tags *[]string `json:"tags,omitempty"` AvailabilityZone *string `json:"availability-zone,omitempty"` }
MachineHardware holds information about a machine's hardware characteristics.
type MachineInfo struct { ModelUUID string `json:"model-uuid"` Id string `json:"id"` InstanceId string `json:"instance-id"` AgentStatus StatusInfo `json:"agent-status"` InstanceStatus StatusInfo `json:"instance-status"` Life life.Value `json:"life"` Config map[string]interface{} `json:"config,omitempty"` Series string `json:"series"` ContainerType string `json:"container-type"` SupportedContainers []instance.ContainerType `json:"supported-containers"` SupportedContainersKnown bool `json:"supported-containers-known"` HardwareCharacteristics *instance.HardwareCharacteristics `json:"hardware-characteristics,omitempty"` CharmProfiles []string `json:"charm-profiles,omitempty"` Jobs []model.MachineJob `json:"jobs"` Addresses []Address `json:"addresses"` HasVote bool `json:"has-vote"` WantsVote bool `json:"wants-vote"` }
MachineInfo holds the information about a machine that is tracked by multiwatcherStore.
func (i *MachineInfo) EntityId() EntityId
EntityId returns a unique identifier for a machine across models.
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 struct { Results []MachineNetworkConfigResult `json:"results"` }
MachineNetworkConfigResults holds network configuration for multiple machines.
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 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 MachinePortsParams struct { Params []MachinePorts `json:"params"` }
MachinePortsParams holds the arguments for making a FirewallerAPIV1.GetMachinePorts() API call.
type MachinePortsResult struct { Error *Error `json:"error,omitempty"` Ports []MachinePortRange `json:"ports"` }
MachinePortsResult holds a single result of the FirewallerAPIV1.GetMachinePorts() and UniterAPI.AllMachinePorts() API calls.
type MachinePortsResults struct { Results []MachinePortsResult `json:"results"` }
MachinePortsResults holds all the results of the FirewallerAPIV1.GetMachinePorts() and UniterAPI.AllMachinePorts() API calls.
type MachineStatus struct { AgentStatus DetailedStatus `json:"agent-status"` InstanceStatus DetailedStatus `json:"instance-status"` ModificationStatus DetailedStatus `json:"modification-status"` DNSName string `json:"dns-name"` // IPAddresses holds the IP addresses known for this machine. It is // here for backwards compatibility. It should be similar to its // namesakes in NetworkInterfaces, but may also include any // public/floating IP addresses not actually bound to the machine but // known to the provider. IPAddresses []string `json:"ip-addresses,omitempty"` // InstanceId holds the unique identifier for this machine, based on // what is supplied by the provider. InstanceId instance.Id `json:"instance-id"` // DisplayName is a human-readable name for this machine. DisplayName string `json:"display-name"` // Series holds the name of the operating system release installed on // this machine. Series string `json:"series"` // Id is the Juju identifier for this machine in this model. Id string `json:"id"` // NetworkInterfaces holds a map of NetworkInterface for this machine. NetworkInterfaces map[string]NetworkInterface `json:"network-interfaces,omitempty"` // Containers holds the MachineStatus of any containers hosted on this // machine. Containers map[string]MachineStatus `json:"containers"` // Constraints holds a string of space-separated key=value pairs for // each constraint datum. Constraints string `json:"constraints"` // Hardware holds a string of space-separated key=value pairs for each // hardware specification datum. Hardware string `json:"hardware"` Jobs []model.MachineJob `json:"jobs"` HasVote bool `json:"has-vote"` WantsVote bool `json:"wants-vote"` // LXDProfiles holds all the machines current LXD profiles that have // been applied to the machine LXDProfiles map[string]LXDProfile `json:"lxd-profiles,omitempty"` }
MachineStatus holds status info about a machine.
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 struct { Ids []MachineStorageId `json:"ids"` }
MachineStorageIds holds a set of machine/storage-entity attachment identifiers.
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 struct { Results []MachineStorageIdsWatchResult `json:"results"` }
MachineStorageIdsWatchResults holds the results for any API call which ends up returning a list of MachineStorageIdsWatchers.
type MapResult struct { Result map[string]interface{} `json:"result"` Error *Error `json:"error,omitempty"` }
MapResult holds a generic map or an error.
MapResults holds the bulk operation result of an API call that returns a map or an error.
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 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 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.
MetadataImageIds holds image ids and can be used to identify related image metadata.
type MetadataSaveParams struct { Metadata []CloudImageMetadataList `json:"metadata,omitempty"` }
MetadataSaveParams holds lists of cloud image metadata to save. Each list will be saved atomically.
MeterStatus represents the meter status of a unit.
type MeterStatusParam struct { Tag string `json:"tag"` Code string `json:"code"` Info string `json:"info,omitempty"` }
MeterStatusParam holds meter status information to be set for the specified tag.
type MeterStatusParams struct { Statuses []MeterStatusParam `json:"statues"` }
MeterStatusParams holds parameters for making SetMeterStatus calls.
type MeterStatusResult struct { Code string `json:"code"` Info string `json:"info"` Error *Error `json:"error,omitempty"` }
MeterStatusResult holds unit meter status or error.
type MeterStatusResults struct { Results []MeterStatusResult `json:"results"` }
MeterStatusResults holds meter status results for multiple units.
type Metric struct { Key string `json:"key"` Value string `json:"value"` Time time.Time `json:"time"` Labels map[string]string `json:"labels,omitempty"` }
Metric holds a single metric.
type MetricBatch struct { UUID string `json:"uuid"` CharmURL string `json:"charm-url"` Created time.Time `json:"created"` Metrics []Metric `json:"metrics"` }
MetricBatch is a list of metrics with metadata.
type MetricBatchParam struct { Tag string `json:"tag"` Batch MetricBatch `json:"batch"` }
MetricBatchParam contains a single metric batch.
type MetricBatchParams struct { Batches []MetricBatchParam `json:"batches"` }
MetricBatchParams contains multiple metric batches.
type MetricResult struct { Time time.Time `json:"time"` Key string `json:"key"` Value string `json:"value"` Unit string `json:"unit"` Labels map[string]string `json:"labels"` }
MetricResult contains a single metric.
type MetricResults struct { Results []EntityMetrics `json:"results"` }
MetricResults contains results from a GetMetrics call, with one item per Entity given as an argument to the command.
func (m *MetricResults) OneError() error
OneError returns the first error
MetricsParam contains the metrics for a single unit.
type MetricsParams struct { Metrics []MetricsParam `json:"metrics"` }
MetricsParams contains the metrics for multiple units.
type MigrationModelInfo struct { UUID string `json:"uuid"` Name string `json:"name"` OwnerTag string `json:"owner-tag"` AgentVersion version.Number `json:"agent-version"` ControllerAgentVersion version.Number `json:"controller-agent-version"` }
MigrationModelInfo is used to report basic model information to the migrationmaster worker.
type MigrationSpec 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 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 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 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 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 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 ModelAccess struct { Model string `json:"model,omitempty"` Access string `json:"access,omitempty"` }
ModelAccess contains information about user model access.
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.
ModelArgs wraps a simple model tag.
type ModelBlockInfo struct { Name string `json:"name"` UUID string `json:"model-uuid"` OwnerTag string `json:"owner-tag"` Blocks []string `json:"blocks"` }
ModelBlockInfo holds information about an model and its current blocks.
type ModelBlockInfoList struct { Models []ModelBlockInfo `json:"models,omitempty"` }
ModelBlockInfoList holds information about the blocked models for a controller.
ModelConfig holds a model configuration.
type ModelConfigResult struct { Config ModelConfig `json:"config"` }
ModelConfigResult holds model configuration.
type ModelConfigResults struct { Config map[string]ConfigValue `json:"config"` }
ModelConfigResults contains the result of client API calls to get model config values.
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 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 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 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 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 struct { Results []ModelDefaultsResult `json:"results"` }
ModelDefaultsResults contains the result of client API calls to get the model default values.
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 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 struct { Name string `json:"name"` Type string `json:"type"` UUID string `json:"uuid"` ControllerUUID string `json:"controller-uuid"` IsController bool `json:"is-controller"` ProviderType string `json:"provider-type,omitempty"` DefaultSeries string `json:"default-series,omitempty"` CloudTag string `json:"cloud-tag"` CloudRegion string `json:"cloud-region,omitempty"` CloudCredentialTag string `json:"cloud-credential-tag,omitempty"` // CloudCredentialValidity contains if model credential is valid, if known. CloudCredentialValidity *bool `json:"cloud-credential-validity,omitempty"` // OwnerTag is the tag of the user that owns the model. OwnerTag string `json:"owner-tag"` // Life is the current lifecycle state of the model. Life life.Value `json:"life"` // Status is the current status of the model. Status EntityStatus `json:"status,omitempty"` // Users contains information about the users that have access // to the model. Owners and administrators can see all users // that have access; other users can only see their own details. Users []ModelUserInfo `json:"users"` // Machines contains information about the machines in the model. // This information is available to owners and users with write // access or greater. Machines []ModelMachineInfo `json:"machines"` // Migration contains information about the latest failed or // currently-running migration. It'll be nil if there isn't one. Migration *ModelMigrationStatus `json:"migration,omitempty"` // SLA contains the information about the SLA for the model, if set. SLA *ModelSLAInfo `json:"sla"` // AgentVersion is the agent version for this model. AgentVersion *version.Number `json:"agent-version"` }
ModelInfo holds information about the Juju model.
ModelInfoList holds a list of ModelInfo structures.
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 struct { Results []ModelInfoListResult `json:"results"` }
ModelInfoListResults holds the result of a bulk call that returns multiple lists of ModelInfo structures.
type ModelInfoResult struct { Result *ModelInfo `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
ModelInfoResult holds the result of a ModelInfo call.
type ModelInfoResults struct { Results []ModelInfoResult `json:"results"` }
ModelInfoResults holds the result of a bulk ModelInfo call.
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 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 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"` }
ModelMachineInfo holds information about a machine in a model.
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 ModelResult struct { Error *Error `json:"error,omitempty"` Name string `json:"name"` UUID string `json:"uuid"` Type string `json:"type"` }
ModelResult holds the result of an API call returning a name and UUID for a model.
type ModelSLA struct { ModelSLAInfo Credentials []byte `json:"creds"` }
ModelSLA contains the arguments for the SetSLALevel client API call.
ModelSLAInfo describes the SLA info for a model.
ModelSequencesResult holds the map of sequence names to next value.
ModelSet contains the arguments for ModelSet client API call.
type ModelStatus struct { ModelTag string `json:"model-tag"` Life life.Value `json:"life"` Type string `json:"type"` HostedMachineCount int `json:"hosted-machine-count"` ApplicationCount int `json:"application-count"` UnitCount int `json:"unit-count"` OwnerTag string `json:"owner-tag"` Machines []ModelMachineInfo `json:"machines,omitempty"` Volumes []ModelVolumeInfo `json:"volumes,omitempty"` Filesystems []ModelFilesystemInfo `json:"filesystems,omitempty"` Error *Error `json:"error,omitempty"` }
ModelStatus holds information about the status of a juju model.
type ModelStatusInfo struct { Name string `json:"name"` Type string `json:"type"` CloudTag string `json:"cloud-tag"` CloudRegion string `json:"region,omitempty"` Version string `json:"version"` AvailableVersion string `json:"available-version"` ModelStatus DetailedStatus `json:"model-status"` MeterStatus MeterStatus `json:"meter-status"` SLA string `json:"sla"` }
ModelStatusInfo holds status information about the model itself.
type ModelStatusResults struct { Results []ModelStatus `json:"models"` }
ModelStatusResults holds status information about a group of models.
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 struct { Name string `json:"name"` UUID string `json:"uuid"` Type string `json:"type"` ControllerUUID string `json:"controller-uuid"` IsController bool `json:"is-controller"` ProviderType string `json:"provider-type,omitempty"` DefaultSeries string `json:"default-series,omitempty"` CloudTag string `json:"cloud-tag"` CloudRegion string `json:"cloud-region,omitempty"` CloudCredentialTag string `json:"cloud-credential-tag,omitempty"` // OwnerTag is the tag of the user that owns the model. OwnerTag string `json:"owner-tag"` // Life is the current lifecycle state of the model. Life life.Value `json:"life"` // Status is the current status of the model. Status EntityStatus `json:"status,omitempty"` // UserAccess is model access level for the current user. UserAccess UserAccessPermission `json:"user-access"` // UserLastConnection contains the time when current user logged in // into the model last. UserLastConnection *time.Time `json:"last-connection"` // Counts contains counts of interesting entities // in the model, for example machines, cores, containers, units, etc. Counts []ModelEntityCount `json:"counts"` // Migration contains information about the latest failed or // currently-running migration. It'll be nil if there isn't one. Migration *ModelMigrationStatus `json:"migration,omitempty"` // SLA contains the information about the SLA for the model, if set. SLA *ModelSLAInfo `json:"sla"` // AgentVersion is the agent version for this model. AgentVersion *version.Number `json:"agent-version"` }
ModelSummary holds summary about a Juju model.
type ModelSummaryResult struct { Result *ModelSummary `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
ModelSummaryResult holds the result of a ListModelsWithInfo call.
type ModelSummaryResults struct { Results []ModelSummaryResult `json:"results"` }
ModelSummaryResults holds the result of a bulk ListModelsWithInfo call.
ModelUnset contains the arguments for ModelUnset client API call.
type ModelUnsetKeys struct { CloudTag string `json:"cloud-tag,omitempty"` CloudRegion string `json:"cloud-region,omitempty"` Keys []string `json:"keys"` }
ModelUnsetKeys contains the config keys to unset for a cloud/region.
type ModelUpdate struct { ModelUUID string `json:"model-uuid"` Name string `json:"name"` Life life.Value `json:"life"` Owner string `json:"owner"` ControllerUUID string `json:"controller-uuid"` IsController bool `json:"is-controller"` Config map[string]interface{} `json:"config,omitempty"` Status StatusInfo `json:"status"` Constraints constraints.Value `json:"constraints"` SLA ModelSLAInfo `json:"sla"` }
ModelUpdate holds the information about a model that is tracked by multiwatcherStore.
func (i *ModelUpdate) EntityId() EntityId
EntityId returns a unique identifier for a model.
type ModelUserInfo struct { UserName string `json:"user"` DisplayName string `json:"display-name"` LastConnection *time.Time `json:"last-connection"` Access UserAccessPermission `json:"access"` }
ModelUserInfo holds information on a user who has access to a model. Owners of a model can see this information for all users who have access, so it should not include sensitive information.
type ModelUserInfoResult struct { Result *ModelUserInfo `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
ModelUserInfoResult holds the result of an ModelUserInfo call.
type ModelUserInfoResults struct { Results []ModelUserInfoResult `json:"results"` }
ModelUserInfoResults holds the result of a bulk ModelUserInfo API call.
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 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 struct { Changes []ModifyCloudAccess `json:"changes"` }
ModifyCloudAccessRequest holds the parameters for making grant and revoke cloud calls.
type ModifyControllerAccess struct { UserTag string `json:"user-tag"` Action ControllerAction `json:"action"` Access string `json:"access"` }
type ModifyControllerAccessRequest struct { Changes []ModifyControllerAccess `json:"changes"` }
ModifyControllerAccessRequest holds the parameters for making grant and revoke controller calls.
type ModifyModelAccess struct { UserTag string `json:"user-tag"` Action ModelAction `json:"action"` Access UserAccessPermission `json:"access"` ModelTag string `json:"model-tag"` }
type ModifyModelAccessRequest struct { Changes []ModifyModelAccess `json:"changes"` }
ModifyModelAccessRequest holds the parameters for making grant and revoke model calls.
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 struct { Changes []ModifyOfferAccess `json:"changes"` }
ModifyModelAccessRequest holds the parameters for making grant and revoke offer calls.
ModifyUserSSHKeys stores parameters used for a KeyManager.Add|Delete|Import call for a user.
type MongoVersion struct { Major int `json:"major"` Minor int `json:"minor"` Patch string `json:"patch"` StorageEngine string `json:"engine"` }
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.InterfaceConfigType 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"` }
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(interfaceInfos []network.InterfaceInfo) []NetworkConfig
NetworkConfigFromInterfaceInfo converts a slice of network.InterfaceInfo into the equivalent NetworkConfig slice.
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"` // 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"` // Addresses contains a list of addresses configured on the interface. Addresses []InterfaceAddress `json:"addresses"` }
NetworkInfo describes one interface with IP addresses.
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 struct { Error *Error `json:"error,omitempty" yaml:"error,omitempty"` Info []NetworkInfo `json:"bind-addresses,omitempty" yaml:"bind-addresses,omitempty"` EgressSubnets []string `json:"egress-subnets,omitempty" yaml:"egress-subnets,omitempty"` IngressAddresses []string `json:"ingress-addresses,omitempty" yaml:"ingress-addresses,omitempty"` }
NetworkInfoResult Adds egress and ingress subnets and changes the serialized `Info` key name in the yaml/json API protocol.
type NetworkInfoResultV6 struct { Error *Error `json:"error,omitempty" yaml:"error,omitempty"` Info []NetworkInfo `json:"network-info" yaml:"info"` }
NetworkInfoResultV6 holds either and error or a list of NetworkInfos for given binding.
type NetworkInfoResults struct { Results map[string]NetworkInfoResult `json:"results"` }
NetworkInfoResults holds a mapping from binding name to NetworkInfoResult.
type NetworkInfoResultsV6 struct { Results map[string]NetworkInfoResultV6 `json:"results"` }
NetworkInfoResults holds a mapping from binding name to NetworkInfoResultV6.
type NetworkInterface struct { // IPAddresses holds the IP addresses bound to this machine. IPAddresses []string `json:"ip-addresses"` MACAddress string `json:"mac-address"` Gateway string `json:"gateway,omitempty"` DNSNameservers []string `json:"dns-nameservers,omitempty"` // Space holds the name of a space in which this devices IP addr's // subnet belongs. Space string `json:"space,omitempty"` // Is this interface up? IsUp bool `json:"is-up"` }
NetworkInterfaceStatus holds a /etc/network/interfaces-type data and the space name for any device with at least one associated IP address.
type 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.
NotifyWatchResult holds a NotifyWatcher id and an error (if any).
type NotifyWatchResults struct { Results []NotifyWatchResult `json:"results"` }
NotifyWatchResults holds the results for any API call which ends up returning a list of NotifyWatchers
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.
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 struct { OfferUUID string `json:"offer-uuid"` Macaroons macaroon.Slice `json:"macaroons,omitempty"` }
OfferArg holds an offer uuid and corresponding macaroons.
OfferArgs holds arguments to an API call dealing with offers.
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 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 struct { Filters []OfferFilter }
OfferFilters is used to query offers. Offers matching any of the filters are returned.
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 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 struct { Results []OfferStatusWatchResult `json:"results"` }
OfferStatusWatchResults holds the results for any API call which ends up returning a list of OfferStatusWatchers.
type OfferURLs struct { // OfferURLs contains collection of urls for applications that are to be shown. OfferURLs []string `json:"offer-urls,omitempty"` }
OfferURLs is a collection of remote offer URLs
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 OperationQueryArgs struct { Applications []string `json:"applications,omitempty"` Units []string `json:"units,omitempty"` FunctionNames []string `json:"functions,omitempty"` Status []string `json:"status,omitempty"` }
OperationQueryArgs holds args for listing operations.
type OperatorProvisioningInfo struct { ImagePath string `json:"image-path"` Version version.Number `json:"version"` APIAddresses []string `json:"api-addresses"` Tags map[string]string `json:"tags,omitempty"` CharmStorage KubernetesFilesystemParams `json:"charm-storage"` }
OperatorProvisioningInfo holds info need to provision an operator.
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 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 struct { // Results is the list of payload results. Results []Payload `json:"results"` }
PayloadListResults returns the result of the Payload.List endpoint.
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 struct { Results []PayloadResult `json:"results"` }
PayloadResults is the result for a call that makes one or more requests about payloads.
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 struct { Results []PhaseResult `json:"results"` }
PhasesResults holds the phase of one or more model migrations.
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 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 struct { // Result has: // - Application name keys representing the application pinned. // - Tag slice values representing the entities requiring pinned // behaviour for each application. Result map[string][]string `json:"result,omitempty"` }
PinnedLeadershipResults holds data representing the current applications for which leadership is pinned
Port encapsulates a protocol and port number. It is used in API requests/responses. See also network.Port, from/to which this is transformed.
FromNetworkPort is a convenience helper to create a parameter out of the network type, here for Port.
NetworkPort is a convenience helper to return the parameter as network type, here for Port.
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.
FromNetworkPortRange is a convenience helper to create a parameter out of the network type, here for PortRange.
NetworkPortRange is a convenience helper to return the parameter as network type, here for PortRange.
PortsResult holds the result of an API call that returns a slice of Port or an error.
type PortsResults struct { Results []PortsResult `json:"results"` }
PortsResults holds the bulk operation result of an API call that returns a slice of Port.
PrivateAddress holds parameters for the PrivateAddress call.
PrivateAddressResults holds results of the PrivateAddress call.
ProcessRelations holds the information required to process series of relations during a model migration.
type Profile struct { Config map[string]string `json:"config,omitempty"` Description string `json:"description,omitempty"` Devices map[string]map[string]string `json:"devices,omitempty"` }
Profile is a representation of charm.v6 LXDProfile
type ProfileArgs struct { Args []ProfileArg `json:"args"` }
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 struct { Results []ProfileChangeResult `json:"results"` }
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 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 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 struct { Results []ProviderInterfaceInfoResult `json:"results"` }
ProviderInterfaceInfoResults holds the results of a GetProviderInterfaceInfo call.
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 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 struct { Constraints constraints.Value `json:"constraints"` Series string `json:"series"` Placement string `json:"placement"` Jobs []model.MachineJob `json:"jobs"` Volumes []VolumeParams `json:"volumes,omitempty"` VolumeAttachments []VolumeAttachmentParams `json:"volume-attachments,omitempty"` Tags map[string]string `json:"tags,omitempty"` SubnetsToZones map[string][]string `json:"subnets-to-zones,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"` }
ProvisioningInfo holds machine provisioning info.
type ProvisioningInfoResult struct { Error *Error `json:"error,omitempty"` Result *ProvisioningInfo `json:"result"` }
ProvisioningInfoResult holds machine provisioning info or an error.
type ProvisioningInfoResults struct { Results []ProvisioningInfoResult `json:"results"` }
ProvisioningInfoResults holds multiple machine provisioning info results.
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.
ProvisioningScriptResult contains the result of the ProvisioningScript client API call.
type ProxyConfig struct { HTTP string `json:"http"` HTTPS string `json:"https"` FTP string `json:"ftp"` NoProxy string `json:"no-proxy"` }
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"` Error *Error `json:"error,omitempty"` }
ProxyConfigResult contains information needed to configure a clients proxy settings
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 struct { Results []ProxyConfigResult `json:"results"` }
ProxyConfigResults contains information needed to configure multiple clients proxy settings
type ProxyConfigResultsV1 struct { Results []ProxyConfigResultV1 `json:"results"` }
ProxyConfigResultsV1 contains information needed to configure multiple clients proxy settings. Result for facade v1 call.
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.
PublicAddress holds parameters for the PublicAddress call.
PublicAddressResults holds results of the PublicAddress call.
type QueryApplicationOffersResults struct { // Results contains application offers matching each filter. Results []ApplicationOfferAdminDetails `json:"results"` }
QueryApplicationOffersResults is a result of searching application offers.
ReauthRequest holds a challenge/response token meaningful to the identity provider.
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 struct { Result RebootAction `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
RebootActionResult holds the result of a single call to machine.ShouldRebootOrShutdown.
type RebootActionResults struct { Results []RebootActionResult `json:"results,omitempty"` }
RebootActionResults holds a list of RebootActionResult and any error.
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"` // An optional alias for the controller the model migrated to. ControllerAlias string `json:"controller-alias,omitempty"` }
RedirectErrorInfo provides additional information for Redirect errors.
func (e RedirectErrorInfo) AsMap() map[string]interface{}
AsMap encodes the error info as a map that can be attached to an Error.
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 struct { RegionName string `json:"region-name"` Value interface{} `json:"value"` }
RegionDefaults contains the settings for regions in a ModelDefaults.
type RegisterRemoteRelationArg struct { // ApplicationToken is the application token on the remote model. ApplicationToken string `json:"application-token"` // SourceModelTag is the tag of the model hosting the application. SourceModelTag string `json:"source-model-tag"` // RelationToken is the relation token on the remote model. RelationToken string `json:"relation-token"` // RemoteEndpoint contains info about the endpoint in the remote model. RemoteEndpoint RemoteEndpoint `json:"remote-endpoint"` // RemoteSpace contains provider-level info about the space the // endpoint is bound to in the remote model. RemoteSpace RemoteSpace `json:"remote-space"` // OfferUUID is the UUID of the offer. OfferUUID string `json:"offer-uuid"` // LocalEndpointName is the name of the endpoint in the local model. LocalEndpointName string `json:"local-endpoint-name"` // Macaroons are used for authentication. Macaroons macaroon.Slice `json:"macaroons,omitempty"` }
RegisterRemoteRelationArg holds attributes used to register a remote relation.
type RegisterRemoteRelationArgs struct { Relations []RegisterRemoteRelationArg `json:"relations"` }
RegisterRemoteRelationArgs holds args used to add remote relations.
type RegisterRemoteRelationResult struct { Result *RemoteRelationDetails `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
RegisterRemoteRelationResult holds a remote relation details and an error.
type RegisterRemoteRelationResults struct { Results []RegisterRemoteRelationResult `json:"results,omitempty"` }
RemoteRemoteRelationResults has a set of remote relation results.