| Modifier and Type | Class and Description |
|---|---|
static class |
Client.HttpProxy |
static interface |
Client.InstanceOperation |
protected class |
Client.InstanceProgressMonitor |
static interface |
Client.InstanceState |
protected class |
Client.ProgressMonitor |
protected class |
Client.ProviderProgressMonitor |
static interface |
Client.ProviderState |
protected class |
Client.TaskProgressMonitor |
static interface |
Client.TaskState |
| Modifier and Type | Field and Description |
|---|---|
static Set |
FINISH_STATES |
static Set |
OFF_OPERATIONS |
static Set |
ON_OPERATIONS |
static Set |
SHUTDOWN_OPERATIONS |
static Set |
TERMINATE_OPERATIONS |
| Modifier | Constructor and Description |
|---|---|
|
Client(String endpointUrl,
String token,
Client.HttpProxy httpProxy) |
|
Client(String endpointUrl,
String username,
String password,
Client.HttpProxy httpProxy) |
protected |
Client(String endpointUrl,
String username,
String password,
String token,
Client.HttpProxy httpProxy) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect() |
net.sf.json.JSONObject |
createBox(net.sf.json.JSONObject box) |
IProgressMonitor |
createProvider(net.sf.json.JSONObject provider) |
IProgressMonitor |
createTemplate(String name,
net.sf.json.JSONObject instance,
String datacenter,
String folder,
String datastore) |
net.sf.json.JSONObject |
createWorkspace(String name) |
void |
delete(String instanceId) |
IProgressMonitor |
deploy(String profileId,
String workspaceId,
List<String> tags,
net.sf.json.JSONArray variables) |
IProgressMonitor |
deploy(String boxVersion,
String policyId,
String instanceName,
String workspaceId,
List<String> tags,
net.sf.json.JSONArray variables,
String expirationTime,
String expirationOperation,
net.sf.json.JSONArray policyVariables,
String automaticUpdates) |
void |
doDelete(String url) |
net.sf.json.JSON |
doGet(String url,
boolean isArray) |
<T extends net.sf.json.JSON> |
doPost(String url,
net.sf.json.JSONObject resource,
boolean isArray) |
int |
doUpdate(String url) |
net.sf.json.JSONObject |
doUpdate(String url,
net.sf.json.JSONObject resource) |
protected org.apache.http.HttpResponse |
execute(org.apache.http.client.methods.HttpRequestBase request) |
IProgressMonitor |
forceTerminate(String instanceId) |
String |
generateToken(String description) |
net.sf.json.JSONArray |
getAllBoxes(String workspaceId) |
net.sf.json.JSONObject |
getBox(String boxId) |
net.sf.json.JSONArray |
getBoxes(String workspaceId) |
String |
getBoxPageUrl(String boxId) |
net.sf.json.JSONArray |
getBoxStack(String boxId) |
String |
getBoxUrl(String boxId) |
net.sf.json.JSONArray |
getBoxVersions(String boxId) |
String |
getEndpointUrl() |
static org.apache.http.client.HttpClient |
getHttpClientInstance() |
Client.HttpProxy |
getHttpClientProxy() |
net.sf.json.JSONObject |
getInstance(String instanceId) |
static String |
getInstancePageUrl(String endpointUrl,
String instanceId) |
net.sf.json.JSONArray |
getInstances(List<String> instanceIDs) |
net.sf.json.JSONArray |
getInstances(String workspaceId) |
net.sf.json.JSONArray |
getInstances(String workspaceId,
List<String> instanceIDs) |
String |
getInstanceUrl(String instanceId) |
static String |
getInstanceUrl(String endpointUrl,
String instanceId) |
String |
getLatestBoxVersion(String workspace,
String boxId) |
String |
getPageUrl(net.sf.json.JSONObject resource) |
static String |
getPageUrl(String endpointUrl,
net.sf.json.JSONObject resource) |
static String |
getPageUrl(String endpointUrl,
String resourceUrl) |
protected String |
getPassword() |
List<net.sf.json.JSONObject> |
getPolicies(String workspaceId,
Collection<String> claims) |
net.sf.json.JSONArray |
getProfiles(String workspaceId) |
net.sf.json.JSONArray |
getProfiles(String workspaceId,
net.sf.json.JSONObject box) |
net.sf.json.JSONArray |
getProfiles(String workspaceId,
String boxId) |
net.sf.json.JSONObject |
getProvider(String providerId) |
String |
getProviderPageUrl(String providerId) |
net.sf.json.JSONArray |
getProviders(String workspaceId) |
String |
getProviderUrl(String providerId) |
static String |
getResourceId(String resourceUrl) |
static String |
getResponseBodyAsString(org.apache.http.HttpResponse response) |
net.sf.json.JSONObject |
getService(String instanceId) |
net.sf.json.JSONArray |
getTokens() |
protected String |
getUsername() |
net.sf.json.JSONArray |
getWorkspaces() |
IProgressMonitor |
poweron(String instanceId) |
IProgressMonitor |
reconfigure(String instanceId,
net.sf.json.JSONArray variables) |
IProgressMonitor |
reinstall(String instanceId,
net.sf.json.JSONArray variables) |
IProgressMonitor |
shutdown(String instanceId) |
IProgressMonitor |
syncProvider(String providerId) |
IProgressMonitor |
terminate(String instanceId) |
net.sf.json.JSONObject |
updateBox(String boxId,
net.sf.json.JSONArray variables) |
net.sf.json.JSONObject |
updateInstance(net.sf.json.JSONObject instance) |
net.sf.json.JSONObject |
updateInstance(net.sf.json.JSONObject instance,
net.sf.json.JSONArray variables) |
net.sf.json.JSONObject |
updateInstance(net.sf.json.JSONObject instance,
net.sf.json.JSONArray variables,
String boxVersion) |
void |
writeTo(String url,
OutputStream output) |
public static final Set FINISH_STATES
public static final Set SHUTDOWN_OPERATIONS
public static final Set TERMINATE_OPERATIONS
public static final Set ON_OPERATIONS
public static final Set OFF_OPERATIONS
protected Client(String endpointUrl, String username, String password, String token, Client.HttpProxy httpProxy)
public Client(String endpointUrl, String username, String password, Client.HttpProxy httpProxy)
public Client(String endpointUrl, String token, Client.HttpProxy httpProxy)
public String getEndpointUrl()
protected String getUsername()
protected String getPassword()
public Client.HttpProxy getHttpClientProxy()
public void connect()
throws IOException
IOExceptionpublic String generateToken(String description) throws IOException
IOExceptionpublic net.sf.json.JSONArray getTokens()
throws IOException
IOExceptionpublic net.sf.json.JSONArray getWorkspaces()
throws IOException
getWorkspaces in interface ApiClientIOExceptionpublic net.sf.json.JSONArray getAllBoxes(String workspaceId) throws IOException
getAllBoxes in interface ApiClientIOExceptionpublic net.sf.json.JSONArray getBoxes(String workspaceId) throws IOException
IOExceptionpublic net.sf.json.JSONArray getBoxVersions(String boxId) throws IOException
getBoxVersions in interface ApiClientIOExceptionpublic net.sf.json.JSONObject getBox(String boxId) throws IOException
getBox in interface ApiClientIOExceptionpublic net.sf.json.JSONObject getProvider(String providerId) throws IOException
IOExceptionpublic net.sf.json.JSONArray getProviders(String workspaceId) throws IOException
IOExceptionpublic net.sf.json.JSONObject createWorkspace(String name) throws IOException
IOExceptionpublic net.sf.json.JSONObject createBox(net.sf.json.JSONObject box)
throws IOException,
URISyntaxException
IOExceptionURISyntaxExceptionpublic IProgressMonitor createProvider(net.sf.json.JSONObject provider) throws IOException
IOExceptionpublic net.sf.json.JSONArray getProfiles(String workspaceId, String boxId) throws IOException
IOExceptionpublic net.sf.json.JSONArray getProfiles(String workspaceId, net.sf.json.JSONObject box) throws IOException
IOExceptionpublic net.sf.json.JSONArray getProfiles(String workspaceId) throws IOException
IOExceptionpublic List<net.sf.json.JSONObject> getPolicies(String workspaceId, Collection<String> claims) throws IOException
IOExceptionpublic net.sf.json.JSONObject getInstance(String instanceId) throws IOException
getInstance in interface ApiClientIOExceptionpublic net.sf.json.JSONObject getService(String instanceId) throws IOException
IOExceptionpublic net.sf.json.JSONArray getInstances(String workspaceId) throws IOException
IOExceptionpublic net.sf.json.JSONArray getInstances(String workspaceId, List<String> instanceIDs) throws IOException
getInstances in interface ApiClientIOExceptionpublic net.sf.json.JSONArray getInstances(List<String> instanceIDs) throws IOException
IOExceptionpublic net.sf.json.JSONArray getBoxStack(String boxId) throws IOException
IOExceptionpublic String getLatestBoxVersion(String workspace, String boxId) throws IOException
IOExceptionpublic net.sf.json.JSONObject updateInstance(net.sf.json.JSONObject instance)
throws IOException
IOExceptionpublic net.sf.json.JSONObject updateInstance(net.sf.json.JSONObject instance,
net.sf.json.JSONArray variables)
throws IOException
IOExceptionpublic net.sf.json.JSONObject updateInstance(net.sf.json.JSONObject instance,
net.sf.json.JSONArray variables,
String boxVersion)
throws IOException
IOExceptionpublic net.sf.json.JSONObject updateBox(String boxId, net.sf.json.JSONArray variables) throws IOException
IOExceptionpublic IProgressMonitor deploy(String profileId, String workspaceId, List<String> tags, net.sf.json.JSONArray variables) throws IOException
IOExceptionpublic IProgressMonitor deploy(String boxVersion, String policyId, String instanceName, String workspaceId, List<String> tags, net.sf.json.JSONArray variables, String expirationTime, String expirationOperation, net.sf.json.JSONArray policyVariables, String automaticUpdates) throws IOException
IOExceptionpublic IProgressMonitor reconfigure(String instanceId, net.sf.json.JSONArray variables) throws IOException
IOExceptionpublic IProgressMonitor terminate(String instanceId) throws IOException
IOExceptionpublic IProgressMonitor forceTerminate(String instanceId) throws IOException
IOExceptionpublic IProgressMonitor poweron(String instanceId) throws IOException
IOExceptionpublic IProgressMonitor shutdown(String instanceId) throws IOException
IOExceptionpublic void delete(String instanceId) throws IOException
IOExceptionpublic IProgressMonitor reinstall(String instanceId, net.sf.json.JSONArray variables) throws IOException
IOExceptionpublic IProgressMonitor createTemplate(String name, net.sf.json.JSONObject instance, String datacenter, String folder, String datastore) throws IOException
IOExceptionpublic IProgressMonitor syncProvider(String providerId) throws IOException
IOExceptionpublic net.sf.json.JSON doGet(String url, boolean isArray) throws IOException
IOExceptionpublic <T extends net.sf.json.JSON> T doPost(String url, net.sf.json.JSONObject resource, boolean isArray) throws IOException
doPost in interface ApiClientIOExceptionpublic net.sf.json.JSONObject doUpdate(String url, net.sf.json.JSONObject resource) throws IOException
IOExceptionpublic int doUpdate(String url) throws IOException
IOExceptionpublic void writeTo(String url, OutputStream output) throws IOException
IOExceptionpublic void doDelete(String url) throws IOException
IOExceptionpublic String getPageUrl(net.sf.json.JSONObject resource)
public static final String getPageUrl(String endpointUrl, net.sf.json.JSONObject resource)
public static final String getInstancePageUrl(String endpointUrl, String instanceId)
public static String getResponseBodyAsString(org.apache.http.HttpResponse response) throws IOException
IOExceptionprotected org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpRequestBase request)
throws IOException
IOException@CheckForNull public static org.apache.http.client.HttpClient getHttpClientInstance()
Copyright © 2016–2019. All rights reserved.