Comment 3 for bug 1574991

Revision history for this message
Cyril Roelandt (cyril-roelandt) wrote :

You could always quote the member id:
$ glance member-list --image-id 726a66c5-70fd-456e-b6e9-278a83b47918
+--------------------------------------+--------------+---------+
| Image ID | Member ID | Status |
+--------------------------------------+--------------+---------+
| 726a66c5-70fd-456e-b6e9-278a83b47918 | fdsae#$%^^da | pending |
+--------------------------------------+--------------+---------+
$ glance member-delete 726a66c5-70fd-456e-b6e9-278a83b47918 fdsae%23%24%25%5E%5Eda
$ glance member-list --image-id 726a66c5-70fd-456e-b6e9-278a83b47918
+----------+-----------+--------+
| Image ID | Member ID | Status |
+----------+-----------+--------+
+----------+-----------+--------+

The OpenStack Client does not allow a "bad" ID to be used:

$ openstack image add project 726a66c5-70fd-456e-b6e9-278a83b47918 fake-tenant-id
No project with a name or ID of 'fake-tenant-id' exists.

The problem with that is that if a project is deleted, then its membership cannot be removed from an image.

The question is: should the Glance Client check the validity of project IDs or should we trust the user?