jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yao, Julie" <julie....@hpe.com>
Subject RE: Use JClouds to talk to non AWS cloud with S3 API
Date Fri, 29 Jan 2016 19:53:24 GMT
It works now by adding following code:
overrides.setProperty(PROPERTY_S3_SERVICE_PATH, "/services/Walrus");
BlobStoreContext context = ContextBuilder.newBuilder(new S3ApiMetadata())
                .endpoint("myserver:8080/services/Walrus")
....

Thanks!

-----Original Message-----
From: Yao, Julie 
Sent: Friday, January 29, 2016 10:49 AM
To: user@jclouds.apache.org
Subject: RE: Use JClouds to talk to non AWS cloud with S3 API

Code snippet using boto:
def connect(self):
        self.connection = boto.connect_s3 (
            aws_access_key_id = self.access_key_id,
            aws_secret_access_key = self.secret_access_key,
            port = self.port,
            host= self.host,
            is_secure=False,
            calling_format=boto.s3.connection.OrdinaryCallingFormat()
        )
        
        bucket = self.connection.get_bucket(self.container)
....

Exception stack using jclouds:
Exception in thread "main" org.jclouds.http.HttpResponseException: request: HEAD http://myserver:8080/public
HTTP/1.1 failed with response: HTTP/1.1 500 Internal Server Error
	at org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.handleError(ParseAWSErrorFromXmlContent.java:63)
	at org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:67)
	at org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:136)
	at org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:105)
	at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
	at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
	at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
	at org.jclouds.rest.internal.DelegatesToInvocationFunction.handle(DelegatesToInvocationFunction.java:156)
	at org.jclouds.rest.internal.DelegatesToInvocationFunction.invoke(DelegatesToInvocationFunction.java:123)
	at com.sun.proxy.$Proxy45.bucketExists(Unknown Source)
	at org.jclouds.s3.blobstore.S3BlobStore.containerExists(S3BlobStore.java:130)
	at com.itoa.server.test.RepositoryS3.main(RepositoryS3.java:32)

Thanks!

-----Original Message-----
From: Andrew Phillips [mailto:andrewp@apache.org] 
Sent: Thursday, January 28, 2016 9:05 PM
To: user@jclouds.apache.org
Cc: Yao, Julie
Subject: Re: Use JClouds to talk to non AWS cloud with S3 API

Hi Julie

Could you enable wire and debug logging so we can see exactly which calls jclouds is making
[1]? Also, could you share a code snippet of how you are successfully using boto to do the
same thing? Hopefully, we can find out where the calls from jclouds differ from what boto
is doing...

Regards

ap

[1] https://jclouds.apache.org/reference/logging/

Mime
View raw message