Documentation ¶
Index ¶
- Constants
- func IsDeletedUserError(err error) bool
- func IsNeverLoggedInError(err error) bool
- func IsNotAlive(err error) bool
- func IsParentDeviceHasChildrenError(err interface{}) bool
- func IsProviderIDNotUniqueError(err interface{}) bool
- func NewDeletedUserError(userName string) error
- func NewErrIncompatibleBase(supportedBases []base.Base, b base.Base, 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 NewIsControllerMemberError(machineId string, isVoting bool) error
- func NewModelNotEmptyError(machines, applications, volumes, filesystems int) error
- func NewNeverLoggedInError(userName string) error
- func NewNotAliveError(entity string) error
- func NewParentDeviceHasChildrenError(parentName string, numChildren int) error
- func NewProviderIDNotUniqueError(providerIDs ...network.Id) error
Constants ¶
const ( // ProvisioningStateInconsistent is returned by SetProvisioningState when the provisioning state // is inconsistent with the application scale. ProvisioningStateInconsistent = errors.ConstError("provisioning state is inconsistent") // ErrApplicationShouldNotHaveUnits is returned by SetCharm when the application has units when // it is expected to not have units. Used for upgrading from podspec to sidecar charms. ErrApplicationShouldNotHaveUnits = errors.ConstError("application should not have units") )
const ( // ErrCannotEnterScope indicates that a relation unit failed to enter its scope // due to either the unit or the relation not being Alive. ErrCannotEnterScope = errors.ConstError("cannot enter scope") // 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 = errors.ConstError("cannot enter scope yet") // 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. ErrCharmRevisionAlreadyModified = errors.ConstError("charm revision already modified") ErrDead = errors.ConstError("not found or dead") // IncompatibleBaseError indicates the base selected is not supported by // the charm. IncompatibleBaseError = errors.ConstError("incompatible base for charm") )
const ( HasAssignedUnitsError = errors.ConstError("has assigned units") // HasAttachmentsError indicates that an attempt to destroy // a machine failed due to it having storage attachments. HasAttachmentsError = errors.ConstError("machine has attachments") // HasContainersError indicates that the machine had attempted to be // destroyed with containers still running. HasContainersError = errors.ConstError("machine is hosting containers") // IsControllerMemberError indicates the machine had attempted to be // destroyed whilst still considered a controller. IsControllerMemberError = errors.ConstError("machine is still a controller member") )
const ( // HasHostedModelsError defines if an attempt was made to destroy the // controller model while it contained non-empty hosted models, without // specifying that they should also be destroyed. HasHostedModelsError = errors.ConstError("has hosted models") // ModelNotEmptyError 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. ModelNotEmptyError = errors.ConstError("model not empty") // PersistentStorageError indicates 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). PersistentStorageError = errors.ConstError("model contains persistent storage") )
const ( // 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.ConstError("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.ConstError("unit has storage attachments") )
const ( // StorageAttachedError reports whether or not the given error was caused // by an operation on storage that should not be, but is, attached. StorageAttachedError = errors.ConstError("storage is attached") )
Variables ¶
This section is empty.
Functions ¶
func IsDeletedUserError ¶
IsDeletedUserError returns true if err is of type deletedUserError.
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 NewDeletedUserError ¶
func NewErrIncompatibleBase ¶
func NewHasAssignedUnitsError ¶
NewHasAssignedUnitsError creates a new error that satisfies HasAssignedUnitsError.
func NewHasAttachmentsError ¶
NewHasAttachmentsError creates a new error that satisfies HasAttachmentsError.
func NewHasContainersError ¶
NewHasContainersError creates a new error that satisfies HasContainersError.
func NewHasHostedModelsError ¶
func NewIsControllerMemberError ¶
NewIsControllerMemberError creates a new error that satisfies IsControllerMemberError.
func NewModelNotEmptyError ¶
NewModelNotEmptyError constructs a ModelNotEmpty with the error message tailored to match the number of machines, applications, volumes and filesystem's left. The returned error satisfies ModelNotEmptyError.
func NewNeverLoggedInError ¶
func NewNotAliveError ¶
func NewProviderIDNotUniqueError ¶
NewProviderIDNotUniqueError returns an instance of errProviderIDNotUnique initialized with the given duplicate provider IDs.
Types ¶
This section is empty.