[Kimchi-devel] [PATCH 4/4] Transient StoragePool POST request handling

Christy Perez christy at linux.vnet.ibm.com
Tue Jan 27 18:39:10 UTC 2015


Set the Deactivate action as a destructive one so that the GET
will not be called for transient storage pools afterward.

Signed-off-by: Christy Perez <christy at linux.vnet.ibm.com>
---
 src/kimchi/control/storagepools.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/kimchi/control/storagepools.py b/src/kimchi/control/storagepools.py
index 872ad04..ba388e8 100644
--- a/src/kimchi/control/storagepools.py
+++ b/src/kimchi/control/storagepools.py
@@ -19,7 +19,6 @@
 
 import cherrypy
 
-
 from kimchi.control.base import Collection, Resource
 from kimchi.control.storagevolumes import IsoVolumes, StorageVolumes
 from kimchi.control.utils import get_class_name, model_fn
@@ -79,7 +78,8 @@ def __init__(self, model, ident):
         self.admin_methods = ['PUT', 'POST', 'DELETE']
         self.uri_fmt = "/storagepools/%s"
         self.activate = self.generate_action_handler('activate')
-        self.deactivate = self.generate_action_handler('deactivate')
+        self.deactivate = self.generate_action_handler('deactivate',
+            destructive=True)
         self.storagevolumes = StorageVolumes(self.model, ident)
 
     @property
-- 
1.9.3




More information about the Kimchi-devel mailing list