[lxc-devel] [pylxd/master] Doc update: howto change attributes of a container

rooty0 on Github lxc-bot at linuxcontainers.org
Mon Aug 15 19:43:07 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 302 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160815/1b34eead/attachment.bin>
-------------- next part --------------
From adb9c27b2b276d4fefc8de426e9e5691614bdf4e Mon Sep 17 00:00:00 2001
From: Stan Rudenko <me at rooty.name>
Date: Mon, 15 Aug 2016 12:42:07 -0700
Subject: [PATCH] Doc update: howto change attributes of a container

---
 doc/source/containers.rst | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/doc/source/containers.rst b/doc/source/containers.rst
index 12aa035..e48af76 100644
--- a/doc/source/containers.rst
+++ b/doc/source/containers.rst
@@ -50,6 +50,7 @@ Container methods
     renamed by simply changing the name of the container as an attribute
     and calling `save`. The new name is the first argument and, as the method
     is asynchronous, you may pass `wait=True` as well.
+  - `save` - Update container's configuration
   - `state` - Get the expanded state of the container.
   - `start` - Start the container
   - `stop` - Stop the container
@@ -109,6 +110,15 @@ container.
     >>> container.delete()
 
 
+To modify container's configuration method `save` should be called after
+:class:`~container.Container` attributes changes.
+
+    >>> container = client.containers.get('my-container')
+    >>> container.ephemeral = False
+    >>> container.devices = { 'root': { 'path': '/', 'type': 'disk', 'size': '7GB'} }
+    >>> container.save
+
+
 Container Snapshots
 -------------------
 


More information about the lxc-devel mailing list