<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Shashidhar,<div><br></div><div>PS -> had to remove your original post in the email due to a 40KB message body limitation on the list. </div><div><br></div><div>I'm don't think the java-cloudfiles API currently works with openstack-swift authentication system. I tried to use the latest version 1.8.1 and also 1.8.0 but was encountering other problems that was prohibiting me from even reaching my openstack-swift SAIO system. </div><div><br></div><div>So I decided to give it a try on an older version I already had installed (1.5.3 ... I know it's old)  ...  </div><div><br></div><div>Problem #1 : Using SSL with java sucks .. </div><div><span class="Apple-tab-span" style="white-space: pre; ">     </span>I didn't feel like troubleshooting java keytool, so I changed my SAIO setup to no longer use SSL in my proxy-server. </div><div><br></div><div>Problem #2: Had to hack two files in order to make authentication work</div><div><br></div><div>FILE #1 = src/main/java/com/rackspacecloud/client/cloudfiles/FilesClient.java</div><div>--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div><div><div>377-openstack/src/main/java/com/rackspacecloud/client/cloudfiles/FilesClient.java  </div><div>--- rackspace-java-cloudfiles-0ce9377/src/main/java/com/rackspacecloud/client/cloudfiles/FilesClient.java       2010-02-08 17:46:42.000000000 -0600</div><div>+++ rackspace-java-cloudfiles-0ce9377-openstack/src/main/java/com/rackspacecloud/client/cloudfiles/FilesClient.java     2011-04-09 21:36:32.110095891 -0500</div><div>@@ -115,8 +115,10 @@</div><div>         this.username = username;</div><div>         this.password = password;</div><div>         this.account = account;</div><div>+</div><div>         if (account != null && account.length() > 0) {</div><div>-               this.authenticationURL = FilesUtil.getProperty("auth_url")+VERSION+"/"+account+FilesUtil.getProperty("auth_url_post");</div><div>+               this.authenticationURL = FilesUtil.getProperty("auth_url");</div><div>+            this.username = account+":"+username;</div><div>         }</div><div>         else {</div><div>                this.authenticationURL = FilesUtil.getProperty("auth_url");</div><div>@@ -192,7 +194,7 @@</div><div>     {</div><div>         this.account = account;</div><div>         if (account != null && account.length() > 0) {</div><div>-               this.authenticationURL = FilesUtil.getProperty("auth_url")+VERSION+"/"+account+FilesUtil.getProperty("auth_url_post");</div><div>+               this.authenticationURL = FilesUtil.getProperty("auth_url");</div><div>         }</div><div>         else {</div><div>                this.authenticationURL = FilesUtil.getProperty("auth_url");</div></div><div><br></div><div>--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div><div><br></div><div>FILE #2 = src/main/java/com/rackspacecloud/client/cloudfiles/FilesResponse.java</div><div><div>--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div></div><div>e9377-openstack/src/main/java/com/rackspacecloud/client/cloudfiles/FilesResponse.java </div><div><div>--- rackspace-java-cloudfiles-0ce9377/src/main/java/com/rackspacecloud/client/cloudfiles/FilesResponse.java     2010-02-08 17:46:42.000000000 -0600</div><div>+++ rackspace-java-cloudfiles-0ce9377-openstack/src/main/java/com/rackspacecloud/client/cloudfiles/FilesResponse.java   2011-04-09 20:56:22.826095729 -0500</div><div>@@ -51,7 +51,8 @@</div><div>        if (getStatusCode() == HttpStatus.SC_UNAUTHORIZED )</div><div>                return false;</div><div> </div><div>-       if (getStatusCode() == HttpStatus.SC_NO_CONTENT)    </div><div>+       /* Marcelo if (getStatusCode() == HttpStatus.SC_NO_CONTENT)    */</div><div>+       if (getStatusCode() == HttpStatus.SC_OK)    </div><div>                return true;</div><div> </div><div>        return false;   </div></div><div><div>--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div></div><div><br></div><div>Once I was done with modifying the files I compiled it with "ant compile"</div><div><br></div><div>Then I  created my "cloudfiles.properties" file </div><div><div>----------------------------------------------------------------------------------------------</div><div>version=v1</div><div>connection_timeout=5000</div></div><div><br></div><div><div># Auth info</div><div>auth_url=<a href="http://MY/">http://MY</a>_IP_ADDRR:8080/auth/v1.0</div><div>auth_token_name=X-Auth-Token</div><div>#auth_user_header=X-Auth-User</div><div>#auth_pass_header=X-Auth-Key</div></div><div>----------------------------------------------------------------------------------------------</div><div><br></div><div>Then I tested the java api using the run_cli.sh </div><div><br></div><div><div>btorch@stone:~/src/rackspace-java-cloudfiles-0ce9377-openstack$ bash run_cli.sh </div><div>Username: marcelo</div><div>Password: XXXXXXXXXX</div><div>Account (return if using Mosso directly): external</div><div>Logged in!</div><div>Type 'help' for assistance</div><div>external: get </div><div>The account has 3 containers</div><div>   glance</div><div>   images</div><div>   test</div><div>external: head</div><div>Account information:</div><div>  Number of Containers: 3</div><div>    Total Account Size: 1938161664</div><div><br></div><div>external: head glance</div><div>Information for glance</div><div>  Object Count: 2</div><div>    Total Size: 1,938,161,664 bytes</div></div><div>....</div><div><br></div><div><br></div><div>Then I ran the test unit... I also expected any CDN test units to fail since openstack-swift does not have CDN:</div><div><br></div><div><div>btorch@stone:~/src/rackspace-java-cloudfiles-0ce9377-openstack$ ant test</div><div>Buildfile: build.xml</div><div><br></div><div>init:</div><div>     [echo] -------------------------------------------------</div><div>     [echo]            Building Cloudfiles</div><div>     [echo] -------------------------------------------------</div><div><br></div><div>compile:</div><div>     [echo] Compiling the source</div><div><br></div><div>compile-test:</div><div>     [echo] Compiling the test source</div><div>    [javac] Compiling 2 source files to /home/btorch/src/rackspace-java-cloudfiles-0ce9377-openstack/classes</div><div>     [copy] Copying 2 files to /home/btorch/src/rackspace-java-cloudfiles-0ce9377-openstack/classes</div><div>      [jar] Building jar: /home/btorch/src/rackspace-java-cloudfiles-0ce9377-openstack/dist/java-cloudfiles-test.jar</div><div><br></div><div>test: </div><div>    [junit] Running com.rackspacecloud.client.cloudfiles.FilesClientTestCase</div><div>    [junit] Testsuite: com.rackspacecloud.client.cloudfiles.FilesClientTestCase</div><div>    [junit] Tests run: 38, Failures: 8, Errors: 0, Time elapsed: 30.824 sec</div><div>    [junit] Tests run: 38, Failures: 8, Errors: 0, Time elapsed: 30.824 sec</div><div>    [junit]</div><div>    [junit] Testcase: testConstructor(com.rackspacecloud.client.cloudfiles.FilesClientTestCase):        FAILED</div><div>    [junit] expected:<...> but was:<baz:...></div><div>    [junit] junit.framework.ComparisonFailure: expected:<...> but was:<baz:...></div><div>    [junit]     at com.rackspacecloud.client.cloudfiles.FilesClientTestCase.testConstructor(FilesClientTestCase.java:49)</div><div>    [junit]</div><div>    [junit]</div><div>    [junit] Testcase: testNoArgConstructor(com.rackspacecloud.client.cloudfiles.FilesClientTestCase):   FAILED</div><div>    [junit] expected:<...> but was:<external:...></div><div>    [junit] junit.framework.ComparisonFailure: expected:<...> but was:<external:...></div><div>    [junit]     at com.rackspacecloud.client.cloudfiles.FilesClientTestCase.testNoArgConstructor(FilesClientTestCase.java:59)</div><div>    [junit]</div><div>    [junit]</div></div><div><div>    [junit]</div><div>    [junit] Testcase: testCDNContainerList(com.rackspacecloud.client.cloudfiles.FilesClientTestCase):   FAILED</div><div>    [junit] host parameter is null</div><div>    [junit] junit.framework.AssertionFailedError: host parameter is null</div><div>    [junit]     at com.rackspacecloud.client.cloudfiles.FilesClientTestCase.testCDNContainerList(FilesClientTestCase.java:1242)</div><div>    [junit]</div><div>    [junit]</div><div>    [junit] Testcase: testCDNContainerListLimitMarker(com.rackspacecloud.client.cloudfiles.FilesClientTestCase):        FAILED</div><div>    [junit] host parameter is null</div><div>    [junit] junit.framework.AssertionFailedError: host parameter is null</div><div>    [junit]     at com.rackspacecloud.client.cloudfiles.FilesClientTestCase.testCDNContainerListLimitMarker(FilesClientTestCase.java:1268)</div><div>    [junit]</div><div>    [junit]</div><div>    [junit] Testcase: testCDNContainerFullListing(com.rackspacecloud.client.cloudfiles.FilesClientTestCase):    FAILED</div><div>    [junit] host parameter is null</div><div>    [junit] junit.framework.AssertionFailedError: host parameter is null</div><div>    [junit]     at com.rackspacecloud.client.cloudfiles.FilesClientTestCase.testCDNContainerFullListing(FilesClientTestCase.java:1293)</div><div>    [junit]</div><div>    [junit]</div><div>    [junit] Testcase: testCDNContainerFullListingAll(com.rackspacecloud.client.cloudfiles.FilesClientTestCase): FAILED</div><div>    [junit] host parameter is null</div><div>    [junit] junit.framework.AssertionFailedError: host parameter is null</div><div>    [junit]     at com.rackspacecloud.client.cloudfiles.FilesClientTestCase.testCDNContainerFullListingAll(FilesClientTestCase.java:1307)</div><div>    [junit]</div><div>    [junit]</div><div>    [junit] Testcase: testCDNApi(com.rackspacecloud.client.cloudfiles.FilesClientTestCase):     FAILED</div><div>    [junit] host parameter is null</div><div>    [junit] junit.framework.AssertionFailedError: host parameter is null</div><div>    [junit]     at com.rackspacecloud.client.cloudfiles.FilesClientTestCase.testCDNApi(FilesClientTestCase.java:1366)</div><div>    [junit]</div><div>    [junit]</div><div>    [junit] Testcase: testURLs(com.rackspacecloud.client.cloudfiles.FilesClientTestCase):       FAILED</div><div>    [junit] null</div><div>    [junit] junit.framework.AssertionFailedError</div><div>    [junit]     at com.rackspacecloud.client.cloudfiles.FilesClientTestCase.testURLs(FilesClientTestCase.java:1526)</div><div>    [junit]</div><div>    [junit]</div><div>    [junit] Test com.rackspacecloud.client.cloudfiles.FilesClientTestCase FAILED</div><div><br></div><div>BUILD SUCCESSFUL</div><div>Total time: 34 seconds</div></div><div><br></div><div>-----</div><div><br></div><div>I'm not sure why the newer versions of the java-cloudfiles API were failing, perhaps I was doing something wrong! I hope this helps a bit or perhaps sends you to the right track. If I have an update about java-cloudfiles and openstack-swift compatibility I'll let you know. </div><div><br></div><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Marcelo Martins</div><div>Openstack-swift</div><div><a href="mailto:btorch-os@zeroaccess.org">btorch-os@zeroaccess.org</a></div><div><br></div><div><div>“Knowledge is the wings on which our aspirations take flight and soar. When it comes to surfing and life if you know what to do you can do it. If you desire anything become educated about it and succeed. “</div></div><div><br></div></div></span></div></span></div><div><blockquote type="cite"><font class="Apple-style-span" color="#000000"><br></font>Thanks & Regards,<br> shashi <br> _______________________________________________<br>Openstack-operators mailing list<br><a href="mailto:Openstack-operators@lists.openstack.org">Openstack-operators@lists.openstack.org</a><br>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators<br></blockquote></div><br></body></html>