Begin the transition to an explicit object registry

In oslo.versionedobjects, the registry is opt-in instead of implicit.
This patch sets the stage for moving to that by defining a no-op
registry with a compatible register method so that we can go ahead and
decorate the object classes and then move the registry underneath them.

Related to blueprint use-oslo-objects

Change-Id: Iddc68a2d8a9b103621bc60a7426fe495edf80aad
This commit is contained in:
Dan Smith
2015-06-02 09:54:45 -07:00
parent 671a3d13c2
commit 1e9fe44dc9

View File

@@ -21,6 +21,7 @@ from nova.objects import fields
# TODO(berrange): Remove NovaObjectDictCompat
@base.NovaObjectRegistry.register
class Aggregate(base.NovaPersistentObject, base.NovaObject,
base.NovaObjectDictCompat):
# Version 1.0: Initial version
@@ -150,6 +151,7 @@ class Aggregate(base.NovaPersistentObject, base.NovaObject,
return self.metadata.get('availability_zone', None)
@base.NovaObjectRegistry.register
class AggregateList(base.ObjectListBase, base.NovaObject):
# Version 1.0: Initial version
# Version 1.1: Added key argument to get_by_host()