Documentation ¶
Index ¶
- Variables
- func IsCharmAlreadyUploadedError(err interface{}) bool
- func IsDeletedUserError(err error) bool
- func IsHasAssignedUnitsError(err error) bool
- func IsHasAttachmentsError(err error) bool
- func IsHasContainersError(err error) bool
- func IsHasHostedModelsError(err error) bool
- func IsHasPersistentStorageError(err error) bool
- func IsIncompatibleSeriesError(err interface{}) bool
- func IsModelNotEmptyError(err error) bool
- func IsNeverConnectedError(err error) bool
- func IsNeverLoggedInError(err error) bool
- func IsNotAlive(err error) bool
- func IsParentDeviceHasChildrenError(err interface{}) bool
- func IsProviderIDNotUniqueError(err interface{}) bool
- func IsStorageAttachedError(err error) bool
- func IsUpgradeInProgressError(err error) bool
- func IsVersionInconsistentError(e interface{}) bool
- func NewDeletedUserError(userName string) error
- func NewErrCharmAlreadyUploaded(curl *charm.URL) error
- func NewErrIncompatibleSeries(seriesList []string, series, charmName string) error
- func NewHasAssignedUnitsError(machineId string, unitNames []string) error
- func NewHasAttachmentsError(machineId string, attachments []names.Tag) error
- func NewHasContainersError(machineId string, containerIds []string) error
- func NewHasHostedModelsError(i int) error
- func NewHasPersistentStorageError() error
- func NewModelNotEmptyError(machines, applications, volumes, filesystems int) error
- func NewNeverConnectedError(userName string) error
- func NewNeverLoggedInError(userName string) error
- func NewNotAliveError(entity string) error
- func NewParentDeviceHasChildrenError(parentName string, numChildren int) error
- func NewProviderIDNotUniqueError(providerIDs ...network.Id) error
- func NewStorageAttachedError(err string) error
- func NewVersionInconsistentError(currentVersion version.Number, agents []string) *versionInconsistentError
Constants ¶
This section is empty.
Variables ¶
var ( // ErrCannotEnterScope indicates that a relation unit failed to enter its scope // due to either the unit or the relation not being Alive. ErrCannotEnterScope = stderrors.New("cannot enter scope: unit or relation is not alive") // ErrCannotEnterScopeYet indicates that a relation unit failed to enter its // scope due to a required and pre-existing subordinate unit that is not Alive. // Once that subordinate has been removed, a new one can be created. ErrCannotEnterScopeYet = stderrors.New("cannot enter scope yet: non-alive subordinate unit has not been removed") )
var ( // ErrUnitHasSubordinates is a standard error to indicate that a Unit // cannot complete an operation to end its life because it still has // subordinate applications. ErrUnitHasSubordinates = errors.New("unit has subordinates") // ErrUnitHasStorageAttachments is a standard error to indicate that // a Unit cannot complete an operation to end its life because it still // has storage attachments. ErrUnitHasStorageAttachments = errors.New("unit has storage attachments") )
var ErrCharmRevisionAlreadyModified = fmt.Errorf("charm revision already modified")
ErrCharmRevisionAlreadyModified is returned when a pending or placeholder charm is no longer pending or a placeholder, signaling the charm is available in state with its full information.
var ErrDead = fmt.Errorf("not found or dead")
var ErrUpgradeInProgress = errors.New("upgrade in progress")
Functions ¶
func IsCharmAlreadyUploadedError ¶
func IsCharmAlreadyUploadedError(err interface{}) bool
IsCharmAlreadyUploadedError returns if the given error is errCharmAlreadyUploaded.
func IsDeletedUserError ¶
IsDeletedUserError returns true if err is of type deletedUserError.
func IsHasAssignedUnitsError ¶
func IsHasAttachmentsError ¶
IsHasAttachmentsError reports whether or not the error is a hasAttachmentsError, indicating that an attempt to destroy a machine failed due to it having storage attachments.
func IsHasContainersError ¶
IshasContainersError reports whether or not the error is a hasContainersError, indicating that an attempt to destroy a machine failed due to it having containers.
func IsHasHostedModelsError ¶
IsHasHostedModelsError reports whether or not the given error was caused by an attempt to destroy the controller model while it contained non-empty hosted models, without specifying that they should also be destroyed.
func IsHasPersistentStorageError ¶
IsHasPersistentStorageError reports whether or not the given error was caused by an attempt to destroy a model while it contained persistent storage, without specifying how the storage should be removed (destroyed or released).
func IsIncompatibleSeriesError ¶
func IsIncompatibleSeriesError(err interface{}) bool
IsIncompatibleSeriesError returns if the given error or its cause is errIncompatibleSeries.
func IsModelNotEmptyError ¶
IsModelNotEmptyError reports whether or not the given error was caused due to an operation requiring a model to be empty, where the model is non-empty.
func IsNeverConnectedError ¶
IsNeverConnectedError returns true if err is of type neverConnectedError.
func IsNeverLoggedInError ¶
IsNeverLoggedInError returns true if err is of type neverLoggedInError.
func IsNotAlive ¶
IsNotAlive returns true if err is cause by a not alive error.
func IsParentDeviceHasChildrenError ¶
func IsParentDeviceHasChildrenError(err interface{}) bool
IsParentDeviceHasChildrenError returns if the given error or its cause is errParentDeviceHasChildren.
func IsProviderIDNotUniqueError ¶
func IsProviderIDNotUniqueError(err interface{}) bool
IsProviderIDNotUniqueError returns if the given error or its cause is errProviderIDNotUnique.
func IsStorageAttachedError ¶
IsStorageAttachedError reports whether or not the given error was caused by an operation on storage that should not be, but is, attached.
func IsUpgradeInProgressError ¶
IsUpgradeInProgressError returns true if the error is caused by an in-progress upgrade.
func IsVersionInconsistentError ¶
func IsVersionInconsistentError(e interface{}) bool
IsVersionInconsistentError returns if the given error is versionInconsistentError.
func NewDeletedUserError ¶
func NewErrCharmAlreadyUploaded ¶
func NewErrCharmAlreadyUploaded(curl *charm.URL) error
func NewHasAttachmentsError ¶
func NewHasContainersError ¶
func NewHasHostedModelsError ¶
func NewHasPersistentStorageError ¶
func NewHasPersistentStorageError() error
func NewModelNotEmptyError ¶
func NewNeverConnectedError ¶
func NewNeverLoggedInError ¶
func NewNotAliveError ¶
func NewProviderIDNotUniqueError ¶
NewProviderIDNotUniqueError returns an instance of errProviderIDNotUnique initialized with the given duplicate provider IDs.
func NewStorageAttachedError ¶
func NewVersionInconsistentError ¶
func NewVersionInconsistentError(currentVersion version.Number, agents []string) *versionInconsistentError
NewVersionInconsistentError returns a new instance of versionInconsistentError.
Types ¶
This section is empty.