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

Aline Manera alinefm at linux.vnet.ibm.com
Fri Jan 30 14:35:11 UTC 2015


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 at 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):




More information about the Kimchi-devel mailing list