The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/pylxd/pull/417

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
This solves issue #405 as I ran into the same problem and assumed that I need to implement the delete myself.
 
Signed-off-by: Felix Engelmann <fe-git...@nlogn.org>
From 4063d03f52e412b3367e596d958cfd9309f9f87e Mon Sep 17 00:00:00 2001
From: Felix Engelmann <fe-git...@nlogn.org>
Date: Thu, 19 Nov 2020 23:29:23 +0100
Subject: [PATCH] Documentation for Image deletion

Signed-off-by: Felix Engelmann <fe-git...@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)
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to