diff options
author | Sonsino, Ofir (os0695) <os0695@intl.att.com> | 2018-05-06 13:31:32 +0300 |
---|---|---|
committer | Sonsino, Ofir (os0695) <os0695@intl.att.com> | 2018-05-06 13:31:32 +0300 |
commit | 9e8835dd593b382f369308fac3cc1cfc64c0971c (patch) | |
tree | f1e2af99695f2cbb91173a0547d991a9cb72652b /vid-app-common/src/main/java/org/onap/vid/mso | |
parent | caf0ab3707f8177e4b20d1cf735e5e20c2e6ec14 (diff) |
VoLTE support
Change-Id: I593b9c92bf9330c2d28f2ccbd59c0651b67fe94a
Issue-ID: VID-189
Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/mso')
5 files changed, 32 insertions, 1 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java index 8db7c3c5..f38a7fc6 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java @@ -16,6 +16,8 @@ public interface MsoBusinessLogic { // this function should get params from tosca and send them to instance at mso, then return success response. MsoResponseWrapper createSvcInstance(RequestDetails msoRequest) throws Exception; + MsoResponseWrapper createE2eSvcInstance(Object msoRequest) throws Exception; + MsoResponseWrapper createVnf(RequestDetails requestDetails, String serviceInstanceId) throws Exception; MsoResponseWrapper createNwInstance(RequestDetails requestDetails, String serviceInstanceId) throws Exception; diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java index 95b175aa..f15c7e5b 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java @@ -82,6 +82,21 @@ public class MsoBusinessLogicImpl implements MsoBusinessLogic { return msoClientInterface.createSvcInstance(msoRequest, endpoint); } + @Override + public MsoResponseWrapper createE2eSvcInstance(Object msoRequest) throws Exception { + String methodName = "createE2eSvcInstance "; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + String endpoint; + try { + endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_E2E_SVC_INSTANCE); + } catch (Exception exception) { + throw exception; + } + + return msoClientInterface.createE2eSvcInstance(msoRequest, endpoint); + } + void validateLineOfBusiness(RequestDetails requestDetails) { Object value = requestDetails.getAdditionalProperties(); diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java index 2d09630f..a8477563 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java @@ -17,6 +17,9 @@ public interface MsoInterface { * @throws Exception */ MsoResponseWrapper createSvcInstance(RequestDetails requestDetails, String endpoint) throws Exception; + + //For VoLTE E2E services + MsoResponseWrapper createE2eSvcInstance(Object requestDetails, String endpoint) throws Exception; /** * will create a virtual network function using MSO service. diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java index 584e8581..f6b3f946 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java @@ -70,6 +70,9 @@ public class MsoProperties extends SystemProperties { public static final String MSO_PASSWORD = "mso.password.x"; /** The Constant MSO_REST_API_SVC_INSTANCE. */ + public static final String MSO_REST_API_E2E_SVC_INSTANCE = "mso.restapi.svc.e2einstance"; // /e2eServiceInstances/v3 + + /** The Constant MSO_REST_API_SVC_INSTANCE. */ public static final String MSO_REST_API_SVC_INSTANCE = "mso.restapi.svc.instance"; // /serviceInstances/v2 /** The Constant MSO_REST_API_VNF_INSTANCE. */ diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java index 20f22afa..c3deec32 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java @@ -33,6 +33,14 @@ public class MsoRestClientNew extends RestMsoImplementation implements MsoInterf return createInstance(requestDetails, endpoint); } + + @Override + public MsoResponseWrapper createE2eSvcInstance(Object requestDetails, String endpoint) throws Exception { + String methodName = "createE2eSvcInstance "; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + return createInstance(requestDetails, endpoint); + } @Override public MsoResponseWrapper createVnf(RequestDetails requestDetails, String endpoint) throws Exception { @@ -126,7 +134,7 @@ public class MsoRestClientNew extends RestMsoImplementation implements MsoInterf } - public MsoResponseWrapper createInstance(RequestDetails request, String path) throws Exception { + public MsoResponseWrapper createInstance(Object request, String path) throws Exception { String methodName = "createInstance"; logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start"); |