Skip to content

Jclouds components to access an implementation of Aliyun

License

Notifications You must be signed in to change notification settings

linfengOu/aliyun-jclouds

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Providers of JClouds for Aliyun

Build Status

Introduction

aliyun-jclouds adapt for jclouds to use cloud service of aliyun

Providers

Provider Service Remark
aliyun-ecs ComputeService Removed in this repo
aliyun-oss BlobStore
aliyun-slb LoadBalancerService Removed in this repo

For aliyun-ecs/slb, refer to original repo.

Maven

<dependencies>
  <dependency>
    <groupId>io.github.aliyun-beta</groupId>
    <artifactId>aliyun-oss</artifactId>
    <version>1.0.0</version>
  </dependency>
</dependencies>

Usage

Offical documents link Apache-jclouds

BlobStore

BlobStore blobStore;
String provider = "aliyun-oss";
String key = "Your AccessKey";
String secret = "Your AccessKeySecret";
BlobStoreContext context = ContextBuilder
      .newBuilder(provider)
      .credentials(key, secret)
      .buildView(BlobStoreContext.class);
blobStore = context.getBlobStore();

Build

mvn package -DskipTests

Local Dev

Compile

Providers use Google Auto to generate services

It is important to do like this

mvn clean compile

Then you will find an folder named services from target\classes\META-INF in each modules

If you do not do the operation, an error will happends.

key [aliyun-oss] not in the list of providers or apis

test

Change the accessKey and secret witch generate by your own account of Aliyun in each test classes before test

private static final String key = "xxx";
private static final String secret = "yyy";

Then run command

mvn test

License

Licensed under the Apache License, Version 2.0

About

Jclouds components to access an implementation of Aliyun

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%