Hi Wu Ke, It seems that there is no such kind of full filter feature in Swift API. You have to implement it as a seperate component by yourself. But you can look at Glance image API to see how to implement it since Glance are using Swift to store VM images with Registry and Query features. Specifically you can refer to image-list API. Another suggestion, you need to think about indexing capability since the container will most likely contain millions of objects. If the filtering is based on the full set of objects, it is challenging for performance.
Best Regards, Edward Zhang(张华) 地址:北京市海淀区东北旺西路8号 中关村 Staff Software Engineer 软件园28号楼 环宇大厦3层 邮编:100193 Travel&Transportation Standards Address: 3F Ring, Building 28 Emerging Technology Institute(ETI) Zhongguancun Software Park, 8 IBM China Software Development Lab Dongbeiwang West Road, Haidian e-mail: zhu...@cn.ibm.com District, Beijing, P.R.C.100193 Notes ID: Hua ZZ Zhang/China/IBM Tel: 86-10-82450483 Ke Wu <ke...@ibeca.me> Sent by: To openstack-bounces openstack@lists.launchpad.net +zhuadl=cn.ibm.co cc m@lists.launchpad .net Subject [Openstack] [Horizon][Swift]Cloudfile API 2012-06-12 04:18 Hi everyone, I am currently working on the Horizon's Swift containers/objects dashboard. On the dashboard user could retrieve, upload and delete objects which are in a Swift container. I tried to use Cloud File's Python API to connect to a Swift container and retrieve the objects, it all worked well. However, when I headed to implement filtering object function, I couldn't found a "Filter API" provided natively. The get_objects function of the Container object in the API does have a "prefix" parameter to allow me do some basic filter, but it's far from enough for a full functional filter. So what I am doing now is to retrieve a list of objects by get_objects method and filter the objects by name. This method is a bad hack, would lead to many problems such as breaking pagination, or too much resource consuming if the objects list is long. Was I missing some APIs? Or is there any other way that I can do this? Any thoughts would be helpful. Please kindly spare any spelling/grammar errors :) Thanks a lot! -Ke Wu _______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
<<inline: 45837058.gif>>
<<inline: ecblank.gif>>
<<inline: graycol.gif>>
<<inline: pic15616.gif>>
_______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp