filter on image name should not use exact name
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Won't Fix
|
Low
|
Wlodzimierz Borkowski |
Bug Description
Horizon passes name filter into glanceclient is like name=cirros. cirros is the partial name of the cirros-
The original bug reported in horizon like the following...after more digging, I moved the bug into glanceclient.
"at Admin-> Images
The filter on Image Name has to be exact the same as the image name. If I have the image names like the followings, it could be hard and not user friendly:
Fedora-
cirros-
Think the image name filter should do the same way as instances table's instance name filter which uses contains, not the exact match."
Changed in horizon: | |
assignee: | nobody → Gloria Gu (gloria-gu) |
affects: | horizon → python-glanceclient |
description: | updated |
Changed in python-glanceclient: | |
assignee: | Gloria Gu (gloria-gu) → nobody |
no longer affects: | horizon |
Changed in python-glanceclient: | |
assignee: | nobody → Wlodzimierz Borkowski (woodbor) |
I think this is more of glanceclient issue than horizon issue. Need more dig.
in glanceclient v1/images.py
def list(self, **kwargs):
.....
filters = kwargs. get('filters' , {}) pop('properties ', {})
params[ 'property- %s' % key] = value
params. update( filters) -- line 241
properties = filters.
for key, value in properties.items():
here filters has name=cirros
line 195 detail? %s' % urlparse. urlencode( qp)
url = '/v1/images/
images, resp = self._list(url, "images")
'/v1/images/ detail? sort_key= created_ at&sort_ dir=desc& limit=21& name=cirros& is_public= None'