Cleanup handling of SQLAlchemy session in DB access layer

Registered by Roman Podoliaka on 2013-05-22

1. Use common session handling code already implemented in Oslo (DONE)
2. Don't pass session instances to public DB methods (DONE)
3. Use explicit transactions only when necessary (DONE)
4. Fix incorrect usage of sessions throughout the DB-related code (DONE)

Blueprint information

Status:
Complete
Approver:
John Griffith
Priority:
Medium
Drafter:
Roman Podoliaka
Direction:
Approved
Assignee:
Roman Podoliaka
Definition:
Approved
Series goal:
Accepted for havana
Implementation:
Implemented
Milestone target:
milestone icon 2013.2
Started by
Thierry Carrez on 2013-06-04
Completed by
Roman Podoliaka on 2013-08-04

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/db-unique-keys,n,z

Addressed by: https://review.openstack.org/30280
    Add common Oslo DB code to the source tree

Addressed by: https://review.openstack.org/30281
    Migrate to Oslo DB code

Gerrit topic: https://review.openstack.org/#q,topic:bp/db-session-cleanup,n,z

Addressed by: https://review.openstack.org/34523
    Move resource usage sync functions to db backend

Addressed by: https://review.openstack.org/35316
    WIP: remove session from public DB API methods

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

Addressed by: https://review.openstack.org/38657
    Improve DB API test coverage

Addressed by: https://review.openstack.org/38658
    Execute DB API methods in a single transaction

Addressed by: https://review.openstack.org/38659
    Fix volume_create()/snapshot_create() DB methods

Addressed by: https://review.openstack.org/38660
    Call get_session() only when necessary

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.