diff options
Diffstat (limited to 'mso-api-handlers')
2 files changed, 14 insertions, 6 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java index 2f32e80dc1..d60915bf43 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java @@ -160,7 +160,7 @@ public class OrchestrationRequests { orchestrationList = new GetOrchestrationListResponse(); - List<RequestList> requestLists = new ArrayList<RequestList>(); + List<RequestList> requestLists = new ArrayList<>(); for (InfraActiveRequests infraActive : activeRequests) { 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 3c40003dd0..6f6d2972d1 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 @@ -757,12 +757,16 @@ public class ServiceInstances { // } // TODO need to make this a configurable property - String defaultServiceModelName = msoRequest.getRequestInfo().getSource() + "_DEFAULT"; + String defaultServiceModelName = "*"; + String defaultSourceServiceModelName = msoRequest.getRequestInfo().getSource() + "_DEFAULT"; Service serviceRecord; ModelInfo modelInfo = msoRequest.getModelInfo(); if(msoRequest.getALaCarteFlag()){ - serviceRecord = db.getServiceByModelName(defaultServiceModelName); + serviceRecord = db.getServiceByModelName(defaultSourceServiceModelName); + if (serviceRecord == null) { + serviceRecord = db.getServiceByModelName(defaultServiceModelName); + } }else{ serviceRecord = db.getServiceByModelUUID(modelInfo.getModelVersionId()); // ModelVersionId is not required in v3 if(serviceRecord == null) { @@ -778,12 +782,16 @@ public class ServiceInstances { RequestParameters reqParam = msoRequest.getServiceInstancesRequest().getRequestDetails().getRequestParameters(); if(reqParam!=null && reqParam.isaLaCarteSet() && recipe==null){ return null; - }else if (recipe == null) { //aLaCarte wasn't sent, so we'll try the default + } + + //aLaCarte wasn't sent, so we'll try the default + serviceRecord = db.getServiceByModelName(defaultSourceServiceModelName); + if (serviceRecord == null) { serviceRecord = db.getServiceByModelName(defaultServiceModelName); - recipe = db.getServiceRecipeByModelUUID(serviceRecord.getModelUUID(), action.name()); } - if(modelInfo.getModelVersionId() == null) { + recipe = db.getServiceRecipeByModelUUID(serviceRecord.getModelUUID(), action.name()); + if(modelInfo.getModelVersionId() == null) { modelInfo.setModelVersionId(serviceRecord.getModelUUID()); } if(recipe==null){ |