Snapshot and volume objects

Abstract volumes and volume snapshots into objects.
Get, create, and delete snapshot APIs were changed to
use new snapshot objects.  A skeleton volume object was
created, but cinder internals were not changed to use
the volume object, although volume is referenced and
used by the snapshot object.  The internals will be
changed to use volume object in a subsequent patch.

Change-Id: I387018e80c8539565e99454db65d976030002c0f
Implements: blueprint cinder-objects
This commit is contained in:
Thang Pham
2014-11-10 17:38:42 -05:00
parent 2b4c8e79ec
commit 21cda264dd
22 changed files with 1468 additions and 272 deletions

View File

@@ -42,6 +42,7 @@ from cinder.common import config # noqa Need to register global_opts
from cinder.db import migration
from cinder.db.sqlalchemy import api as sqla_api
from cinder import i18n
from cinder import objects
from cinder.openstack.common import log as oslo_logging
from cinder import rpc
from cinder import service
@@ -106,6 +107,9 @@ class TestCase(testtools.TestCase):
"""Run before each test method to initialize test environment."""
super(TestCase, self).setUp()
# Import cinder objects for test cases
objects.register_all()
# Unit tests do not need to use lazy gettext
i18n.enable_lazy(False)