Migrate InstanceFault object to Fields
Related to blueprint structured-object-fields Change-Id: I832f4af2e517ebbc28ace32a78730dbd3f87fb45
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
from nova import db
|
||||
from nova.objects import base
|
||||
from nova.objects import utils as obj_utils
|
||||
from nova.objects import fields
|
||||
|
||||
|
||||
class InstanceFault(base.NovaPersistentObject, base.NovaObject):
|
||||
@@ -23,12 +23,12 @@ class InstanceFault(base.NovaPersistentObject, base.NovaObject):
|
||||
VERSION = '1.1'
|
||||
|
||||
fields = {
|
||||
'id': int,
|
||||
'instance_uuid': obj_utils.str_value,
|
||||
'code': int,
|
||||
'message': obj_utils.str_or_none,
|
||||
'details': obj_utils.str_or_none,
|
||||
'host': obj_utils.str_or_none,
|
||||
'id': fields.IntegerField(),
|
||||
'instance_uuid': fields.UUIDField(),
|
||||
'code': fields.IntegerField(),
|
||||
'message': fields.StringField(nullable=True),
|
||||
'details': fields.StringField(nullable=True),
|
||||
'host': fields.StringField(nullable=True),
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user