Make Object FieldType take an object name instead of a class

The object infrastructure has a concept of an object name, which
is what we use to determine if something implements a particular
thing, and it is how we look up object classes when we
deserialize them. Since many objects will eventually reference
each other, we should be using their names to determine
compatibility, not their classes.

Related to blueprint structured-object-fields

Change-Id: I2edb8b8475662ad25e9f3319ce5e44317a2d0547
This commit is contained in:
Dan Smith
2013-10-14 15:47:03 -07:00
parent 775071447c
commit 3872a1a2e7
4 changed files with 15 additions and 0 deletions

View File

@@ -58,6 +58,10 @@ def _make_fault_list(faultlist, db_faultlist):
class InstanceFaultList(base.ObjectListBase, base.NovaObject):
fields = {
'objects': fields.ListOfObjectsField('InstanceFault'),
}
@base.remotable_classmethod
def get_by_instance_uuids(cls, context, instance_uuids):
db_faults = db.instance_fault_get_by_instance_uuids(context,