← Back to team overview

openstack team mailing list archive

Re: [Horizon][Swift]Cloudfile API

 

Hi Ke Wu,

Unfortunately the Swift API doesn't offer any way of filtering. The
'prefix' parameter is as good as it gets.

Adrian


On 11 June 2012 21:18, Ke Wu <ke.wu@xxxxxxxx> wrote:
> 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@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp


References