>>> Also with this implementation what happens is that when the admin calls the 
>>> api without volumeid he sees all the policies 
That’s exactly what the bug CS-4109 asked for.

But yes as you point out - 
http://confluence.cloudstack.org/display/gen/3.0+API+list*+commands+changes 
says otherwise.


Alena,
Is CS 4109 moot now, considering the API policy since 3.0.x? 

-Prachi 

-----Original Message-----
From: Nitin Mehta [mailto:nore...@reviews.apache.org] On Behalf Of Nitin Mehta
Sent: Friday, July 06, 2012 4:52 PM
To: cloudstack; Prachi Damle; Likitha Shetty; Nitin Mehta
Subject: Re: Review Request: listSnapshotPolicies command, volumeId parameter 
made optional.



> On June 28, 2012, 12:21 p.m., Nitin Mehta wrote:
> > Ideally listSnapshotPolicy should be part of 
> > BaseListProjectAndAccountResourcesCmd.
> 
> Prachi Damle wrote:
>     listSnapshotPolicy cannot extend BaseListProjectAndAccountResourcesCmd, 
> since the snapshotPolicy entity does not carry the account/domain attributes. 
> Instead access checks are made to the volume to which the policy refers.

That's a fair point Prachi. But, then I think snapshotPolicy  should carry the 
account/domain entity. Figuring it out from the volume is not the right way to 
do so. This is not how we do it in CS correct ?
Also with this implementation what happens is that when the admin calls the api 
without volumeid he sees all the policies whereas he should see only HIS 
policies. wiki - 
http://confluence.cloudstack.org/display/gen/3.0+API+list*+commands+changes 
says that.
So I say that we need to introduce account and domain info in the 
snapshot_policy table and also have listSnapshotPolicy extend 
BaseListProjectAndAccountResourcesCmd.


- Nitin


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


On June 27, 2012, 6:47 a.m., Likitha Shetty wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5604/
> -----------------------------------------------------------
> 
> (Updated June 27, 2012, 6:47 a.m.)
> 
> 
> Review request for cloudstack.
> 
> 
> Description
> -------
> 
> Changes made to allow the admin to see all the the policies in the system 
> when 'listSnapshotPolicies' is executed. The optional parameter 'volumeId' 
> can be used to narrow down the search.
> 
> 
> This addresses bug CS-4109.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/api/commands/ListSnapshotPoliciesCmd.java c19924b 
>   api/src/com/cloud/storage/snapshot/SnapshotService.java 0500061 
>   server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b97a7d7 
> 
> Diff: https://reviews.apache.org/r/5604/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Likitha Shetty
> 
>

Reply via email to