Cinder objects base

This patch is to insert the objects code base, currently based
on nova.objects.  It will be later based on
oslo_versionedobjects once it is available.  This is done
to make progress on changing cinder internals to use objects,
since nova.objects and oslo.versionedobjects are similar.

Inserted objects code base into cinder and modified cinder services
to use object-aware serializer.

Change-Id: I42a6cc43da19ca29db4cfb33cbf794afed18f758
Implements: blueprint cinder-objects
This commit is contained in:
Thang Pham
2014-11-10 17:02:02 -05:00
parent d9cd6d008c
commit 2b4c8e79ec
18 changed files with 2887 additions and 7 deletions

View File

@@ -76,6 +76,7 @@ from cinder import db
from cinder.db import migration as db_migration
from cinder.db.sqlalchemy import api as db_api
from cinder.i18n import _
from cinder.objects import base as objects_base
from cinder.openstack.common import log as logging
from cinder import rpc
from cinder import utils
@@ -271,7 +272,9 @@ class VolumeCommands(object):
if not rpc.initialized():
rpc.init(CONF)
target = messaging.Target(topic=CONF.volume_topic)
self._client = rpc.get_client(target)
serializer = objects_base.CinderObjectSerializer()
self._client = rpc.get_client(target, serializer=serializer)
return self._client
@args('volume_id',