Check source_type and destination_type when booting with bdm provided
When booting instance with block_device_mapping provided,
in the current implementation, the "destination_type" is
allowed to be None, and this lead to un-sync between Nova
and Cinder: Nova will have a bdm in its record while the
volume is still in "available" status in cinder.
Also we should check source_type here
This patch adds a check for source_type and
destination_type, source_type shoud be within
'volume', 'image', 'snapshot' or 'blank';
When empty destination_type is provided, it
will be assigned to an default value according
to source_type, if it is provided with a wrong
value, command error will raise and information
will shown.
Reviewed: https:/ /review. openstack. org/402364 /git.openstack. org/cgit/ openstack/ python- novaclient/ commit/ ?id=a58959dd9ec 3962cbb6d273f13 6286809678b0c4
Committed: https:/
Submitter: Jenkins
Branch: master
commit a58959dd9ec3962 cbb6d273f136286 809678b0c4
Author: Kevin_Zheng <email address hidden>
Date: Fri Nov 25 16:55:18 2016 +0800
Check source_type and destination_type when booting with bdm provided
When booting instance with block_device_ mapping provided,
in the current implementation, the "destination_type" is
allowed to be None, and this lead to un-sync between Nova
and Cinder: Nova will have a bdm in its record while the
volume is still in "available" status in cinder.
Also we should check source_type here
This patch adds a check for source_type and _type, source_type shoud be within
destination
'volume', 'image', 'snapshot' or 'blank';
When empty destination_type is provided, it
will be assigned to an default value according
to source_type, if it is provided with a wrong
value, command error will raise and information
will shown.
Change-Id: If6c7d8ed58a94d 262ac6c300e75ac a4cdf99ff1d
partial-bug: #1644725