summaryrefslogtreecommitdiffstats
path: root/cloudify-client
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2019-04-23 11:50:45 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-23 11:50:45 +0000
commit096a5140050a7fc634f73e3587d8c202393243aa (patch)
tree3a2ac6b7b8cc290b73f569fbb4d3b8b1b80bc2f7 /cloudify-client
parent72f5c70d944780dd98e070e82363a58a20c38b66 (diff)
parent7a67a7fa82c931e9cc6002a4689002c9e3a25627 (diff)
Merge "Define constant for String literal"
Diffstat (limited to 'cloudify-client')
-rw-r--r--cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/BlueprintsResource.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/BlueprintsResource.java b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/BlueprintsResource.java
index 3eae02bcee..9877eb9f43 100644
--- a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/BlueprintsResource.java
+++ b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/BlueprintsResource.java
@@ -31,6 +31,7 @@ import org.onap.so.cloudify.base.client.CloudifyRequest;
public class BlueprintsResource {
private final CloudifyClient client;
+ private static final String BLUEPRINTS_PATH = "/api/v3/blueprints/";
public BlueprintsResource(CloudifyClient client) {
this.client = client;
@@ -72,7 +73,7 @@ public class BlueprintsResource {
// If a URL is provided, add it to the query string
// If a Stream is provided, set it as the Entity body
super(client, HttpMethod.PUT,
- "/api/v3/blueprints/" + blueprintId + "?application_file_name=" + mainFileName
+ BLUEPRINTS_PATH + blueprintId + "?application_file_name=" + mainFileName
+ ((blueprintUrl != null) ? "&blueprint_archive=" + blueprintUrl : ""),
((blueprint != null) ? Entity.stream(blueprint) : null), Blueprint.class);
}
@@ -80,13 +81,13 @@ public class BlueprintsResource {
public class DeleteBlueprint extends CloudifyRequest<Blueprint> {
public DeleteBlueprint(String blueprintId) {
- super(client, HttpMethod.DELETE, "/api/v3/blueprints/" + blueprintId, null, Blueprint.class);
+ super(client, HttpMethod.DELETE, BLUEPRINTS_PATH + blueprintId, null, Blueprint.class);
}
}
public class GetBlueprint extends CloudifyRequest<Blueprint> {
public GetBlueprint(String id, String queryArgs) {
- super(client, HttpMethod.GET, "/api/v3/blueprints/" + id + queryArgs, null, Blueprint.class);
+ super(client, HttpMethod.GET, BLUEPRINTS_PATH + id + queryArgs, null, Blueprint.class);
}
}