[openstack-dev] [Cinder] about policy.json in unit test
Adam Young
ayoung at redhat.com
Wed May 21 15:12:30 UTC 2014
On 05/20/2014 09:39 PM, Bohai (ricky) wrote:
>
> Thanks for your explanation.
>
> I think the implement in nova maybe is a good reference.
>
> I have filed it to a blueprint.
>
> https://blueprints.launchpad.net/cinder/+spec/united-policy-in-cinder
>
Would like to load policy from the policy store in Keystone. We need
"load policy for Endpoint" in order to make it usable, and some way for
an endpoint to know its own id.
>
> Ricky.
>
> *From:*Christopher Yeoh [mailto:cbkyeoh at gmail.com]
> *Sent:* Monday, May 19, 2014 3:44 PM
> *To:* OpenStack Development Mailing List (not for usage questions)
> *Subject:* Re: [openstack-dev] [Cinder] about policy.json in unit test
>
> On Mon, May 19, 2014 at 1:14 AM, Mike Perez <thingee at gmail.com
> <mailto:thingee at gmail.com>> wrote:
>
> On 02:04 Tue 29 Apr , Bohai (ricky) wrote:
> > Hi stackers,
> >
> > I found there are two "policy.json" files in cinder project.
> > One is for source code(cinder/etc/policy.json), another is for the
> unit test(cinder/cinder/tests/policy.json).
> >
> > Maybe it's better to united them and make the unit test to use the
> "policy.json" file in the source code:
> > 1. "policy.json" in the source code is really what we want to test
> but not the one in unit test.
> > 2. It's more convenient for the developers, because of only need to
> modify one policy.json file.
> > Current it's easy to miss one of them.
> >
> > Any advices?
>
> Seems like the right direction. Don't know why they were separate to begin
> with.
>
> Nova has the same issue so its probably just historical. I'm not
> familiar with the cinder policy files, but for
> Nova the default policy settings are different for the real policy
> file versus the one used for the unittests
>
> and the unittests rely on this. So there's likely there will need to
> be some cleanup required to use just one policy file
>
> and may complicate the unittests a bit more. But overall sounds like a
> good idea just to have one policy file.
>
> Chris
>
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140521/f9373eab/attachment.html>
More information about the OpenStack-dev
mailing list