Check type argument on create from source and snap
Currently the create from snap and create from source
options will set the volume-type when specified in the
create call.
This is actually wrong, because clone and create from snap
MUST be performed on the same backend as the parent volume. The
result is that if the specified type doesn't match the specs for
it's parent, and actually needs to be on a different backend
the new volume will "appear" to have the correct type, but it's
actually invalid.
The --volume-type argument should be rejected when --source-volid
or --snapshot-id are used, and the parent type-id just picked up
and used. Then the user can retype if desired.
Auto failing this strictly causes backward compatability issues though
so we'll just check for a mismatch and raise an exception in that case.
This way if the user knows what they're doing and they're explicit
in the command we still allow it and things are fine.
Change-Id: Ia822cfe48a948045ccea6533bcf92e68ed97ef37
Closes-Bug:
1276787