mirror of https://github.com/apache/jclouds.git
Initial Server Interface commit
git-svn-id: http://jclouds.googlecode.com/svn/trunk@2341 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
c66eb4c389
commit
44ec84c8aa
|
@ -114,6 +114,11 @@
|
|||
<artifactId>gson</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.common</groupId>
|
||||
<artifactId>google-guava</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package org.jclouds.servers;
|
||||
|
||||
import com.google.common.base.Service;
|
||||
|
||||
/**
|
||||
* @author Ivan Meredith
|
||||
*/
|
||||
public interface Instance extends Service {
|
||||
String getId();
|
||||
|
||||
String getTag();
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package org.jclouds.servers;
|
||||
|
||||
import java.util.SortedSet;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
/**
|
||||
* @author Ivan Meredith
|
||||
*/
|
||||
public interface Platform {
|
||||
public String getId();
|
||||
|
||||
public Future<Instance> createInstance();
|
||||
|
||||
public Instance createInstanceAndWait();
|
||||
|
||||
public Instance getInstance(String id);
|
||||
|
||||
public SortedSet<Instance> listInstances();
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package org.jclouds.servers;
|
||||
|
||||
import com.google.common.base.Service;
|
||||
|
||||
import java.util.SortedSet;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
/**
|
||||
* @author Ivan Meredith
|
||||
*/
|
||||
public interface Server extends Service {
|
||||
public String getId();
|
||||
|
||||
public State rebootAndWait();
|
||||
|
||||
public Future<State> reboot();
|
||||
|
||||
public Boolean supportsPlatforms();
|
||||
|
||||
public Platform createPlatform(String id/*, Archive archive , mount? */);
|
||||
|
||||
public Platform getPlatform(String id);
|
||||
|
||||
public SortedSet<Platform> listPlatforms();
|
||||
|
||||
public SortedSet<Instance> listInstances(/* platform("mybilling-1.0.1").tags("production" */);
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package org.jclouds.servers;
|
||||
|
||||
import java.util.SortedSet;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
/**
|
||||
* TODO: better name?
|
||||
*
|
||||
* @author Ivan Meredith
|
||||
*/
|
||||
public interface ServerService {
|
||||
public Server createServerAndWait(String name, String profile, String image);
|
||||
|
||||
public Future<Server> createServer(String name, String profile, String image);
|
||||
|
||||
public SortedSet<Server> listServers();
|
||||
|
||||
public Server getServer(String id);
|
||||
}
|
Loading…
Reference in New Issue