From a5cfde4e2dca6d98fa6611f493e338a805fe3d06 Mon Sep 17 00:00:00 2001 From: Ryan Rossiter Date: Mon, 4 Apr 2016 18:33:51 +0000 Subject: [PATCH] Remove DictCompat from mapping objects HostMapping and InstanceMapping had DictCompat inheritance solely because of bug 1474952. This bug was fixed back in o.vo 0.6.0, so this inheritance can be removed. These objects did not use dict syntax anywhere, so accessors did not have to be changed over. Change-Id: I1bde23f2ffeb8ed562e8c3f195a0cfe75fb455b3 Partially-Implements: bp rm-object-dict-compat-newton --- nova/objects/host_mapping.py | 5 +---- nova/objects/instance_mapping.py | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/nova/objects/host_mapping.py b/nova/objects/host_mapping.py index 9c8acf4a3a..3114c66f61 100644 --- a/nova/objects/host_mapping.py +++ b/nova/objects/host_mapping.py @@ -10,7 +10,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_versionedobjects import base as ovo from sqlalchemy.orm import joinedload from nova.db.sqlalchemy import api as db_api @@ -27,10 +26,8 @@ def _cell_id_in_updates(updates): updates["cell_id"] = cell_mapping_obj.id -# NOTE(danms): Maintain Dict compatibility because of ovo bug 1474952 @base.NovaObjectRegistry.register -class HostMapping(base.NovaTimestampObject, base.NovaObject, - ovo.VersionedObjectDictCompat): +class HostMapping(base.NovaTimestampObject, base.NovaObject): # Version 1.0: Initial version VERSION = '1.0' diff --git a/nova/objects/instance_mapping.py b/nova/objects/instance_mapping.py index 16f92d6397..1b75c1317e 100644 --- a/nova/objects/instance_mapping.py +++ b/nova/objects/instance_mapping.py @@ -10,7 +10,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_versionedobjects import base as ovo from sqlalchemy.orm import joinedload from nova.db.sqlalchemy import api as db_api @@ -22,10 +21,8 @@ from nova.objects import cell_mapping from nova.objects import fields -# NOTE(danms): Maintain Dict compatibility because of ovo bug 1474952 @base.NovaObjectRegistry.register -class InstanceMapping(base.NovaTimestampObject, base.NovaObject, - ovo.VersionedObjectDictCompat): +class InstanceMapping(base.NovaTimestampObject, base.NovaObject): # Version 1.0: Initial version VERSION = '1.0'