Documentation ¶
Index ¶
- Constants
- func ClientError(err error) error
- func ErrCode(err error) string
- func FromNetworkHostsPorts(nhpm [][]network.HostPort) [][]HostPort
- func IsCodeActionNotAvailable(err error) bool
- func IsCodeAlreadyExists(err error) bool
- func IsCodeCannotEnterScope(err error) bool
- func IsCodeCannotEnterScopeYet(err error) bool
- func IsCodeDead(err error) bool
- func IsCodeExcessiveContention(err error) bool
- func IsCodeHasAssignedUnits(err error) bool
- func IsCodeLeadershipClaimDenied(err error) bool
- func IsCodeMachineHasAttachedStorage(err error) bool
- func IsCodeNoAddressSet(err error) bool
- func IsCodeNotAssigned(err error) bool
- func IsCodeNotFound(err error) bool
- func IsCodeNotFoundOrCodeUnauthorized(err error) bool
- func IsCodeNotImplemented(err error) bool
- func IsCodeNotProvisioned(err error) bool
- func IsCodeNotSupported(err error) bool
- func IsCodeOperationBlocked(err error) bool
- func IsCodeStopped(err error) bool
- func IsCodeTryAgain(err error) bool
- func IsCodeUnauthorized(err error) bool
- func IsCodeUnitHasSubordinates(err error) bool
- func IsCodeUpgradeInProgress(err error) bool
- func NetworkAddresses(addrs []Address) []network.Address
- func NetworkHostPorts(hps []HostPort) []network.HostPort
- func NetworkHostsPorts(hpm [][]HostPort) [][]network.HostPort
- type APIHostPortsResult
- type Action
- type ActionExecutionResult
- type ActionExecutionResults
- type ActionResult
- type ActionResults
- type Actions
- type ActionsByReceiver
- type ActionsByReceivers
- type ActionsQueryResult
- type ActionsQueryResults
- type AddCharmWithAuthorization
- type AddMachineParams
- type AddMachines
- type AddMachinesResult
- type AddMachinesResults
- type AddRelation
- type AddRelationResults
- type AddServiceUnits
- type AddServiceUnitsResults
- type AddSubnetParams
- type AddSubnetsParams
- type AddUser
- type AddUserResult
- type AddUserResults
- type AddUsers
- type Address
- type AgentGetEntitiesResult
- type AgentGetEntitiesResults
- type AgentStatus
- type AgentVersionResult
- type AllWatcherId
- type AllWatcherNextResults
- type AnnotationsGetResult
- type AnnotationsGetResults
- type AnnotationsSet
- type AuthUserInfo
- type BackupsCreateArgs
- type BackupsDownloadArgs
- type BackupsInfoArgs
- type BackupsListArgs
- type BackupsListResult
- type BackupsMetadataResult
- type BackupsRemoveArgs
- type BackupsUploadArgs
- type BackupsUploadResult
- type Block
- type BlockDeviceResult
- type BlockDeviceResults
- type BlockDevicesResult
- type BlockDevicesResults
- type BlockResult
- type BlockResults
- type BlockSwitchParams
- type BoolResult
- type BoolResults
- type BytesResult
- type CharmInfo
- type CharmURL
- type CharmURLs
- type CharmsList
- type CharmsListResult
- type CharmsResponse
- type ClaimLeadershipBulkParams
- type ClaimLeadershipBulkResults
- type ClaimLeadershipParams
- type CloudImageMetadata
- type ConfigSettings
- type ConfigSettingsResult
- type ConfigSettingsResults
- type ConstraintsResult
- type ConstraintsResults
- type ContainerConfig
- type ContainerManagerConfig
- type ContainerManagerConfigParams
- type CreateSpaceParams
- type CreateSpacesParams
- type CreateSubnetParams
- type CreateSubnetsParams
- type Creds
- type DeployerConnectionValues
- type DestroyMachines
- type DestroyRelation
- type DestroyServiceUnits
- type DestroySystemArgs
- type DistributionGroupResult
- type DistributionGroupResults
- type EndpointStatus
- type Entities
- type EntitiesCharmURL
- type EntitiesPortRanges
- type EntitiesPorts
- type EntitiesVersion
- type Entity
- type EntityAnnotations
- type EntityCharmURL
- type EntityPassword
- type EntityPasswords
- type EntityPort
- type EntityPortRange
- type EntityStatus
- type EntityStatusArgs
- type EntityVersion
- type EntityWatchResult
- type EntityWatchResults
- type EnvUserInfo
- type EnvUserInfoResult
- type EnvUserInfoResults
- type EnvironAction
- type EnvironConfig
- type EnvironConfigResult
- type Environment
- type EnvironmentBlockInfo
- type EnvironmentBlockInfoList
- type EnvironmentConfigResults
- type EnvironmentCreateArgs
- type EnvironmentResult
- type EnvironmentSet
- type EnvironmentSkeletonConfigArgs
- type EnvironmentUnset
- type Error
- type ErrorResult
- type ErrorResults
- type FacadeVersions
- type Filesystem
- type FilesystemAttachment
- type FilesystemAttachmentInfo
- type FilesystemAttachmentParams
- type FilesystemAttachmentParamsResult
- type FilesystemAttachmentParamsResults
- type FilesystemAttachmentResult
- type FilesystemAttachmentResults
- type FilesystemAttachments
- type FilesystemDetails
- type FilesystemDetailsResult
- type FilesystemDetailsResults
- type FilesystemFilter
- type FilesystemInfo
- type FilesystemParams
- type FilesystemParamsResult
- type FilesystemParamsResults
- type FilesystemResult
- type FilesystemResults
- type Filesystems
- type FindTags
- type FindTagsResults
- type FindToolsParams
- type FindToolsResult
- type FullStatus
- type GetAnnotations
- type GetAnnotationsResults
- type GetConstraintsResults
- type GetLeadershipSettingsBulkResults
- type GetLeadershipSettingsResult
- type GetServiceConstraints
- type HistoryKind
- type HostPort
- type ImageFilterParams
- type ImageMetadata
- type ImageMetadataFilter
- type ImageSpec
- type InstanceInfo
- type InstanceStatus
- type InstancesInfo
- type IsMasterResult
- type IsMeteredResult
- type JobsResult
- type JobsResults
- type LegacyMachineStatus
- type LegacyStatus
- type LegacyStorageDetails
- type LegacyVolumeDetails
- type Life
- type LifeResult
- type LifeResults
- type ListCloudImageMetadataResult
- type ListImageResult
- type ListSSHKeys
- type ListSpacesResults
- type ListSubnetsResults
- type LoginRequest
- type LoginRequestCompat
- type LoginResult
- type LoginResultV1
- type MachineAddresses
- type MachineAddressesResult
- type MachineAddressesResults
- type MachineBlockDevices
- type MachineContainers
- type MachineContainersParams
- type MachineNetworkConfigResult
- type MachineNetworkConfigResults
- type MachinePortRange
- type MachinePorts
- type MachinePortsParams
- type MachinePortsResult
- type MachinePortsResults
- type MachineSetProvisioned
- type MachineStatus
- type MachineStorageId
- type MachineStorageIds
- type MachineStorageIdsWatchResult
- type MachineStorageIdsWatchResults
- type MergeLeadershipSettingsBulkParams
- type MergeLeadershipSettingsParam
- type MetadataSaveParams
- type MeterStatus
- type MeterStatusResult
- type MeterStatusResults
- type Metric
- type MetricBatch
- type MetricBatchParam
- type MetricBatchParams
- type MetricsParam
- type MetricsParams
- type ModifyEnvironUser
- type ModifyEnvironUsers
- type ModifyUserSSHKeys
- type Network
- type NetworkConfig
- type NetworkInterface
- type NetworkStatus
- type NetworksSpecification
- type NotifyWatchResult
- type NotifyWatchResults
- type Port
- type PortRange
- type PortsResult
- type PortsResults
- type PrivateAddress
- type PrivateAddressResults
- type ProvisioningInfo
- type ProvisioningInfoResult
- type ProvisioningInfoResults
- type ProvisioningScriptParams
- type ProvisioningScriptResult
- type PublicAddress
- type PublicAddressResults
- type ReauthRequest
- type RebootAction
- type RebootActionResult
- type RebootActionResults
- type RelationIds
- type RelationResult
- type RelationResults
- type RelationStatus
- type RelationUnit
- type RelationUnitPair
- type RelationUnitPairs
- type RelationUnitSettings
- type RelationUnits
- type RelationUnitsSettings
- type RelationUnitsWatchResult
- type RelationUnitsWatchResults
- type ReleaseLeadershipBulkParams
- type ReleaseLeadershipBulkResults
- type ReleaseLeadershipParams
- type RemoveBlocksArgs
- type RequestedNetworkResult
- type RequestedNetworksResults
- type ResolveCharmResult
- type ResolveCharmResults
- type ResolveCharms
- type Resolved
- type ResolvedMode
- type ResolvedModeResult
- type ResolvedModeResults
- type ResolvedResults
- type RestoreArgs
- type RsyslogConfigResult
- type RsyslogConfigResults
- type RunParams
- type RunResult
- type RunResults
- type ServiceCharmActionsResult
- type ServiceCharmRelations
- type ServiceCharmRelationsResults
- type ServiceDeploy
- type ServiceDestroy
- type ServiceExpose
- type ServiceGet
- type ServiceGetResults
- type ServiceMetricCredential
- type ServiceMetricCredentials
- type ServiceSet
- type ServiceSetCharm
- type ServiceSetYAML
- type ServiceStatus
- type ServiceStatusResult
- type ServiceStatusResults
- type ServiceUnexpose
- type ServiceUnset
- type ServiceUpdate
- type ServicesCharmActionsResults
- type ServicesDeploy
- type SetAnnotations
- type SetConstraints
- type SetEnvironAgentVersion
- type SetInstancesStatus
- type SetMachineBlockDevices
- type SetMachinesAddresses
- type SetProvisioned
- type SetRsyslogCertParams
- type SetStatus
- type Settings
- type SettingsResult
- type SettingsResults
- type Space
- type SpaceResult
- type SpaceResults
- type StateServersChangeResult
- type StateServersChangeResults
- type StateServersChanges
- type StateServersSpec
- type StateServersSpecs
- type StateServingInfo
- type Status
- type StatusHistory
- type StatusParams
- type StatusResult
- type StatusResults
- type StorageAddParams
- type StorageAttachment
- type StorageAttachmentDetails
- type StorageAttachmentId
- type StorageAttachmentIds
- type StorageAttachmentIdsResult
- type StorageAttachmentIdsResults
- type StorageAttachmentResult
- type StorageAttachmentResults
- type StorageAttachmentsResult
- type StorageAttachmentsResults
- type StorageConstraints
- type StorageDetails
- type StorageDetailsResult
- type StorageDetailsResults
- type StorageInstance
- type StorageInstanceResult
- type StorageInstanceResults
- type StorageKind
- type StoragePool
- type StoragePoolFilter
- type StoragePoolsResult
- type StoragesAddParams
- type StringBoolResult
- type StringBoolResults
- type StringResult
- type StringResults
- type StringsResult
- type StringsResults
- type StringsWatchResult
- type StringsWatchResults
- type Subnet
- type SubnetsFilters
- type ToolsResult
- type ToolsResults
- type UnitStatus
- type UnitStatusHistory
- type UpdateBehavior
- type UserEnvironment
- type UserEnvironmentList
- type UserInfo
- type UserInfoRequest
- type UserInfoResult
- type UserInfoResults
- type Version
- type VersionResult
- type VersionResults
- type Volume
- type VolumeAttachment
- type VolumeAttachmentInfo
- type VolumeAttachmentParams
- type VolumeAttachmentParamsResult
- type VolumeAttachmentParamsResults
- type VolumeAttachmentResult
- type VolumeAttachmentResults
- type VolumeAttachments
- type VolumeAttachmentsResult
- type VolumeAttachmentsResults
- type VolumeDetails
- type VolumeDetailsResult
- type VolumeDetailsResults
- type VolumeFilter
- type VolumeInfo
- type VolumeParams
- type VolumeParamsResult
- type VolumeParamsResults
- type VolumeResult
- type VolumeResults
- type Volumes
- type WatchContainer
- type WatchContainers
- type ZoneResult
- type ZoneResults
Constants ¶
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" 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" CodeMachineHasAttachedStorage = "machine has attached storage" CodeNotProvisioned = "not provisioned" CodeNoAddressSet = "no address set" CodeTryAgain = "try again" CodeNotImplemented = rpc.CodeNotImplemented CodeAlreadyExists = "already exists" CodeUpgradeInProgress = "upgrade in progress" CodeActionNotAvailable = "action no longer available" CodeOperationBlocked = "operation is blocked" CodeLeadershipClaimDenied = "leadership claim denied" CodeNotSupported = "not supported" )
The Code constants hold error codes for some kinds of error.
Variables ¶
This section is empty.
Functions ¶
func ClientError ¶
ClientError maps errors returned from an RPC call into local errors with appropriate values.
func ErrCode ¶
ErrCode returns the error code associated with the given error, or the empty string if there is none.
func FromNetworkHostsPorts ¶
FromNetworkHostsPorts is a helper to create a parameter out of the network type, here for a nested slice of HostPort.
func IsCodeAlreadyExists ¶
func IsCodeCannotEnterScope ¶
func IsCodeDead ¶
func IsCodeHasAssignedUnits ¶
func IsCodeNoAddressSet ¶
func IsCodeNotAssigned ¶
func IsCodeNotFound ¶
func IsCodeNotFoundOrCodeUnauthorized ¶
IsCodeNotFoundOrCodeUnauthorized is used in API clients which, pre-API, used errors.IsNotFound; this is because an API client is not necessarily privileged to know about the existence or otherwise of a particular entity, and the server may hence convert NotFound to Unauthorized at its discretion.
func IsCodeNotImplemented ¶
func IsCodeNotProvisioned ¶
func IsCodeNotSupported ¶
func IsCodeOperationBlocked ¶
func IsCodeStopped ¶
func IsCodeTryAgain ¶
func IsCodeUnauthorized ¶
func IsCodeUpgradeInProgress ¶
func NetworkAddresses ¶
NetworkAddresses is a convenience helper to return the parameter as network type, here for a slice of Address.
func NetworkHostPorts ¶
NetworkHostPorts is a convenience helper to return the parameter as network type, here for a slice of HostPort.
func NetworkHostsPorts ¶
NetworkHostsPorts is a convenience helper to return the parameter as network type, here for a nested slice of HostPort.
Types ¶
type APIHostPortsResult ¶
type APIHostPortsResult struct {
Servers [][]HostPort `json:"Servers"`
}
APIHostPortsResult holds the result of an APIHostPorts call. Each element in the top level slice holds the addresses for one API server.
func (APIHostPortsResult) NetworkHostsPorts ¶
func (r APIHostPortsResult) NetworkHostsPorts() [][]network.HostPort
NetworkHostsPorts is a convenience helper to return the contained result servers as network type.
type Action ¶
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 ¶
type ActionExecutionResult struct { ActionTag string `json:"actiontag"` Status string `json:"status"` Results map[string]interface{} `json:"results,omitempty"` Message string `json:"message,omitempty"` }
ActionExecutionResult holds the action tag and output used when recording the result of an action.
type ActionExecutionResults ¶
type ActionExecutionResults struct {
Results []ActionExecutionResult `json:"results,omitempty"`
}
ActionExecutionResults holds a slice of ActionExecutionResult for a bulk action API call
type ActionResult ¶
type ActionResult struct { Action *Action `json:"action,omitempty"` Enqueued time.Time `json:"enqueued,omitempty"` Started time.Time `json:"started,omitempty"` Completed time.Time `json:"completed,omitempty"` Status string `json:"status,omitempty"` Message string `json:"message,omitempty"` Output map[string]interface{} `json:"output,omitempty"` Error *Error `json:"error,omitempty"` }
ActionResult describes an Action that will be or has been completed.
type ActionResults ¶
type ActionResults struct {
Results []ActionResult `json:"results,omitempty"`
}
ActionResults is a slice of ActionResult for bulk requests.
type Actions ¶
type Actions struct {
Actions []Action `json:"actions,omitempty"`
}
Actions is a slice of Action for bulk requests.
type ActionsByReceiver ¶
type ActionsByReceiver struct { Receiver string `json:"receiver,omitempty"` Actions []ActionResult `json:"actions,omitempty"` Error *Error `json:"error,omitempty"` }
ActionsByReceiver is a bulk API call wrapper containing Actions, either as input paramters or as results.
type ActionsByReceivers ¶
type ActionsByReceivers struct {
Actions []ActionsByReceiver `json:"actions,omitempty"`
}
ActionsByReceivers wrap a slice of Actions for API calls.
type ActionsQueryResult ¶
type ActionsQueryResult struct { Receiver string `json:"receiver,omitempty"` Action ActionResult `json:"action,omitempty"` Error *Error `json:"error,omitempty"` }
ActionsQueryResult holds the name and parameters of an query result.
type ActionsQueryResults ¶
type ActionsQueryResults struct {
Results []ActionsQueryResult `json:"results,omitempty"`
}
ActionsQueryResults holds a slice of responses from the Actions query.
type AddCharmWithAuthorization ¶
type AddCharmWithAuthorization struct { URL string CharmStoreMacaroon *macaroon.Macaroon }
AddCharmWithAuthorization holds the arguments for making an AddCharmWithAuthorization API call.
type AddMachineParams ¶
type AddMachineParams struct { // The following fields hold attributes that will be given to the // new machine when it is created. Series string `json:"Series"` Constraints constraints.Value `json:"Constraints"` Jobs []multiwatcher.MachineJob `json:"Jobs"` // Disks describes constraints for disks that must be attached to // the machine when it is provisioned. Disks []storage.Constraints `json:"Disks"` // 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"` // 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:"ParentId"` // 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:"ContainerType"` // 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:"InstanceId"` Nonce string `json:"Nonce"` HardwareCharacteristics instance.HardwareCharacteristics `json:"HardwareCharacteristics"` Addrs []Address `json:"Addrs"` }
AddMachineParams encapsulates the parameters used to create a new machine.
type AddMachines ¶
type AddMachines struct {
MachineParams []AddMachineParams `json:"MachineParams"`
}
AddMachines holds the parameters for making the AddMachinesWithPlacement call.
type AddMachinesResult ¶
AddMachinesResult holds the name of a machine added by the api.client.AddMachine call for a single machine.
type AddMachinesResults ¶
type AddMachinesResults struct {
Machines []AddMachinesResult `json:"Machines"`
}
AddMachinesResults holds the results of an AddMachines call.
type AddRelation ¶
type AddRelation struct {
Endpoints []string
}
AddRelation holds the parameters for making the AddRelation call. The endpoints specified are unordered.
type AddRelationResults ¶
type AddRelationResults struct {
Endpoints map[string]charm.Relation
}
AddRelationResults holds the results of a AddRelation call. The Endpoints field maps service names to the involved endpoints.
type AddServiceUnits ¶
type AddServiceUnits struct { ServiceName string NumUnits int ToMachineSpec string Placement []*instance.Placement }
AddServiceUnits holds parameters for the AddUnits call.
type AddServiceUnitsResults ¶
type AddServiceUnitsResults struct {
Units []string
}
AddServiceUnitsResults holds the names of the units added by the AddServiceUnits call.
type AddSubnetParams ¶
type AddSubnetParams struct { SubnetTag string `json:"SubnetTag,omitempty"` SubnetProviderId string `json:"SubnetProviderId,omitempty"` SpaceTag string `json:"SpaceTag"` 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 ¶
type AddSubnetsParams struct {
Subnets []AddSubnetParams `json:"Subnets"`
}
AddSubnetsParams holds the arguments of AddSubnets API call.
type AddUser ¶
type AddUser struct { Username string `json:"username"` DisplayName string `json:"display-name"` Password string `json:"password"` }
AddUser stores the parameters to add one user.
type AddUserResult ¶
type AddUserResult struct { Tag string `json:"tag,omitempty"` Error *Error `json:"error,omitempty"` }
AddUserResult returns the tag of the newly created user, or an error.
type AddUserResults ¶
type AddUserResults struct {
Results []AddUserResult `json:"results"`
}
AddUserResults holds the results of the bulk AddUser API call.
type AddUsers ¶
type AddUsers struct {
Users []AddUser `json:"users"`
}
AddUsers holds the parameters for adding new users.
type Address ¶
type Address struct { Value string `json:"Value"` Type string `json:"Type"` NetworkName string `json:"NetworkName"` Scope string `json:"Scope"` }
Address represents the location of a machine, including metadata about what kind of location the address describes. It's used in the API requests/responses. See also network.Address, from/to which this is transformed.
func FromNetworkAddress ¶
FromNetworkAddress is a convenience helper to create a parameter out of the network type, here for Address.
func FromNetworkAddresses ¶
FromNetworkAddresses is a convenience helper to create a parameter out of the network type, here for a slice of Address.
func (Address) NetworkAddress ¶
NetworkAddress is a convenience helper to return the parameter as network type, here for Address.
type AgentGetEntitiesResult ¶
type AgentGetEntitiesResult struct { Life Life Jobs []multiwatcher.MachineJob ContainerType instance.ContainerType Error *Error }
AgentGetEntitiesResult holds the results of a machineagent.API.GetEntities call for a single entity.
type AgentGetEntitiesResults ¶
type AgentGetEntitiesResults struct {
Entities []AgentGetEntitiesResult
}
AgentGetEntitiesResults holds the results of a agent.API.GetEntities call.
type AgentStatus ¶
type AgentStatus struct { Status Status Info string Data map[string]interface{} Since *time.Time Kind HistoryKind Version string Life string Err error }
AgentStatus holds status info about a machine or unit agent.
type AgentVersionResult ¶
AgentVersionResult is used to return the current version number of the agent running the API server.
type AllWatcherId ¶
type AllWatcherId struct {
AllWatcherId string
}
AllWatcherId holds the id of an AllWatcher.
type AllWatcherNextResults ¶
type AllWatcherNextResults struct {
Deltas []multiwatcher.Delta
}
AllWatcherNextResults holds deltas returned from calling AllWatcher.Next().
type AnnotationsGetResult ¶
type AnnotationsGetResult struct { EntityTag string Annotations map[string]string Error ErrorResult }
AnnotationsGetResult holds entity annotations or retrieval error.
type AnnotationsGetResults ¶
type AnnotationsGetResults struct {
Results []AnnotationsGetResult
}
AnnotationsGetResults holds annotations associated with entities.
type AnnotationsSet ¶
type AnnotationsSet struct {
Annotations []EntityAnnotations
}
AnnotationsSet stores parameters for making Set call on Annotations client.
type AuthUserInfo ¶
type AuthUserInfo struct { DisplayName string `json:"display-name"` Identity string `json:"identity"` LastConnection *time.Time `json:"last-connection,omitempty"` // Credentials contains an optional opaque credential value to be held by // the client, if any. Credentials *string `json:"credentials,omitempty"` }
AuthUserInfo describes a logged-in local user or remote identity.
type BackupsCreateArgs ¶
type BackupsCreateArgs struct {
Notes string
}
BackupsCreateArgs holds the args for the API Create method.
type BackupsDownloadArgs ¶
type BackupsDownloadArgs struct {
ID string
}
BackupsDownloadArgs holds the args for the API Download method.
type BackupsInfoArgs ¶
type BackupsInfoArgs struct {
ID string
}
BackupsInfoArgs holds the args for the API Info method.
type BackupsListArgs ¶
type BackupsListArgs struct { }
BackupsListArgs holds the args for the API List method.
type BackupsListResult ¶
type BackupsListResult struct {
List []BackupsMetadataResult
}
BackupsListResult holds the list of all stored backups.
type BackupsMetadataResult ¶
type BackupsMetadataResult struct { ID string Checksum string ChecksumFormat string Size int64 Stored time.Time // May be zero... Started time.Time Finished time.Time // May be zero... Notes string Environment string Machine string Hostname string Version version.Number }
BackupsMetadataResult holds the metadata for a backup as returned by an API backups method (such as Create).
type BackupsRemoveArgs ¶
type BackupsRemoveArgs struct {
ID string
}
BackupsRemoveArgs holds the args for the API Remove method.
type BackupsUploadArgs ¶
type BackupsUploadArgs struct { Data []byte Metadata BackupsMetadataResult }
BackupsUploadArgs holds the args for the API Upload method.
type BackupsUploadResult ¶
type BackupsUploadResult struct {
ID string
}
BackupsListResult holds the list of all stored backups.
type Block ¶
type Block struct { // Id is this blocks id. Id string `json:"id"` // Tag holds the tag of the entity that is blocked. Tag string `json:"tag"` // Type is block type as per state.multiwatcher.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 environment from corruption.
type BlockDeviceResult ¶
type BlockDeviceResult struct { Result storage.BlockDevice `json:"result"` Error *Error `json:"error,omitempty"` }
BlockDeviceResult holds the result of an API call to retrieve details of a block device.
type BlockDeviceResults ¶
type BlockDeviceResults struct {
Results []BlockDeviceResult `json:"results,omitempty"`
}
BlockDeviceResults holds the result of an API call to retrieve details of multiple block devices.
type BlockDevicesResult ¶
type BlockDevicesResult struct { Result []storage.BlockDevice `json:"result"` Error *Error `json:"error,omitempty"` }
BlockDevicesResult holds the result of an API call to retrieve details of all block devices relating to some entity.
type BlockDevicesResults ¶
type BlockDevicesResults struct {
Results []BlockDevicesResult `json:"results,omitempty"`
}
BlockDevicseResults holds the result of an API call to retrieve details of all block devices relating to some entities.
type BlockResult ¶
BlockResult holds the result of an API call to retrieve details for a block.
type BlockResults ¶
type BlockResults struct {
Results []BlockResult `json:"results,omitempty"`
}
BlockResults holds the result of an API call to list blocks.
type BlockSwitchParams ¶
type BlockSwitchParams struct { // Type is block type as per state.multiwatcher.BlockType. // Valid types are "BlockDestroy", "BlockRemove" and "BlockChange". Type string `json:"type"` // Message is a descriptive or an explanatory message // that accompanies the switch. Message string `json:"message,omitempty"` }
BlockSwitchParams holds the parameters for switching a block on/off.
type BoolResult ¶
BoolResult holds the result of an API call that returns a a boolean or an error.
type BoolResults ¶
type BoolResults struct {
Results []BoolResult
}
BoolResults holds multiple results with BoolResult each.
type BytesResult ¶
type BytesResult struct {
Result []byte
}
BytesResult holds the result of an API call that returns a slice of bytes.
type CharmInfo ¶
type CharmInfo struct {
CharmURL string
}
CharmInfo stores parameters for a charms.CharmInfo call.
type CharmURLs ¶
type CharmURLs struct {
URLs []CharmURL
}
CharmURLs identifies multiple charm URLs.
type CharmsList ¶
type CharmsList struct {
Names []string
}
CharmsList stores parameters for a charms.List call
type CharmsListResult ¶
type CharmsListResult struct {
CharmURLs []string
}
CharmsListResult stores result from a charms.List call
type CharmsResponse ¶
type CharmsResponse struct { Error string `json:",omitempty"` CharmURL string `json:",omitempty"` Files []string `json:",omitempty"` }
CharmsResponse is the server response to charm upload or GET requests.
type ClaimLeadershipBulkParams ¶
type ClaimLeadershipBulkParams struct { // Params are the parameters for making a bulk leadership claim. Params []ClaimLeadershipParams }
ClaimLeadershipBulkParams is a collection of parameters for making a bulk leadership claim.
type ClaimLeadershipBulkResults ¶
type ClaimLeadershipBulkResults ErrorResults
ClaimLeadershipBulkResults is the collection of results from a bulk leadership claim.
type ClaimLeadershipParams ¶
type ClaimLeadershipParams struct { // ServiceTag is the service for which you want to make a // leadership claim. ServiceTag string // UnitTag is the unit which is making the leadership claim. UnitTag string // DurationSeconds is the number of seconds for which the lease is required. DurationSeconds float64 }
ClaimLeadershipParams are the parameters needed for making a leadership claim.
type CloudImageMetadata ¶
type CloudImageMetadata struct { // ImageId is an image identifier. ImageId string `json:"image_id"` // Stream contains reference to a particular stream, // for e.g. "daily" or "released" Stream string `json:"stream,omitempty"` // Region is the name of cloud region associated with the image. Region string `json:"region"` // Series is OS version, for e.g. "quantal". 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"` }
CloudImageMetadata holds cloud image metadata properties.
type ConfigSettings ¶
type ConfigSettings map[string]interface{}
ConfigSettings holds unit, service or cham configuration settings with string keys and arbitrary values.
type ConfigSettingsResult ¶
type ConfigSettingsResult struct { Error *Error Settings ConfigSettings }
ConfigSettingsResult holds a configuration map or an error.
type ConfigSettingsResults ¶
type ConfigSettingsResults struct {
Results []ConfigSettingsResult
}
ConfigSettingsResults holds multiple configuration maps or errors.
type ConstraintsResult ¶
type ConstraintsResult struct { Error *Error Constraints constraints.Value }
ConstraintsResult holds machine constraints or an error.
type ConstraintsResults ¶
type ConstraintsResults struct {
Results []ConstraintsResult
}
ConstraintsResults holds multiple constraints results.
type ContainerConfig ¶
type ContainerConfig struct { ProviderType string AuthorizedKeys string SSLHostnameVerification bool Proxy proxy.Settings AptProxy proxy.Settings AptMirror string PreferIPv6 bool AllowLXCLoopMounts bool *UpdateBehavior }
ContainerConfig contains information from the environment config that is needed for container cloud-init.
type ContainerManagerConfig ¶
ContainerManagerConfig contains information from the environment config that is needed for configuring the container manager.
type ContainerManagerConfigParams ¶
type ContainerManagerConfigParams struct {
Type instance.ContainerType
}
ContainerManagerConfigParams contains the parameters for the ContainerManagerConfig provisioner API call.
type CreateSpaceParams ¶
type CreateSpaceParams struct { SubnetTags []string `json:"SubnetTags"` SpaceTag string `json:"SpaceTag"` Public bool `json:"Public"` }
CreateSpaceParams holds the space tag and at least one subnet tag required to create a new space.
type CreateSpacesParams ¶
type CreateSpacesParams struct {
Spaces []CreateSpaceParams `json:"Spaces"`
}
CreateSpacesParams olds the arguments of the AddSpaces API call.
type CreateSubnetParams ¶
type CreateSubnetParams struct { SubnetTag string `json:"SubnetTag,omitempty"` SpaceTag string `json:"SpaceTag"` Zones []string `json:"Zones,omitempty"` VLANTag int `json:"VLANTag,omitempty"` IsPublic bool `json:"IsPublic"` }
CreateSubnetParams holds a subnet and space tags, vlan tag, and a list of zones to associate the subnet to.
type CreateSubnetsParams ¶
type CreateSubnetsParams struct {
Subnets []CreateSubnetParams `json:"Subnets"`
}
CreateSubnetsParams holds the arguments of CreateSubnets API call.
type DeployerConnectionValues ¶
DeployerConnectionValues containers the result of deployer.ConnectionInfo API call.
type DestroyMachines ¶
DestroyMachines holds parameters for the DestroyMachines call.
type DestroyRelation ¶
type DestroyRelation struct {
Endpoints []string
}
DestroyRelation holds the parameters for making the DestroyRelation call. The endpoints specified are unordered.
type DestroyServiceUnits ¶
type DestroyServiceUnits struct {
UnitNames []string
}
DestroyServiceUnits holds parameters for the DestroyUnits call.
type DestroySystemArgs ¶
type DestroySystemArgs struct { // DestroyEnvironments specifies whether or not the hosted environments // should be destroyed as well. If this is not specified, and there are // other hosted environments, the destruction of the system will fail. DestroyEnvironments bool `json:"destroy-environments"` // IgnoreBlocks specifies whether or not to ignore blocks // on hosted environments. IgnoreBlocks bool `json:"ignore-blocks"` }
DestroySystemArgs holds the arguments for destroying a system.
type DistributionGroupResult ¶
DistributionGroupResult contains the result of the DistributionGroup provisioner API call.
type DistributionGroupResults ¶
type DistributionGroupResults struct {
Results []DistributionGroupResult
}
DistributionGroupResults is the bulk form of DistributionGroupResult.
type EndpointStatus ¶
type EndpointStatus struct { ServiceName string Name string Role charm.RelationRole Subordinate bool }
EndpointStatus holds status info about a single endpoint
func (*EndpointStatus) String ¶
func (epStatus *EndpointStatus) String() string
type EntitiesCharmURL ¶
type EntitiesCharmURL struct {
Entities []EntityCharmURL
}
EntitiesCharmURL holds the parameters for making a SetCharmURL API call.
type EntitiesPortRanges ¶
type EntitiesPortRanges struct {
Entities []EntityPortRange `json:"Entities"`
}
EntitiesPortRanges holds the parameters for making an OpenPorts or ClosePorts on some entities.
type EntitiesPorts ¶
type EntitiesPorts struct {
Entities []EntityPort `json:"Entities"`
}
EntitiesPorts holds the parameters for making an OpenPort or ClosePort on some entities.
type EntitiesVersion ¶
type EntitiesVersion struct {
AgentTools []EntityVersion
}
EntitiesVersion specifies what tools are being run for multiple entities.
type EntityAnnotations ¶
EntityAnnotations stores annotations for an entity.
type EntityCharmURL ¶
EntityCharmURL holds an entity's tag and a charm URL.
type EntityPassword ¶
EntityPassword specifies a password change for the entity with the given tag.
type EntityPasswords ¶
type EntityPasswords struct {
Changes []EntityPassword
}
EntityPasswords holds the parameters for making a SetPasswords call.
type EntityPort ¶
type EntityPort struct { Tag string `json:"Tag"` Protocol string `json:"Protocol"` Port int `json:"Port"` }
EntityPort holds an entity's tag, a protocol and a port.
type EntityPortRange ¶
type EntityPortRange struct { Tag string `json:"Tag"` Protocol string `json:"Protocol"` FromPort int `json:"FromPort"` ToPort int `json:"ToPort"` }
EntityPortRange holds an entity's tag, a protocol and a port range.
type EntityStatus ¶
EntityStatus holds the status of an entity.
type EntityStatusArgs ¶
EntityStatus holds parameters for setting the status of a single entity.
type EntityVersion ¶
EntityVersion specifies the tools version to be set for an entity with the given tag. version.Binary directly.
type EntityWatchResult ¶
type EntityWatchResult struct { EntityWatcherId string `json:"EntityWatcherId"` Changes []string `json:"Changes"` Error *Error `json:"Error"` }
EntityWatchResult holds a EntityWatcher id, changes and an error (if any).
type EntityWatchResults ¶
type EntityWatchResults struct {
Results []EntityWatchResult
}
EntityWatchResults holds the results for any API call which ends up returning a list of EntityWatchers.
type EnvUserInfo ¶
type EnvUserInfo struct { UserName string `json:"user"` DisplayName string `json:"displayname"` CreatedBy string `json:"createdby"` DateCreated time.Time `json:"datecreated"` LastConnection *time.Time `json:"lastconnection"` }
EnvUserInfo holds information on a user.
type EnvUserInfoResult ¶
type EnvUserInfoResult struct { Result *EnvUserInfo `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
EnvUserInfoResult holds the result of an EnvUserInfo call.
type EnvUserInfoResults ¶
type EnvUserInfoResults struct {
Results []EnvUserInfoResult `json:"results"`
}
EnvUserInfoResults holds the result of a bulk EnvUserInfo API call.
type EnvironAction ¶
type EnvironAction string
EnvironAction is an action that can be preformed on an environment.
const ( AddEnvUser EnvironAction = "add" RemoveEnvUser EnvironAction = "remove" )
Actions that can be preformed on an environment.
type EnvironConfig ¶
type EnvironConfig map[string]interface{}
EnvironConfig holds an environment configuration.
type EnvironConfigResult ¶
type EnvironConfigResult struct {
Config EnvironConfig
}
EnvironConfigResult holds environment configuration or an error.
type Environment ¶
Environment holds the result of an API call returning a name and UUID for an environment and the tag of the server in which it is running.
type EnvironmentBlockInfo ¶
type EnvironmentBlockInfo struct { Name string `json:"name"` UUID string `json:"env-uuid"` OwnerTag string `json:"owner-tag"` Blocks []string `json:"blocks"` }
EnvironmentBlockInfo holds information about an environment and its current blocks.
type EnvironmentBlockInfoList ¶
type EnvironmentBlockInfoList struct {
Environments []EnvironmentBlockInfo `json:"environments,omitempty"`
}
EnvironmentBlockInfoList holds information about the blocked environments for a system.
type EnvironmentConfigResults ¶
type EnvironmentConfigResults struct {
Config map[string]interface{}
}
EnvironmentConfigResults contains the result of client API calls to get environment config values.
type EnvironmentCreateArgs ¶
type EnvironmentCreateArgs struct { // OwnerTag represents the user that will own the new environment. // The OwnerTag must be a valid user tag. If the user tag represents // a local user, that user must exist. OwnerTag string // Account holds the provider specific account details necessary to // interact with the provider to create, list and destroy machines. Account map[string]interface{} // Config defines the environment config, which includes the name of the // environment. An environment UUID is allocated by the API server during // the creation of the environment. Config map[string]interface{} }
EnvironmentCreateArgs holds the arguments that are necessary to create and environment.
type EnvironmentResult ¶
EnvironmentResult holds the result of an API call returning a name and UUID for an environment.
type EnvironmentSet ¶
type EnvironmentSet struct {
Config map[string]interface{}
}
EnvironmentSet contains the arguments for EnvironmentSet client API call.
type EnvironmentSkeletonConfigArgs ¶
EnvironmentSkeletonConfigArgs wraps the args for environmentmanager.SkeletonConfig.
type EnvironmentUnset ¶
type EnvironmentUnset struct {
Keys []string
}
EnvironmentUnset contains the arguments for EnvironmentUnset client API call.
type ErrorResult ¶
type ErrorResult struct {
Error *Error
}
ErrorResult holds the error status of a single operation.
type ErrorResults ¶
type ErrorResults struct { // Results contains the error results from each operation. Results []ErrorResult }
ErrorResults holds the results of calling a bulk operation which returns no data, only an error result. The order and number of elements matches the operations specified in the request.
func (ErrorResults) Combine ¶
func (result ErrorResults) Combine() error
Combine returns one error from the result which is an accumulation of the errors. If there are no errors in the result, the return value is nil. Otherwise the error values are combined with new-line characters.
func (ErrorResults) OneError ¶
func (result ErrorResults) OneError() error
OneError returns the error from the result of a bulk operation on a single value.
type FacadeVersions ¶
FacadeVersions describes the available Facades and what versions of each one are available
type Filesystem ¶
type Filesystem struct { FilesystemTag string `json:"filesystemtag"` VolumeTag string `json:"volumetag,omitempty"` Info FilesystemInfo `json:"info"` }
Filesystem identifies and describes a storage filesystem in the environment.
type FilesystemAttachment ¶
type FilesystemAttachment struct { FilesystemTag string `json:"filesystemtag"` MachineTag string `json:"machinetag"` Info FilesystemAttachmentInfo `json:"info"` }
FilesystemAttachment identifies and describes a filesystem attachment.
type FilesystemAttachmentInfo ¶
type FilesystemAttachmentInfo struct { MountPoint string `json:"mountpoint,omitempty"` ReadOnly bool `json:"read-only,omitempty"` }
FilesystemAttachmentInfo describes a filesystem attachment.
type FilesystemAttachmentParams ¶
type FilesystemAttachmentParams struct { FilesystemTag string `json:"filesystemtag"` MachineTag string `json:"machinetag"` FilesystemId string `json:"filesystemid,omitempty"` InstanceId string `json:"instanceid,omitempty"` Provider string `json:"provider"` MountPoint string `json:"mountpoint,omitempty"` ReadOnly bool `json:"read-only,omitempty"` }
FilesystemAttachmentParams holds the parameters for creating a filesystem attachment.
type FilesystemAttachmentParamsResult ¶
type FilesystemAttachmentParamsResult struct { Result FilesystemAttachmentParams `json:"result"` Error *Error `json:"error,omitempty"` }
FilesystemAttachmentParamsResults holds provisioning parameters for a filesystem attachment.
type FilesystemAttachmentParamsResults ¶
type FilesystemAttachmentParamsResults struct {
Results []FilesystemAttachmentParamsResult `json:"results,omitempty"`
}
FilesystemAttachmentParamsResults holds provisioning parameters for multiple filesystem attachments.
type FilesystemAttachmentResult ¶
type FilesystemAttachmentResult struct { Result FilesystemAttachment `json:"result"` Error *Error `json:"error,omitempty"` }
FilesystemAttachmentResult holds the details of a single filesystem attachment, or an error.
type FilesystemAttachmentResults ¶
type FilesystemAttachmentResults struct {
Results []FilesystemAttachmentResult `json:"results,omitempty"`
}
FilesystemAttachmentResults holds a set of FilesystemAttachmentResults.
type FilesystemAttachments ¶
type FilesystemAttachments struct {
FilesystemAttachments []FilesystemAttachment `json:"filesystemattachments"`
}
FilesystemAttachments describes a set of storage filesystem attachments.
type FilesystemDetails ¶
type FilesystemDetails struct { // FilesystemTag is the tag for the filesystem. FilesystemTag string `json:"filesystemtag"` // VolumeTag is the tag for the volume backing the // filesystem, if any. VolumeTag string `json:"volumetag,omitempty"` // Info contains information about the filesystem. Info FilesystemInfo `json:"info"` // Status contains the status of the filesystem. Status EntityStatus `json:"status"` // MachineAttachments contains a mapping from // machine tag to filesystem attachment information. MachineAttachments map[string]FilesystemAttachmentInfo `json:"machineattachments,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 environment 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 FilesystemDetailsResult ¶
type FilesystemDetailsResult struct { Result *FilesystemDetails `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
FilesystemDetailsResult contains details about a filesystem, its attachments or an error preventing retrieving those details.
type FilesystemDetailsResults ¶
type FilesystemDetailsResults struct {
Results []FilesystemDetailsResult `json:"results,omitempty"`
}
FilesystemDetailsResults holds filesystem details.
type FilesystemFilter ¶
type FilesystemFilter struct { // Machines are machine tags to filter on. Machines []string `json:"machines,omitempty"` }
FilesystemFilter holds a filter for filter list API call.
func (*FilesystemFilter) IsEmpty ¶
func (f *FilesystemFilter) IsEmpty() bool
IsEmpty determines if filter is empty
type FilesystemInfo ¶
type FilesystemInfo struct { FilesystemId string `json:"filesystemid"` // Size is the size of the filesystem in MiB. Size uint64 `json:"size"` }
Filesystem describes a storage filesystem in the environment.
type FilesystemParams ¶
type FilesystemParams struct { FilesystemTag string `json:"filesystemtag"` VolumeTag string `json:"volumetag,omitempty"` Size uint64 `json:"size"` Provider string `json:"provider"` Attributes map[string]interface{} `json:"attributes,omitempty"` Tags map[string]string `json:"tags,omitempty"` Attachment *FilesystemAttachmentParams `json:"attachment,omitempty"` }
FilesystemParams holds the parameters for creating a storage filesystem.
type FilesystemParamsResult ¶
type FilesystemParamsResult struct { Result FilesystemParams `json:"result"` Error *Error `json:"error,omitempty"` }
FilesystemParamsResults holds provisioning parameters for a filesystem.
type FilesystemParamsResults ¶
type FilesystemParamsResults struct {
Results []FilesystemParamsResult `json:"results,omitempty"`
}
FilesystemParamsResults holds provisioning parameters for multiple filesystems.
type FilesystemResult ¶
type FilesystemResult struct { Result Filesystem `json:"result"` Error *Error `json:"error,omitempty"` }
FilesystemResult holds information about a filesystem.
type FilesystemResults ¶
type FilesystemResults struct {
Results []FilesystemResult `json:"results,omitempty"`
}
FilesystemResults holds information about multiple filesystems.
type Filesystems ¶
type Filesystems struct {
Filesystems []Filesystem `json:"filesystems"`
}
Filesystems describes a set of storage filesystems in the environment.
type FindTags ¶
type FindTags struct {
Prefixes []string `json:"prefixes"`
}
FindTags wraps a slice of strings that are prefixes to use when searching for matching tags.
type FindTagsResults ¶
FindTagsResults wraps the mapping between the requested prefix and the matching tags for each requested prefix.
type FindToolsParams ¶
type FindToolsParams struct { // Number will be used to match tools versions exactly if non-zero. Number version.Number // MajorVersion will be used to match the major version if non-zero. MajorVersion int // MinorVersion will be used to match the major version if greater // than or equal to zero, and Number is zero. MinorVersion int // Arch will be used to match tools by architecture if non-empty. Arch string // Series will be used to match tools by series if non-empty. Series string }
FindToolsParams defines parameters for the FindTools method.
type FindToolsResult ¶
FindToolsResult holds a list of tools from FindTools and any error.
type FullStatus ¶
type FullStatus struct { EnvironmentName string AvailableVersion string Machines map[string]MachineStatus Services map[string]ServiceStatus Networks map[string]NetworkStatus Relations []RelationStatus }
Status holds information about the status of a juju environment.
type GetAnnotations ¶
type GetAnnotations struct {
Tag string
}
GetAnnotations stores parameters for making the GetAnnotations call.
type GetAnnotationsResults ¶
GetAnnotationsResults holds annotations associated with an entity.
type GetConstraintsResults ¶
type GetConstraintsResults struct {
Constraints constraints.Value
}
GetConstraintsResults holds results of the GetConstraints call.
type GetLeadershipSettingsBulkResults ¶
type GetLeadershipSettingsBulkResults struct {
Results []GetLeadershipSettingsResult
}
GetLeadershipSettingsBulkResults is the collection of results from a bulk request for leadership settings.
type GetLeadershipSettingsResult ¶
GetLeadershipSettingsResult is the results from requesting leadership settings.
type GetServiceConstraints ¶
type GetServiceConstraints struct {
ServiceName string
}
GetServiceConstraints stores parameters for making the GetServiceConstraints call.
type HistoryKind ¶
type HistoryKind string
const ( KindCombined HistoryKind = "combined" KindAgent HistoryKind = "agent" KindWorkload HistoryKind = "workload" )
type HostPort ¶
HostPort associates an address with a port. It's used in the API requests/responses. See also network.HostPort, from/to which this is transformed.
func FromNetworkHostPort ¶
FromNetworkHostPort is a convenience helper to create a parameter out of the network type, here for HostPort.
func FromNetworkHostPorts ¶
FromNetworkHostPorts is a helper to create a parameter out of the network type, here for a slice of HostPort.
func (HostPort) NetworkHostPort ¶
NetworkHostPort is a convenience helper to return the parameter as network type, here for HostPort.
type ImageFilterParams ¶
type ImageFilterParams struct {
Images []ImageSpec `json:"images"`
}
ImageFilterParams holds the parameters used to specify images to delete.
type ImageMetadata ¶
type ImageMetadata struct { Kind string `json:"kind"` Arch string `json:"arch"` Series string `json:"series"` URL string `json:"url"` Created time.Time `json:"created"` }
ImageMetadata represents an image in storage.
type ImageMetadataFilter ¶
type ImageMetadataFilter struct { // Region stores metadata region. Region string `json:"region,omitempty"` // Series stores all desired series. Series []string `json:"series,omitempty"` // Arches stores all desired architectures. Arches []string `json:"arches,omitempty"` // Stream can be "" or "released" for the default "released" stream, // or "daily" for daily images, or any other stream that the available // simplestreams metadata supports. Stream string `json:"stream,omitempty"` // VirtType stores virtualisation type. VirtType string `json:"virt_type,omitempty"` // RootStorageType stores storage type. RootStorageType string `json:"root-storage-type,omitempty"` }
ImageMetadataFilter holds filter properties used to search for image metadata. It amalgamates both simplestreams.MetadataLookupParams and simplestreams.LookupParams and adds additional properties to satisfy existing and new use cases.
type ImageSpec ¶
type ImageSpec struct { Kind string `json:"kind"` Arch string `json:"arch"` Series string `json:"series"` }
ImageSpec defines the parameters to select images list or delete.
type InstanceInfo ¶
type InstanceInfo struct { Tag string InstanceId instance.Id Nonce string Characteristics *instance.HardwareCharacteristics Networks []Network Interfaces []NetworkInterface Volumes []Volume // VolumeAttachments is a mapping from volume tag to // volume attachment info. VolumeAttachments map[string]VolumeAttachmentInfo }
InstanceInfo holds a machine tag, provider-specific instance id, a nonce, a list of networks and interfaces to set up.
type InstanceStatus ¶
InstanceStatus holds an entity tag and instance status.
type InstancesInfo ¶
type InstancesInfo struct {
Machines []InstanceInfo
}
InstancesInfo holds the parameters for making a SetInstanceInfo call for multiple machines.
type IsMasterResult ¶
type IsMasterResult struct { // Master reports whether the connected agent // lives on the same instance as the mongo replica // set master. Master bool }
IsMasterResult holds the result of an IsMaster API call.
type IsMeteredResult ¶
type IsMeteredResult struct {
Metered bool
}
IsMeteredResult stores result from a charms.IsMetered call
type JobsResult ¶
type JobsResult struct { Jobs []multiwatcher.MachineJob `json:"Jobs"` Error *Error `json:"Error"` }
JobsResult holds the jobs for a machine that are returned by a call to Jobs.
type JobsResults ¶
type JobsResults struct {
Results []JobsResult `json:"Results"`
}
JobsResults holds the result of a call to Jobs.
type LegacyMachineStatus ¶
type LegacyMachineStatus struct {
InstanceId string // Not type instance.Id just to match original api.
}
LegacyMachineStatus holds just the instance-id of a machine.
type LegacyStatus ¶
type LegacyStatus struct {
Machines map[string]LegacyMachineStatus
}
LegacyStatus holds minimal information on the status of a juju environment.
type LegacyStorageDetails ¶
type LegacyStorageDetails struct { // StorageTag holds tag for this storage. StorageTag string `json:"storagetag"` // OwnerTag holds tag for the owner of this storage, unit or service. OwnerTag string `json:"ownertag"` // Kind holds what kind of storage this instance is. Kind StorageKind `json:"kind"` // Status indicates storage status, e.g. pending, provisioned, attached. Status string `json:"status,omitempty"` // UnitTag holds tag for unit for attached instances. UnitTag string `json:"unittag,omitempty"` // Location holds location for provisioned attached instances. Location string `json:"location,omitempty"` // Persistent indicates whether the storage is persistent or not. Persistent bool `json:"persistent"` }
LegacyStorageDetails holds information about storage.
NOTE(axw): this is for backwards compatibility only. This struct should not be changed!
type LegacyVolumeDetails ¶
type LegacyVolumeDetails struct { // VolumeTag is tag for this volume instance. VolumeTag string `json:"volumetag"` // StorageInstance returns the tag of the storage instance that this // volume is assigned to, if any. StorageTag string `json:"storage,omitempty"` // UnitTag is the tag of the unit attached to storage instance // for this volume. UnitTag string `json:"unit,omitempty"` // VolumeId is a unique provider-supplied ID for the volume. VolumeId string `json:"volumeid,omitempty"` // HardwareId is the volume's hardware ID. HardwareId string `json:"hardwareid,omitempty"` // Size is the size of the volume in MiB. Size uint64 `json:"size,omitempty"` // Persistent reflects whether the volume is destroyed with the // machine to which it is attached. Persistent bool `json:"persistent"` // Status contains the current status of the volume. Status EntityStatus `json:"status"` }
LegacyVolumeDetails describes a storage volume in the environment for the purpose of volume CLI commands.
This is kept separate from Volume which contains only information specific to the volume model, whereas LegacyVolumeDetails is intended to contain complete information about a volume.
NOTE(axw): this is for backwards compatibility only. This struct should not be changed!
type Life ¶
type Life multiwatcher.Life
Life describes the lifecycle state of an entity ("alive", "dying" or "dead").
type LifeResult ¶
LifeResult holds the life status of a single entity, or an error indicating why it is not available.
type LifeResults ¶
type LifeResults struct {
Results []LifeResult
}
LifeResults holds the life or error status of multiple entities.
type ListCloudImageMetadataResult ¶
type ListCloudImageMetadataResult struct {
Result []CloudImageMetadata `json:"result"`
}
ListCloudImageMetadataResult holds the results of querying cloud image metadata.
type ListImageResult ¶
type ListImageResult struct {
Result []ImageMetadata `json:"result"`
}
ListImageResult holds the results of querying images.
type ListSSHKeys ¶
ListSSHKeys stores parameters used for a KeyManager.ListKeys call.
type ListSpacesResults ¶
type ListSpacesResults struct {
Results []Space `json:"Results"`
}
ListSpacesResults holds the list of all available spaces.
type ListSubnetsResults ¶
type ListSubnetsResults struct {
Results []Subnet `json:"Results"`
}
ListSubnetsResults holds the result of a ListSubnets API call.
type LoginRequest ¶
type LoginRequest struct { AuthTag string `json:"auth-tag"` Credentials string `json:"credentials"` Nonce string `json:"nonce"` }
LoginRequest holds credentials for identifying an entity to the Login v1 facade.
type LoginRequestCompat ¶
type LoginRequestCompat struct { LoginRequest Creds }
LoginRequestCompat holds credentials for identifying an entity to the Login v1 or earlier (v0 or even pre-facade).
type LoginResult ¶
type LoginResult struct { Servers [][]HostPort `json:"Servers"` EnvironTag string `json:"EnvironTag"` LastConnection *time.Time `json:"LastConnection"` Facades []FacadeVersions `json:"Facades"` }
LoginResult holds the result of a Login call.
type LoginResultV1 ¶
type LoginResultV1 struct { // Servers is the list of API server addresses. Servers [][]HostPort `json:"servers"` // EnvironTag is the tag for the environment that is being connected to. EnvironTag string `json:"environ-tag"` // ServerTag is the tag for the environment that holds the API servers. // This is the initial environment created when bootstrapping juju. ServerTag string `json:"server-tag"` // ReauthRequest can be used to relay any further authentication handshaking // required on the part of the client to complete the Login, if any. ReauthRequest *ReauthRequest `json:"reauth-request,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"` // ServerVersion is the string representation of the server version // if the server supports it. ServerVersion string `json:"server-version,omitempty"` }
LoginResultV1 holds the result of an Admin v1 Login call.
type MachineAddresses ¶
MachineAddresses holds an machine tag and addresses.
type MachineAddressesResult ¶
type MachineAddressesResult struct { Error *Error `json:"Error"` Addresses []Address `json:"Addresses"` }
MachineAddressesResult holds a list of machine addresses or an error.
type MachineAddressesResults ¶
type MachineAddressesResults struct {
Results []MachineAddressesResult `json:"Results"`
}
MachineAddressesResults holds the results of calling an API method returning a list of addresses per machine.
type MachineBlockDevices ¶
type MachineBlockDevices struct { Machine string `json:"machine"` BlockDevices []storage.BlockDevice `json:"blockdevices,omitempty"` }
MachineBlockDevices holds a machine tag and the block devices present on that machine.
type MachineContainers ¶
type MachineContainers struct { MachineTag string ContainerTypes []instance.ContainerType }
MachineContainers holds the arguments for making an SetSupportedContainers call on a given machine.
type MachineContainersParams ¶
type MachineContainersParams struct {
Params []MachineContainers
}
MachineContainersParams holds the arguments for making a SetSupportedContainers API call.
type MachineNetworkConfigResult ¶
type MachineNetworkConfigResult struct { Error *Error `json:"Error"` // Tagged to Info due to compatibility reasons. Config []NetworkConfig `json:"Info"` }
MachineNetworkConfigResult holds network configuration for a single machine.
type MachineNetworkConfigResults ¶
type MachineNetworkConfigResults struct {
Results []MachineNetworkConfigResult `json:"Results"`
}
MachineNetworkConfigResults holds network configuration for multiple machines.
type MachinePortRange ¶
type MachinePortRange struct { UnitTag string `json:"UnitTag"` RelationTag string `json:"RelationTag"` PortRange PortRange `json:"PortRange"` }
MachinePortRange holds a single port range open on a machine for the given unit and relation tags.
type MachinePorts ¶
type MachinePorts struct { MachineTag string `json:"MachineTag"` NetworkTag string `json:"NetworkTag"` }
MachinePorts holds a machine and network tags. It's used when referring to opened ports on the machine for a network.
type MachinePortsParams ¶
type MachinePortsParams struct {
Params []MachinePorts `json:"Params"`
}
MachinePortsParams holds the arguments for making a FirewallerAPIV1.GetMachinePorts() API call.
type MachinePortsResult ¶
type MachinePortsResult struct { Error *Error `json:"Error"` Ports []MachinePortRange `json:"Ports"` }
MachinePortsResult holds a single result of the FirewallerAPIV1.GetMachinePorts() and UniterAPI.AllMachinePorts() API calls.
type MachinePortsResults ¶
type MachinePortsResults struct {
Results []MachinePortsResult `json:"Results"`
}
MachinePortsResults holds all the results of the FirewallerAPIV1.GetMachinePorts() and UniterAPI.AllMachinePorts() API calls.
type MachineSetProvisioned ¶
type MachineSetProvisioned struct { Tag string InstanceId instance.Id Nonce string Characteristics *instance.HardwareCharacteristics }
MachineSetProvisioned holds a machine tag, provider-specific instance id, a nonce, or an error.
NOTE: This is deprecated since 1.19.0 and not used by the provisioner, it's just retained for backwards-compatibility and should be removed.
type MachineStatus ¶
type MachineStatus struct { Agent AgentStatus // The following fields mirror fields in AgentStatus (introduced // in 1.19.x). The old fields below are being kept for // compatibility with old clients. // They can be removed once API versioning lands. AgentState Status AgentStateInfo string AgentVersion string Life string Err error DNSName string InstanceId instance.Id InstanceState string Series string Id string Containers map[string]MachineStatus Hardware string Jobs []multiwatcher.MachineJob HasVote bool WantsVote bool }
MachineStatus holds status info about a machine.
type MachineStorageId ¶
type MachineStorageId struct { MachineTag string `json:"machinetag"` // AttachmentTag is the tag of the volume or filesystem whose // attachment to the machine is represented. AttachmentTag string `json:"attachmenttag"` }
MachineStorageId identifies the attachment of a storage entity to a machine, by their tags.
type MachineStorageIds ¶
type MachineStorageIds struct {
Ids []MachineStorageId `json:"ids"`
}
MachineStorageIds holds a set of machine/storage-entity attachment identifiers.
type MachineStorageIdsWatchResult ¶
type MachineStorageIdsWatchResult struct { MachineStorageIdsWatcherId string Changes []MachineStorageId Error *Error }
MachineStorageIdsWatchResult holds a MachineStorageIdsWatcher id, changes and an error (if any).
type MachineStorageIdsWatchResults ¶
type MachineStorageIdsWatchResults struct {
Results []MachineStorageIdsWatchResult
}
MachineStorageIdsWatchResults holds the results for any API call which ends up returning a list of MachineStorageIdsWatchers.
type MergeLeadershipSettingsBulkParams ¶
type MergeLeadershipSettingsBulkParams struct { // Params are the parameters for making a bulk leadership settings // merge. Params []MergeLeadershipSettingsParam }
MergeLeadershipSettingsBulkParams is a collection of parameters for making a bulk merge of leadership settings.
type MergeLeadershipSettingsParam ¶
type MergeLeadershipSettingsParam struct { // ServiceTag is the service for which you want to merge // leadership settings. ServiceTag string // Settings are the Leadership settings you wish to merge in. Settings Settings }
MergeLeadershipSettingsParam are the parameters needed for merging in leadership settings.
type MetadataSaveParams ¶
type MetadataSaveParams struct {
Metadata []CloudImageMetadata `json:"metadata"`
}
MetadataSaveParams holds cloud image metadata details to save.
type MeterStatus ¶
MeterStatus represents the meter status of a unit.
type MeterStatusResult ¶
MeterStatusResult holds unit meter status or error.
type MeterStatusResults ¶
type MeterStatusResults struct {
Results []MeterStatusResult
}
MeterStatusResults holds meter status results for multiple units.
type MetricBatch ¶
MetricBatch is a list of metrics with metadata.
type MetricBatchParam ¶
type MetricBatchParam struct { Tag string Batch MetricBatch }
MetricBatchParam contains a single metric batch.
type MetricBatchParams ¶
type MetricBatchParams struct {
Batches []MetricBatchParam
}
MetricBatchParams contains multiple metric batches.
type MetricsParam ¶
MetricsParam contains the metrics for a single unit.
type MetricsParams ¶
type MetricsParams struct {
Metrics []MetricsParam
}
MetricsParams contains the metrics for multiple units.
type ModifyEnvironUser ¶
type ModifyEnvironUser struct { UserTag string `json:"user-tag"` Action EnvironAction `json:"action"` }
ModifyEnvironUser stores the parameters used for a Client.ShareEnvironment call.
type ModifyEnvironUsers ¶
type ModifyEnvironUsers struct {
Changes []ModifyEnvironUser
}
ModifyEnvironUsers holds the parameters for making Client ShareEnvironment calls.
type ModifyUserSSHKeys ¶
ModifyUserSSHKeys stores parameters used for a KeyManager.Add|Delete|Import call for a user.
type Network ¶
type Network struct { // Tag is the network's tag. Tag string `json:"Tag"` // ProviderId is the provider-specific network id. ProviderId string `json:"ProviderId"` // CIDR of the network, in "123.45.67.89/12" format. CIDR string `json:"CIDR"` // 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:"VLANTag"` }
Network describes a single network available on an instance.
type NetworkConfig ¶
type NetworkConfig struct { // DeviceIndex specifies the order in which the network interface // appears on the host. The primary interface has an index of 0. DeviceIndex int `json:"DeviceIndex"` // MACAddress is the network interface's hardware MAC address // (e.g. "aa:bb:cc:dd:ee:ff"). MACAddress string `json:"MACAddress"` // CIDR of the network, in 123.45.67.89/24 format. CIDR string `json:"CIDR"` // NetworkName is juju-internal name of the network. // TODO(dimitern) This should be removed or adapted to the model // once spaces are introduced. NetworkName string `json:"NetworkName"` // ProviderId is a provider-specific network interface id. ProviderId string `json:"ProviderId"` // ProviderSubnetId is a provider-specific subnet id, to which the // interface is attached to. ProviderSubnetId string `json:"ProviderSubnetId"` // 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:"VLANTag"` // InterfaceName is the raw OS-specific network device name (e.g. // "eth1", even for a VLAN eth1.42 virtual interface). InterfaceName string `json:"InterfaceName"` // 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:"NoAutoStart,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:"ConfigType,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. Address string `json:"Address,omitempty"` // DNSServers contains an optional list of IP addresses and/or // hostnames to configure as DNS servers for this network // interface. DNSServers []string `json:"DNSServers,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:"GatewayAddress,omitempty"` // ExtraConfig can contain any valid setting and its value allowed // inside an "iface" section of a interfaces(5) config file, e.g. // "up", "down", "mtu", etc. ExtraConfig map[string]string `json:"ExtraConfig,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.
type NetworkInterface ¶
type NetworkInterface struct { // MACAddress is the network interface's hardware MAC address // (e.g. "aa:bb:cc:dd:ee:ff"). MACAddress string `json:"MACAddress"` // InterfaceName is the OS-specific network device name (e.g. // "eth1", even for for a VLAN eth1.42 virtual interface). InterfaceName string `json:"InterfaceName"` // NetworkTag is this interface's network tag. NetworkTag string `json:"NetworkTag"` // IsVirtual is true when the interface is a virtual device, as // opposed to a physical device. IsVirtual bool `json:"IsVirtual"` // Disabled returns whether the interface is disabled. Disabled bool `json:"Disabled"` }
NetworkInterface describes a single network interface available on an instance.
type NetworkStatus ¶
NetworkStatus holds status info about a network.
type NetworksSpecification ¶
NetworksSpecification holds the enabled and disabled networks for a service. TODO(dimitern): Drop this in a follow-up.
type NotifyWatchResult ¶
NotifyWatchResult holds a NotifyWatcher id and an error (if any).
type NotifyWatchResults ¶
type NotifyWatchResults struct {
Results []NotifyWatchResult
}
NotifyWatchResults holds the results for any API call which ends up returning a list of NotifyWatchers
type Port ¶
Port encapsulates a protocol and port number. It is used in API requests/responses. See also network.Port, from/to which this is transformed.
func FromNetworkPort ¶
FromNetworkPort is a convenience helper to create a parameter out of the network type, here for Port.
func (Port) NetworkPort ¶
NetworkPort is a convenience helper to return the parameter as network type, here for Port.
type PortRange ¶
type PortRange struct { FromPort int `json:"FromPort"` ToPort int `json:"ToPort"` Protocol string `json:"Protocol"` }
PortRange represents a single range of ports. It is used in API requests/responses. See also network.PortRange, from/to which this is transformed.
func FromNetworkPortRange ¶
FromNetworkPortRange is a convenience helper to create a parameter out of the network type, here for PortRange.
func (PortRange) NetworkPortRange ¶
NetworkPortRange is a convenience helper to return the parameter as network type, here for PortRange.
type PortsResult ¶
PortsResult holds the result of an API call that returns a slice of Port or an error.
type PortsResults ¶
type PortsResults struct {
Results []PortsResult `json:"Results"`
}
PortsResults holds the bulk operation result of an API call that returns a slice of Port.
type PrivateAddress ¶
type PrivateAddress struct {
Target string
}
PrivateAddress holds parameters for the PrivateAddress call.
type PrivateAddressResults ¶
type PrivateAddressResults struct {
PrivateAddress string
}
PrivateAddressResults holds results of the PrivateAddress call.
type ProvisioningInfo ¶
type ProvisioningInfo struct { Constraints constraints.Value Series string Placement string Networks []string Jobs []multiwatcher.MachineJob Volumes []VolumeParams Tags map[string]string SubnetsToZones map[string][]string }
ProvisioningInfo holds machine provisioning info.
type ProvisioningInfoResult ¶
type ProvisioningInfoResult struct { Error *Error Result *ProvisioningInfo }
ProvisioningInfoResult holds machine provisioning info or an error.
type ProvisioningInfoResults ¶
type ProvisioningInfoResults struct {
Results []ProvisioningInfoResult
}
ProvisioningInfoResults holds multiple machine provisioning info results.
type ProvisioningScriptParams ¶
type ProvisioningScriptParams struct { MachineId string Nonce string // DataDir may be "", in which case the default will be used. DataDir string // 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 }
ProvisioningScriptParams contains the parameters for the ProvisioningScript client API call.
type ProvisioningScriptResult ¶
type ProvisioningScriptResult struct {
Script string
}
ProvisioningScriptResult contains the result of the ProvisioningScript client API call.
type PublicAddress ¶
type PublicAddress struct {
Target string
}
PublicAddress holds parameters for the PublicAddress call.
type PublicAddressResults ¶
type PublicAddressResults struct {
PublicAddress string
}
PublicAddressResults holds results of the PublicAddress call.
type ReauthRequest ¶
ReauthRequest holds a challenge/response token meaningful to the identity provider.
type RebootAction ¶
type RebootAction string
RebootAction defines the action a machine should take when a hook needs to reboot
const ( // ShouldDoNothing instructs a machine agent that no action // is required on its part ShouldDoNothing RebootAction = "noop" // ShouldReboot instructs a machine to reboot // this happens when a hook running on a machine, requests // a reboot ShouldReboot RebootAction = "reboot" // ShouldShutdown instructs a machine to shut down. This usually // happens when running inside a container, and a hook on the parent // machine requests a reboot ShouldShutdown RebootAction = "shutdown" )
type RebootActionResult ¶
type RebootActionResult struct { Result RebootAction `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
RebootActionResult holds the result of a single call to machine.ShouldRebootOrShutdown.
type RebootActionResults ¶
type RebootActionResults struct {
Results []RebootActionResult `json:"results,omitempty"`
}
RebootActionResults holds a list of RebootActionResult and any error.
type RelationIds ¶
type RelationIds struct {
RelationIds []int
}
RelationIds holds multiple relation ids.
type RelationResult ¶
type RelationResult struct { Error *Error Life Life Id int Key string Endpoint multiwatcher.Endpoint }
RelationResult returns information about a single relation, or an error.
type RelationResults ¶
type RelationResults struct {
Results []RelationResult
}
RelationResults holds the result of an API call that returns information about multiple relations.
type RelationStatus ¶
type RelationStatus struct { Id int Key string Interface string Scope charm.RelationScope Endpoints []EndpointStatus }
RelationStatus holds status info about a relation.
type RelationUnit ¶
RelationUnit holds a relation and a unit tag.
type RelationUnitPair ¶
RelationUnitPair holds a relation tag, a local and remote unit tags.
type RelationUnitPairs ¶
type RelationUnitPairs struct {
RelationUnitPairs []RelationUnitPair
}
RelationUnitPairs holds the parameters for API calls expecting multiple sets of a relation tag, a local and remote unit tags.
type RelationUnitSettings ¶
RelationUnitSettings holds a relation tag, a unit tag and local unit settings.
type RelationUnits ¶
type RelationUnits struct {
RelationUnits []RelationUnit
}
RelationUnits holds the parameters for API calls expecting a pair of relation and unit tags.
type RelationUnitsSettings ¶
type RelationUnitsSettings struct {
RelationUnits []RelationUnitSettings
}
RelationUnitsSettings holds the arguments for making a EnterScope or WriteSettings API calls.
type RelationUnitsWatchResult ¶
type RelationUnitsWatchResult struct { RelationUnitsWatcherId string Changes multiwatcher.RelationUnitsChange Error *Error }
RelationUnitsWatchResult holds a RelationUnitsWatcher id, changes and an error (if any).
type RelationUnitsWatchResults ¶
type RelationUnitsWatchResults struct {
Results []RelationUnitsWatchResult
}
RelationUnitsWatchResults holds the results for any API call which ends up returning a list of RelationUnitsWatchers.
type ReleaseLeadershipBulkParams ¶
type ReleaseLeadershipBulkParams struct {
Params []ReleaseLeadershipParams
}
ReleaseLeadershipBulkParams is a collection of parameters needed to make a bulk release leadership call.
type ReleaseLeadershipBulkResults ¶
type ReleaseLeadershipBulkResults ErrorResults
ReleaseLeadershipBulkResults is a type which contains results from a bulk leadership call.
type ReleaseLeadershipParams ¶
type ReleaseLeadershipParams struct { // ServiceTag is the service for which you want to make a // leadership claim. ServiceTag string // UnitTag is the unit which is making the leadership claim. UnitTag string }
ReleaseLeadershipParams are the parameters needed to release a leadership claim.
type RemoveBlocksArgs ¶
type RemoveBlocksArgs struct {
All bool `json:"all"`
}
RemoveBlocksArgs holds the arguments for the RemoveBlocks command. It is a struct to facilitate the easy addition of being able to remove blocks for individual environments at a later date.
type RequestedNetworkResult ¶
type RequestedNetworkResult struct { Error *Error `json:"Error"` Networks []string `json:"Networks"` }
RequestedNetworkResult holds requested networks or an error.
type RequestedNetworksResults ¶
type RequestedNetworksResults struct {
Results []RequestedNetworkResult `json:"Results"`
}
RequestedNetworksResults holds multiple requested networks results.
type ResolveCharmResult ¶
type ResolveCharmResult struct { URL *charm.URL `json:",omitempty"` Error string `json:",omitempty"` }
ResolveCharmResult holds the result of resolving a charm reference to a URL, or any error that occurred.
type ResolveCharmResults ¶
type ResolveCharmResults struct {
URLs []ResolveCharmResult
}
ResolveCharmResults holds results of the ResolveCharms call.
type ResolveCharms ¶
type ResolveCharms struct {
References []charm.Reference
}
ResolveCharms stores charm references for a ResolveCharms call.
type ResolvedMode ¶
type ResolvedMode string
ResolvedMode describes the way state transition errors are resolved.
const ( ResolvedNone ResolvedMode = "" ResolvedRetryHooks ResolvedMode = "retry-hooks" ResolvedNoHooks ResolvedMode = "no-hooks" )
type ResolvedModeResult ¶
type ResolvedModeResult struct { Error *Error Mode ResolvedMode }
ResolvedModeResult holds a resolved mode or an error.
type ResolvedModeResults ¶
type ResolvedModeResults struct {
Results []ResolvedModeResult
}
ResolvedModeResults holds the bulk operation result of an API call that returns a resolved mode or an error.
type ResolvedResults ¶
ResolvedResults holds results of the Resolved call.
type RestoreArgs ¶
type RestoreArgs struct { // BackupId holds the id of the backup in server if any BackupId string }
RestoreArgs Holds the backup file or id
type RsyslogConfigResult ¶
type RsyslogConfigResult struct { Error *Error `json:"Error"` CACert string `json:"CACert"` CAKey string `json:"CAKey"` // Port is only used by state servers as the port to listen on. // Clients should use HostPorts for the rsyslog addresses to forward // logs to. Port int `json:"Port"` HostPorts []HostPort `json:"HostPorts"` }
RsyslogConfigResult holds the result of a GetRsyslogConfig call.
type RsyslogConfigResults ¶
type RsyslogConfigResults struct {
Results []RsyslogConfigResult
}
RsyslogConfigResults is the bulk form of RyslogConfigResult
type RunParams ¶
type RunParams struct { Commands string Timeout time.Duration Machines []string Services []string Units []string }
RunParams is used to provide the parameters to the Run method. Commands and Timeout are expected to have values, and one or more values should be in the Machines, Services, or Units slices.
type RunResult ¶
type RunResult struct { exec.ExecResponse MachineId string UnitId string Error string }
RunResult contains the result from an individual run call on a machine. UnitId is populated if the command was run inside the unit context.
type RunResults ¶
type RunResults struct {
Results []RunResult
}
RunResults is used to return the slice of results. API server side calls need to return single structure values.
type ServiceCharmActionsResult ¶
type ServiceCharmActionsResult struct { ServiceTag string `json:"servicetag,omitempty"` Actions *charm.Actions `json:"actions,omitempty"` Error *Error `json:"error,omitempty"` }
ServiceCharmActionsResult holds service name and charm.Actions for the service. If an error such as a missing charm or malformed service name occurs, it is encapsulated in this type.
type ServiceCharmRelations ¶
type ServiceCharmRelations struct {
ServiceName string
}
ServiceCharmRelations holds parameters for making the ServiceCharmRelations call.
type ServiceCharmRelationsResults ¶
type ServiceCharmRelationsResults struct {
CharmRelations []string
}
ServiceCharmRelationsResults holds the results of the ServiceCharmRelations call.
type ServiceDeploy ¶
type ServiceDeploy struct { ServiceName string CharmUrl string NumUnits int Config map[string]string ConfigYAML string // Takes precedence over config if both are present. Constraints constraints.Value ToMachineSpec string Placement []*instance.Placement Networks []string Storage map[string]storage.Constraints }
ServiceDeploy holds the parameters for making the ServiceDeploy call.
type ServiceDestroy ¶
type ServiceDestroy struct {
ServiceName string
}
ServiceDestroy holds the parameters for making the ServiceDestroy call.
type ServiceExpose ¶
type ServiceExpose struct {
ServiceName string
}
ServiceExpose holds the parameters for making the ServiceExpose call.
type ServiceGet ¶
type ServiceGet struct {
ServiceName string
}
ServiceGet holds parameters for making the ServiceGet or ServiceGetCharmURL calls.
type ServiceGetResults ¶
type ServiceGetResults struct { Service string Charm string Config map[string]interface{} Constraints constraints.Value }
ServiceGetResults holds results of the ServiceGet call.
type ServiceMetricCredential ¶
ServiceMetricCredential holds parameters for the SetServiceCredentials call.
type ServiceMetricCredentials ¶
type ServiceMetricCredentials struct {
Creds []ServiceMetricCredential
}
ServiceMetricCredentials holds multiple ServiceMetricCredential parameters.
type ServiceSet ¶
ServiceSet holds the parameters for a ServiceSet command. Options contains the configuration data.
type ServiceSetCharm ¶
ServiceSetCharm sets the charm for a given service.
type ServiceSetYAML ¶
ServiceSetYAML holds the parameters for a ServiceSetYAML command. Config contains the configuration data in YAML format.
type ServiceStatus ¶
type ServiceStatus struct { Err error Charm string Exposed bool Life string Relations map[string][]string Networks NetworksSpecification CanUpgradeTo string SubordinateTo []string Units map[string]UnitStatus MeterStatuses map[string]MeterStatus Status AgentStatus }
ServiceStatus holds status info about a service.
type ServiceStatusResult ¶
type ServiceStatusResult struct { Service StatusResult Units map[string]StatusResult Error *Error }
ServiceStatusResult holds results for a service Full Status
type ServiceStatusResults ¶
type ServiceStatusResults struct {
Results []ServiceStatusResult
}
ServiceStatusResults holds multiple StatusResult.
type ServiceUnexpose ¶
type ServiceUnexpose struct {
ServiceName string
}
ServiceUnexpose holds parameters for the ServiceUnexpose call.
type ServiceUnset ¶
ServiceUnset holds the parameters for a ServiceUnset command. Options contains the option attribute names to unset.
type ServiceUpdate ¶
type ServiceUpdate struct { ServiceName string CharmUrl string ForceCharmUrl bool MinUnits *int SettingsStrings map[string]string SettingsYAML string // Takes precedence over SettingsStrings if both are present. Constraints *constraints.Value }
ServiceUpdate holds the parameters for making the ServiceUpdate call.
type ServicesCharmActionsResults ¶
type ServicesCharmActionsResults struct {
Results []ServiceCharmActionsResult `json:"results,omitempty"`
}
ServicesCharmActionsResults holds a slice of ServiceCharmActionsResult for a bulk result of charm Actions for Services.
type ServicesDeploy ¶
type ServicesDeploy struct {
Services []ServiceDeploy
}
ServicesDeploy holds the parameters for deploying one or more services.
type SetAnnotations ¶
SetAnnotations stores parameters for making the SetAnnotations call.
type SetConstraints ¶
type SetConstraints struct { ServiceName string //optional, if empty, environment constraints are set. Constraints constraints.Value }
SetConstraints stores parameters for making the SetConstraints call.
type SetEnvironAgentVersion ¶
SetEnvironAgentVersion contains the arguments for SetEnvironAgentVersion client API call.
type SetInstancesStatus ¶
type SetInstancesStatus struct {
Entities []InstanceStatus
}
SetInstancesStatus holds parameters for making a SetInstanceStatus() call.
type SetMachineBlockDevices ¶
type SetMachineBlockDevices struct {
MachineBlockDevices []MachineBlockDevices `json:"machineblockdevices"`
}
SetMachineBlockDevices holds the arguments for recording the block devices present on a set of machines.
type SetMachinesAddresses ¶
type SetMachinesAddresses struct {
MachineAddresses []MachineAddresses `json:"MachineAddresses"`
}
SetMachinesAddresses holds the parameters for making an API call to update machine addresses.
type SetProvisioned ¶
type SetProvisioned struct {
Machines []MachineSetProvisioned
}
SetProvisioned holds the parameters for making a SetProvisioned call for a machine.
NOTE: This is deprecated since 1.19.0 and not used by the provisioner, it's just retained for backwards-compatibility and should be removed.
type SetRsyslogCertParams ¶
SetRsyslogCertParams holds parameters for the SetRsyslogCert call.
type SetStatus ¶
type SetStatus struct {
Entities []EntityStatusArgs
}
SetStatus holds the parameters for making a SetStatus/UpdateStatus call.
type SettingsResult ¶
SettingsResult holds a relation settings map or an error.
type SettingsResults ¶
type SettingsResults struct {
Results []SettingsResult
}
SettingsResults holds the result of an API calls that returns settings for multiple relations.
type Space ¶
type Space struct { Name string `json:"Name"` Subnets []Subnet `json:"Subnets"` Error *Error `json:"Error,omitempty"` }
Space holds the information about a single space and its associated subnets.
type SpaceResult ¶
SpaceResult holds a single space tag or an error.
type SpaceResults ¶
type SpaceResults struct {
Results []SpaceResult `json:"Results"`
}
SpaceResults holds the bulk operation result of an API call that returns space tags or an errors.
type StateServersChangeResult ¶
type StateServersChangeResult struct { Result StateServersChanges Error *Error }
StateServersChangeResult contains the results of a single EnsureAvailability API call or an error.
type StateServersChangeResults ¶
type StateServersChangeResults struct {
Results []StateServersChangeResult
}
StateServersChangeResults contains the results of the EnsureAvailability API call.
type StateServersChanges ¶
type StateServersChanges struct { Added []string `json:"added,omitempty"` Maintained []string `json:"maintained,omitempty"` Removed []string `json:"removed,omitempty"` Promoted []string `json:"promoted,omitempty"` Demoted []string `json:"demoted,omitempty"` Converted []string `json:"converted,omitempty"` }
StateServersChanges lists the servers that have been added, removed or maintained in the pool as a result of an ensure-availability operation.
type StateServersSpec ¶
type StateServersSpec struct { EnvironTag string NumStateServers int `json:"num-state-servers"` Constraints constraints.Value `json:"constraints,omitempty"` // Series is the series to associate with new state server machines. // If this is empty, then the environment's default series is used. Series string `json:"series,omitempty"` // Placement defines specific machines to become new state server machines. Placement []string `json:"placement,omitempty"` }
StateServersSpec contains arguments for the EnsureAvailability client API call.
type StateServersSpecs ¶
type StateServersSpecs struct {
Specs []StateServersSpec
}
StateServersSpecs contains all the arguments for the EnsureAvailability API call.
type StateServingInfo ¶
type StateServingInfo struct { APIPort int StatePort int // The state server cert and corresponding private key. Cert string PrivateKey string // The private key for the CA cert so that a new state server // cert can be generated when needed. CAPrivateKey string // this will be passed as the KeyFile argument to MongoDB SystemIdentity string }
StateServingInfo holds information needed by a state server.
type Status ¶
type Status multiwatcher.Status
Status represents the status of an entity. It could be a unit, machine or its agent.
const ( // The entity requires human intervention in order to operate // correctly. StatusError Status = "error" // The entity is actively participating in the environment. // For unit agents, this is a state we preserve for backwards // compatibility with scripts during the life of Juju 1.x. // In Juju 2.x, the agent-state will remain “active” and scripts // will watch the unit-state instead for signals of service readiness. StatusStarted Status = "started" )
const ( // The machine is not yet participating in the environment. StatusPending Status = "pending" // The machine's agent will perform no further action, other than // to set the unit to Dead at a suitable moment. StatusStopped Status = "stopped" // The machine ought to be signalling activity, but it cannot be // detected. StatusDown Status = "down" )
const ( // The machine on which a unit is to be hosted is still being // spun up in the cloud. StatusAllocating Status = "allocating" // The machine on which this agent is running is being rebooted. // The juju-agent should move from rebooting to idle when the reboot is complete. StatusRebooting Status = "rebooting" // The agent is running a hook or action. The human-readable message should reflect // which hook or action is being run. StatusExecuting Status = "executing" // Once the agent is installed and running it will notify the Juju server and its state // becomes "idle". It will stay "idle" until some action (e.g. it needs to run a hook) or // error (e.g it loses contact with the Juju server) moves it to a different state. StatusIdle Status = "idle" // The unit agent has failed in some way,eg the agent ought to be signalling // activity, but it cannot be detected. It might also be that the unit agent // detected an unrecoverable condition and managed to tell the Juju server about it. StatusFailed Status = "failed" // The juju agent has has not communicated with the juju server for an unexpectedly long time; // the unit agent ought to be signalling activity, but none has been detected. StatusLost Status = "lost" // ---- Outdated ---- // The unit agent is downloading the charm and running the install hook. StatusInstalling Status = "installing" // The unit is being destroyed; the agent will soon mark the unit as “dead”. // In Juju 2.x this will describe the state of the agent rather than a unit. StatusStopping Status = "stopping" )
const ( // The unit is not yet providing services, but is actively doing stuff // in preparation for providing those services. // This is a "spinning" state, not an error state. // It reflects activity on the unit itself, not on peers or related units. StatusMaintenance Status = "maintenance" // This unit used to exist, we have a record of it (perhaps because of storage // allocated for it that was flagged to survive it). Nonetheless, it is now gone. StatusTerminated Status = "terminated" // A unit-agent has finished calling install, config-changed, and start, // but the charm has not called status-set yet. StatusUnknown Status = "unknown" // The unit is unable to progress to an active state because a service to // which it is related is not running. StatusWaiting Status = "waiting" // The unit needs manual intervention to get back to the Running state. StatusBlocked Status = "blocked" // The unit believes it is correctly offering all the services it has // been asked to offer. StatusActive Status = "active" )
const ( // StatusAttaching indicates that the storage is being attached // to a machine. StatusAttaching Status = "attaching" // StatusAttached indicates that the storage is attached to a // machine. StatusAttached Status = "attached" // StatusDetaching indicates that the storage is being detached // from a machine. StatusDetaching Status = "detaching" // StatusDetached indicates that the storage is not attached to // any machine. StatusDetached Status = "detached" // StatusDestroying indicates that the storage is being destroyed. StatusDestroying Status = "destroying" )
type StatusHistory ¶
type StatusHistory struct { Kind HistoryKind Size int Name string }
StatusHistory holds the parameters to filter a status history query.
type StatusParams ¶
type StatusParams struct {
Patterns []string
}
StatusParams holds parameters for the Status call.
type StatusResult ¶
type StatusResult struct { Error *Error Id string Life Life Status Status Info string Data map[string]interface{} Since *time.Time }
StatusResult holds an entity status, extra information, or an error.
type StatusResults ¶
type StatusResults struct {
Results []StatusResult
}
StatusResults holds multiple status results.
type StorageAddParams ¶
type StorageAddParams struct { // UnitTag is unit name. UnitTag string `json:"unit"` // StorageName is the name of the storage as specified in the charm. StorageName string `bson:"name"` // Constraints are specified storage constraints. Constraints StorageConstraints `json:"storage"` }
StorageAddParams holds storage details to add to a unit dynamically.
type StorageAttachment ¶
type StorageAttachment struct { StorageTag string OwnerTag string UnitTag string Kind StorageKind Location string Life Life }
StorageAttachment describes a unit's attached storage instance.
type StorageAttachmentDetails ¶
type StorageAttachmentDetails struct { // StorageTag is the tag of the storage instance. StorageTag string `json:"storagetag"` // UnitTag is the tag of the unit attached to the storage instance. UnitTag string `json:"unittag"` // MachineTag is the tag of the machine that the attached unit is assigned to. MachineTag string `json:"machinetag"` // Location holds location (mount point/device path) of // the attached storage. Location string `json:"location,omitempty"` }
StorageAttachmentDetails holds detailed information about a storage attachment.
type StorageAttachmentId ¶
type StorageAttachmentId struct { StorageTag string `json:"storagetag"` UnitTag string `json:"unittag"` }
StorageAttachmentId identifies a storage attachment by the tags of the related unit and storage instance.
type StorageAttachmentIds ¶
type StorageAttachmentIds struct {
Ids []StorageAttachmentId `json:"ids"`
}
StorageAttachmentIds holds a set of storage attachment identifiers.
type StorageAttachmentIdsResult ¶
type StorageAttachmentIdsResult struct { Result StorageAttachmentIds `json:"result"` Error *Error `json:"error,omitempty"` }
StorageAttachmentIdsResult holds the result of an API call to retrieve the IDs of a unit's attached storage instances.
type StorageAttachmentIdsResults ¶
type StorageAttachmentIdsResults struct {
Results []StorageAttachmentIdsResult `json:"results,omitempty"`
}
StorageAttachmentIdsResult holds the result of an API call to retrieve the IDs of multiple units attached storage instances.
type StorageAttachmentResult ¶
type StorageAttachmentResult struct { Result StorageAttachment `json:"result"` Error *Error `json:"error,omitempty"` }
StorageAttachmentResult holds the result of an API call to retrieve details of a storage attachment.
type StorageAttachmentResults ¶
type StorageAttachmentResults struct {
Results []StorageAttachmentResult `json:"results,omitempty"`
}
StorageAttachmentResults holds the result of an API call to retrieve details of multiple storage attachments.
type StorageAttachmentsResult ¶
type StorageAttachmentsResult struct { Result []StorageAttachment `json:"result"` Error *Error `json:"error,omitempty"` }
StorageAttachmentsResult holds the result of an API call to retrieve details of a unit's attached storage instances.
type StorageAttachmentsResults ¶
type StorageAttachmentsResults struct {
Results []StorageAttachmentsResult `json:"results,omitempty"`
}
StorageAttachmentsResults holds the result of an API call to retrieve details of multiple units' attached storage instances.
type StorageConstraints ¶
type StorageConstraints struct { // Pool is the name of the storage pool from which to provision the // storage instance. Pool string `bson:"pool,omitempty"` // Size is the required size of the storage instance, in MiB. Size *uint64 `bson:"size,omitempty"` // Count is the required number of storage instances. Count *uint64 `bson:"count,omitempty"` }
StorageConstraints contains constraints for storage instance.
type StorageDetails ¶
type StorageDetails struct { // StorageTag holds tag for this storage. StorageTag string `json:"storagetag"` // OwnerTag holds tag for the owner of this storage, unit or service. OwnerTag string `json:"ownertag"` // Kind holds what kind of storage this instance is. Kind StorageKind `json:"kind"` // Status contains the status of the storage instance. Status EntityStatus `json:"status"` // Persistent reports whether or not the underlying volume or // filesystem is persistent; i.e. whether or not it outlives // the machine that it is attached to. Persistent bool // Attachments contains a mapping from unit tag to // storage attachment details. Attachments map[string]StorageAttachmentDetails `json:"attachments,omitempty"` }
StorageDetails holds information about storage.
type StorageDetailsResult ¶
type StorageDetailsResult struct { Result *StorageDetails `json:"details,omitempty"` Legacy LegacyStorageDetails `json:"result"` Error *Error `json:"error,omitempty"` }
StorageDetailsResult holds information about a storage instance or error related to its retrieval.
type StorageDetailsResults ¶
type StorageDetailsResults struct {
Results []StorageDetailsResult `json:"results,omitempty"`
}
StorageDetailsResults holds results for storage details or related storage error.
type StorageInstance ¶
type StorageInstance struct { StorageTag string OwnerTag string Kind StorageKind }
StorageInstance describes a storage instance.
type StorageInstanceResult ¶
type StorageInstanceResult struct { Result StorageInstance `json:"result"` Error *Error `json:"error,omitempty"` }
StorageInstanceResult holds the result of an API call to retrieve details of a storage instance.
type StorageInstanceResults ¶
type StorageInstanceResults struct {
Results []StorageInstanceResult `json:"results,omitempty"`
}
StorageInstanceResults holds the result of an API call to retrieve details of multiple storage instances.
type StorageKind ¶
type StorageKind int
StorageKind is the kind of a storage instance.
const ( StorageKindUnknown StorageKind = iota StorageKindBlock StorageKindFilesystem )
func (*StorageKind) String ¶
func (k *StorageKind) String() string
String returns representation of StorageKind for readability.
type StoragePool ¶
type StoragePool struct { // Name is the pool's name. Name string `json:"name"` // Provider is the type of storage provider this pool represents, eg "loop", "ebs". Provider string `json:"provider"` // Attrs are the pool's configuration attributes. Attrs map[string]interface{} `json:"attrs"` }
StoragePool holds data for a pool instance.
type StoragePoolFilter ¶
type StoragePoolFilter struct { // Names are pool's names to filter on. Names []string `json:"names,omitempty"` // Providers are pool's storage provider types to filter on. Providers []string `json:"providers,omitempty"` }
StoragePoolFilter holds a filter for pool API call.
type StoragePoolsResult ¶
type StoragePoolsResult struct {
Results []StoragePool `json:"results,omitempty"`
}
StoragePoolsResult holds a collection of pool instances.
type StoragesAddParams ¶
type StoragesAddParams struct {
Storages []StorageAddParams `json:"storages"`
}
StoragesAddParams holds storage details to add to units dynamically.
type StringBoolResult ¶
StringBoolResult holds the result of an API call that returns a string and a boolean.
type StringBoolResults ¶
type StringBoolResults struct {
Results []StringBoolResult
}
StringBoolResults holds multiple results with a string and a bool each.
type StringResult ¶
StringResult holds a string or an error.
type StringResults ¶
type StringResults struct {
Results []StringResult
}
StringResults holds the bulk operation result of an API call that returns a string or an error.
type StringsResult ¶
StringsResult holds the result of an API call that returns a slice of strings or an error.
type StringsResults ¶
type StringsResults struct {
Results []StringsResult
}
StringsResults holds the bulk operation result of an API call that returns a slice of strings or an error.
type StringsWatchResult ¶
StringsWatchResult holds a StringsWatcher id, changes and an error (if any).
type StringsWatchResults ¶
type StringsWatchResults struct {
Results []StringsWatchResult
}
StringsWatchResults holds the results for any API call which ends up returning a list of StringsWatchers.
type Subnet ¶
type Subnet struct { // CIDR of the subnet in IPv4 or IPv6 notation. CIDR string `json:"CIDR"` // ProviderId is the provider-specific subnet ID (if applicable). ProviderId string `json:"ProviderId,omitempty` // VLANTag needs to be between 1 and 4094 for VLANs and 0 for // normal networks. It's defined by IEEE 802.1Q standard. VLANTag int `json:"VLANTag"` // Life is the subnet's life cycle value - Alive means the subnet // is in use by one or more machines, Dying or Dead means the // subnet is about to be removed. Life Life `json:"Life"` // SpaceTag is the Juju network space this subnet is associated // with. SpaceTag string `json:"SpaceTag"` // Zones contain one or more availability zones this subnet is // associated with. Zones []string `json:"Zones"` // StaticRangeLowIP (if available) is the lower bound of the // subnet's static IP allocation range. StaticRangeLowIP net.IP `json:"StaticRangeLowIP,omitempty"` // StaticRangeHighIP (if available) is the higher bound of the // subnet's static IP allocation range. StaticRangeHighIP net.IP `json:"StaticRangeHighIP,omitempty"` // Status returns the status of the subnet, whether it is in use, not // in use or terminating. Status string `json:"Status,omitempty"` }
Subnet describes a single subnet within a network.
type SubnetsFilters ¶
type SubnetsFilters struct { SpaceTag string `json:"SpaceTag,omitempty"` Zone string `json:"Zone,omitempty"` }
SubnetsFilters holds an optional SpaceTag and Zone for filtering the subnets returned by a ListSubnets call.
type ToolsResult ¶
ToolsResult holds the tools and possibly error for a given Tools() API call.
type ToolsResults ¶
type ToolsResults struct {
Results []ToolsResult
}
ToolsResults is a list of tools for various requested agents.
type UnitStatus ¶
type UnitStatus struct { // UnitAgent holds the status for a unit's agent. UnitAgent AgentStatus // Workload holds the status for a unit's workload Workload AgentStatus // Until Juju 2.0, we need to continue to return legacy agent state values // as top level struct attributes when the "FullStatus" API is called. AgentState Status AgentStateInfo string AgentVersion string Life string Err error Machine string OpenedPorts []string PublicAddress string Charm string Subordinates map[string]UnitStatus }
UnitStatus holds status info about a unit.
type UnitStatusHistory ¶
type UnitStatusHistory struct {
Statuses []AgentStatus
}
UnitStatusHistory holds a slice of statuses.
type UpdateBehavior ¶
UpdateBehavior contains settings that are duplicated in several places. Let's just embed this instead.
type UserEnvironment ¶
type UserEnvironment struct { Environment LastConnection *time.Time }
UserEnvironment holds information about an environment and the last time the environment was accessed for a particular user.
type UserEnvironmentList ¶
type UserEnvironmentList struct {
UserEnvironments []UserEnvironment
}
UserEnvironmentList holds information about a list of environments for a particular user.
type UserInfo ¶
type UserInfo struct { Username string `json:"username"` DisplayName string `json:"display-name"` CreatedBy string `json:"created-by"` DateCreated time.Time `json:"date-created"` LastConnection *time.Time `json:"last-connection,omitempty"` Disabled bool `json:"disabled"` }
UserInfo holds information on a user.
type UserInfoRequest ¶
type UserInfoRequest struct { Entities []Entity `json:"entities"` IncludeDisabled bool `json:"include-disabled"` }
UserInfoRequest defines the users to return. An empty Entities list indicates that all matching users should be returned.
type UserInfoResult ¶
type UserInfoResult struct { Result *UserInfo `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
UserInfoResult holds the result of a UserInfo call.
type UserInfoResults ¶
type UserInfoResults struct {
Results []UserInfoResult `json:"results"`
}
UserInfoResults holds the result of a bulk UserInfo API call.
type VersionResult ¶
VersionResult holds the version and possibly error for a given DesiredVersion() API call.
type VersionResults ¶
type VersionResults struct {
Results []VersionResult
}
VersionResults is a list of versions for the requested entities.
type Volume ¶
type Volume struct { VolumeTag string `json:"volumetag"` Info VolumeInfo `json:"info"` }
Volume identifies and describes a storage volume in the environment.
type VolumeAttachment ¶
type VolumeAttachment struct { VolumeTag string `json:"volumetag"` MachineTag string `json:"machinetag"` Info VolumeAttachmentInfo `json:"info"` }
VolumeAttachment identifies and describes a volume attachment.
type VolumeAttachmentInfo ¶
type VolumeAttachmentInfo struct { DeviceName string `json:"devicename,omitempty"` DeviceLink string `json:"devicelink,omitempty"` BusAddress string `json:"busaddress,omitempty"` ReadOnly bool `json:"read-only,omitempty"` }
VolumeAttachmentInfo describes a volume attachment.
type VolumeAttachmentParams ¶
type VolumeAttachmentParams struct { VolumeTag string `json:"volumetag"` MachineTag string `json:"machinetag"` VolumeId string `json:"volumeid,omitempty"` InstanceId string `json:"instanceid,omitempty"` Provider string `json:"provider"` ReadOnly bool `json:"read-only,omitempty"` }
VolumeAttachmentParams holds the parameters for creating a volume attachment.
type VolumeAttachmentParamsResult ¶
type VolumeAttachmentParamsResult struct { Result VolumeAttachmentParams `json:"result"` Error *Error `json:"error,omitempty"` }
VolumeAttachmentParamsResults holds provisioning parameters for a volume attachment.
type VolumeAttachmentParamsResults ¶
type VolumeAttachmentParamsResults struct {
Results []VolumeAttachmentParamsResult `json:"results,omitempty"`
}
VolumeAttachmentParamsResults holds provisioning parameters for multiple volume attachments.
type VolumeAttachmentResult ¶
type VolumeAttachmentResult struct { Result VolumeAttachment `json:"result"` Error *Error `json:"error,omitempty"` }
VolumeAttachmentResult holds the details of a single volume attachment, or an error.
type VolumeAttachmentResults ¶
type VolumeAttachmentResults struct {
Results []VolumeAttachmentResult `json:"results,omitempty"`
}
VolumeAttachmentResults holds a set of VolumeAttachmentResults.
type VolumeAttachments ¶
type VolumeAttachments struct {
VolumeAttachments []VolumeAttachment `json:"volumeattachments"`
}
VolumeAttachments describes a set of storage volume attachments.
type VolumeAttachmentsResult ¶
type VolumeAttachmentsResult struct { Attachments []VolumeAttachment `json:"attachments,omitempty"` Error *Error `json:"error,omitempty"` }
VolumeAttachmentsResult holds the volume attachments for a single machine, or an error.
type VolumeAttachmentsResults ¶
type VolumeAttachmentsResults struct {
Results []VolumeAttachmentsResult `json:"results,omitempty"`
}
VolumeAttachmentsResults holds a set of VolumeAttachmentsResults for a set of machines.
type VolumeDetails ¶
type VolumeDetails struct { // VolumeTag is the tag for the volume. VolumeTag string `json:"volumetag"` // Info contains information about the volume. Info VolumeInfo `json:"info"` // Status contains the status of the volume. Status EntityStatus `json:"status"` // MachineAttachments contains a mapping from // machine tag to volume attachment information. MachineAttachments map[string]VolumeAttachmentInfo `json:"machineattachments,omitempty"` // Storage contains details about the storage instance // that the volume is assigned to, if any. Storage *StorageDetails `json:"storage,omitempty"` }
VolumeDetails describes a storage volume in the environment for the purpose of volume CLI commands.
This is kept separate from Volume which contains only information specific to the volume model, whereas VolumeDetails is intended to contain complete information about a volume and related information (status, attachments, storage).
type VolumeDetailsResult ¶
type VolumeDetailsResult struct { // Details describes the volume in detail. Details *VolumeDetails `json:"details,omitempty"` // LegacyVolume describes the volume in detail. // // NOTE(axw): VolumeDetails contains redundant and nonsensical // information. Use Details if it is available, and only use // this for backwards-compatibility. LegacyVolume *LegacyVolumeDetails `json:"volume,omitempty"` // LegacyAttachments describes the attachments of the volume to // machines. // // NOTE(axw): this should have gone into VolumeDetails, but it's too // late for that now. We'll continue to populate it, and use it // if it's defined but Volume.Attachments is not. Please do not // copy this structure. LegacyAttachments []VolumeAttachment `json:"attachments,omitempty"` // Error contains volume retrieval error. Error *Error `json:"error,omitempty"` }
VolumeDetailsResult contains details about a volume, its attachments or an error preventing retrieving those details.
type VolumeDetailsResults ¶
type VolumeDetailsResults struct {
Results []VolumeDetailsResult `json:"results,omitempty"`
}
VolumeDetailsResults holds volume details.
type VolumeFilter ¶
type VolumeFilter struct { // Machines are machine tags to filter on. Machines []string `json:"machines,omitempty"` }
VolumeFilter holds a filter for volume list API call.
func (*VolumeFilter) IsEmpty ¶
func (f *VolumeFilter) IsEmpty() bool
IsEmpty determines if filter is empty
type VolumeInfo ¶
type VolumeInfo struct { VolumeId string `json:"volumeid"` HardwareId string `json:"hardwareid,omitempty"` // Size is the size of the volume in MiB. Size uint64 `json:"size"` Persistent bool `json:"persistent"` }
Volume describes a storage volume in the environment.
type VolumeParams ¶
type VolumeParams struct { VolumeTag string `json:"volumetag"` Size uint64 `json:"size"` Provider string `json:"provider"` Attributes map[string]interface{} `json:"attributes,omitempty"` Tags map[string]string `json:"tags,omitempty"` Attachment *VolumeAttachmentParams `json:"attachment,omitempty"` }
VolumeParams holds the parameters for creating a storage volume.
type VolumeParamsResult ¶
type VolumeParamsResult struct { Result VolumeParams `json:"result"` Error *Error `json:"error,omitempty"` }
VolumeParamsResults holds provisioning parameters for a volume.
type VolumeParamsResults ¶
type VolumeParamsResults struct {
Results []VolumeParamsResult `json:"results,omitempty"`
}
VolumeParamsResults holds provisioning parameters for multiple volumes.
type VolumeResult ¶
VolumeResult holds information about a volume.
type VolumeResults ¶
type VolumeResults struct {
Results []VolumeResult `json:"results,omitempty"`
}
VolumeResults holds information about multiple volumes.
type Volumes ¶
type Volumes struct {
Volumes []Volume `json:"volumes"`
}
Volumes describes a set of storage volumes in the environment.
type WatchContainer ¶
WatchContainer identifies a single container type within a machine.
type WatchContainers ¶
type WatchContainers struct {
Params []WatchContainer
}
WatchContainers holds the arguments for making a WatchContainers API call.
type ZoneResult ¶
type ZoneResult struct { Error *Error `json:"Error"` Name string `json:"Name"` Available bool `json:"Available"` }
ZoneResult holds the result of an API call that returns an availability zone name and whether it's available for use.
type ZoneResults ¶
type ZoneResults struct {
Results []ZoneResult `json:"Results"`
}
ZoneResults holds multiple ZoneResult results