
Question: does libvirt supports delete a non-persistent network or storage pool? Is that restriction only for guests? On 27/01/2015 16:39, Christy Perez wrote:
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@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):