jclouds

Manual authentication for Google API in jclouds, separating token acquisition

痴心易碎 提交于 2019-12-11 15:34:20
问题 I need to separate the authentication phase from Google's Api creation, but it's very difficult (for me) to make it possible. This is very important because I am creating a REST API that should receive the authorization tokens previously acquired and not the credentials directly from its users for security reasons, because with tokens I can set a lifetime limit as specified in RFC 6750. I have the following code: public class Main { public static void main(String[] args) { // Reads the JSON

JClouds and OpenStack : IllegalStateException: Expected BEGIN_ARRAY but was STRING

帅比萌擦擦* 提交于 2019-12-11 12:37:46
问题 I'm trying to access OpenStack Swift using Apache JClouds 1.9.2 library. Maven dependency : <dependency> <groupId>org.apache.jclouds</groupId> <artifactId>jclouds-all</artifactId> <version>1.9.2</version> </dependency> I began with the getting started guide and its code sample. In general, I have no problem to connect and persist a blob. But when I try to list the list of containers (or the contents of a container) I get the following error : SEVERE: Error parsing input: java.lang

jclouds : how do I update metadata for an existing blob?

孤街醉人 提交于 2019-12-10 16:39:57
问题 I've got a few thousand blobs at Rackspace's Cloud Files which I need to update content type for. However, I can't figure out how I do that using the jclouds API. How can I go about to update metadata on an existing blob? 回答1: Assuming you have the whole set up running for your rackspace, using jclouds is easy: First initialize with the following details: BlobStoreContext context = ContextBuilder.newBuilder(provider) .credentials(username, apiKey) .buildView(BlobStoreContext.class); BlobStore

How can I access HP Helion using Apache jclouds

耗尽温柔 提交于 2019-12-06 12:11:06
问题 I want to access HP Helion cloud using Apache jclouds 1.8.0 (via the Apache Brooklyn project) and the configuration I used previously no longer works. The documentation suggests I use the same username and password as the console but this gives me an HTTP 401 authentication error. The POST data being sent is recorded in the logs, and looks like this (with the formatted and username/password redacted): { "auth":{ "apiAccessKeyCredentials":{"accessKey":"user@example.org","secretKey":"XXXXXXXX"}

Apache jclouds java.lang.NoSuchMethodError when using Rackspace in a Spring Boot application

狂风中的少年 提交于 2019-12-04 09:39:57
问题 I'm trying to integrate Apache Jclouds into a Spring Boot application I'm working on so that I can upload files to Rackspace Cloud Files(UK). I've created a class which I'm creating as a Bean; import com.google.common.io.ByteSource; import com.google.common.io.Files; import org.jclouds.ContextBuilder; import org.jclouds.io.Payload; import org.jclouds.io.Payloads; import org.jclouds.openstack.swift.v1.features.ObjectApi; import org.jclouds.rackspace.cloudfiles.v1.CloudFilesApi; import org

Can not debug java.lang.NoClassDefFoundError: com/google/inject/internal/util/$Preconditions

人盡茶涼 提交于 2019-12-02 20:31:56
问题 I am trying to make an applet for uploading files to openstack swift using jclouds. And I am facing the NoClassDefFoundError, following is the stacktrace: Exception in thread "main" java.lang.NoClassDefFoundError: com/google/inject/internal/util/$Preconditions at org.nnsoft.guice.rocoto.configuration.ConfigurationModule.configure(ConfigurationModule.java:64) at com.google.inject.AbstractModule.configure(AbstractModule.java:59) at com.google.inject.spi.Elements$RecordingBinder.install(Elements

How do I update metadata for an existing Amazon S3 file?

北城以北 提交于 2019-11-30 10:55:56
I need to update the cache control header in all AmazonS3's Cloud Files. However, I can't figure out how I do that using the jclouds API. I'm using apache jclouds plugin. And I got two related answers: jclouds : how do I update metadata for an existing blob? Set Expires header for an existing S3 object using AWS Java SDK The first answer is suggesting to use SwiftKey Api class which is not available in grails's jcloud plugin. The second answer is using AWS java sdk for which there is already a grails wrapping plugin https://grails.org/plugin/aws-sdk but it doesn't support metadata update. Dan

How do I update metadata for an existing Amazon S3 file?

倖福魔咒の 提交于 2019-11-29 16:09:34
问题 I need to update the cache control header in all AmazonS3's Cloud Files. However, I can't figure out how I do that using the jclouds API. I'm using apache jclouds plugin. And I got two related answers: jclouds : how do I update metadata for an existing blob? Set Expires header for an existing S3 object using AWS Java SDK The first answer is suggesting to use SwiftKey Api class which is not available in grails's jcloud plugin. The second answer is using AWS java sdk for which there is already