cinderlib.objects module¶
- class Connection(*args, **kwargs)[source]¶
Bases:
cinderlib.objects.Object
,cinderlib.objects.LazyVolumeAttr
Cinderlib Connection info that maps to VolumeAttachment.
On Pike we don’t have the connector field on the VolumeAttachment ORM instance so we use the connection_info to store everything.
- We’ll have a dictionary:
- {‘conn’: connection info
‘connector’: connector dictionary ‘device’: result of connect_volume}
- OVO_CLASS¶
- SIMPLE_JSON_IGNORE = ('volume',)¶
- property attached¶
- property backend¶
- property conn_info¶
- property connected¶
- property connector¶
- property connector_info¶
- property device¶
- property path¶
- property protocol¶
- class NamedObject(backend, **fields_data)[source]¶
Bases:
cinderlib.objects.Object
- property description¶
- property name¶
- property name_in_storage¶
- class Object(backend, **fields_data)[source]¶
Bases:
object
Base class for our resource representation objects.
- CONTEXT¶
- DEFAULT_FIELDS_VALUES = {}¶
- LAZY_PROPERTIES = ()¶
- SIMPLE_JSON_IGNORE = ()¶
- backend_class¶
alias of
cinderlib.cinderlib.Backend
- property dump¶
- property dumps¶
- property json¶
- property jsons¶
- class Snapshot(volume, **kwargs)[source]¶
Bases:
cinderlib.objects.NamedObject
,cinderlib.objects.LazyVolumeAttr
- DEFAULT_FIELDS_VALUES = {'metadata': {}, 'status': 'creating'}¶
- OVO_CLASS¶
- SIMPLE_JSON_IGNORE = ('volume',)¶
- class Volume(backend_or_vol, pool_name=None, **kwargs)[source]¶
Bases:
cinderlib.objects.NamedObject
- DEFAULT_FIELDS_VALUES = {'admin_metadata': {}, 'attach_status': 'detached', 'glance_metadata': {}, 'metadata': {}, 'project_id': cinder.context.RequestContext.project_id, 'size': 1, 'status': 'creating', 'user_id': cinder.context.RequestContext.user_id}¶
- LAZY_PROPERTIES = ('snapshots', 'connections')¶
- OVO_CLASS¶
- SIMPLE_JSON_IGNORE = ('snapshots', 'volume_attachment')¶
- property connections¶
- property snapshots¶
- setup(persistence_driver, backend_class, project_id, user_id, non_uuid_ids)¶