[lxc-devel] [pylxd/master] Return self on container state changes.
pcdummy on Github
lxc-bot at linuxcontainers.org
Sun Jul 24 21:08:34 UTC 2016
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 386 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160724/20996732/attachment.bin>
-------------- next part --------------
From a70d69a44c125b1160f79c8d752b7c92b5dc6979 Mon Sep 17 00:00:00 2001
From: Rene Jochum <rene at jochums.at>
Date: Sun, 24 Jul 2016 23:05:51 +0200
Subject: [PATCH] Return self on container state changes.
Signed-off-by: Rene Jochum <rene at jochums.at>
---
pylxd/container.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pylxd/container.py b/pylxd/container.py
index 3f49b32..80634c3 100644
--- a/pylxd/container.py
+++ b/pylxd/container.py
@@ -143,6 +143,10 @@ def _set_state(self, state, timeout=30, force=True, wait=False):
self.client, response.json()['operation'])
self.sync()
+ return self
+
+ return response
+
def state(self):
response = self.api.state.get()
state = ContainerState(**response.json()['metadata'])
More information about the lxc-devel
mailing list