Set the Deactivate action as a destructive one so that the GET
will not be called for transient networks afterward.
Signed-off-by: Christy Perez <christy(a)linux.vnet.ibm.com>
---
src/kimchi/control/networks.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/kimchi/control/networks.py b/src/kimchi/control/networks.py
index 7cb1572..22fc3bb 100644
--- a/src/kimchi/control/networks.py
+++ b/src/kimchi/control/networks.py
@@ -20,7 +20,6 @@
from kimchi.control.base import Collection, Resource
from kimchi.control.utils import UrlSubNode
-
@UrlSubNode('networks', True)
class Networks(Collection):
def __init__(self, model):
@@ -37,7 +36,8 @@ def __init__(self, model, ident):
self.admin_methods = ['PUT', 'POST', 'DELETE']
self.uri_fmt = "/networks/%s"
self.activate = self.generate_action_handler('activate')
- self.deactivate = self.generate_action_handler('deactivate')
+ self.deactivate = self.generate_action_handler('deactivate', \
+ destructive=True)
@property
def data(self):
--
1.9.3