← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1369992] [NEW] "glance image-delete" CLI is not functioning as expected.

 

You have been subscribed to a public bug:

Below are the help content of Glance image delete-

$ glance help image-delete
usage: glance image-delete <IMAGE> [<IMAGE> ...]

Delete specified image(s).

Positional arguments:
  <IMAGE>  Name or ID of image(s) to delete.

Here were can pass Name or ID of image to delete.

The problem is here-
if I am trying to delete a non public image  through its name, it returns below message -
"No image with a name or ID of '<image-name>' exists"

while if I am passing "ID" of non public image(instead of name), it
deletes image successfully.

JFYI-
In the case of public image, CLI works as expected for "Name" and "ID" both.

Below are the command execution logs-

$ glance image-list --is-public="False"
+--------------------------------------+------------------+-------------+------------------+----------+--------+
| ID                                   | Name             | Disk Format | Container Format | Size     | Status |
+--------------------------------------+------------------+-------------+------------------+----------+--------+
| 37adaa79-7b09-4d65-abb2-7d8848447ddb | Cirros 0.3.1     | qcow2       | bare             | 13147648 | active |
| c5566731-e9a5-4b63-b409-813f9d83fb40 | test13           | vmdk        | ovf              |          | queued |
+--------------------------------------+------------------+-------------+------------------+----------+--------+

$ glance image-delete test13
No image with a name or ID of 'test13' exists

$ glance image-list --is-public="False"
+--------------------------------------+------------------+-------------+------------------+----------+--------+
| ID                                   | Name             | Disk Format | Container Format | Size     | Status |
+--------------------------------------+------------------+-------------+------------------+----------+--------+
| 37adaa79-7b09-4d65-abb2-7d8848447ddb | Cirros 0.3.1     | qcow2       | bare             | 13147648 | active |
| c5566731-e9a5-4b63-b409-813f9d83fb40 | test13           | vmdk        | ovf              |          | queued |
+--------------------------------------+------------------+-------------+------------------+----------+--------+

$ glance image-delete c5566731-e9a5-4b63-b409-813f9d83fb40

$ glance image-list --is-public="False"
+--------------------------------------+------------------+-------------+------------------+----------+--------+
| ID                                   | Name             | Disk Format | Container Format | Size     | Status |
+--------------------------------------+------------------+-------------+------------------+----------+--------+
| 37adaa79-7b09-4d65-abb2-7d8848447ddb | Cirros 0.3.1     | qcow2       | bare             | 13147648 | active |
+--------------------------------------+------------------+-------------+------------------+----------+--------+

$ glance --version
0.12.0

** Affects: glance
     Importance: Undecided
     Assignee: Wlodzimierz Borkowski (woodbor)
         Status: New

-- 
"glance image-delete" CLI is not functioning as expected.
https://bugs.launchpad.net/bugs/1369992
You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to Glance.


References