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
IOException
public String generateToken(String description) throws IOException
IOException
public net.sf.json.JSONArray getTokens() throws IOException
IOException
public net.sf.json.JSONArray getWorkspaces() throws IOException
getWorkspaces
in interface ApiClient
IOException
public net.sf.json.JSONArray getAllBoxes(String workspaceId) throws IOException
getAllBoxes
in interface ApiClient
IOException
public net.sf.json.JSONArray getBoxes(String workspaceId) throws IOException
IOException
public net.sf.json.JSONArray getBoxVersions(String boxId) throws IOException
getBoxVersions
in interface ApiClient
IOException
public net.sf.json.JSONObject getBox(String boxId) throws IOException
getBox
in interface ApiClient
IOException
public net.sf.json.JSONObject getProvider(String providerId) throws IOException
IOException
public net.sf.json.JSONArray getProviders(String workspaceId) throws IOException
IOException
public net.sf.json.JSONObject createWorkspace(String name) throws IOException
IOException
public net.sf.json.JSONObject createBox(net.sf.json.JSONObject box) throws IOException, URISyntaxException
IOException
URISyntaxException
public IProgressMonitor createProvider(net.sf.json.JSONObject provider) throws IOException
IOException
public net.sf.json.JSONArray getProfiles(String workspaceId, String boxId) throws IOException
IOException
public net.sf.json.JSONArray getProfiles(String workspaceId, net.sf.json.JSONObject box) throws IOException
IOException
public net.sf.json.JSONArray getProfiles(String workspaceId) throws IOException
IOException
public List<net.sf.json.JSONObject> getPolicies(String workspaceId, Collection<String> claims) throws IOException
IOException
public net.sf.json.JSONObject getInstance(String instanceId) throws IOException
getInstance
in interface ApiClient
IOException
public net.sf.json.JSONObject getService(String instanceId) throws IOException
IOException
public net.sf.json.JSONArray getInstances(String workspaceId) throws IOException
IOException
public net.sf.json.JSONArray getInstances(String workspaceId, List<String> instanceIDs) throws IOException
getInstances
in interface ApiClient
IOException
public net.sf.json.JSONArray getInstances(List<String> instanceIDs) throws IOException
IOException
public net.sf.json.JSONArray getBoxStack(String boxId) throws IOException
IOException
public String getLatestBoxVersion(String workspace, String boxId) throws IOException
IOException
public net.sf.json.JSONObject updateInstance(net.sf.json.JSONObject instance) throws IOException
IOException
public net.sf.json.JSONObject updateInstance(net.sf.json.JSONObject instance, net.sf.json.JSONArray variables) throws IOException
IOException
public net.sf.json.JSONObject updateInstance(net.sf.json.JSONObject instance, net.sf.json.JSONArray variables, String boxVersion) throws IOException
IOException
public net.sf.json.JSONObject updateBox(String boxId, net.sf.json.JSONArray variables) throws IOException
IOException
public IProgressMonitor deploy(String profileId, String workspaceId, List<String> tags, net.sf.json.JSONArray variables) throws IOException
IOException
public 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
IOException
public IProgressMonitor reconfigure(String instanceId, net.sf.json.JSONArray variables) throws IOException
IOException
public IProgressMonitor terminate(String instanceId) throws IOException
IOException
public IProgressMonitor forceTerminate(String instanceId) throws IOException
IOException
public IProgressMonitor poweron(String instanceId) throws IOException
IOException
public IProgressMonitor shutdown(String instanceId) throws IOException
IOException
public void delete(String instanceId) throws IOException
IOException
public IProgressMonitor reinstall(String instanceId, net.sf.json.JSONArray variables) throws IOException
IOException
public IProgressMonitor createTemplate(String name, net.sf.json.JSONObject instance, String datacenter, String folder, String datastore) throws IOException
IOException
public IProgressMonitor syncProvider(String providerId) throws IOException
IOException
public net.sf.json.JSON doGet(String url, boolean isArray) throws IOException
IOException
public <T extends net.sf.json.JSON> T doPost(String url, net.sf.json.JSONObject resource, boolean isArray) throws IOException
doPost
in interface ApiClient
IOException
public net.sf.json.JSONObject doUpdate(String url, net.sf.json.JSONObject resource) throws IOException
IOException
public int doUpdate(String url) throws IOException
IOException
public void writeTo(String url, OutputStream output) throws IOException
IOException
public void doDelete(String url) throws IOException
IOException
public 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
IOException
protected 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.