On Thu, Jan 9, 2014 at 2:35 PM, 黎林果 <[email protected]> wrote:

> Hi Chris,
> Thanks for you reply.
>
> It's not only hard coded for swap volumes. In function
> '_create_instance' which for creating instance of nova/compute/api.py,
> the '_prepare_image_mapping' function will be called. And it hard code
> to True, too.
>
> values = block_device.BlockDeviceDict({
>                 'device_name': bdm['device'],
>                 'source_type': 'blank',
>                 'destination_type': 'local',
>                 'device_type': 'disk',
>                 'guest_format': guest_format,
>                 'delete_on_termination': True,
>                 'boot_index': -1})
>
>
Just before that in _prepare_image_mapping is:

            if virtual_name == 'ami' or virtual_name == 'root':
                continue

            if not block_device.is_swap_or_ephemeral(virtual_name):
                continue


Chris
_______________________________________________
OpenStack-dev mailing list
[email protected]
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to