From 1700a2d59ff4117ae072959b7165602d29cbdb69 Mon Sep 17 00:00:00 2001 From: Ryan Rossiter Date: Tue, 30 Jun 2015 22:19:17 +0000 Subject: [PATCH] Change List objects to use obj_relationships List objects used to use child_versions, which was tested in a more shallow way than test_relationships() tests obj_relationships. This change moves over all list classes to use obj_relationships (and therefore are now tested in test_relationships() with all other objects). Change-Id: I334dba243de45bf11ccb5ab55e2aa8390fe9d8c2 Closes-Bug: #1470154 --- nova/objects/aggregate.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/nova/objects/aggregate.py b/nova/objects/aggregate.py index 3c2a03dda..681470d9c 100644 --- a/nova/objects/aggregate.py +++ b/nova/objects/aggregate.py @@ -162,11 +162,10 @@ class AggregateList(base.ObjectListBase, base.NovaObject): fields = { 'objects': fields.ListOfObjectsField('Aggregate'), } - child_versions = { - '1.0': '1.1', - '1.1': '1.1', - # NOTE(danms): Aggregate was at 1.1 before we added this - '1.2': '1.1', + + # NOTE(danms): Aggregate was at 1.1 before we added this + obj_relationships = { + 'objects': [('1.0', '1.1'), ('1.1', '1.1'), ('1.2', '1.1')], } @classmethod