From 1e9fe44dc909b1c9c1fd85a539c0b691b5a6e93a Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Tue, 2 Jun 2015 09:54:45 -0700 Subject: [PATCH] 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 --- nova/objects/aggregate.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nova/objects/aggregate.py b/nova/objects/aggregate.py index 937196fb4..3c2a03dda 100644 --- a/nova/objects/aggregate.py +++ b/nova/objects/aggregate.py @@ -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()