> On Aug. 13, 2012, 10:40 a.m., Nitin Mehta wrote:
> > api/src/com/cloud/api/commands/ListDiskOfferingsCmd.java, line 85
> > <https://reviews.apache.org/r/6523/diff/1/?file=137562#file137562line85>
> >
> >     This is not going to solve the problem everywhere. This disk offering 
> > can be used during deploy vm or create volume command and you are not 
> > restricting him there using API. I think before we go down any path to 
> > solve the issue its important to list all the solutions possible with their 
> > pros and cons and then take one which seems the most appropriate.

I agree, but since we're using this default custom disk offering only when 
uploading volumes.

See 
http://bugs.cloudstack.org/browse/CS-14926?focusedCommentId=138758&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-138758

Pros/Cons I came up with, add/edit/delete:

>1. Have a separate column in disk_offering table and use this info to 
>distinguish between offerings that are for CS internal use.
Pros: Easy to implement. Could be made generic, for all kinds of offerings.
Cons: May break upgrades? May not be a good idea for maintenance and future 
extension

>2. No need of such an offering
Since, it a special case remove it. When a user/admin uploads a VM, the HTTP 
POST request contains the size of the file that is being uploaded.
Instead of linking it with CustomDisk offering, have a UploadDisk (change 
name/params) offering that is used internally and is a different kind of 
disk/offering and we have only one such diskoffering (not create such offering 
for each uploaded volumes, but rather have one for all uploaded volumes only.)
Pros/cons: discuss.

>3. Just don't send info to clients when they make list disk offering api.
Pros: The current patch fixes the listings
Cons: Not elegant solution


- Rohit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/6523/#review10196
-----------------------------------------------------------


On Aug. 10, 2012, 1:58 p.m., Rohit Yadav wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/6523/
> -----------------------------------------------------------
> 
> (Updated Aug. 10, 2012, 1:58 p.m.)
> 
> 
> Review request for cloudstack and Nitin Mehta.
> 
> 
> Description
> -------
> 
>     Bugfix: CS-14926 Do not show default custom disk offering
>     
>     Fixes CS-14926 by not sending default Custom disk offering in API response
>     Without disk offering info client won't be able to use this information.
>     
>     Admin can create new disk offering with custom disk size enabled, if such 
> a
>     disk offering is needed.
> 
> Follow discussion on: http://bugs.cloudstack.org/browse/CS-14926
> 
> Download original patch: http://patchbin.baagi.org/p?id=aoqfqk
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/api/commands/ListDiskOfferingsCmd.java fbf655d 
> 
> Diff: https://reviews.apache.org/r/6523/diff/
> 
> 
> Testing
> -------
> 
> Works for me!
> 
> 
> Thanks,
> 
> Rohit Yadav
> 
>

Reply via email to