[lxc-devel] [pylxd/master] Documentation for Image deletion

felix-engelmann on Github lxc-bot at linuxcontainers.org
Thu Nov 19 22:31:28 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 468 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201119/3050eb09/attachment.bin>
-------------- next part --------------
From 4063d03f52e412b3367e596d958cfd9309f9f87e Mon Sep 17 00:00:00 2001
From: Felix Engelmann <fe-github at nlogn.org>
Date: Thu, 19 Nov 2020 23:29:23 +0100
Subject: [PATCH] Documentation for Image deletion

Signed-off-by: Felix Engelmann <fe-github at nlogn.org>
---
 doc/source/images.rst | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/doc/source/images.rst b/doc/source/images.rst
index 0011d654..5b7c5f85 100644
--- a/doc/source/images.rst
+++ b/doc/source/images.rst
@@ -61,6 +61,7 @@ Image methods
   - `add_alias` - Add an alias to the image.
   - `delete_alias` - Remove an alias.
   - `copy` - Copy the image to another LXD client.
+  - `delete` - Deletes the image.
 
 Examples
 --------
@@ -97,3 +98,13 @@ you may also want to `wait=True`.
     >>> image = client.images.create(image_data, public=True, wait=True)
     >>> image.fingerprint
     'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
+
+
+Finally, delete an image. As this is an asynchonous operation,
+you may also want to `wait=True`.
+
+.. code-block:: python
+
+    >>> image = client.images.get(
+    ...     'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855')
+    >>> image.delete(wait=True)


More information about the lxc-devel mailing list