From f75c50298775cd24ace535a6f1a3facac3d2a52b Mon Sep 17 00:00:00 2001 From: vanzhiganov Date: Wed, 12 Oct 2016 03:18:49 +0300 Subject: [PATCH] fix --- SWSCloudNode/compute/lxc/lxc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SWSCloudNode/compute/lxc/lxc.py b/SWSCloudNode/compute/lxc/lxc.py index e23be83..25339d5 100644 --- a/SWSCloudNode/compute/lxc/lxc.py +++ b/SWSCloudNode/compute/lxc/lxc.py @@ -71,7 +71,7 @@ class LXC(object): def __init__(self): logging.debug("") - def list(self, status=None): + def list_containers(self, status=None): """ :return: ['container_first', 'container_second'] """ @@ -89,7 +89,7 @@ class LXC(object): """ checks if a given container is defined or not """ - if name in self.list(): + if name in self.list_containers(): return True return False @@ -100,7 +100,7 @@ class LXC(object): if not self.exists(name): raise ContainerNotExists("The container (%s) does not exist!" % name) - if name in self.list("running"): + if name in self.list_containers("running"): raise ContainerAlreadyRunning('The container %s is already started!' % name) cmd = ['lxc-start', '-n', name, '-d']