Move to using ovo's remotable decorators

This removes Nova's remotable and remotable_classmethod decorators
and aliases the old location to the oslo.versionedobjects (ovo)
implementations.

This uncovered a couple other places where we were still passing a
context to a remotable method (in tests), which are fixed up here.

There is also a bug in ovo's remotable decorator that requires dict
compatibility. For this reason, this patch adds the Dict mixin to
a few objects (with appropriate comments), which can be removed when
we have an ovo release with that fix in it.

Related to blueprint use-oslo-objects

Change-Id: Id51fa3a55f65c8c075423f50a1240c997f9f2388
This commit is contained in:
Dan Smith
2015-07-15 10:44:33 -07:00
parent 7503b25538
commit b15e10555a
14 changed files with 37 additions and 96 deletions

View File

@@ -10,6 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_versionedobjects import base as ovo
from nova.db.sqlalchemy import api as db_api
from nova.db.sqlalchemy import api_models
from nova import exception
@@ -17,8 +19,10 @@ from nova.objects import base
from nova.objects import fields
# NOTE(danms): Maintain Dict compatibility because of ovo bug 1474952
@base.NovaObjectRegistry.register
class CellMapping(base.NovaTimestampObject, base.NovaObject):
class CellMapping(base.NovaTimestampObject, base.NovaObject,
ovo.VersionedObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'