← Back to team overview

openstack team mailing list archive

[Horizon][Swift]Cloudfile API

 

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




Follow ups