← Back to team overview

yahoo-eng-team team mailing list archive

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

 

Public bug reported:

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.

There problem is here that 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, it deletes it
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
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1369992

Title:
  "glance image-delete" CLI is not functioning as expected.

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

Bug description:
  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.

  There problem is here that 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, it deletes it
  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

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1369992/+subscriptions


Follow ups

References