Details
Description
Volume gets created with the size mentioned in the custom disk offering
Steps to reproduce:
==============
1.Bring up cs with latest build
2.Create custom disk offering with disk size say 2
3.Create data disk using this offering and provide disk size as 1 while creating data disk
Expected Result:
==============
Since the disk offering is of type custom , volume should be created with size given during volume creation instead of taking it from the disk offering.
If the disk offering is custom then the volume creation must ignore the size given in the offering and should create volume with size provide while creating volume.
Actual Result:
===========
Disk got created with size mentioned in disk offering rather than the size given during volume creation time.
Observations:
===========
http://10.147.38.153:8096/client/api?command=createDiskOffering&isMirrored=false&name=custom&displaytext=custom&storageType=shared&cacheMode=none&provisioningType=thin&customized=true&disksize=2
{ "creatediskofferingresponse" : { "diskoffering" :
} }
{ "queryasyncjobresultresponse" : {"accountid":"638d4e82-341f-11e4-a4c9-06097e000023","userid":"638d5ddc-341f-11e4-a4c9-06097e000023","cmd":"org.apache.cloudstack.api.command.admin.volume.CreateVolumeCmdByAdmin","jobstatus":1,"jobprocstatus":0,"jobresultcode":0,"jobresulttype":"object","jobresult":{"volume":{"id":"42f24df4-b4ae-4b4c-80ce-ea1b5daf12bd","name":"custom","zoneid":"2c67c83e-b8c3-42d0-a37b-b37287ac84dd","zonename":"zone1","type":"DATADISK","provisioningtype":"thin","size":2147483648,"created":"2014-09-12T23:34:32+0530","state":"Allocated","account":"admin","domainid":"2caca782-341f-11e4-a4c9-06097e000023","domain":"ROOT","storagetype":"shared","hypervisor":"None","diskofferingid":"2ddb8b79-9592-4b8c-8bd9-3d32c582873b","diskofferingname":"custom","diskofferingdisplaytext":"custom","destroyed":false,"isextractable":true,"tags":[],"displayvolume":true,"quiescevm":false,"jobid":"edf1a066-63b0-400b-bf15-4f77bf659206","jobstatus":0}},"jobinstancetype":"Volume","jobinstanceid":"42f24df4-b4ae-4b4c-80ce-ea1b5daf12bd","created":"2014-09-12T23:34:32+0530","jobid":"edf1a066-63b0-400b-bf15-4f77bf659206"} }