Comment 1 for bug 1624700

Revision history for this message
Akihiro Motoki (amotoki) wrote :

After investigating this issue, it turns out it is more complex than I thought.

To retrieve all images from all tenants, is_public=None needs to be specified in Glance API v1. On the other hand, Glance API v2 returns all images from all tenants if a caller has admin privilege.

The error I reported occurs when Glance v2 API is used.

The cause is list-function-extra-params="{is_public: 'None'}" specified in openstack_dashboard/static/app/core/images/admin-panel.html.
If we consider glance v2 API only, the diff below will fix the problem.

---
diff --git a/openstack_dashboard/static/app/core/images/images.module.js b/openstack_dashboard/static/app/core/images/images.module.js
index e708291..2ead08e 100644
--- a/openstack_dashboard/static/app/core/images/images.module.js
+++ b/openstack_dashboard/static/app/core/images/images.module.js
@@ -303,7 +303,7 @@
     });

     $routeProvider.when('/admin/images', {
- templateUrl: path + 'admin-panel.html'
+ templateUrl: path + 'panel.html'
     });

     function goToAngularDetails(params) {

--

Unfortunately, this solution does not work for Glance v1 API.

I am not sure where should be changed to fix this bug.
To handle this bug, the logic needs to know which image API version is used.
The server side logic looks suitable to fix this issue, but at now the client side code handles v1/v2 differences.

Thought?