nova/nova
Matt Riedemann dce8618166 Allow None for block_device_mapping_v2.boot_index
The legacy v2 API allowed None for the boot_index [1]. It
allowed this implicitly because the API code would convert
the block_device_mapping_v2 dict from the request into a
BlockDeviceMapping object, which has a boot_index field that
is nullable (allows None).

The API reference documentation [2] also says:

"To disable a device from booting, set the boot index
to a negative value or use the default boot index value,
which is None."

It appears that with the move to v2.1 and request schema
validation, the boot_index schema was erroneously set to
not allow None for a value, which is not backward compatible
with the v2 API behavior.

This change fixes the schema to allow boot_index=None again
and adds a test to show it working.

This should not require a microversion bump since it's fixing
a regression in the v2.1 API which worked in the v2 API and
is already handled throughout Nova's block device code.

Closes-Bug: #1662699

[1] https://github.com/openstack/nova/blob/13.0.0/nova/compute/api.py#L1268
[2] http://developer.openstack.org/api-ref/compute/#create-server

Change-Id: Ice78a0982bcce491f0c9690903ed2c6b6aaab1be
(cherry picked from commit e34f05edb2)
(cherry picked from commit ff1925ae47)
2017-02-09 10:33:35 -05:00
..
CA
api Allow None for block_device_mapping_v2.boot_index 2017-02-09 10:33:35 -05:00
cells Fix migration list + MigrationList operation 2016-08-15 10:05:23 -04:00
cert
cloudpipe conf: Move cloudpipe options to a group 2016-08-22 09:31:03 +01:00
cmd Let nova-manage cell_v2 commands use transport_url from CONF 2017-01-13 23:46:08 +00:00
common
compute Don't trace on ImageNotFound in delete_image_on_error 2016-12-12 10:15:36 +00:00
conductor Do not try to backport when db has older object version 2016-10-17 08:22:43 +00:00
conf Update docs for serial console support 2016-11-09 09:46:26 -05:00
console Fixed typos in nova: compute, console and conf dir 2016-08-01 21:14:32 +00:00
consoleauth
db Make build_requests.instance MediumText 2016-10-27 05:53:26 -04:00
hacking Remove hacking check [N347] for config options. 2016-08-11 14:23:21 +02:00
image Determine disk_format for volume-backed snapshot from schema 2016-09-26 14:07:20 -04:00
ipv6 Fix test_ipv6 and simplify to_global() 2016-06-28 20:42:32 +02:00
keymgr Deprecate barbican options 2016-07-29 15:36:28 -05:00
locale Imported Translations from Zanata 2016-10-24 08:48:34 +00:00
network Add a no-op wait method to NetworkInfo 2016-11-10 12:08:50 +00:00
notifications Merge "Make notification objects use flavor capacity attributes" 2016-08-06 05:58:09 +00:00
objects Instance obj_clone leaves metadata as changed 2016-11-11 21:43:11 +00:00
pci Fix crashing during guest config with pci_devices=None 2016-12-12 15:07:18 +00:00
policies Merge "Fix server operations' policies to admin only" 2016-08-11 06:07:52 +00:00
scheduler Make placement client keep trying to connect 2017-01-11 19:29:36 -05:00
servicegroup
tests Allow None for block_device_mapping_v2.boot_index 2017-02-09 10:33:35 -05:00
virt libvirt: avoid generating script with empty path 2017-01-26 11:29:54 +00:00
vnc
volume encryptors: Workaround mangled passphrases 2016-11-10 15:31:07 +00:00
wsgi
__init__.py
availability_zones.py
baserpc.py
block_device.py Allow None for block_device_mapping_v2.boot_index 2017-02-09 10:33:35 -05:00
cache_utils.py
config.py Add the ability to configure glanceclient debug logging 2016-08-04 00:32:37 +00:00
context.py Merge "Move cell message queue switching and add caching" 2016-09-01 21:49:23 +00:00
crypto.py
debugger.py Use oslo_log instead of logging 2016-05-27 12:18:32 +00:00
exception.py Throw exception if numa_nodes is not set to integer greater than 0 2016-09-09 14:53:56 +02:00
exception_wrapper.py Transform wrap_exception notification to versioned format 2016-06-21 09:39:47 +02:00
filters.py
hash_ring.py Ironic: allow multiple compute services 2016-08-04 23:51:13 +00:00
hooks.py
i18n.py
loadables.py
manager.py
policy.py Emit warning when use 'user_id' in policy rule 2016-08-29 11:46:15 +00:00
quota.py incorrect description in nova-api.log about quota check 2016-09-02 17:00:14 +09:00
rpc.py Stop overwriting thread local context in ClientRouter 2016-09-28 12:07:41 -04:00
safe_utils.py
service.py Device tagging API support 2016-06-29 20:55:16 -07:00
signature_utils.py Trivial-Fix: Fix typos 2016-06-13 06:41:08 +00:00
test.py Use StableObjectJsonFixture from o.vo 2016-08-29 11:52:10 -04:00
utils.py Merge "Properly quote IPv6 address in RsyncDriver" 2016-08-18 13:17:19 +00:00
version.py Use oslo_log instead of logging 2016-05-27 12:18:32 +00:00
weights.py
wsgi.py