Hi, I got hold of generating tokens two ways. For the benefit of future users having similar query (archiving), putting it below.
1. keystone token-get OR 2. curl -d '{"auth":{"tenantName": "tenantname", "passwordCredentials":{"username": "nik", "password": "password"}}}' -H "Content-type: application/json" http://IP:35357/v2.0/tokens Thanks Raghavendra -------------------------------------------- On Tue, 9/17/13, Raghavendra Rangrej <rrrang...@yahoo.com> wrote: Subject: Re: [Openstack] Object versioning not working To: "Clay Gerrard" <clay.gerr...@gmail.com> Cc: "openstack@lists.openstack.org" <openstack@lists.openstack.org> Date: Tuesday, September 17, 2013, 2:46 PM Hi, Thanks for the clarification. May be a different thread but I have issue generating tokens. I am using RDO all in one openstack with swift installed (with authtoken). The reason I tried swift CLI was I am not getting how to generate the auth token to give it in curl commands. With web search, whatever token I generate, I am getting unauthorized when I run command like below you gave. Any webpage, discussions or document explaining generating swift token and using it in curl can be helpful as it has blocked my work. Current set of openstack documents lack examples for using authtoken. Thanks Raghavendra -------------------------------------------- On Tue, 9/17/13, Clay Gerrard <clay.gerr...@gmail.com> wrote: Subject: Re: [Openstack] Object versioning not working To: "Raghavendra Rangrej" <rrrang...@yahoo.com> Cc: "openstack@lists.openstack.org" <openstack@lists.openstack.org> Date: Tuesday, September 17, 2013, 2:13 AM If you look at the raw API response from a HEAD on the "testing" container (maybe with curl) I think you'll see that you've set the wrong metadata key. You should set "X-Version-Location: test_cont" instead of "X-Container-Meta-X-Version-Location: test_cont" The `-m` option for `swift post` is only for setting user metadata; unfortunately it doesn't look like you can set arbitrary headers with `swift post`: https://bugs.launchpad.net/swift/+bug/1226256 I did this: curl -H 'x-auth-token: <your-auth-token-goes-here>' http://localhost:8080/v1/AUTH_test/testing -X POST -H 'x-versions-location: test_cont' -Clay On Mon, Sep 16, 2013 at 6:12 AM, Raghavendra Rangrej <rrrang...@yahoo.com> wrote: Hi, I am trying swift object versioning using swift CLIs (using swift post to change meta data). In container-server.conf, I have set the flag allow_versions = true. With CLI, I added meta data as follows: swift stat testing Account: AUTH_1335922166fb4c43a4929f4fba670f3712dw Container: testing Objects: 3 Bytes: 157 Read ACL: -v Write ACL: Sync To: Sync Key: Meta X-Versions-Location: test_cont Accept-Ranges: bytes X-Timestamp: 1379065681.40505 Content-Type: text/plain; charset=utf-8 swift stat test_cont Account: AUTH_1335922166fb4c43a4929f4fba670f3712dw Container: test_cont Objects: 3 Bytes: 42 Read ACL: Write ACL: Sync To: Sync Key: Accept-Ranges: bytes X-Timestamp: 1379066009.84224 Content-Type: text/plain; charset=utf-8 If I upload a new content of the object in testing container, I am expecting a version to be created in test_cont container. But it is not the case. I was expecting once the flag is set and meta data is changed, old versions should be stored in test_cont dirs but it is not the case Even swift restart didn't help. Any idea ? if my expectation is wrong or swift versioning has issues? I am using swift 1.4.0 version swift --version swift 1.4.0 Thanks for your time Raghavendra _______________________________________________ Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack Post to : openstack@lists.openstack.org Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack _______________________________________________ Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack Post to : openstack@lists.openstack.org Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack