diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-10-24 19:10:04 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-10-24 19:10:04 +0000 |
| commit | fbf7ab67a853d3fda2670c352f73069522495f52 (patch) | |
| tree | aa58fe492933b0eb68e49727794bc0cae7e2aa8f /nova/api | |
| parent | ec8d2569f5ab453279913ec1d0c4684235b66a08 (diff) | |
| parent | 7c9761b3bb52788021b5bf0eb9726af833db4074 (diff) | |
| download | nova-fbf7ab67a853d3fda2670c352f73069522495f52.tar.gz nova-fbf7ab67a853d3fda2670c352f73069522495f52.tar.xz nova-fbf7ab67a853d3fda2670c352f73069522495f52.zip | |
Merge "Fix error on invalid delete_on_termination value"
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/servers.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index c5e829d52..8288f0424 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -796,7 +796,11 @@ class Controller(wsgi.Controller): block_device_mapping = None if self.ext_mgr.is_loaded('os-volumes'): - block_device_mapping = server_dict.get('block_device_mapping') + block_device_mapping = server_dict.get('block_device_mapping', []) + for bdm in block_device_mapping: + if 'delete_on_termination' in bdm: + bdm['delete_on_termination'] = utils.bool_from_str( + bdm['delete_on_termination']) ret_resv_id = False # min_count and max_count are optional. If they exist, they may come |
