Cinder Objects

Registered by Thang Pham

The goal of this blueprint is to introduce objects into cinder. An object is used to bundle data with methods that can operate on them. The plan is to represent the following concepts as objects: service, volume, volume type, snapshot, quota, backup, consistency group and consistency group snapshot.

By using objects, the code will be insulated from the actual database schema, making it easier rolling upgrades. Objects can be used to pass data over RPC and allow lazy-loading of data directly from the database or over RPC.

Blueprint information

Status:
Complete
Approver:
Mike Perez
Priority:
High
Drafter:
Thang Pham
Direction:
Approved
Assignee:
Thang Pham
Definition:
Approved
Series goal:
Accepted for kilo
Implementation:
Implemented
Milestone target:
milestone icon 2015.1.0
Started by
Mike Perez
Completed by
Mike Perez

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/cinder-objects,n,z

Addressed by: https://review.openstack.org/130044
    WIP: Cinder objects

Addressed by: https://review.openstack.org/131873
    WIP: Cinder objects

Addressed by: https://review.openstack.org/133566
    WIP: Snapshot object

Gerrit topic: https://review.openstack.org/#q,topic:bp/snapshot-object,n,z

Addressed by: https://review.openstack.org/157085
    WIP: Backup object

Addressed by: https://review.openstack.org/160417
    Service object

Addressed by: https://review.openstack.org/160209
    Switch to oslo_versionedobjects

Addressed by: https://review.openstack.org/161077
    Switch get_all_snapshots to use objects

Addressed by: https://review.openstack.org/162185
    PoC: Rebase objects to use oslo_versionedobjects

Addressed by: https://review.openstack.org/160208
    Raise exception for invalid mock assert calls

Gerrit topic: https://review.openstack.org/#q,topic:objects-quota,n,z

Addressed by: https://review.openstack.org/163232
    WIP - Quota Objects

Gerrit topic: https://review.openstack.org/#q,topic:objects-cg,n,z

Addressed by: https://review.openstack.org/163641
    WIP - ConsistencyGroup Object

Addressed by: https://review.openstack.org/163910
    WIP: Complete switch to snapshot objects

Addressed by: https://review.openstack.org/164764
    Create unit tests for volume objects

Addressed by: https://review.openstack.org/165214
    Properly use obj_extra_fields in objects

Addressed by: https://review.openstack.org/177054
    WIP: Conversion to volume object

Gerrit topic: https://review.openstack.org/#q,topic:bug/1458127,n,z

Gerrit topic: https://review.openstack.org/#q,topic:glusterfs-cinder-objects,n,z

Addressed by: https://review.openstack.org/187892
    WIP: GlusterFS: Switch to Cinder Objects

Gerrit topic: https://review.openstack.org/#q,topic:bp/rpc-object-compatibility,n,z

Addressed by: https://review.openstack.org/195027
    CGSnapshot Object

Addressed by: https://review.openstack.org/196071
    Fix saving tz aware datetimes in Versioned Objects

Addressed by: https://review.openstack.org/198341
    Cleanup for SnapshotObject

Addressed by: https://review.openstack.org/201404
    WIP: Conversion to volume object

Addressed by: https://review.openstack.org/207544
    Cleanup for cinder tests with ConsistencyGroups.

Addressed by: https://review.openstack.org/207866
    Cleanup for cinder tests with CGSnapshot.

Addressed by: https://review.openstack.org/218361
    Sync volume versionedobject to ORM

Addressed by: https://review.openstack.org/228218
    Update retype to use versionedobjects

Addressed by: https://review.openstack.org/228690
    Update extend_volume to use versionedobjects

Addressed by: https://review.openstack.org/228916
    Update migrate_volume to use versionedobjects

Addressed by: https://review.openstack.org/238894
    Update initialize_connection to use versionedobjects

Addressed by: https://review.openstack.org/238906
    Update initialize_connection to use versionedobjects

Addressed by: https://review.openstack.org/240078
    Update create_volume to use versionedobjects

Addressed by: https://review.openstack.org/240735
    Update create_volume API to use versionedobjects

Addressed by: https://review.openstack.org/246600
    WIP: Switch request_spec in create volume calls to ovo

Addressed by: https://review.openstack.org/248998
    Implement refresh() for cinder objects

Addressed by: https://review.openstack.org/247762
    Recognize extra fields in CinderObjectDictCompat

Addressed by: https://review.openstack.org/252458
    OVO request_spec in migrate/manage/retype calls

Addressed by: https://review.openstack.org/253033
    Switch request_spec_list in create CG to ovo

Addressed by: https://review.openstack.org/251989
    Move QualityOfServiceSpecs to use VersionedObject

Addressed by: https://review.openstack.org/257305
    Convert filter_properties to OVO (create, retype)

Gerrit topic: https://review.openstack.org/#q,topic:bug/1520102,n,z

Addressed by: https://review.openstack.org/258132
    Update manage_existing to use volume object

Addressed by: https://review.openstack.org/260618
    Update create_snapshot to use volume object

Addressed by: https://review.openstack.org/262024
    Update restore_backup to use volume object

Addressed by: https://review.openstack.org/262640
    update _usage_from_backup() method with versionedobjects

Addressed by: https://review.openstack.org/263001
    update terminate_connecton() with versionedobjects

Addressed by: https://review.openstack.org/263127
    update remove_export() with versionedobjects

Addressed by: https://review.openstack.org/263570
    Wrap a code path for versionedobjects

Addressed by: https://review.openstack.org/263765
    Update copy_volume_to_image to use volume object

Addressed by: https://review.openstack.org/264797
    Update terminate_connection to use volume object

Addressed by: https://review.openstack.org/265266
    Update accept_transfer to use volume object

Addressed by: https://review.openstack.org/268608
    Update attach_volume() with verisonedobjects

Addressed by: https://review.openstack.org/268609
    Update detach_volume() with versionedobjects

Addressed by: https://review.openstack.org/271614
    Update test cases related to attach_volume and detach_volume API

Gerrit topic: https://review.openstack.org/#q,topic:qwe,n,z

Addressed by: https://review.openstack.org/277009
    Fix a wrong call in method obj_make_compatible()

Addressed by: https://review.openstack.org/297366
    Cleanup rpcapi version checks

Addressed by: https://review.openstack.org/300708
    Cleanup for Volume Object

Addressed by: https://review.openstack.org/297701
    Remove support for 1.x volume RPC API

Addressed by: https://review.openstack.org/315783
    Cleanup for Volume Object(Part 2)

Addressed by: https://review.openstack.org/317698
    Cleanup for Volume Object(Part 3)

Addressed by: https://review.openstack.org/319040
    [WIP] Switch service capabilities to ovo

Addressed by: https://review.openstack.org/329332
    Convert backup_device to OVO

Gerrit topic: https://review.openstack.org/#q,topic:cgsnapshots/cinder-objects,n,z

Addressed by: https://review.openstack.org/338542
    Moving the OPTIONAL_FIELDS inside theOVO object

Gerrit topic: https://review.openstack.org/#q,topic:_from_db_object/cinder-objects,n,z

Addressed by: https://review.openstack.org/339566
    Changing method _from_db_object to classmethod After moving OPTIONAL_FIELDS into the class definition, the method _from_db_object should be classmethod instead of staticmethod.

Addressed by: https://review.openstack.org/342929
    Fix mistakes introduced with QoSSpecs object

Addressed by: https://review.openstack.org/374971
    Refactoring total_capacity_gb & free_capavity_gb in capabilities

Addressed by: https://review.openstack.org/391776
    Clean _get_cctxt method signatures

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.