use of org.geotoolkit.wps.xml.v200.Status in project core by authzforce.
the class BaseXacmlJsonResultPostprocessor method processClientError.
@Override
public JSONObject processClientError(final IndeterminateEvaluationException error) {
assert maxDepthOfErrorCauseIncludedInResult == 0;
final Status finalStatus = error.getTopLevelStatus();
// FIXME: maxDepthOfErrorCauseIncludedInResult > 0 not supported so far
final JSONObject result = new JSONObject(HashCollections.newImmutableMap("Decision", DecisionType.INDETERMINATE.value(), "Status", toJson(finalStatus)));
return new JSONObject(HashCollections.newImmutableMap("Response", new JSONArray(Collections.singleton(result))));
}
use of org.geotoolkit.wps.xml.v200.Status in project geotoolkit by Geomatys.
the class WPS2Process method execute.
@Override
protected void execute() throws ProcessException {
final Result result;
try {
if (jobId != null) {
try {
// It's an already running process we've got here. All we have to do
// is checking its status, to ensure/wait its completion.
result = checkResult(getStatus());
} catch (JAXBException | IOException ex) {
throw new ProcessException("Cannot get process status", this, ex);
}
} else {
final ExecuteRequest exec = createRequest();
exec.setDebug(debug);
exec.setClientSecurity(security);
result = sendExecuteRequest(exec);
}
} catch (InterruptedException e) {
throw new DismissProcessException("Process interrupted while executing", this, e);
}
if (!isDimissed()) {
fillOutputs(result);
}
}
use of org.geotoolkit.wps.xml.v200.Status in project yakc by manusa.
the class ServiceLegacyIT method deleteNamespacedService.
@Test
@DisplayName("deleteNamespacedService, should delete existing Service")
void deleteNamespacedService() throws IOException {
// When
// Apparently they have corrected this in the API, it will have different results depending on the target cluster
final Status result = KC.create(CoreV1Api.class).deleteNamespacedService(serviceName, NAMESPACE).get(Status.class);
// Then
assertThat(result).isNotNull().extracting(Status::getStatus).isEqualTo("Success");
}
use of org.geotoolkit.wps.xml.v200.Status in project yakc by manusa.
the class DeploymentIT method deleteNamespacedDeployment.
@Test
@DisplayName("deleteNamespacedDeployment, should delete existing Pod")
void deleteNamespacedDeployment() throws IOException {
// When
final Status result = KC.create(AppsV1Api.class).deleteNamespacedDeployment(deploymentName, NAMESPACE).get();
// Then
assertThat(result).isNotNull().hasFieldOrPropertyWithValue("status", "Success");
}
use of org.geotoolkit.wps.xml.v200.Status in project yakc by manusa.
the class NetworkPolicyIT method deleteNamespacedNetworkPolicy.
@Test
@DisplayName("deleteNamespacedNetworkPolicy, should delete existing NetworkPolicy")
void deleteNamespacedNetworkPolicy() throws IOException {
// When
final Status result = KC.create(NetworkingV1Api.class).deleteNamespacedNetworkPolicy(networkPolicyName, NAMESPACE, DeleteOptions.builder().gracePeriodSeconds(1).build()).get();
// Then
assertThat(result).isNotNull().extracting(Status::getStatus).isEqualTo("Success");
}
Aggregations