clean up nova's db api
Database access layer has grown organically, and could use some house keeping. For both nova/db/api and nova/db/
* identify and remove unused methods
* consolidate duplicate methods when possible
* ensure SQLAlchemy objects are not leaking out of the API
* ensure related methods are grouped together and named consistently
Blueprint information
- Status:
- Complete
- Approver:
- Russell Bryant
- Priority:
- High
- Drafter:
- aeva black
- Direction:
- Approved
- Assignee:
- Joe Gordon
- Definition:
- Approved
- Series goal:
- Accepted for grizzly
- Implementation:
-
Implemented
- Milestone target:
-
2013.1
- Started by
- Joe Gordon
- Completed by
- Russell Bryant
Related branches
Related bugs
Sprints
Whiteboard
https:/
List of db functions that return sqlalchemy model objects: https:/
Should use jsonutils.
"once that's done we can probably remove most of the to_primitive() calls that are scattered everywhere else" ~russellb 11/27/2012
Going in the direction of only allowing primitives to be returned from nova.db.api (potentially with a few explicit exceptions) ~Joe Gordon 11/28/2012
Gerrit topic: https:/
Addressed by: https:/
Access DB values as dict not as Attributes
Addressed by: https:/
Access DB values as dict not as attributes. Part 2
Addressed by: https:/
Access DB values as dict not as attributes. Part 3
Addressed by: https:/
Clean up soft deletion in sqlaclhemy db api
Addressed by: https:/
Access DB values as dict not as attributes. Part 4
Addressed by: https:/
Allow to_primitive to ignore datetimes
Addressed by: https:/
Access DB as dict not as attributes part 5
Addressed by: https:/
Use joined version of db.api calls
Addressed by: https:/
Update nova/compute/api to handle instance as dict
Addressed by: https:/
Update jsonutils from oslo-incubator
Addressed by: https:/
Use joinedload for system_metadata in db
Gerrit topic: https:/
Addressed by: https:/
Remove orphaned db method instance_
Work Items
Work items:
identify and remove unused methods: DONE
Don't use Attributes for objects returned from nova.db.api: DONE
make nova.db.api only return primitives (potentially with a few exceptions): POSTPONED
consolidate duplicate methods when possible: DONE
ensure related methods are grouped together and named consistently: TODO
Dependency tree

* Blueprints in grey have been implemented.