use of org.platformlayer.PlatformLayerClient in project platformlayer by platformlayer.
the class ScriptCommands method getActivation.
public static Object getActivation(String serviceType) throws PlatformLayerClientException, JSONException {
PlatformLayerCliContext context = PlatformLayerCliContext.get();
PlatformLayerClient client = context.getPlatformLayerClient();
String retvalJsonString = client.getActivation(serviceType, Format.JSON);
JSONObject retvalJsonObject = new JSONObject(retvalJsonString);
return toPython(retvalJsonObject);
}
use of org.platformlayer.PlatformLayerClient in project platformlayer by platformlayer.
the class ScriptCommands method getSshPublicKey.
public static Object getSshPublicKey(String serviceType) throws PlatformLayerClientException, JSONException {
PlatformLayerCliContext context = PlatformLayerCliContext.get();
PlatformLayerClient client = context.getPlatformLayerClient();
String key = client.getSshPublicKey(serviceType);
return toPython(key);
}
use of org.platformlayer.PlatformLayerClient in project platformlayer by platformlayer.
the class ListChildren method runCommand.
@Override
public Object runCommand() throws PlatformLayerClientException {
PlatformLayerClient client = getPlatformLayerClient();
PlatformLayerKey key = path.resolve(getContext());
boolean includeDeleted = true;
return client.listChildren(key, includeDeleted);
}
use of org.platformlayer.PlatformLayerClient in project platformlayer by platformlayer.
the class ListJobExecutions method runCommand.
@Override
public Object runCommand() throws PlatformLayerClientException {
PlatformLayerClient client = getPlatformLayerClient();
JobExecutionList runs;
if (jobId == null) {
runs = client.listJobExecutions();
} else {
runs = client.listJobExecutions(jobId);
}
return runs;
}
use of org.platformlayer.PlatformLayerClient in project platformlayer by platformlayer.
the class ListJobs method runCommand.
@Override
public Object runCommand() throws PlatformLayerClientException {
PlatformLayerClient client = getPlatformLayerClient();
JobDataList jobs;
if (path == null) {
jobs = client.listJobs();
} else {
PlatformLayerKey resolved = path.resolve(getContext());
jobs = client.listJobs(resolved);
}
return jobs;
}
Aggregations