summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/util/RestfulUtil.java8
-rw-r--r--bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java1
-rw-r--r--docs/Building_SO.rst4
-rw-r--r--docs/Developer_Info.rst4
-rw-r--r--docs/architecture.rst2
-rw-r--r--docs/images/SO_1.pngbin83586 -> 75897 bytes
-rw-r--r--docs/images/SO_Architecture_1.pngbin123253 -> 126013 bytes
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java171
8 files changed, 68 insertions, 122 deletions
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/util/RestfulUtil.java b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/util/RestfulUtil.java
index 4d2bf59fee..9b00e4e1eb 100644
--- a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/util/RestfulUtil.java
+++ b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/util/RestfulUtil.java
@@ -107,21 +107,21 @@ public class RestfulUtil {
HttpClient client = HttpClientBuilder.create().build();
- if("POST".equals(methodType.toUpperCase())) {
+ if("POST".equalsIgnoreCase(methodType)) {
HttpPost httpPost = new HttpPost(msbUrl);
httpPost.setConfig(requestConfig);
httpPost.setEntity(new StringEntity(content, ContentType.APPLICATION_JSON));
method = httpPost;
- } else if("PUT".equals(methodType.toUpperCase())) {
+ } else if("PUT".equalsIgnoreCase(methodType)) {
HttpPut httpPut = new HttpPut(msbUrl);
httpPut.setConfig(requestConfig);
httpPut.setEntity(new StringEntity(content, ContentType.APPLICATION_JSON));
method = httpPut;
- } else if("GET".equals(methodType.toUpperCase())) {
+ } else if("GET".equalsIgnoreCase(methodType)) {
HttpGet httpGet = new HttpGet(msbUrl);
httpGet.setConfig(requestConfig);
method = httpGet;
- } else if("DELETE".equals(methodType.toUpperCase())) {
+ } else if("DELETE".equalsIgnoreCase(methodType)) {
HttpDelete httpDelete = new HttpDelete(msbUrl);
httpDelete.setConfig(requestConfig);
method = httpDelete;
diff --git a/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java
index 7d432067ba..8cd187bb2c 100644
--- a/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java
+++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java
@@ -29,7 +29,6 @@ import javax.ws.rs.PUT;
import org.camunda.bpm.cockpit.db.QueryParameters;
import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource;
-import org.camunda.bpm.cockpit.db.CommandExecutor;
import org.openecomp.camunda.bpmn.plugin.urnmap.db.*;
public class ProcessInstanceResource extends AbstractPluginResource {
diff --git a/docs/Building_SO.rst b/docs/Building_SO.rst
index 2e411d5e11..7d68e433cc 100644
--- a/docs/Building_SO.rst
+++ b/docs/Building_SO.rst
@@ -34,7 +34,9 @@ Build software without unit tests
Build docker images
--------------------
-SO docker images are built using the "docker" maven profile. During the build, the chef-repo and so-docker repositories are cloned from gerrit into the "so" directory structure. Extra definitions are required in the build environment to make this happen. You may need to adjust the definition of mso.chef.git.url.prefix to match the way you authenticate yourself when performing git clone.
+SO docker images are built using the "docker" maven profile.
+
+During the build, the chef-repo and so-docker repositories are cloned from gerrit into the "so" directory structure. Extra definitions are required in the build environment to make this happen. You may need to adjust the definition of mso.chef.git.url.prefix to match the way you authenticate yourself when performing git clone.
If you are behind a corporate firewall, you can specify proxy definitions for the constructed docker images.
diff --git a/docs/Developer_Info.rst b/docs/Developer_Info.rst
index d077323f71..579a12d77f 100644
--- a/docs/Developer_Info.rst
+++ b/docs/Developer_Info.rst
@@ -1,6 +1,6 @@
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
-.. Copyright 2017 Huawei Technologies Co., Ltd.
+.. Copyright 2018 Huawei Technologies Co., Ltd.
Developer Information
======================
@@ -10,4 +10,4 @@ Developer Information
Install_Configure_SO.rst
architecture.rst
- offered_consumed_apis.rst \ No newline at end of file
+ \ No newline at end of file
diff --git a/docs/architecture.rst b/docs/architecture.rst
index 1e7777f32c..e988632b96 100644
--- a/docs/architecture.rst
+++ b/docs/architecture.rst
@@ -1,6 +1,6 @@
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
-.. Copyright 2017 Huawei Technologies Co., Ltd.
+.. Copyright 2018 Huawei Technologies Co., Ltd.
SO - Architecture
===============
diff --git a/docs/images/SO_1.png b/docs/images/SO_1.png
index 8e477acc46..715801330b 100644
--- a/docs/images/SO_1.png
+++ b/docs/images/SO_1.png
Binary files differ
diff --git a/docs/images/SO_Architecture_1.png b/docs/images/SO_Architecture_1.png
index 53836ffd8c..0d84829c61 100644
--- a/docs/images/SO_Architecture_1.png
+++ b/docs/images/SO_Architecture_1.png
Binary files differ
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java
index 581ad34939..32a016fae5 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java
@@ -88,10 +88,7 @@ public class ServiceInstances {
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(value="Create a Service Instance on a version provided",response=Response.class)
public Response createServiceInstance(String request, @PathParam("version") String version) {
-
- Response response = serviceInstances(request, Action.createInstance, null, version);
-
- return response;
+ return serviceInstances(request, Action.createInstance, null, version);
}
@POST
@@ -100,11 +97,9 @@ public class ServiceInstances {
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(value="Activate provided Service Instance",response=Response.class)
public Response activateServiceInstance(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
- Response response = serviceInstances(request, Action.activateInstance, instanceIdMap, version);
-
- return response;
+ return serviceInstances(request, Action.activateInstance, instanceIdMap, version);
}
@POST
@@ -113,11 +108,9 @@ public class ServiceInstances {
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(value="Deactivate provided Service Instance",response=Response.class)
public Response deactivateServiceInstance(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
- Response response = serviceInstances(request, Action.deactivateInstance, instanceIdMap, version);
-
- return response;
+ return serviceInstances(request, Action.deactivateInstance, instanceIdMap, version);
}
@DELETE
@@ -126,10 +119,9 @@ public class ServiceInstances {
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(value="Delete provided Service Instance",response=Response.class)
public Response deleteServiceInstance(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
- Response response = serviceInstances(request, Action.deleteInstance, instanceIdMap, version);
- return response;
+ return serviceInstances(request, Action.deleteInstance, instanceIdMap, version);
}
@POST
@@ -138,11 +130,9 @@ public class ServiceInstances {
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(value="Create Port Mirroring Configuration",response=Response.class)
public Response createPortConfiguration(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
- Response response = configurationRecipeLookup(request, Action.createInstance, instanceIdMap, version);
-
- return response;
+ return configurationRecipeLookup(request, Action.createInstance, instanceIdMap, version);
}
@DELETE
@@ -152,11 +142,10 @@ public class ServiceInstances {
@ApiOperation(value="Delete provided Port",response=Response.class)
public Response deletePortConfiguration(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId,
@PathParam("configurationInstanceId") String configurationInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
instanceIdMap.put("configurationInstanceId", configurationInstanceId);
- Response response = configurationRecipeLookup(request, Action.deleteInstance, instanceIdMap, version);
- return response;
+ return configurationRecipeLookup(request, Action.deleteInstance, instanceIdMap, version);
}
@POST
@@ -166,12 +155,10 @@ public class ServiceInstances {
@ApiOperation(value="Enable Port Mirroring",response=Response.class)
public Response enablePort(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId,
@PathParam("configurationInstanceId") String configurationInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
instanceIdMap.put("configurationInstanceId", configurationInstanceId);
- Response response = configurationRecipeLookup(request, Action.enablePort, instanceIdMap, version);
-
- return response;
+ return configurationRecipeLookup(request, Action.enablePort, instanceIdMap, version);
}
@POST
@@ -181,12 +168,10 @@ public class ServiceInstances {
@ApiOperation(value="Disable Port Mirroring",response=Response.class)
public Response disablePort(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId,
@PathParam("configurationInstanceId") String configurationInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
instanceIdMap.put("configurationInstanceId", configurationInstanceId);
- Response response = configurationRecipeLookup(request, Action.disablePort, instanceIdMap, version);
-
- return response;
+ return configurationRecipeLookup(request, Action.disablePort, instanceIdMap, version);
}
@POST
@@ -196,12 +181,10 @@ public class ServiceInstances {
@ApiOperation(value="Activate Port Mirroring",response=Response.class)
public Response activatePort(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId,
@PathParam("configurationInstanceId") String configurationInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
instanceIdMap.put("configurationInstanceId", configurationInstanceId);
- Response response = configurationRecipeLookup(request, Action.activateInstance, instanceIdMap, version);
-
- return response;
+ return configurationRecipeLookup(request, Action.activateInstance, instanceIdMap, version);
}
@POST
@@ -211,12 +194,10 @@ public class ServiceInstances {
@ApiOperation(value="Deactivate Port Mirroring",response=Response.class)
public Response deactivatePort(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId,
@PathParam("configurationInstanceId") String configurationInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
instanceIdMap.put("configurationInstanceId", configurationInstanceId);
- Response response = configurationRecipeLookup(request, Action.deactivateInstance, instanceIdMap, version);
-
- return response;
+ return configurationRecipeLookup(request, Action.deactivateInstance, instanceIdMap, version);
}
@POST
@@ -226,11 +207,9 @@ public class ServiceInstances {
@ApiOperation(value="Add Relationships to a Service Instance",response=Response.class)
public Response addRelationships(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId) {
msoLogger.debug ("version is: " + version);
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
- Response response = configurationRecipeLookup(request, Action.addRelationships, instanceIdMap, version);
-
- return response;
+ return configurationRecipeLookup(request, Action.addRelationships, instanceIdMap, version);
}
@POST
@@ -240,11 +219,9 @@ public class ServiceInstances {
@ApiOperation(value="Remove Relationships from Service Instance",response=Response.class)
public Response removeRelationships(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId) {
msoLogger.debug ("version is: " + version);
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
- Response response = configurationRecipeLookup(request, Action.removeRelationships, instanceIdMap, version);
-
- return response;
+ return configurationRecipeLookup(request, Action.removeRelationships, instanceIdMap, version);
}
@POST
@@ -254,11 +231,9 @@ public class ServiceInstances {
@ApiOperation(value="Create VNF on a specified version and serviceInstance",response=Response.class)
public Response createVnfInstance(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId) {
msoLogger.debug ("version is: " + version);
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
- Response response = serviceInstances(request, Action.createInstance, instanceIdMap, version);
-
- return response;
+ return serviceInstances(request, Action.createInstance, instanceIdMap, version);
}
@POST
@@ -269,12 +244,10 @@ public class ServiceInstances {
public Response replaceVnfInstance(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId,
@PathParam("vnfInstanceId") String vnfInstanceId) {
msoLogger.debug ("version is: " + version);
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
instanceIdMap.put("vnfInstanceId", vnfInstanceId);
- Response response = serviceInstances(request, Action.replaceInstance, instanceIdMap, version);
-
- return response;
+ return serviceInstances(request, Action.replaceInstance, instanceIdMap, version);
}
@PUT
@@ -284,12 +257,10 @@ public class ServiceInstances {
@ApiOperation(value="Update VNF on a specified version, serviceInstance and vnfInstance",response=Response.class)
public Response updateVnfInstance(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId,
@PathParam("vnfInstanceId") String vnfInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
- instanceIdMap.put("vnfInstanceId", vnfInstanceId);
- Response response = serviceInstances(request, Action.updateInstance, instanceIdMap, version);
-
- return response;
+ instanceIdMap.put("vnfInstanceId", vnfInstanceId);
+ return serviceInstances(request, Action.updateInstance, instanceIdMap, version);
}
@POST
@@ -299,12 +270,10 @@ public class ServiceInstances {
@ApiOperation(value="Apply updated configuration",response=Response.class)
public Response applyUpdatedConfig(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId,
@PathParam("vnfInstanceId") String vnfInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
- instanceIdMap.put("vnfInstanceId", vnfInstanceId);
- Response response = serviceInstances(request, Action.applyUpdatedConfig, instanceIdMap, version);
-
- return response;
+ instanceIdMap.put("vnfInstanceId", vnfInstanceId);
+ return serviceInstances(request, Action.applyUpdatedConfig, instanceIdMap, version);
}
@@ -315,12 +284,10 @@ public class ServiceInstances {
@ApiOperation(value="Delete provided VNF instance",response=Response.class)
public Response deleteVnfInstance(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId,
@PathParam("vnfInstanceId") String vnfInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
instanceIdMap.put("vnfInstanceId", vnfInstanceId);
- Response response = serviceInstances(request, Action.deleteInstance, instanceIdMap, version);
-
- return response;
+ return serviceInstances(request, Action.deleteInstance, instanceIdMap, version);
}
@POST
@@ -331,12 +298,10 @@ public class ServiceInstances {
public Response createVfModuleInstance(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId,
@PathParam("vnfInstanceId") String vnfInstanceId) {
msoLogger.debug ("version is: " + version);
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
instanceIdMap.put("vnfInstanceId", vnfInstanceId);
- Response response = serviceInstances(request, Action.createInstance, instanceIdMap, version);
-
- return response;
+ return serviceInstances(request, Action.createInstance, instanceIdMap, version);
}
@POST
@@ -348,13 +313,11 @@ public class ServiceInstances {
@PathParam("vnfInstanceId") String vnfInstanceId,
@PathParam("vfmoduleInstanceId") String vfmoduleInstanceId) {
msoLogger.debug ("version is: " + version);
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
instanceIdMap.put("vnfInstanceId", vnfInstanceId);
instanceIdMap.put("vfModuleInstanceId", vfmoduleInstanceId);
- Response response = serviceInstances(request, Action.replaceInstance, instanceIdMap, version);
-
- return response;
+ return serviceInstances(request, Action.replaceInstance, instanceIdMap, version);
}
@PUT
@@ -365,13 +328,11 @@ public class ServiceInstances {
public Response updateVfModuleInstance(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId,
@PathParam("vnfInstanceId") String vnfInstanceId,
@PathParam("vfmoduleInstanceId") String vfmoduleInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
instanceIdMap.put("vnfInstanceId", vnfInstanceId);
instanceIdMap.put("vfModuleInstanceId", vfmoduleInstanceId);
- Response response = serviceInstances(request, Action.updateInstance, instanceIdMap, version);
-
- return response;
+ return serviceInstances(request, Action.updateInstance, instanceIdMap, version);
}
@POST
@@ -381,12 +342,10 @@ public class ServiceInstances {
@ApiOperation(value="Perform VNF software update",response=Response.class)
public Response inPlaceSoftwareUpdate(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId,
@PathParam("vnfInstanceId") String vnfInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
- instanceIdMap.put("vnfInstanceId", vnfInstanceId);
- Response response = serviceInstances(request, Action.inPlaceSoftwareUpdate, instanceIdMap, version);
-
- return response;
+ instanceIdMap.put("vnfInstanceId", vnfInstanceId);
+ return serviceInstances(request, Action.inPlaceSoftwareUpdate, instanceIdMap, version);
}
@DELETE
@@ -397,13 +356,11 @@ public class ServiceInstances {
public Response deleteVfModuleInstance(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId,
@PathParam("vnfInstanceId") String vnfInstanceId,
@PathParam("vfmoduleInstanceId") String vfmoduleInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
instanceIdMap.put("vnfInstanceId", vnfInstanceId);
instanceIdMap.put("vfModuleInstanceId", vfmoduleInstanceId);
- Response response = serviceInstances(request, Action.deleteInstance, instanceIdMap, version);
-
- return response;
+ return serviceInstances(request, Action.deleteInstance, instanceIdMap, version);
}
@@ -414,12 +371,10 @@ public class ServiceInstances {
@ApiOperation(value="Create VolumeGroup on a specified version, serviceInstance, vnfInstance",response=Response.class)
public Response createVolumeGroupInstance(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId,
@PathParam("vnfInstanceId") String vnfInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
instanceIdMap.put("vnfInstanceId", vnfInstanceId);
- Response response = serviceInstances(request, Action.createInstance, instanceIdMap, version);
-
- return response;
+ return serviceInstances(request, Action.createInstance, instanceIdMap, version);
}
@PUT
@@ -430,13 +385,11 @@ public class ServiceInstances {
public Response updateVolumeGroupInstance(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId,
@PathParam("vnfInstanceId") String vnfInstanceId,
@PathParam("volumeGroupInstanceId") String volumeGroupInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
instanceIdMap.put("vnfInstanceId", vnfInstanceId);
instanceIdMap.put("volumeGroupInstanceId", volumeGroupInstanceId);
- Response response = serviceInstances(request, Action.updateInstance, instanceIdMap, version);
-
- return response;
+ return serviceInstances(request, Action.updateInstance, instanceIdMap, version);
}
@DELETE
@@ -447,13 +400,11 @@ public class ServiceInstances {
public Response deleteVolumeGroupInstance(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId,
@PathParam("vnfInstanceId") String vnfInstanceId,
@PathParam("volumeGroupInstanceId") String volumeGroupInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
instanceIdMap.put("vnfInstanceId", vnfInstanceId);
instanceIdMap.put("volumeGroupInstanceId", volumeGroupInstanceId);
- Response response = serviceInstances(request, Action.deleteInstance, instanceIdMap, version);
-
- return response;
+ return serviceInstances(request, Action.deleteInstance, instanceIdMap, version);
}
@POST
@@ -462,11 +413,9 @@ public class ServiceInstances {
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(value="Create NetworkInstance on a specified version and serviceInstance ",response=Response.class)
public Response createNetworkInstance(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
- Response response = serviceInstances(request, Action.createInstance, instanceIdMap, version);
-
- return response;
+ return serviceInstances(request, Action.createInstance, instanceIdMap, version);
}
@PUT
@@ -476,12 +425,10 @@ public class ServiceInstances {
@ApiOperation(value="Update VolumeGroup on a specified version, serviceInstance, networkInstance",response=Response.class)
public Response updateNetworkInstance(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId,
@PathParam("networkInstanceId") String networkInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
instanceIdMap.put("networkInstanceId", networkInstanceId);
- Response response = serviceInstances(request, Action.updateInstance, instanceIdMap, version);
-
- return response;
+ return serviceInstances(request, Action.updateInstance, instanceIdMap, version);
}
@DELETE
@@ -491,12 +438,10 @@ public class ServiceInstances {
@ApiOperation(value="Delete provided Network instance",response=Response.class)
public Response deleteNetworkInstance(String request, @PathParam("version") String version, @PathParam("serviceInstanceId") String serviceInstanceId,
@PathParam("networkInstanceId") String networkInstanceId) {
- HashMap<String, String> instanceIdMap = new HashMap<String,String>();
+ HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
instanceIdMap.put("networkInstanceId", networkInstanceId);
- Response response = serviceInstances(request, Action.deleteInstance, instanceIdMap, version);
-
- return response;
+ return serviceInstances(request, Action.deleteInstance, instanceIdMap, version);
}
private Response serviceInstances(String requestJSON, Action action, HashMap<String,String> instanceIdMap, String version) {