[Openstack] [Horizon][Swift]Cloudfile API

Hua ZZ Zhang zhuadl at cn.ibm.com
Tue Jun 12 09:15:35 UTC 2012


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: zhuadl at cn.ibm.com             District, Beijing, P.R.C.100193       
 Notes ID: Hua ZZ Zhang/China/IBM                                            
 Tel: 86-10-82450483                                                         
                                                                             
                                                                             
                                                                             
                                                                             
                                                                             
                                                                             
                                                                             





                                                                           
             Ke Wu                                                         
             <ke.wu at ibeca.me>                                              
             Sent by:                                                   To 
             openstack-bounces         openstack at lists.launchpad.net       
             +zhuadl=cn.ibm.co                                          cc 
             m at 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 at lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120612/35295756/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 45837058.gif
Type: image/gif
Size: 1279 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120612/35295756/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120612/35295756/attachment-0001.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120612/35295756/attachment-0002.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pic15616.gif
Type: image/gif
Size: 1255 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120612/35295756/attachment-0003.gif>


More information about the Openstack mailing list