yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #23737
[Bug 1369992] Re: "glance image-delete" CLI is not functioning as expected.
Hi after checked in the code, there is:
def _get_images(self, context, filters, **params):
"""Get images, wrapping in exception if necessary."""
# NOTE(markwash): for backwards compatibility, is_public=True for
# admins actually means "treat me as if I'm not an admin and show me
# all my images"
if context.is_admin and params.get('is_public') is True:
params['admin_as_user'] = True
del params['is_public']
So it's glance (sorry for inconveniences). Do you work as admin account
? Because there is note: for backwards compatibility, is_public=True
for admins actually means "treat me as if I'm not an admin and show me
all my images. Checked for non admin account and works as defined (split
public and non public)
** Project changed: python-glanceclient => glance
--
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.
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1369992/+subscriptions
References