[Kimchi-devel] [PATCH] Fix sample plugin configuration

Daniel H Barboza danielhb at linux.vnet.ibm.com
Mon Sep 1 20:02:05 UTC 2014


Reviewed-by: Daniel Barboza <danielhb at linux.vnet.ibm.com>

On 08/28/2014 03:52 PM, Aline Manera wrote:
> Since the authorization method changed, kimchiauth() does not accept any
> parameter. The admin methods should be listed on Collection and
> Resource elements.
>
> Signed-off-by: Aline Manera <alinefm at linux.vnet.ibm.com>
> ---
>   plugins/sample/__init__.py    | 2 ++
>   plugins/sample/sample.conf.in | 2 --
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/plugins/sample/__init__.py b/plugins/sample/__init__.py
> index 4aca4e0..10c244c 100644
> --- a/plugins/sample/__init__.py
> +++ b/plugins/sample/__init__.py
> @@ -64,12 +64,14 @@ class Circles(Collection):
>       def __init__(self, model):
>           super(Circles, self).__init__(model)
>           self.resource = Circle
> +        self.admin_methods = ['POST', 'PUT']
>
>
>   class Rectangles(Collection):
>       def __init__(self, model):
>           super(Rectangles, self).__init__(model)
>           self.resource = Rectangle
> +        self.admin_methods = ['POST', 'PUT']
>
>
>   class Circle(Resource):
> diff --git a/plugins/sample/sample.conf.in b/plugins/sample/sample.conf.in
> index 6e0908b..cf42467 100644
> --- a/plugins/sample/sample.conf.in
> +++ b/plugins/sample/sample.conf.in
> @@ -17,8 +17,6 @@ tools.kimchiauth.on = True
>
>   [/rectangles]
>   tools.kimchiauth.on = True
> -tools.kimchiauth.admin_methods = ['POST', 'PUT']
>
>   [/circles]
>   tools.kimchiauth.on = True
> -tools.kimchiauth.admin_methods = ['POST', 'PUT']




More information about the Kimchi-devel mailing list