1. Create volume type of thick/thin/eagerzeroedthick , these are the types vmware supports.
2. Set the vmware extra specs to the volume type created in step1.
3. While doing step 2, instead of passing the valid types in the extra spec list [i.e, thin, thick, or eagerZeroedThick], pass any argument here, the command is successful.
As vmware does not support other than above mentioned types in the extra spec list, this should be handled and thrown error.
$ cinder type-key ef9e6393-0aa7-4e0c-a9c9-86e3e61c3642 set vmware:vmdk_type=thi23
$ cinder type-list
+--------------------------------------+-------+
| ID | Name |
+--------------------------------------+-------+
| 93fec469-4ed6-41f5-9add-db09ef926a54 | thin |
| ef9e6393-0aa7-4e0c-a9c9-86e3e61c3642 | thick |
+--------------------------------------+-------+
$ cinder type-key ef9e6393-0aa7-4e0c-a9c9-86e3e61c3642 set vmware:vmdk_type=thi23
$ cinder extra-specs-list
+--------------------------------------+-------+----------------------------------+
| ID | Name | extra_specs |
+--------------------------------------+-------+----------------------------------+
| 93fec469-4ed6-41f5-9add-db09ef926a54 | thin | {u'vmware:vmdk_type': u'tin123'} |
| ef9e6393-0aa7-4e0c-a9c9-86e3e61c3642 | thick | {u'vmware:vmdk_type': u'thi23'} | -->
there is no check here for the vmdk_type,
+--------------------------------------+-------+----------------------------------+
Thanks
Pavan
Similar behavior observed for type clone also.
vmware supports clone types : full and linked, where as i can add full1 , linked123 to the extra spec list
subbu@devstack- controller: ~/devstack$ cinder extra-specs-list ------- ------- ------- ------- ----+-- ------- ----+-- ------- ------- ------- ------- ------- -+ ------- ------- ------- ------- ----+-- ------- ----+-- ------- ------- ------- ------- ------- -+ d87c-462b- bdb7-a2ebf3303c 8e | full_clone1 | {u'vmware: clone_type' : u'full1'} | 7fbe-446f- b520-5f1bab5191 29 | link_clone | {u'vmware: clone_type' : u'linked123'} | 3d06-4fb8- aaf9-5c634392f8 fd | full_clone | {u'vmware: clone_type' : u'full'} | 4ed6-41f5- 9add-db09ef926a 54 | thin | {u'vmware: vmdk_type' : u'tin123'} | 1eb5-4fad- 841f-7e66eaaec0 b0 | fast_clone1 | {u'vmware: clone_type' : u'linked'} | 0aa7-4e0c- a9c9-86e3e61c36 42 | thick | {u'vmware: vmdk_type' : u'thi23'} | ------- ------- ------- ------- ----+-- ------- ----+-- ------- ------- ------- ------- ------- -+
+------
| ID | Name | extra_specs |
+------
| 39d06839-
| 3f397d83-
| 5de1c9b5-
| 93fec469-
| a7ccc6d9-
| ef9e6393-
+------