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

Aline Manera alinefm at linux.vnet.ibm.com
Thu Aug 28 18:52:38 UTC 2014


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']
-- 
1.9.3




More information about the Kimchi-devel mailing list