Merge "Pass Down the Instance Name to Ironic Driver"

This commit is contained in:
Jenkins 2015-07-29 17:41:44 +00:00 committed by Gerrit Code Review
commit 0ecd1f9071
3 changed files with 7 additions and 0 deletions

View File

@ -841,6 +841,8 @@ class IronicDriverTestCase(test.NoDBTestCase):
'value': str(instance.root_gb)},
{'path': '/instance_info/swap_mb', 'op': 'add',
'value': str(flavor['swap'])},
{'path': '/instance_info/display_name',
'value': instance.display_name, 'op': 'add'},
{'path': '/instance_uuid', 'op': 'add',
'value': instance.uuid}]
mock_update.assert_called_once_with(node.uuid, expected_patch)

View File

@ -41,6 +41,9 @@ class IronicDriverFieldsTestCase(test.NoDBTestCase):
'op': 'add'},
{'path': '/instance_info/swap_mb',
'value': str(self.flavor['swap']),
'op': 'add'},
{'path': '/instance_info/display_name',
'value': self.instance['display_name'],
'op': 'add'}]
self._expected_cleanup_patch = []

View File

@ -62,6 +62,8 @@ class GenericDriverFields(object):
'value': str(instance.root_gb)})
patch.append({'path': '/instance_info/swap_mb', 'op': 'add',
'value': str(flavor['swap'])})
patch.append({'path': '/instance_info/display_name',
'op': 'add', 'value': instance.display_name})
if instance.ephemeral_gb:
patch.append({'path': '/instance_info/ephemeral_gb',