Add backend validation for volume type extra spec options

Registered by Vipin Balachandran on 2016-01-20

Currently the extra spec options in volume type are not validated by backend drivers while creating or editing it. Different backends validate the extra spec options during volume create or attach depending on the option. For example, the VMware VMDK driver supports the extra spec option 'vmware:storage_profile' which specifies the storage policy to be associated with the volume in vCenter server. If the storage policy mentioned by the admin is invalid, an error is thrown by the VMDK driver during volume creation. In this case, the user experience can be improved if the backend can validate the storage policy in vCenter server before persisting the extra spec option.

This blueprint proposes the following changes so that the backend drivers are given a chance to validate the extra spec options in volume type during its creation or update:

* If an extra spec option is added or updated, and if the volume_backend_name is specified in the volume type, then call the driver corresponding to the volume_backend_name to validate the extra spec option. If volume_backend_name is not set, then call all configured drivers to validate the extra spec option.

* If the extra spec option is invalid, then the driver throws an error.

* If at least one driver returns an error during validation, then display an error message, otherwise persist the change.

Blueprint information

Status:
Not started
Approver:
Sean McGinnis
Priority:
Low
Drafter:
Vipin Balachandran
Direction:
Approved
Assignee:
Vipin Balachandran
Definition:
Approved
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/volume-type-extra-spec-validation,n,z

Addressed by: https://review.openstack.org/318576
    Backend validation for extra spec options

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.