jclouds for the swift keystone 2.0

297 views
Skip to first unread message

machi...@163.com

unread,
Jul 11, 2012, 7:48:15 AM7/11/12
to jcl...@googlegroups.com
  
     Hi, all

         Here is my code:
  
        String identity = "admin:adminxx";   
        String credential = "openstack";
        String authURL = "http://10.200.XX.XX:5000/v2.0";
        String provider = "swift-keystone";
        String endPointName = "swift-keystone.endpoint";
       
        Properties properties = new Properties();
        properties.setProperty("jclouds.keystone.credential-type","passwordCredentials");
       
       
        BlobStoreContext context = ContextBuilder.newBuilder(provider)
            .credentials(identity, credential)
            .endpoint(authURL)
            .modules(ImmutableSet.<Module>of(new EnterpriseConfigurationModule()))
            .overrides(properties)
            .buildView(BlobStoreContext.class);


      In result, it has exceptions:


Exception in thread "main" com.google.inject.CreationException: Guice creation errors:
      1) No implementation for org.jclouds.location.suppliers.RegionIdToURISupplier$Factory was bound.
  at org.jclouds.openstack.swift.config.SwiftRestClientModule$KeystoneStorageEndpointModule.provideStorageUrl(SwiftRestClientModule.java:89)

1 error
    at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:435)
    at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:154)
    at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106)
    at com.google.inject.Guice.createInjector(Guice.java:95)
    at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:321)
    at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:261)
    at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:521)
    at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:501)
    at com.syncsort.NewSwift.main(NewSwift.java:38)


    Can you help me find the wrong place in my code.
    Thanks very much!

                                                                                                                                                                                 ma chi

Adrian Cole

unread,
Jul 12, 2012, 1:48:33 AM7/12/12
to jcl...@googlegroups.com
this should be something we can test against hpcloud-objectstorage.

Anyone have a few mins for that?

-A
> --
> You received this message because you are subscribed to the Google Groups
> "jclouds" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/jclouds/-/7f2oItg8OUIJ.
> To post to this group, send email to jcl...@googlegroups.com.
> To unsubscribe from this group, send email to
> jclouds+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/jclouds?hl=en.

machi...@163.com

unread,
Jul 12, 2012, 5:54:51 AM7/12/12
to jcl...@googlegroups.com
    
      I spended two days for this proplems.

      Thanks a lot if anyone can give me some suggestions.

在 2012年7月12日星期四UTC+8下午1时48分33秒,Adrian Cole写道:
> jclouds+unsubscribe@googlegroups.com.

Aled Sage

unread,
Jul 12, 2012, 6:09:18 AM7/12/12
to jcl...@googlegroups.com, Adrian Cole
Hi,

This is easy to reproduce with 1.5.0-SNAPSHOT.

My initial findings are that you can get further if you include the extra lines:
  properties.setProperty(KeystoneProperties.SERVICE_TYPE, "object-store");
  ...
  .modules(ImmutableSet.<Module>of(new EnterpriseConfigurationModule(), new RegionModule()))
But then it fails with:

  Tried proxying org.jclouds.openstack.keystone.v2_0.functions.AuthenticatePasswordCredentials to support a circular dependency, but it is not an interface.

Adam is taking a look now as well - he's much more familiar with the keystone and swift code. Hopefully have a solution for you soon...

Aled

Adrian Cole

unread,
Jul 12, 2012, 11:20:24 AM7/12/12
to Aled Sage, jcl...@googlegroups.com

Pull merged.  Can you try now?

Thx Aled and Adam

machi...@163.com

unread,
Jul 12, 2012, 9:25:34 PM7/12/12
to jcl...@googlegroups.com, Adrian Cole

     
   Hi,

      Thanks very much!

      I add the code of yours,  the same error
     
      "Exception in thread "main" com.google.inject.CreationException: Guice creation errors:

     1) Tried proxying org.jclouds.openstack.keystone.v2_0.functions.AuthenticatePasswordCredentials to support a circular dependency, but it is not an interface."

      Hope this problem will have solutions.......

   
       chi ma


在 2012年7月12日星期四UTC+8下午6时09分18秒,Aled Sage写道:

Adrian Cole

unread,
Jul 12, 2012, 9:50:02 PM7/12/12
to machi...@163.com, jcl...@googlegroups.com

Oh it will ;)

Thanks for being a patient beta tester ;)

Adrian Cole

unread,
Jul 13, 2012, 6:10:04 PM7/13/12
to machi...@163.com, jcl...@googlegroups.com
looking into this now, chi ma.

-A
>>> jclouds+u...@googlegroups.com.

Adrian Cole

unread,
Jul 15, 2012, 5:06:01 AM7/15/12
to machi...@163.com, jcl...@googlegroups.com
OK. I put a serious amount of authentication tests in for "swift-keystone"

https://github.com/jclouds/jclouds/tree/master/apis/swift/src/test/java/org/jclouds/openstack/swift/keystone

Hopefully all is well, now.
-A

machi...@163.com

unread,
Jul 15, 2012, 11:49:22 PM7/15/12
to jcl...@googlegroups.com, machi...@163.com
   Hi, Adrian Cole

         Thank you for your reply.

         I look up the unit test code "https://github.com/jclouds/jclouds/tree/master/apis/swift/src/test/java/org/jclouds/openstack/swift/keystone ",

and I find some class ,such as "KeystoneFixture"  , it cann't find in libraty beta.6,  so  I didn't resolve my problems.

        Can you show me some example code how to connect openstack swift keystone 2.0   with jclouds.

        Thanks.


     chi.ma

在 2012年7月15日星期日UTC+8下午5时06分01秒,Adrian Cole写道:
>>>> jclouds+unsubscribe@googlegroups.com.

Adrian Cole

unread,
Jul 16, 2012, 12:07:16 AM7/16/12
to jcl...@googlegroups.com, machi...@163.com
Hi, there.

We'll be cutting another beta shortly. Will mention this soon.

Cheers,
-A
>> >>>> jclouds+u...@googlegroups.com.
>> >>>> For more options, visit this group at
>> >>>> http://groups.google.com/group/jclouds?hl=en.
>> >>>>
>> >>>>
>> >>>>
>> >>
>
> --
> You received this message because you are subscribed to the Google Groups
> "jclouds" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/jclouds/-/mta3CyzuQt4J.
> To post to this group, send email to jcl...@googlegroups.com.
> To unsubscribe from this group, send email to
> jclouds+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages