Git Product home page Git Product logo

fit2cloud-java-sdk's Introduction

Fit2Cloud SDK Java库 使用指南

第一步:引用Jar包

方法1:使用Maven

<!-- repository -->
<repositories>
	<repository>
		<id>fit2cloud</id>
		<url>http://repository.fit2cloud.com/content/groups/public/</url>
		<releases>
			<enabled>true</enabled>
		</releases>
		<snapshots>
			<enabled>true</enabled>
		</snapshots>
	</repository>  
</repositories>

<!-- dependency -->
<dependency>
  <groupId>com.fit2cloud</groupId>
  <artifactId>fit2cloud-java-sdk</artifactId>
  <version>1.0</version>
</dependency>

方法2:直接下载Jar包

下载地址是: http://repository.fit2cloud.com/content/repositories/fit2cloud-public/com/fit2cloud/fit2cloud-java-sdk/1.0/fit2cloud-java-sdk-1.0-jar-with-dependencies.jar

第二步:调用Fit2Cloud API

		String apiKey = "你的consumer key";
		String apiSecret = "你的secret key";
		String restApiEndpoint = "你的restApiEndpoint";
		Fit2CloudClient client = new Fit2CloudClient(apiKey, apiSecret, restApiEndpoint);
		System.out.println("List clusters.....");
		System.out.println(client.getClusters());

API列表:

  1. 获取集群列表
  2. 获取单个集群的信息
  3. 获取集群下面的虚机组列表
  4. 获取集群下面的虚机列表
  5. 获取集群下特定虚机组下的虚机类表
  6. 在指定集群的特定虚机组下启动虚机
  7. 关闭指定的虚机
  8. 在指定虚机中执行脚本
  9. 获取脚本执行日志

fit2cloud-java-sdk's People

Contributors

fit2cloud avatar xuwei-fit2cloud avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.