Merge "Use service availability_zone for Share Server VM"

This commit is contained in:
Jenkins 2015-08-27 03:26:15 +00:00 committed by Gerrit Code Review
commit eada443eab
2 changed files with 7 additions and 3 deletions

View File

@ -516,6 +516,7 @@ class ServiceInstanceManager(object):
flavor=self.get_config_option("service_instance_flavor_id"),
key_name=key_name,
nics=network_data['nics'],
availability_zone=CONF.storage_availability_zone,
**create_kwargs)
fail_safe_data['instance_id'] = service_instance['id']

View File

@ -1009,7 +1009,8 @@ class ServiceInstanceManagerTestCase(test.TestCase):
self._manager.compute_api.server_create.assert_called_once_with(
self._manager.admin_context, name=instance_name,
image=service_image_id, flavor=100,
key_name=key_data[0], nics=network_data['nics'])
key_name=key_data[0], nics=network_data['nics'],
availability_zone=service_instance.CONF.storage_availability_zone)
self._manager.compute_api.server_get.assert_called_once_with(
self._manager.admin_context, server_create['id'])
if helper_type == service_instance.NEUTRON_NAME:
@ -1075,7 +1076,8 @@ class ServiceInstanceManagerTestCase(test.TestCase):
self._manager.compute_api.server_create.assert_called_once_with(
self._manager.admin_context, name=instance_name,
image=service_image_id, flavor=100,
key_name=key_data[0], nics=network_data['nics'])
key_name=key_data[0], nics=network_data['nics'],
availability_zone=service_instance.CONF.storage_availability_zone)
def test___create_service_instance_failed_to_build(self):
server_create = dict(id='fakeid', status='CREATING', networks=dict())
@ -1119,7 +1121,8 @@ class ServiceInstanceManagerTestCase(test.TestCase):
self._manager.compute_api.server_create.assert_called_once_with(
self._manager.admin_context, name=instance_name,
image=service_image_id, flavor=100,
key_name=key_data[0], nics=network_data['nics'])
key_name=key_data[0], nics=network_data['nics'],
availability_zone=service_instance.CONF.storage_availability_zone)
@ddt.data(
dict(name=None, path=None),