Add cell field to Destination object
This will allow us to request the scheduler limit a scheduling decision to a specific cell. Change-Id: I020900ff682f54fafe3e94789c5731ef4748679b
This commit is contained in:
parent
159062882e
commit
9b8ab58360
|
@ -612,7 +612,8 @@ def migrate_instances_add_request_spec(context, max_count):
|
|||
@base.NovaObjectRegistry.register
|
||||
class Destination(base.NovaObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
# Version 1.1: Add cell field
|
||||
VERSION = '1.1'
|
||||
|
||||
fields = {
|
||||
'host': fields.StringField(),
|
||||
|
@ -620,8 +621,16 @@ class Destination(base.NovaObject):
|
|||
# and also remove the possibility to have multiple nodes per service,
|
||||
# let's provide a possible nullable node here.
|
||||
'node': fields.StringField(nullable=True),
|
||||
'cell': fields.ObjectField('CellMapping', nullable=True),
|
||||
}
|
||||
|
||||
def obj_make_compatible(self, primitive, target_version):
|
||||
super(Destination, self).obj_make_compatible(primitive, target_version)
|
||||
target_version = versionutils.convert_version_to_tuple(target_version)
|
||||
if target_version < (1, 1):
|
||||
if 'cell' in primitive:
|
||||
del primitive['cell']
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
class SchedulerRetries(base.NovaObject):
|
||||
|
|
|
@ -1076,7 +1076,7 @@ object_data = {
|
|||
'ComputeNodeList': '1.16-40258d802a6ed045690a127a2088544b',
|
||||
'DNSDomain': '1.0-7b0b2dab778454b6a7b6c66afe163a1a',
|
||||
'DNSDomainList': '1.0-4ee0d9efdfd681fed822da88376e04d2',
|
||||
'Destination': '1.0-4c59dd1288b2e7adbda6051a2de59183',
|
||||
'Destination': '1.1-fff0853f3acec6b04ddc03158ded11ba',
|
||||
'DeviceBus': '1.0-77509ea1ea0dd750d5864b9bd87d3f9d',
|
||||
'DeviceMetadata': '1.0-04eb8fd218a49cbc3b1e54b774d179f7',
|
||||
'DiskMetadata': '1.0-e7a0f1ccccf10d26a76b28e7492f3788',
|
||||
|
|
Loading…
Reference in New Issue