[Openstack] can swift create child container?

Kyle Kelley rgbkrk at gmail.com
Sat Aug 31 02:01:49 UTC 2013


pangj,

The object names (full "path" so to speak) are actually just keys in the
key-value sense.

Depending on how you are accessing the objects, just make

Let's say you're using python-swiftclient to post an object

Instead of
put_object(*container*, *"myobject"*, *contents*)

Make the key/directory "mydir" come before "myobject"
put_object(*container*, *"mydir/myobject"*, *contents*)

Ok, so this isn't a subcontainer. It's really just organization of your
object blobs in directory like structure (there are no actual directories
in swift, even if the UI you might be using presents it that way).

Hope this helps,

Kyle Kelley


On Fri, Aug 30, 2013 at 8:41 PM, pangj <pangj at laposte.net> wrote:

> I know for swift the sotrage url could be:
> http://swift.example.com:8080/AUTH_user/myfiles/myobject
>
> But if I want a subdir under the container, for example,
> http://swift.example.com:8080/AUTH_user/myfiles/mydir/myobject
>
> How will we do this?
>
> Thanks.
>
> _______________________________________________
> Mailing list:
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe :
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20130830/cb55f4d2/attachment.html>


More information about the Openstack mailing list