From 3fe6d74f5c957c860afd2eff5cd2fa13fe6b951f Mon Sep 17 00:00:00 2001 From: seshukm Date: Mon, 6 Nov 2017 18:27:41 +0530 Subject: create service instance with source as empty IssueId: SO-272 Change-Id: Icd7888fbfececd799751febc7e3d7edbcffc3a0a Signed-off-by: seshukm --- .../java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java | 5 +++++ .../mso/apihandlerinfra/serviceinstancebeans/RequestInfo.java | 3 +++ 2 files changed, 8 insertions(+) (limited to 'mso-api-handlers/mso-api-handler-infra/src/main/java') 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 6413c4bf57..3c40003dd0 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 @@ -751,6 +751,11 @@ public class ServiceInstances { private RecipeLookupResult getServiceURI (CatalogDatabase db, MsoRequest msoRequest, Action action) throws Exception { // SERVICE REQUEST // Construct the default service name + // if no source is provided then make it as VID +// if (null == msoRequest.getRequestInfo().getSource() || msoRequest.getRequestInfo().getSource().isEmpty()){ +// msoRequest.getRequestInfo().setSource("VID"); +// } + // TODO need to make this a configurable property String defaultServiceModelName = msoRequest.getRequestInfo().getSource() + "_DEFAULT"; diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestInfo.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestInfo.java index ba017fe27d..6b8cb84b3c 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestInfo.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/serviceinstancebeans/RequestInfo.java @@ -143,6 +143,9 @@ public class RequestInfo { * */ public String getSource() { + if(null == source || source.isEmpty()){ + source = "VID"; + } return source; } -- cgit 1.2.3-korg