aboutsummaryrefslogtreecommitdiffstats
path: root/cloudify-client
diff options
context:
space:
mode:
Diffstat (limited to 'cloudify-client')
-rw-r--r--cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/DeploymentsResource.java9
-rw-r--r--cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/ExecutionsResource.java7
2 files changed, 9 insertions, 7 deletions
diff --git a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/DeploymentsResource.java b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/DeploymentsResource.java
index 262045a367..335f6b1697 100644
--- a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/DeploymentsResource.java
+++ b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/DeploymentsResource.java
@@ -32,6 +32,7 @@ import org.onap.so.cloudify.base.client.CloudifyRequest;
public class DeploymentsResource {
private final CloudifyClient client;
+ private static final String DEPLOYMENT_PATH = "/api/v3/deployments/";
public DeploymentsResource(CloudifyClient client) {
this.client = client;
@@ -59,25 +60,25 @@ public class DeploymentsResource {
public class CreateDeployment extends CloudifyRequest<Deployment> {
public CreateDeployment(String deploymentId, CreateDeploymentParams body) {
- super(client, HttpMethod.PUT, "/api/v3/deployments/" + deploymentId, Entity.json(body), Deployment.class);
+ super(client, HttpMethod.PUT, DEPLOYMENT_PATH + deploymentId, Entity.json(body), Deployment.class);
}
}
public class DeleteDeployment extends CloudifyRequest<Deployment> {
public DeleteDeployment(String deploymentId) {
- super(client, HttpMethod.DELETE, "/api/v3/deployments/" + deploymentId, null, Deployment.class);
+ super(client, HttpMethod.DELETE, DEPLOYMENT_PATH + deploymentId, null, Deployment.class);
}
}
public class GetDeployment extends CloudifyRequest<Deployment> {
public GetDeployment(String id) {
- super(client, HttpMethod.GET, "/api/v3/deployments/" + id, null, Deployment.class);
+ super(client, HttpMethod.GET, DEPLOYMENT_PATH + id, null, Deployment.class);
}
}
public class GetDeploymentOutputs extends CloudifyRequest<DeploymentOutputs> {
public GetDeploymentOutputs(String id) {
- super(client, HttpMethod.GET, "/api/v3/deployments/" + id + "/outputs", null, DeploymentOutputs.class);
+ super(client, HttpMethod.GET, DEPLOYMENT_PATH + id + "/outputs", null, DeploymentOutputs.class);
}
}
diff --git a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/ExecutionsResource.java b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/ExecutionsResource.java
index 51aaea94bb..34251bfe52 100644
--- a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/ExecutionsResource.java
+++ b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/ExecutionsResource.java
@@ -33,6 +33,7 @@ import org.onap.so.cloudify.base.client.CloudifyRequest;
public class ExecutionsResource {
private final CloudifyClient client;
+ private static final String EXECUTIONS_PATH = "/api/v3/executions/";
public ExecutionsResource(CloudifyClient client) {
this.client = client;
@@ -76,7 +77,7 @@ public class ExecutionsResource {
public class GetExecution extends CloudifyRequest<Execution> {
public GetExecution(String id) {
- super(client, HttpMethod.GET, "/api/v3/executions/" + id, null, Execution.class);
+ super(client, HttpMethod.GET, EXECUTIONS_PATH + id, null, Execution.class);
}
}
@@ -95,13 +96,13 @@ public class ExecutionsResource {
public class UpdateExecution extends CloudifyRequest<Execution> {
public UpdateExecution(String executionId, UpdateExecutionParams body) {
- super(client, HttpMethod.PATCH, "/api/v3/executions/" + executionId, Entity.json(body), Execution.class);
+ super(client, HttpMethod.PATCH, EXECUTIONS_PATH + executionId, Entity.json(body), Execution.class);
}
}
public class CancelExecution extends CloudifyRequest<Execution> {
public CancelExecution(String executionId, CancelExecutionParams body) {
- super(client, HttpMethod.POST, "/api/v3/executions/" + executionId, Entity.json(body), Execution.class);
+ super(client, HttpMethod.POST, EXECUTIONS_PATH + executionId, Entity.json(body), Execution.class);
}
}