aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java10
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRest.java77
-rwxr-xr-xadapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/vdu/utils/VduPlugin.java4
3 files changed, 45 insertions, 46 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
index 699bd7c684..6862492d7e 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
@@ -143,7 +143,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
String tenantId,
String stackName,
String heatTemplate,
- Map <String, ? extends Object> stackInputs,
+ Map <String, ?> stackInputs,
boolean pollForCompletion,
int timeoutMinutes) throws MsoException {
// Just call the new method with the environment & files variable set to null
@@ -165,7 +165,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
String tenantId,
String stackName,
String heatTemplate,
- Map <String, ? extends Object> stackInputs,
+ Map <String, ?> stackInputs,
boolean pollForCompletion,
int timeoutMinutes,
String environment) throws MsoException {
@@ -188,7 +188,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
String tenantId,
String stackName,
String heatTemplate,
- Map <String, ? extends Object> stackInputs,
+ Map <String, ?> stackInputs,
boolean pollForCompletion,
int timeoutMinutes,
String environment,
@@ -211,7 +211,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
String tenantId,
String stackName,
String heatTemplate,
- Map <String, ? extends Object> stackInputs,
+ Map <String, ?> stackInputs,
boolean pollForCompletion,
int timeoutMinutes,
String environment,
@@ -275,7 +275,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
String tenantId,
String stackName,
String heatTemplate,
- Map <String, ? extends Object> stackInputs,
+ Map <String, ?> stackInputs,
boolean pollForCompletion,
int timeoutMinutes,
String environment,
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRest.java b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRest.java
index d0d3999cf4..c1c5aee8f1 100644
--- a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRest.java
+++ b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRest.java
@@ -531,44 +531,43 @@ public class CatalogDbAdapterRest {
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public Response resourceRecipe(@QueryParam("resourceModelUuid") String rmUuid, @QueryParam("action") String action) {
int respStatus = HttpStatus.SC_OK;
- CatalogDatabase db = CatalogDatabase.getInstance();
- String entity = "";
- try{
- if(rmUuid != null && !"".equals(rmUuid)){
- LOGGER.debug ("Query recipe by resource model uuid: " + rmUuid);
- //check vnf and network and ar, the resource could be any resource.
- Recipe recipe = db.getVnfRecipeByModuleUuid(rmUuid, action);
- if(null == recipe){
- recipe = db.getNetworkRecipeByModuleUuid(rmUuid, action);
- }
- if(null == recipe){
- recipe = db.getArRecipeByModuleUuid(rmUuid, action);
- }
- if(recipe != null){
- QueryResourceRecipe resourceRecipe = new QueryResourceRecipe(recipe);
- entity = resourceRecipe.JSON2(false, false);
- }
- else{
- respStatus = HttpStatus.SC_NOT_FOUND;
- }
- }else{
- throw(new Exception("Incoming parameter is null or blank"));
- }
- LOGGER.debug ("Query recipe exit");
- return Response
- .status(respStatus)
- .entity(entity)
- .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
- .build();
- }catch(Exception e){
- LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, rmUuid, "", "resourceRecipe", MsoLogger.ErrorCode.BusinessProcesssError, "Exception during query recipe by resource model uuid: ", e);
- CatalogQueryException excResp = new CatalogQueryException(e.getMessage(), CatalogQueryExceptionCategory.INTERNAL, Boolean.FALSE, null);
- return Response
- .status(HttpStatus.SC_INTERNAL_SERVER_ERROR)
- .entity(new GenericEntity<CatalogQueryException>(excResp) {})
- .build();
- }finally {
- db.close();
- }
+ String entity = "";
+ try (CatalogDatabase db = CatalogDatabase.getInstance()) {
+ if (rmUuid != null && !"".equals(rmUuid)) {
+ LOGGER.debug("Query recipe by resource model uuid: " + rmUuid);
+ //check vnf and network and ar, the resource could be any resource.
+ Recipe recipe = db.getVnfRecipeByModuleUuid(rmUuid, action);
+ if (null == recipe) {
+ recipe = db.getNetworkRecipeByModuleUuid(rmUuid, action);
+ }
+ if (null == recipe) {
+ recipe = db.getArRecipeByModuleUuid(rmUuid, action);
+ }
+ if (recipe != null) {
+ QueryResourceRecipe resourceRecipe = new QueryResourceRecipe(recipe);
+ entity = resourceRecipe.JSON2(false, false);
+ } else {
+ respStatus = HttpStatus.SC_NOT_FOUND;
+ }
+ } else {
+ throw (new Exception("Incoming parameter is null or blank"));
+ }
+ LOGGER.debug("Query recipe exit");
+ return Response
+ .status(respStatus)
+ .entity(entity)
+ .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+ .build();
+ } catch (Exception e) {
+ LOGGER.error(MessageEnum.RA_QUERY_VNF_ERR, rmUuid, "", "resourceRecipe",
+ MsoLogger.ErrorCode.BusinessProcesssError, "Exception during query recipe by resource model uuid: ", e);
+ CatalogQueryException excResp = new CatalogQueryException(e.getMessage(),
+ CatalogQueryExceptionCategory.INTERNAL, Boolean.FALSE, null);
+ return Response
+ .status(HttpStatus.SC_INTERNAL_SERVER_ERROR)
+ .entity(new GenericEntity<CatalogQueryException>(excResp) {
+ })
+ .build();
+ }
}
}
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/vdu/utils/VduPlugin.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/vdu/utils/VduPlugin.java
index 856b713c94..2118eec0a5 100755
--- a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/vdu/utils/VduPlugin.java
+++ b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/vdu/utils/VduPlugin.java
@@ -88,7 +88,7 @@ public interface VduPlugin {
String tenantId,
String vduInstanceName,
VduBlueprint vduBlueprint,
- Map <String, ? extends Object> inputs,
+ Map <String, ?> inputs,
String environmentFile,
int timeoutMinutes,
boolean suppressBackout)
@@ -198,7 +198,7 @@ public interface VduPlugin {
String tenantId,
String vduInstanceId,
VduBlueprint vduBlueprint,
- Map <String, ? extends Object> inputs,
+ Map <String, ?> inputs,
String environmentFile,
int timeoutMinutes)
throws MsoException;