The cinder.objects.cleanable
Module¶
-
class
CinderCleanableObject
¶ Bases:
cinder.objects.base.CinderPersistentObject
Base class for cleanable OVO resources.
All cleanable objects must have a host property/attribute.
-
classmethod
cinder_ovo_cls_init
()¶ Called on OVO registration, sets set of cleanable resources.
-
cleanable_resource_types
= set(['Volume', 'Snapshot'])¶
-
create_worker
(pinned=True)¶ Create a worker entry at the API.
-
static
decorate
(func, caller)¶ decorate(func, caller) decorates a function using a caller.
-
classmethod
get_pinned_version
()¶
-
classmethod
get_rpc_api
()¶
-
is_cleanable
(pinned=False)¶ Check if cleanable VO status is cleanable.
Parameters: pinned – If we should check against pinned version or current version. Returns: Whether this needs a workers DB entry or not
-
refresh
()¶
-
set_worker
()¶
-
static
set_workers
(*decorator_args)¶ Decorator that adds worker DB rows for cleanable versioned objects.
By default will take care of all cleanable objects, but we can limit which objects we want by passing the name of the arguments we want to be added.
-
unset_worker
()¶
-
worker
= None¶
-
classmethod