summaryrefslogtreecommitdiff
path: root/nova/tests/unit/objects
diff options
context:
space:
mode:
authorDan Smith <dansmith@redhat.com>2020-04-21 09:07:32 -0700
committerDan Smith <dansmith@redhat.com>2020-04-21 09:07:32 -0700
commitd3ca7356860d64555eef6f5138501cb38f50ecc8 (patch)
tree6edc884d865acf2ad119e64191fde53025607b4c /nova/tests/unit/objects
parent58aaffade9f78c5fdc6b0d26ec26b70908b7a6aa (diff)
downloadnova-d3ca7356860d64555eef6f5138501cb38f50ecc8.tar.gz
Remove stale nested backport from InstancePCIRequests
Sometime in 2015, we removed the hard-coded obj_relationships mapping from parent objects which facilitated semi-automated child version backports. This was replaced by a manifest-of-versions mechanism where the client reports all the supported objects and versions during a backport request to conductor. The InstancePCIRequests object isn't technically an ObjectListBase, despite acting like one, and thus wasn't using the obj_relationships. Because of this, it was doing its own backporting of its child object, which was not removed in the culling of the static mechanism. Because we now no longer need to worry about sub-object backport chaining, when version 1.2 was added, no backport rule was added, and since the object does not call the base class' generic routine, proper backporting of the child object was not happening. All we need to do is remove the override to allow the base infrastructure to do the work. Change-Id: Id610a24c066707de5ddc0507e7ef26c421ba366c Closes-Bug: #1868033
Diffstat (limited to 'nova/tests/unit/objects')
-rw-r--r--nova/tests/unit/objects/test_instance_pci_requests.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/nova/tests/unit/objects/test_instance_pci_requests.py b/nova/tests/unit/objects/test_instance_pci_requests.py
index 2ccd7397b0..f3b324cdb1 100644
--- a/nova/tests/unit/objects/test_instance_pci_requests.py
+++ b/nova/tests/unit/objects/test_instance_pci_requests.py
@@ -99,20 +99,6 @@ class _TestInstancePCIRequests(object):
self.assertEqual('alias_2', requests.requests[1].alias_name)
self.assertTrue(requests.requests[1].is_new)
- def test_backport_1_0(self):
- requests = objects.InstancePCIRequests(
- requests=[objects.InstancePCIRequest(count=1,
- request_id=FAKE_UUID),
- objects.InstancePCIRequest(count=2,
- request_id=FAKE_UUID)])
- primitive = requests.obj_to_primitive(target_version='1.0')
- backported = objects.InstancePCIRequests.obj_from_primitive(
- primitive)
- self.assertEqual('1.0', backported.VERSION)
- self.assertEqual(2, len(backported.requests))
- self.assertFalse(backported.requests[0].obj_attr_is_set('request_id'))
- self.assertFalse(backported.requests[1].obj_attr_is_set('request_id'))
-
def test_obj_from_db(self):
req = objects.InstancePCIRequests.obj_from_db(None, FAKE_UUID, None)
self.assertEqual(FAKE_UUID, req.instance_uuid)