diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/MSONssmfApplication.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/MSONssmfApplication.java
index cd011e6..83a09dc 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/MSONssmfApplication.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/MSONssmfApplication.java
@@ -20,6 +20,7 @@
 
 package org.onap.so.adapters.nssmf;
 
+
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/config/NssmfAdapterConfig.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/config/NssmfAdapterConfig.java
new file mode 100644
index 0000000..6a59244
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/config/NssmfAdapterConfig.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2020, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ #       http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.nssmf.config;
+
+import lombok.Getter;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+@Getter
+public class NssmfAdapterConfig {
+
+    @Value("${mso.infra.endpoint}")
+    private String infraEndpoint;
+
+    @Value("${mso.infra.auth}")
+    private String infraAuth;
+}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/RequestDbConfig.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/config/RequestDbConfig.java
similarity index 98%
rename from adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/RequestDbConfig.java
rename to adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/config/RequestDbConfig.java
index 484f762..dcb5d61 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/RequestDbConfig.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/config/RequestDbConfig.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.so.adapters.nssmf;
+package org.onap.so.adapters.nssmf.config;
 
 import javax.persistence.EntityManagerFactory;
 import javax.sql.DataSource;
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/WebSecurityConfig.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/config/WebSecurityConfig.java
similarity index 97%
rename from adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/WebSecurityConfig.java
rename to adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/config/WebSecurityConfig.java
index 1522ca9..dfb2b61 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/WebSecurityConfig.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/config/WebSecurityConfig.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.so.adapters.nssmf;
+package org.onap.so.adapters.nssmf.config;
 
 import org.springframework.context.annotation.Configuration;
 import org.springframework.security.config.annotation.web.builders.HttpSecurity;
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java
new file mode 100644
index 0000000..e762bc0
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/consts/NssmfAdapterConsts.java
@@ -0,0 +1,187 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2020, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ #       http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.nssmf.consts;
+
+import org.onap.so.adapters.nssmf.entity.NssmfUrlInfo;
+import org.onap.so.adapters.nssmf.enums.ActionType;
+import org.onap.so.adapters.nssmf.enums.ExecutorType;
+import org.onap.so.adapters.nssmf.enums.HttpMethod;
+import org.onap.so.beans.nsmf.NetworkType;
+import java.util.HashMap;
+import java.util.Map;
+
+public class NssmfAdapterConsts {
+
+    public final static String ONAP_INTERNAL_TAG = "ONAP_internal";
+
+    public final static String CURRENT_INTERNAL_NSSMF_API_VERSION = "v1";
+
+    private static Map<String, NssmfUrlInfo> urlInfoMap = new HashMap<>();
+
+    private final static String EXTERNAL_CN_ALLOCATE_URL = "/api/rest/provMns/{apiVersion}/NSS/SliceProfiles";
+
+    private final static String EXTERNAL_TN_ALLOCATE_URL = "/api/rest/provMns/{apiVersion}/tn/NSS/SliceProfiles";
+
+    private final static String EXTERNAL_AN_ALLOCATE_URL = "/ObjectManagement/NSS/SliceProfiles";
+
+    private final static String INTERNAL_ALLOCATE_URL = "/onap/so/infra/3gppservices/{apiVersion}/allocate";
+
+    private final static String EXTERNAL_CN_DEALLOCATE_URL =
+            "/api/rest/provMns/{apiVersion}/NSS/SliceProfiles/{sliceProfileId}";
+
+    private final static String EXTERNAL_TN_DEALLOCATE_URL =
+            "/api/rest/provMns/{apiVersion}/tn/NSS/SliceProfiles/{sliceProfileId}";
+
+    private final static String EXTERNAL_AN_DEALLOCATE_URL = "/ObjectManagement/NSS/SliceProfiles/{SliceProfileId}";
+
+    private final static String INTERNAL_DEALLOCATE_URL = "/onap/so/infra/3gppservices/{apiVersion}/deAllocate";
+
+    private final static String EXTERNAL_CN_ACTIVATE_URL = "/api/rest/provMns/{apiVersion}/NSS/{snssai}/activation";
+
+    private final static String EXTERNAL_TN_ACTIVATE_URL = "/api/rest/provMns/{apiVersion}/tn/NSS/{snssai}/activation";
+
+    private final static String EXTERNAL_AN_ACTIVATE_URL = "/api/rest/provMns/{apiVersion}/an/NSS/{snssai}/activations";
+
+    private final static String INTERNAL_ACTIVATE_URL = "/onap/so/infra/3gppservices/{apiVersion}/activate";
+
+    private final static String EXTERNAL_CN_DEACTIVATE_URL = "/api/rest/provMns/{apiVersion}/NSS/{snssai}/deactivation";
+
+    private final static String EXTERNAL_TN_DEACTIVATE_URL =
+            "/api/rest/provMns/{apiVersion}/tn/NSS/{snssai}/deactivation";
+
+    private final static String EXTERNAL_AN_DEACTIVATE_URL =
+            "/api/rest/provMns/{apiVersion}/an/NSS/{snssai}/deactivation";
+
+    private final static String INTERNAL_DEACTIVATE_URL = "/onap/so/infra/3gppservices/{apiVersion}/deActivate";
+
+    //
+    private final static String EXTERNAL_CN_TERMINATE_URL =
+            "/api/rest/provMns/{apiVersion}/NSS/SliceProfiles/{SliceProfileId}";
+
+    private final static String EXTERNAL_TN_TERMINATE_URL =
+            "/api/rest/provMns/{apiVersion}/tn/NSS/SliceProfiles/{SliceProfileId}";
+
+    private final static String EXTERNAL_AN_TERMINATE_URL =
+            "/api/rest/provMns/{apiVersion}/an/NSS/SliceProfiles/{SliceProfileId}";
+
+    private final static String INTERNAL_TERMINATE_URL = "/onap/so/infra/3gppservices/{apiVersion}/terminate";
+
+    //
+    private final static String EXTERNAL_AN_MODIFY_URL =
+            "/api/rest/provMns/{apiVersion}/an/NSS/SliceProfiles/{SliceProfileId}";
+
+    private final static String INTERNAL_MODIFY_URL = "/onap/so/infra/3gppservices/{apiVersion}/modify";
+
+    //
+    private final static String EXTERNAL_QUERY_JOB_STATUS =
+            "/api/rest/provMns/{apiVersion}/NSS/jobs/{jobId}?responseId={responseId}";
+
+    private final static String INTERNAL_QUERY_SUB_NET_CAPABILITY =
+            "/onap/so/infra/3gppservices/{apiVersion}/subnetCapabilityQuery";
+
+    static {
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.ACCESS, ActionType.ALLOCATE),
+                new NssmfUrlInfo(EXTERNAL_AN_ALLOCATE_URL, HttpMethod.POST));
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.TRANSPORT, ActionType.ALLOCATE),
+                new NssmfUrlInfo(EXTERNAL_TN_ALLOCATE_URL, HttpMethod.POST));
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.CORE, ActionType.ALLOCATE),
+                new NssmfUrlInfo(EXTERNAL_CN_ALLOCATE_URL, HttpMethod.POST));
+        urlInfoMap.put(generateKey(ExecutorType.INTERNAL, null, ActionType.ALLOCATE),
+                new NssmfUrlInfo(INTERNAL_ALLOCATE_URL, HttpMethod.POST));
+
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.ACCESS, ActionType.DEALLOCATE),
+                new NssmfUrlInfo(EXTERNAL_AN_DEALLOCATE_URL, HttpMethod.DELETE));
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.TRANSPORT, ActionType.DEALLOCATE),
+                new NssmfUrlInfo(EXTERNAL_TN_DEALLOCATE_URL, HttpMethod.DELETE));
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.CORE, ActionType.DEALLOCATE),
+                new NssmfUrlInfo(EXTERNAL_CN_DEALLOCATE_URL, HttpMethod.DELETE));
+        urlInfoMap.put(generateKey(ExecutorType.INTERNAL, null, ActionType.DEALLOCATE),
+                new NssmfUrlInfo(INTERNAL_DEALLOCATE_URL, HttpMethod.DELETE));
+
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.ACCESS, ActionType.ACTIVATE),
+                new NssmfUrlInfo(EXTERNAL_AN_ACTIVATE_URL, HttpMethod.PUT));
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.TRANSPORT, ActionType.ACTIVATE),
+                new NssmfUrlInfo(EXTERNAL_TN_ACTIVATE_URL, HttpMethod.PUT));
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.CORE, ActionType.ACTIVATE),
+                new NssmfUrlInfo(EXTERNAL_CN_ACTIVATE_URL, HttpMethod.PUT));
+        urlInfoMap.put(generateKey(ExecutorType.INTERNAL, null, ActionType.ACTIVATE),
+                new NssmfUrlInfo(INTERNAL_ACTIVATE_URL, HttpMethod.PUT));
+
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.ACCESS, ActionType.DEACTIVATE),
+                new NssmfUrlInfo(EXTERNAL_AN_DEACTIVATE_URL, HttpMethod.PUT));
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.TRANSPORT, ActionType.DEACTIVATE),
+                new NssmfUrlInfo(EXTERNAL_TN_DEACTIVATE_URL, HttpMethod.PUT));
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.CORE, ActionType.DEACTIVATE),
+                new NssmfUrlInfo(EXTERNAL_CN_DEACTIVATE_URL, HttpMethod.PUT));
+        urlInfoMap.put(generateKey(ExecutorType.INTERNAL, null, ActionType.DEACTIVATE),
+                new NssmfUrlInfo(INTERNAL_DEACTIVATE_URL, HttpMethod.PUT));
+
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.ACCESS, ActionType.TERMINATE),
+                new NssmfUrlInfo(EXTERNAL_AN_TERMINATE_URL, HttpMethod.DELETE));
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.TRANSPORT, ActionType.TERMINATE),
+                new NssmfUrlInfo(EXTERNAL_TN_TERMINATE_URL, HttpMethod.DELETE));
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.CORE, ActionType.TERMINATE),
+                new NssmfUrlInfo(EXTERNAL_CN_TERMINATE_URL, HttpMethod.DELETE));
+        urlInfoMap.put(generateKey(ExecutorType.INTERNAL, null, ActionType.TERMINATE),
+                new NssmfUrlInfo(INTERNAL_TERMINATE_URL, HttpMethod.DELETE));
+
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.ACCESS, ActionType.MODIFY),
+                new NssmfUrlInfo(EXTERNAL_AN_MODIFY_URL, HttpMethod.PUT));
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.CORE, ActionType.MODIFY),
+                new NssmfUrlInfo(EXTERNAL_CN_ALLOCATE_URL, HttpMethod.PUT));
+        urlInfoMap.put(generateKey(ExecutorType.INTERNAL, null, ActionType.MODIFY),
+                new NssmfUrlInfo(INTERNAL_MODIFY_URL, HttpMethod.PUT));
+
+
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.CORE, ActionType.QUERY_JOB_STATUS),
+                new NssmfUrlInfo(EXTERNAL_QUERY_JOB_STATUS, HttpMethod.GET));
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.ACCESS, ActionType.QUERY_JOB_STATUS),
+                new NssmfUrlInfo(EXTERNAL_QUERY_JOB_STATUS, HttpMethod.GET));
+        urlInfoMap.put(generateKey(ExecutorType.EXTERNAL, NetworkType.TRANSPORT, ActionType.QUERY_JOB_STATUS),
+                new NssmfUrlInfo(EXTERNAL_QUERY_JOB_STATUS, HttpMethod.GET));
+
+        urlInfoMap.put(generateKey(ExecutorType.INTERNAL, null, ActionType.QUERY_SUB_NET_CAPABILITY),
+                new NssmfUrlInfo(INTERNAL_QUERY_SUB_NET_CAPABILITY, HttpMethod.POST));
+    }
+
+    /**
+     * get nssmf url info from consts
+     * 
+     * @param executorType {@link ExecutorType}
+     * @param networkType {@link NetworkType}
+     * @param actionType {@link ActionType}
+     * @return {@link NssmfUrlInfo}
+     */
+    public static NssmfUrlInfo getNssmfUrlInfo(ExecutorType executorType, NetworkType networkType,
+            ActionType actionType) {
+
+        return urlInfoMap.get(generateKey(executorType, networkType, actionType));
+    }
+
+    private static String generateKey(ExecutorType executorType, NetworkType networkType, ActionType actionType) {
+        if (ExecutorType.EXTERNAL.equals(executorType)) {
+            return executorType.name() + "_" + networkType.name() + "_" + actionType.name();
+        }
+        return executorType.name() + "_" + actionType.name();
+    }
+
+
+}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/controller/NssmfAdapterController.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/controller/NssmfAdapterController.java
new file mode 100644
index 0000000..5360657
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/controller/NssmfAdapterController.java
@@ -0,0 +1,61 @@
+package org.onap.so.adapters.nssmf.controller;
+
+import org.onap.so.adapters.nssmf.service.NssmfManagerService;
+import org.onap.so.beans.nsmf.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
+
+@RestController
+@RequestMapping(value = "/api/rest/provMns/v1", produces = {APPLICATION_JSON}, consumes = {APPLICATION_JSON})
+public class NssmfAdapterController {
+
+    private static final Logger logger = LoggerFactory.getLogger(NssmfAdapterController.class);
+
+    @Autowired
+    private NssmfManagerService nssmfManagerService;
+
+    @PostMapping(value = "/NSS/SliceProfiles")
+    public ResponseEntity allocateNssi(@RequestBody NssmfAdapterNBIRequest nbiRequest) {
+        return nssmfManagerService.allocateNssi(nbiRequest);
+    }
+
+    @PostMapping(value = "/NSS/SliceProfiles/{sliceProfileId}")
+    public ResponseEntity deAllocateNssi(@RequestBody NssmfAdapterNBIRequest nbiRequest,
+            @PathVariable("sliceProfileId") final String sliceProfileId) {
+        return nssmfManagerService.deAllocateNssi(nbiRequest, sliceProfileId);
+    }
+
+
+    @PostMapping(value = "/NSS/{snssai}/activation")
+    public ResponseEntity activateNssi(@RequestBody NssmfAdapterNBIRequest nbiRequest,
+            @PathVariable("snssai") String snssai) {
+        return nssmfManagerService.activateNssi(nbiRequest, snssai);
+    }
+
+    @PostMapping(value = "/NSS/{snssai}/deactivation")
+    public ResponseEntity deactivateNssi(@RequestBody NssmfAdapterNBIRequest nbiRequest,
+            @PathVariable("snssai") String snssai) {
+        return nssmfManagerService.deActivateNssi(nbiRequest, snssai);
+    }
+
+    @PostMapping(value = "/NSS/jobs/{jobId}")
+    public ResponseEntity queryJobStatus(@RequestBody NssmfAdapterNBIRequest nbiRequest,
+            @PathVariable("jobId") String jobId) {
+        return nssmfManagerService.queryJobStatus(nbiRequest, jobId);
+    }
+
+    @PostMapping(value = "/NSS/NSSISelectionCapability")
+    public ResponseEntity queryNSSISelectionCapability(@RequestBody NssmfAdapterNBIRequest nbiRequest) {
+        return nssmfManagerService.queryNSSISelectionCapability(nbiRequest);
+    }
+
+    @PostMapping(value = "/NSS/subnetCapabilityQuery")
+    public ResponseEntity querySubnetCapability(@RequestBody NssmfAdapterNBIRequest nbiRequest) {
+        return nssmfManagerService.querySubnetCapability(nbiRequest);
+    }
+
+}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/model/ErrorResponse.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/ErrorResponse.java
similarity index 97%
rename from adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/model/ErrorResponse.java
rename to adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/ErrorResponse.java
index 188349c..a8653f8 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/model/ErrorResponse.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/ErrorResponse.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.so.adapters.nssmf.model;
+package org.onap.so.adapters.nssmf.entity;
 
 public class ErrorResponse {
 
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/model/TokenResponse.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/NssmfInfo.java
similarity index 69%
copy from adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/model/TokenResponse.java
copy to adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/NssmfInfo.java
index 8007075..af26264 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/model/TokenResponse.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/NssmfInfo.java
@@ -18,27 +18,24 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.so.adapters.nssmf.model;
+package org.onap.so.adapters.nssmf.entity;
 
-public class TokenResponse {
+import lombok.Data;
 
-    private String accessToken;
+@Data
+public class NssmfInfo {
 
-    private int expires;
+    private String url;
 
-    public String getAccessToken() {
-        return accessToken;
-    }
+    private String ipAddress;
 
-    public void setAccessToken(String accessToken) {
-        this.accessToken = accessToken;
-    }
+    private String port;
 
-    public int getExpires() {
-        return expires;
-    }
+    private String insecure;
 
-    public void setExpires(int expires) {
-        this.expires = expires;
-    }
+    private String cacert;
+
+    private String userName;
+
+    private String password;
 }
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/NssmfUrlInfo.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/NssmfUrlInfo.java
new file mode 100644
index 0000000..f55ff10
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/NssmfUrlInfo.java
@@ -0,0 +1,17 @@
+package org.onap.so.adapters.nssmf.entity;
+
+import lombok.Data;
+import org.onap.so.adapters.nssmf.enums.HttpMethod;
+
+@Data
+public class NssmfUrlInfo {
+
+    private String url;
+
+    private HttpMethod httpMethod;
+
+    public NssmfUrlInfo(String url, HttpMethod httpMethod) {
+        this.url = url;
+        this.httpMethod = httpMethod;
+    }
+}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/RestResponse.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/RestResponse.java
similarity index 98%
rename from adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/RestResponse.java
rename to adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/RestResponse.java
index cc047e4..218867c 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/RestResponse.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/RestResponse.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.so.adapters.nssmf.rest;
+package org.onap.so.adapters.nssmf.entity;
 
 import java.util.Map;
 
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/model/TokenRequest.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/TokenRequest.java
similarity index 69%
rename from adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/model/TokenRequest.java
rename to adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/TokenRequest.java
index 3590c68..bfcb875 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/model/TokenRequest.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/TokenRequest.java
@@ -18,8 +18,11 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.so.adapters.nssmf.model;
+package org.onap.so.adapters.nssmf.entity;
 
+import lombok.Data;
+
+@Data
 public class TokenRequest {
 
     private String grantType;
@@ -27,28 +30,4 @@
     private String userName;
 
     private String value;
-
-    public String getGrantType() {
-        return grantType;
-    }
-
-    public void setGrantType(String grantType) {
-        this.grantType = grantType;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
 }
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/model/TokenResponse.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/TokenResponse.java
similarity index 75%
rename from adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/model/TokenResponse.java
rename to adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/TokenResponse.java
index 8007075..552612a 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/model/TokenResponse.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/entity/TokenResponse.java
@@ -18,27 +18,15 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.so.adapters.nssmf.model;
+package org.onap.so.adapters.nssmf.entity;
 
+
+import lombok.Data;
+
+@Data
 public class TokenResponse {
 
     private String accessToken;
 
     private int expires;
-
-    public String getAccessToken() {
-        return accessToken;
-    }
-
-    public void setAccessToken(String accessToken) {
-        this.accessToken = accessToken;
-    }
-
-    public int getExpires() {
-        return expires;
-    }
-
-    public void setExpires(int expires) {
-        this.expires = expires;
-    }
 }
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ActionType.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ActionType.java
new file mode 100644
index 0000000..ed327fd
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ActionType.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2020, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ #       http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.nssmf.enums;
+
+public enum ActionType {
+    ALLOCATE,
+
+    DEALLOCATE,
+
+    CREATE,
+
+    TERMINATE,
+
+    ACTIVATE,
+
+    DEACTIVATE,
+
+    QUERY_JOB_STATUS,
+
+    MODIFY_BY_ID,
+
+    MODIFY,
+
+    QUERY_NSSI_SELECTION_CAPABILITY,
+
+    QUERY_SUB_NET_CAPABILITY
+}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ExecutorType.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ExecutorType.java
new file mode 100644
index 0000000..a76a54c
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ExecutorType.java
@@ -0,0 +1,25 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2020, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ #       http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.nssmf.enums;
+
+public enum ExecutorType {
+    INTERNAL, EXTERNAL
+}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/HttpMethod.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/HttpMethod.java
similarity index 97%
rename from adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/HttpMethod.java
rename to adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/HttpMethod.java
index f6abd98..9271bb5 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/HttpMethod.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/HttpMethod.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.so.adapters.nssmf.rest;
+package org.onap.so.adapters.nssmf.enums;
 
 public enum HttpMethod {
     GET, POST, PUT, DELETE, PATCH;
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/JobStatus.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/JobStatus.java
similarity index 97%
rename from adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/JobStatus.java
rename to adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/JobStatus.java
index f2e651f..d5cc1df 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/JobStatus.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/JobStatus.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.so.adapters.nssmf.rest;
+package org.onap.so.adapters.nssmf.enums;
 
 import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
 
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/SelectionType.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/SelectionType.java
new file mode 100644
index 0000000..420dfdc
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/SelectionType.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2020, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ #       http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.nssmf.enums;
+
+public enum SelectionType {
+    NSSMF,
+
+    NSMF
+}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/exceptions/ApplicationException.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/exceptions/ApplicationException.java
index f63ba35..2461f5c 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/exceptions/ApplicationException.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/exceptions/ApplicationException.java
@@ -20,7 +20,7 @@
 
 package org.onap.so.adapters.nssmf.exceptions;
 
-import org.onap.so.adapters.nssmf.model.ErrorResponse;
+import org.onap.so.adapters.nssmf.entity.ErrorResponse;
 import org.springframework.http.ResponseEntity;
 import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
 
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProvider.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProvider.java
index c737ba6..665b111 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProvider.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProvider.java
@@ -22,6 +22,7 @@
 
 import org.onap.aai.domain.yang.EsrSystemInfoList;
 import org.onap.aai.domain.yang.EsrThirdpartySdncList;
+import org.onap.aai.domain.yang.ServiceInstance;
 
 public interface AaiServiceProvider {
 
@@ -29,4 +30,7 @@
 
     EsrSystemInfoList invokeGetThirdPartySdncEsrSystemInfo(String sdncId);
 
+    void invokeCreateServiceInstance(ServiceInstance nssiInstance, String globalSubscriberId, String serviceType,
+            String serviceInstanceId);
+
 }
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProviderImpl.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProviderImpl.java
index 8cb47eb..3f2e5b2 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProviderImpl.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/extclients/aai/AaiServiceProviderImpl.java
@@ -23,7 +23,9 @@
 
 import org.onap.aai.domain.yang.EsrSystemInfoList;
 import org.onap.aai.domain.yang.EsrThirdpartySdncList;
+import org.onap.aai.domain.yang.ServiceInstance;
 import org.onap.aaiclient.client.aai.AAIObjectType;
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -63,4 +65,12 @@
                 });
     }
 
+
+    @Override
+    public void invokeCreateServiceInstance(ServiceInstance nssiInstance, String globalSubscriberId, String serviceType,
+            String serviceInstanceId) {
+        AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId,
+                serviceType, serviceInstanceId);
+        aaiClientProvider.getAaiClient().create(uri, nssiInstance);
+    }
 }
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/NssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/NssmfManager.java
new file mode 100644
index 0000000..54ef1e0
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/NssmfManager.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2020, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ #       http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.nssmf.manager;
+
+import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
+import org.onap.so.adapters.nssmf.entity.RestResponse;
+import org.onap.so.beans.nsmf.*;
+
+public interface NssmfManager {
+
+    RestResponse allocateNssi(NssmfAdapterNBIRequest nssmfRequest) throws ApplicationException;
+
+    RestResponse deAllocateNssi(NssmfAdapterNBIRequest nssmfRequest, String sliceId) throws ApplicationException;
+
+    RestResponse activateNssi(NssmfAdapterNBIRequest nssmfRequest, String snssai) throws ApplicationException;
+
+    RestResponse deActivateNssi(NssmfAdapterNBIRequest nssmfRequest, String snssai) throws ApplicationException;
+
+    RestResponse queryJobStatus(NssmfAdapterNBIRequest jobReq, String jobId) throws ApplicationException;
+
+    RestResponse queryNSSISelectionCapability(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException;
+
+    RestResponse querySubnetCapability(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException;
+
+    RestResponse modifyNssi(NssmfAdapterNBIRequest modifyRequest) throws ApplicationException;
+}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/NssmfManagerBuilder.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/NssmfManagerBuilder.java
new file mode 100644
index 0000000..0b332af
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/NssmfManagerBuilder.java
@@ -0,0 +1,125 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2020, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ #       http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.nssmf.manager;
+
+import org.onap.so.adapters.nssmf.config.NssmfAdapterConfig;
+import org.onap.so.adapters.nssmf.consts.NssmfAdapterConsts;
+import org.onap.so.adapters.nssmf.enums.ActionType;
+import org.onap.so.adapters.nssmf.enums.ExecutorType;
+import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
+import org.onap.so.adapters.nssmf.manager.impl.external.ExternalAnNssmfManager;
+import org.onap.so.adapters.nssmf.manager.impl.external.ExternalCnNssmfManager;
+import org.onap.so.adapters.nssmf.manager.impl.internal.InternalAnNssmfManager;
+import org.onap.so.adapters.nssmf.manager.impl.internal.InternalCnNssmfManager;
+import org.onap.so.adapters.nssmf.manager.impl.internal.InternalTnNssmfManager;
+import org.onap.so.adapters.nssmf.manager.impl.*;
+import org.onap.so.adapters.nssmf.util.RestUtil;
+import org.onap.so.beans.nsmf.EsrInfo;
+import org.onap.so.beans.nsmf.NetworkType;
+import org.onap.so.beans.nsmf.ServiceInfo;
+import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository;
+
+public class NssmfManagerBuilder {
+
+    private BaseNssmfManager nssmfManger;
+
+    private RestUtil restUtil;
+
+    private ActionType actionType;
+
+    private ResourceOperationStatusRepository repository;
+
+    private ServiceInfo serviceInfo;
+
+    private NssmfAdapterConfig adapterConfig;
+
+    public NssmfManagerBuilder(EsrInfo esrInfo) throws ApplicationException {
+
+        ExecutorType executorType = getExecutorType(esrInfo);
+        NetworkType networkType = esrInfo.getNetworkType();
+
+        if (ExecutorType.INTERNAL.equals(executorType) && NetworkType.CORE.equals(networkType)) {
+            this.nssmfManger = new InternalCnNssmfManager().setEsrInfo(esrInfo).setExecutorType(executorType);
+            return;
+        }
+
+        if (ExecutorType.INTERNAL.equals(executorType) && NetworkType.TRANSPORT.equals(networkType)) {
+            this.nssmfManger = new InternalTnNssmfManager().setEsrInfo(esrInfo).setExecutorType(executorType);
+            return;
+        }
+
+        if (ExecutorType.INTERNAL.equals(executorType) && NetworkType.ACCESS.equals(networkType)) {
+            this.nssmfManger = new InternalAnNssmfManager().setEsrInfo(esrInfo).setExecutorType(executorType);
+            return;
+        }
+
+        if (ExecutorType.EXTERNAL.equals(executorType) && NetworkType.CORE.equals(networkType)) {
+            this.nssmfManger = new ExternalCnNssmfManager().setEsrInfo(esrInfo).setExecutorType(executorType)
+                    .setInitStatus("deactivated");
+            return;
+        }
+
+        if (ExecutorType.EXTERNAL.equals(executorType) && NetworkType.ACCESS.equals(networkType)) {
+            this.nssmfManger = new ExternalAnNssmfManager().setEsrInfo(esrInfo).setExecutorType(executorType)
+                    .setInitStatus("activated");
+            return;
+        }
+
+        throw new ApplicationException(404, "invalid domain and simulator");
+    }
+
+    private ExecutorType getExecutorType(EsrInfo esrInfo) {
+        if (NssmfAdapterConsts.ONAP_INTERNAL_TAG.equals(esrInfo.getVendor())) {
+            return ExecutorType.INTERNAL;
+        }
+        return ExecutorType.EXTERNAL;
+    }
+
+    public NssmfManagerBuilder setRestUtil(RestUtil restUtil) {
+        this.restUtil = restUtil;
+        return this;
+    }
+
+    public NssmfManagerBuilder setActionType(ActionType actionType) {
+        this.actionType = actionType;
+        return this;
+    }
+
+    public NssmfManagerBuilder setRepository(ResourceOperationStatusRepository repository) {
+        this.repository = repository;
+        return this;
+    }
+
+    public NssmfManagerBuilder setServiceInfo(ServiceInfo serviceInfo) {
+        this.serviceInfo = serviceInfo;
+        return this;
+    }
+
+    public NssmfManagerBuilder setAdapterConfig(NssmfAdapterConfig adapterConfig) {
+        this.adapterConfig = adapterConfig;
+        return this;
+    }
+
+    public NssmfManager build() {
+        return this.nssmfManger.setRestUtil(restUtil).setAdapterConfig(adapterConfig).setRepository(repository)
+                .setActionType(actionType).setServiceInfo(serviceInfo);
+    }
+}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java
new file mode 100644
index 0000000..185dfaf
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/BaseNssmfManager.java
@@ -0,0 +1,273 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2020, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ #       http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.nssmf.manager.impl;
+
+import org.onap.so.adapters.nssmf.config.NssmfAdapterConfig;
+import org.onap.so.adapters.nssmf.consts.NssmfAdapterConsts;
+import org.onap.so.adapters.nssmf.entity.NssmfUrlInfo;
+import org.onap.so.adapters.nssmf.enums.*;
+import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
+import org.onap.so.adapters.nssmf.entity.RestResponse;
+import org.onap.so.adapters.nssmf.manager.NssmfManager;
+import org.onap.so.adapters.nssmf.util.RestUtil;
+import org.onap.so.beans.nsmf.*;
+import org.onap.so.db.request.beans.ResourceOperationStatus;
+import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.data.domain.Example;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.StatusDesc.ALLOCATE_NSS_SUCCESS;
+import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.StatusDesc.MODIFY_NSS_SUCCESS;
+import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
+
+public abstract class BaseNssmfManager implements NssmfManager {
+
+    private static final Logger logger = LoggerFactory.getLogger(BaseNssmfManager.class);
+
+    protected RestUtil restUtil;
+
+    protected ResourceOperationStatusRepository repository;
+
+    protected NssmfAdapterConfig adapterConfig;
+
+    protected ActionType actionType;
+
+    protected EsrInfo esrInfo;
+
+    protected String nssmfUrl;
+
+    protected HttpMethod httpMethod;
+
+    protected String initStatus;
+
+    protected ServiceInfo serviceInfo;
+
+    protected RestResponse restResponse;
+
+    private ExecutorType executorType = ExecutorType.INTERNAL;
+
+    private Map<String, String> params = new HashMap<>(); // request params
+
+    @Override
+    public RestResponse allocateNssi(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
+
+        this.params.clear();
+        this.urlHandler();
+        String requestBody = wrapAllocateReqBody(nbiRequest);
+
+        this.restResponse = sendRequest(requestBody);
+
+        this.afterRequest();
+
+        return restResponse;
+    }
+
+    protected abstract String wrapAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException;
+
+    @Override
+    public RestResponse modifyNssi(NssmfAdapterNBIRequest modifyRequest) throws ApplicationException {
+        this.params.clear();
+        this.urlHandler();
+        String requestBody = wrapModifyReqBody(modifyRequest);
+
+        this.restResponse = sendRequest(requestBody);
+
+        this.afterRequest();
+
+        return restResponse;
+    }
+
+    protected abstract String wrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException;
+
+    @Override
+    public RestResponse deAllocateNssi(NssmfAdapterNBIRequest nbiRequest, String sliceId) throws ApplicationException {
+        this.params.clear();
+        this.params.put("sliceProfileId", sliceId);
+
+        this.urlHandler();
+
+        String reqBody = wrapDeAllocateReqBody(nbiRequest.getDeAllocateNssi());
+
+        this.restResponse = sendRequest(reqBody);
+
+        this.afterRequest();
+
+        return restResponse;
+    }
+
+    protected abstract String wrapDeAllocateReqBody(DeAllocateNssi deAllocateNssi) throws ApplicationException;
+
+    protected abstract String wrapReqBody(Object object) throws ApplicationException;
+
+    @Override
+    public RestResponse activateNssi(NssmfAdapterNBIRequest nbiRequest, String snssai) throws ApplicationException {
+        this.params.clear();
+        this.params.put("snssai", snssai);
+
+        this.urlHandler();
+
+        String reqBody = wrapActDeActReqBody(nbiRequest.getActDeActNssi());
+
+        this.restResponse = sendRequest(reqBody);
+
+        this.afterRequest();
+
+        return restResponse;
+    }
+
+    @Override
+    public RestResponse deActivateNssi(NssmfAdapterNBIRequest nbiRequest, String snssai) throws ApplicationException {
+        return activateNssi(nbiRequest, snssai);
+    }
+
+    protected abstract String wrapActDeActReqBody(ActDeActNssi actDeActNssi) throws ApplicationException;
+
+    @Override
+    public RestResponse queryJobStatus(NssmfAdapterNBIRequest jobReq, String jobId) throws ApplicationException {
+        this.params.clear();
+        this.params.put("jobId", jobId);
+        this.params.put("responseId", jobReq.getResponseId());
+        this.urlHandler();
+
+        /**
+         * find by jobId and nsiId jobId -> OperationId nsiId -> ServiceId serviceUuid -> resourceTemplateUUID
+         */
+        ResourceOperationStatus status =
+                getOperationStatus(serviceInfo.getNsiId(), jobId, serviceInfo.getServiceUuid());
+
+        this.restResponse = doQueryJobStatus(status);
+
+        afterQueryJobStatus(status);
+        return restResponse;
+    }
+
+    protected abstract RestResponse doQueryJobStatus(ResourceOperationStatus status) throws ApplicationException;
+
+
+    protected abstract void afterQueryJobStatus(ResourceOperationStatus status);
+
+    private ResourceOperationStatus getOperationStatus(String nsiId, String jobId, String serviceUuid) {
+
+        ResourceOperationStatus status = new ResourceOperationStatus(nsiId, jobId, serviceUuid);
+
+        Optional<ResourceOperationStatus> optional = repository.findOne(Example.of(status));
+
+        return optional.orElse(null);
+    }
+
+    @Override
+    public RestResponse queryNSSISelectionCapability(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
+        SelectionType res = doQueryNSSISelectionCapability();
+        HashMap<String, String> hashMap = new HashMap<>();
+        hashMap.put("selection", res.name());
+        RestResponse restResponse = new RestResponse();
+        restResponse.setStatus(200);
+        restResponse.setResponseContent(marshal(hashMap));
+        return restResponse;
+    }
+
+    protected abstract SelectionType doQueryNSSISelectionCapability();
+
+    @Override
+    public RestResponse querySubnetCapability(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
+        this.params.clear();
+        this.urlHandler();
+
+        return doQuerySubnetCapability(nbiRequest.getSubnetCapabilityQuery());
+    }
+
+    protected abstract RestResponse doQuerySubnetCapability(String req) throws ApplicationException;
+
+    /**
+     * send request to nssmf
+     * 
+     * @param content request body
+     * @return response
+     * @throws ApplicationException
+     */
+    protected abstract RestResponse sendRequest(String content) throws ApplicationException;
+
+    /**
+     * handle the url before request to nssmf, include get the nssmf request url, replace the path variable
+     */
+    private void urlHandler() {
+        NssmfUrlInfo nssmfUrlInfo =
+                NssmfAdapterConsts.getNssmfUrlInfo(this.executorType, this.esrInfo.getNetworkType(), actionType);
+        this.nssmfUrl = nssmfUrlInfo.getUrl();
+        this.httpMethod = nssmfUrlInfo.getHttpMethod();
+        this.nssmfUrl = nssmfUrl.replaceAll("\\{apiVersion}", getApiVersion());
+        this.params.forEach((k, v) -> this.nssmfUrl = this.nssmfUrl.replaceAll("\\{" + k + "}", v));
+    }
+
+    /**
+     * after request
+     */
+    protected abstract void afterRequest() throws ApplicationException;
+
+    protected abstract String getApiVersion();
+
+    public RestUtil getRestUtil() {
+        return restUtil;
+    }
+
+    public BaseNssmfManager setEsrInfo(EsrInfo esrInfo) {
+        this.esrInfo = esrInfo;
+        return this;
+    }
+
+    public BaseNssmfManager setExecutorType(ExecutorType executorType) {
+        this.executorType = executorType;
+        return this;
+    }
+
+    public BaseNssmfManager setRestUtil(RestUtil restUtil) {
+        this.restUtil = restUtil;
+        return this;
+    }
+
+    public BaseNssmfManager setActionType(ActionType actionType) {
+        this.actionType = actionType;
+        return this;
+    }
+
+    public BaseNssmfManager setRepository(ResourceOperationStatusRepository repository) {
+        this.repository = repository;
+        return this;
+    }
+
+    public BaseNssmfManager setServiceInfo(ServiceInfo serviceInfo) {
+        this.serviceInfo = serviceInfo;
+        return this;
+    }
+
+    public BaseNssmfManager setInitStatus(String initStatus) {
+        this.initStatus = initStatus;
+        return this;
+    }
+
+    public BaseNssmfManager setAdapterConfig(NssmfAdapterConfig adapterConfig) {
+        this.adapterConfig = adapterConfig;
+        return this;
+    }
+}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java
new file mode 100644
index 0000000..f6584da
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java
@@ -0,0 +1,201 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2020, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ #       http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.nssmf.manager.impl;
+
+import org.apache.http.Header;
+import org.apache.http.message.BasicHeader;
+import org.onap.aai.domain.yang.ServiceInstance;
+import org.onap.so.adapters.nssmf.entity.NssmfInfo;
+import org.onap.so.adapters.nssmf.entity.RestResponse;
+import org.onap.so.adapters.nssmf.enums.JobStatus;
+import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
+import org.onap.so.adapters.nssmf.util.NssmfAdapterUtil;
+import org.onap.so.beans.nsmf.*;
+import org.onap.so.db.request.beans.ResourceOperationStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import static java.lang.String.valueOf;
+import static org.onap.so.adapters.nssmf.enums.JobStatus.*;
+import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.StatusDesc.*;
+import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
+import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.unMarshal;
+
+public abstract class ExternalNssmfManager extends BaseNssmfManager {
+
+    private static final Logger logger = LoggerFactory.getLogger(ExternalNssmfManager.class);
+
+    @Override
+    protected String wrapAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
+        return doWrapExtAllocateReqBody(nbiRequest);
+    }
+
+    protected abstract String doWrapExtAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException;
+
+    @Override
+    protected String wrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
+        return doWrapModifyReqBody(nbiRequest);
+    }
+
+    protected abstract String doWrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException;
+
+    @Override
+    protected String wrapDeAllocateReqBody(DeAllocateNssi deAllocateNssi) throws ApplicationException {
+        return doWrapDeAllocateReqBody(deAllocateNssi);
+    }
+
+    protected abstract String doWrapDeAllocateReqBody(DeAllocateNssi deAllocateNssi) throws ApplicationException;
+
+    @Override
+    protected void afterQueryJobStatus(ResourceOperationStatus status) {
+        if (Integer.parseInt(status.getProgress()) == 100) {
+
+            ServiceInstance nssiInstance = new ServiceInstance();
+            nssiInstance.setServiceInstanceId(serviceInfo.getNssiId());
+            nssiInstance.setServiceInstanceName(serviceInfo.getNssiName());
+            nssiInstance.setServiceType(serviceInfo.getSST());
+
+            nssiInstance.setOrchestrationStatus(initStatus);
+            nssiInstance.setModelInvariantId(serviceInfo.getServiceInvariantUuid());
+            nssiInstance.setModelVersionId(serviceInfo.getServiceUuid());
+            nssiInstance.setServiceInstanceLocationId(serviceInfo.getPLMNIdList());
+            nssiInstance.setEnvironmentContext(esrInfo.getNetworkType().getNetworkType());
+            nssiInstance.setServiceRole("nssi");
+
+            restUtil.createServiceInstance(nssiInstance, serviceInfo);
+        }
+    }
+
+
+
+    @Override
+    protected String wrapActDeActReqBody(ActDeActNssi actDeActNssi) throws ApplicationException {
+        return marshal(actDeActNssi);
+    }
+
+    protected RestResponse doQueryJobStatus(ResourceOperationStatus status) throws ApplicationException {
+        return doResponseStatus(status);
+    }
+
+    private RestResponse doResponseStatus(ResourceOperationStatus status) throws ApplicationException {
+        RestResponse restResponse = sendRequest(null);
+        ResponseDescriptor rspDesc =
+                unMarshal(restResponse.getResponseContent(), JobStatusResponse.class).getResponseDescriptor();
+        updateRequestDbJobStatus(rspDesc, status, restResponse);
+        return restResponse;
+    }
+
+    @Override
+    protected String wrapReqBody(Object object) throws ApplicationException {
+        return marshal(object);
+    }
+
+    @Override
+    protected RestResponse sendRequest(String content) throws ApplicationException {
+        return sendExternalRequest(content);
+    }
+
+    protected void createStatus(JobStatus jobStatus) throws ApplicationException {
+        if (valueOf(restResponse.getStatus()).startsWith("2")) {
+            logger.info("save segment and operaton info -> begin");
+            NssiResponse response = unMarshal(restResponse.getResponseContent(), NssiResponse.class);
+            ResourceOperationStatus status = new ResourceOperationStatus(serviceInfo.getNsiId(), response.getJobId(),
+                    serviceInfo.getServiceUuid());
+            status.setResourceInstanceID(response.getNssiId());
+
+            updateDbStatus(status, restResponse.getStatus(), jobStatus, NssmfAdapterUtil.getStatusDesc(actionType));
+            logger.info("save segment and operaton info -> end");
+        }
+    }
+
+    @Override
+    protected String getApiVersion() {
+        return "v1";
+    }
+
+
+    // external
+    protected RestResponse sendExternalRequest(String content) throws ApplicationException {
+        NssmfInfo nssmfInfo = restUtil.getNssmfHost(esrInfo);
+        Header header = new BasicHeader("X-Auth-Token", restUtil.getToken(nssmfInfo));
+        String nssmfUrl = nssmfInfo.getUrl() + this.nssmfUrl;
+        return restUtil.send(nssmfUrl, this.httpMethod, content, header);
+    }
+
+    private void updateRequestDbJobStatus(ResponseDescriptor rspDesc, ResourceOperationStatus status, RestResponse rsp)
+            throws ApplicationException {
+
+        switch (fromString(rspDesc.getStatus())) {
+            case STARTED:
+                updateDbStatus(status, rsp.getStatus(), STARTED, QUERY_JOB_STATUS_SUCCESS);
+                break;
+            case PROCESSING:
+                updateDbStatus(status, rsp.getStatus(), PROCESSING, QUERY_JOB_STATUS_SUCCESS);
+                break;
+            case FINISHED:
+                if (rspDesc.getProgress() == 100) {
+                    updateDbStatus(status, rsp.getStatus(), FINISHED, QUERY_JOB_STATUS_SUCCESS);
+                }
+                break;
+            case ERROR:
+                updateDbStatus(status, rsp.getStatus(), ERROR, QUERY_JOB_STATUS_FAILED);
+                throw new ApplicationException(500, QUERY_JOB_STATUS_FAILED);
+        }
+    }
+
+    protected void updateDbStatus(ResourceOperationStatus status, int rspStatus, JobStatus jobStatus,
+            String description) {
+        status.setErrorCode(valueOf(rspStatus));
+        status.setStatus(jobStatus.toString());
+        status.setStatusDescription(description);
+        logger.info("Updating DB status");
+        repository.save(status);
+        logger.info("Updating successful");
+    }
+
+    @Override
+    protected RestResponse doQuerySubnetCapability(String req) throws ApplicationException {
+        RestResponse response = new RestResponse();
+        response.setStatus(200);
+        response.setResponseContent(null);
+        return response;
+    }
+
+    /**
+     * after request, if response code is 2XX, continue handle, else return
+     */
+    @Override
+    protected void afterRequest() throws ApplicationException {
+        if (valueOf(restResponse.getStatus()).startsWith("2")) {
+            doAfterRequest();
+        }
+    }
+
+
+    protected void doAfterRequest() throws ApplicationException {
+        //
+        NssiResponse response = unMarshal(restResponse.getResponseContent(), NssiResponse.class);
+        ResourceOperationStatus status =
+                new ResourceOperationStatus(serviceInfo.getNsiId(), response.getJobId(), serviceInfo.getServiceUuid());
+        status.setResourceInstanceID(response.getNssiId());
+
+        updateDbStatus(status, restResponse.getStatus(), STARTED, NssmfAdapterUtil.getStatusDesc(actionType));
+    }
+}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java
new file mode 100644
index 0000000..a945823
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java
@@ -0,0 +1,133 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2020, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ #       http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.nssmf.manager.impl;
+
+import org.apache.http.Header;
+import org.apache.http.message.BasicHeader;
+import org.onap.so.adapters.nssmf.consts.NssmfAdapterConsts;
+import org.onap.so.adapters.nssmf.entity.RestResponse;
+import org.onap.so.adapters.nssmf.enums.JobStatus;
+import org.onap.so.adapters.nssmf.enums.SelectionType;
+import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
+import org.onap.so.beans.nsmf.*;
+import org.onap.so.db.request.beans.ResourceOperationStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import static org.onap.so.adapters.nssmf.enums.JobStatus.PROCESSING;
+import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
+
+public abstract class InternalNssmfManager extends BaseNssmfManager {
+
+    private static final Logger logger = LoggerFactory.getLogger(InternalNssmfManager.class);
+
+    @Override
+    protected String wrapAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
+        return doWrapAllocateReqBody(nbiRequest);
+    }
+
+    protected abstract String doWrapAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException;
+
+    @Override
+    protected String wrapReqBody(Object object) throws ApplicationException {
+        NssmfRequest nssmfRequest = new NssmfRequest(serviceInfo, esrInfo.getNetworkType(), object);
+        return marshal(nssmfRequest);
+    }
+
+
+    @Override
+    protected String wrapActDeActReqBody(ActDeActNssi actDeActNssi) throws ApplicationException {
+
+        return wrapReqBody(actDeActNssi);
+    }
+
+
+    @Override
+    protected String wrapDeAllocateReqBody(DeAllocateNssi deAllocateNssi) throws ApplicationException {
+        return wrapReqBody(deAllocateNssi);
+    }
+
+
+    @Override
+    protected RestResponse doQueryJobStatus(ResourceOperationStatus status) throws ApplicationException {
+        return responseDBStatus(status);
+    }
+
+    private RestResponse responseDBStatus(ResourceOperationStatus status) throws ApplicationException {
+        ResponseDescriptor descriptor = new ResponseDescriptor();
+        if (status == null) {
+            descriptor.setProgress(0);
+            descriptor.setStatus(PROCESSING.name());
+            descriptor.setStatusDescription("Initiating Nssi Instance");
+            return restUtil.createResponse(200, marshal(descriptor));
+        }
+        descriptor.setStatus(status.getStatus());
+        descriptor.setStatusDescription(status.getStatusDescription());
+        descriptor.setProgress(Integer.parseInt(status.getProgress()));
+        // descriptor.setResponseId(status.getOperationId());
+        return restUtil.createResponse(200, marshal(descriptor));
+    }
+
+    @Override
+    protected RestResponse sendRequest(String content) {
+        return sendInternalRequest(content);
+    }
+
+    @Override
+    protected void afterRequest() {
+        //
+    }
+
+    @Override
+    protected void afterQueryJobStatus(ResourceOperationStatus status) {
+        // internal
+    }
+
+    // internal
+    private RestResponse sendInternalRequest(String content) {
+        Header header = new BasicHeader("X-Auth-Token", adapterConfig.getInfraAuth());
+        this.nssmfUrl = adapterConfig.getInfraEndpoint() + this.nssmfUrl;
+        return restUtil.send(this.nssmfUrl, this.httpMethod, content, header);
+    }
+
+    @Override
+    protected String getApiVersion() {
+        return NssmfAdapterConsts.CURRENT_INTERNAL_NSSMF_API_VERSION;
+    }
+
+
+    @Override
+    protected SelectionType doQueryNSSISelectionCapability() {
+        return SelectionType.NSSMF;
+    }
+
+    @Override
+    protected String wrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
+        return doWrapModifyReqBody(nbiRequest);
+    }
+
+    protected abstract String doWrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException;
+
+    @Override
+    protected RestResponse doQuerySubnetCapability(String req) throws ApplicationException {
+        // handler
+        return sendRequest(req);
+    }
+}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java
new file mode 100644
index 0000000..e244a85
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalAnNssmfManager.java
@@ -0,0 +1,109 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2020, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ #       http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.nssmf.manager.impl.external;
+
+import org.onap.so.adapters.nssmf.entity.RestResponse;
+import org.onap.so.adapters.nssmf.enums.ActionType;
+import org.onap.so.adapters.nssmf.enums.JobStatus;
+import org.onap.so.adapters.nssmf.enums.SelectionType;
+import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
+import org.onap.so.adapters.nssmf.manager.impl.ExternalNssmfManager;
+import org.onap.so.adapters.nssmf.util.NssmfAdapterUtil;
+import org.onap.so.beans.nsmf.DeAllocateNssi;
+import org.onap.so.beans.nsmf.NssiResponse;
+import org.onap.so.beans.nsmf.NssmfAdapterNBIRequest;
+import org.onap.so.db.request.beans.ResourceOperationStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.HashMap;
+import java.util.Map;
+import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
+import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.unMarshal;
+
+
+public class ExternalAnNssmfManager extends ExternalNssmfManager {
+
+    private static final Logger logger = LoggerFactory.getLogger(ExternalAnNssmfManager.class);
+
+    @Override
+    protected String doWrapExtAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
+        return marshal(nbiRequest.getAllocateAnNssi().getSliceProfile());
+    }
+
+    @Override
+    protected void doAfterRequest() throws ApplicationException {
+        if (ActionType.ALLOCATE.equals(actionType) || ActionType.DEALLOCATE.equals(actionType)) {
+            @SuppressWarnings("unchecked")
+            Map<String, String> response = unMarshal(restResponse.getResponseContent(), Map.class);
+
+            String nssiId = response.get("nSSId");
+
+            NssiResponse resp = new NssiResponse();
+            resp.setJobId(nssiId);
+            resp.setNssiId(nssiId);
+
+            RestResponse returnRsp = new RestResponse();
+
+            returnRsp.setStatus(202);
+            returnRsp.setResponseContent(marshal(resp));
+            restResponse = returnRsp;
+
+            ResourceOperationStatus status =
+                    new ResourceOperationStatus(serviceInfo.getNsiId(), nssiId, serviceInfo.getServiceUuid());
+            status.setResourceInstanceID(nssiId);
+
+            updateDbStatus(status, restResponse.getStatus(), JobStatus.FINISHED,
+                    NssmfAdapterUtil.getStatusDesc(actionType));
+        }
+        // todo
+    }
+
+    @Override
+    protected String doWrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
+        // TODO
+        return null;
+    }
+
+    @Override
+    protected String doWrapDeAllocateReqBody(DeAllocateNssi deAllocateNssi) throws ApplicationException {
+        Map<String, String> request = new HashMap<>();
+        request.put("nSSId", deAllocateNssi.getNssiId());
+        return marshal(request);
+    }
+
+
+    @Override
+    public RestResponse modifyNssi(NssmfAdapterNBIRequest modifyRequest) throws ApplicationException {
+        // TODO
+        return null;
+    }
+
+    @Override
+    public RestResponse activateNssi(NssmfAdapterNBIRequest nbiRequest, String snssai) throws ApplicationException {
+        // TODO
+        return null;
+    }
+
+    @Override
+    protected SelectionType doQueryNSSISelectionCapability() {
+        return SelectionType.NSSMF;
+    }
+}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalCnNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalCnNssmfManager.java
new file mode 100644
index 0000000..fb76adc
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/external/ExternalCnNssmfManager.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2020, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ #       http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.nssmf.manager.impl.external;
+
+import org.onap.so.adapters.nssmf.enums.SelectionType;
+import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
+import org.onap.so.adapters.nssmf.manager.impl.ExternalNssmfManager;
+import org.onap.so.beans.nsmf.DeAllocateNssi;
+import org.onap.so.beans.nsmf.NssmfAdapterNBIRequest;
+import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
+
+public class ExternalCnNssmfManager extends ExternalNssmfManager {
+
+    @Override
+    protected String doWrapExtAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
+        return marshal(nbiRequest.getAllocateCnNssi());
+    }
+
+    @Override
+    protected String doWrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
+        return marshal(nbiRequest.getAllocateCnNssi());
+    }
+
+    @Override
+    protected String doWrapDeAllocateReqBody(DeAllocateNssi deAllocateNssi) throws ApplicationException {
+        return marshal(deAllocateNssi);
+    }
+
+    @Override
+    protected SelectionType doQueryNSSISelectionCapability() {
+
+        return SelectionType.NSMF;
+    }
+
+}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalAnNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalAnNssmfManager.java
new file mode 100644
index 0000000..dc65283
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalAnNssmfManager.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2020, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ #       http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.nssmf.manager.impl.internal;
+
+import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
+import org.onap.so.adapters.nssmf.manager.impl.InternalNssmfManager;
+import org.onap.so.beans.nsmf.*;
+import java.util.HashMap;
+import java.util.Map;
+import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
+
+
+public class InternalAnNssmfManager extends InternalNssmfManager {
+
+    @Override
+    protected String doWrapAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
+        NssmfRequest request =
+                new NssmfRequest(serviceInfo, nbiRequest.getEsrInfo().getNetworkType(), nbiRequest.getAllocateAnNssi());
+        request.setName(nbiRequest.getAllocateAnNssi().getNssiName());
+        return marshal(request);
+    }
+
+    @Override
+    protected String doWrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
+        AllocateAnNssi allocateAnNssi = nbiRequest.getAllocateAnNssi();
+        AnSliceProfile sliceProfile = allocateAnNssi.getSliceProfile();
+        Map<String, Object> additional = new HashMap<>();
+        additional.put("modifyAction", "allocate");
+        additional.put("snssaiList", sliceProfile.getSNSSAIList());
+        additional.put("sliceProfileId", sliceProfile.getSliceProfileId());
+        additional.put("nsiInfo", allocateAnNssi.getNsiInfo());
+        additional.put("scriptName", allocateAnNssi.getScriptName());
+        NssmfRequest request = new NssmfRequest(serviceInfo, esrInfo.getNetworkType(), additional);
+        return marshal(request);
+    }
+}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalCnNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalCnNssmfManager.java
new file mode 100644
index 0000000..4a93b30
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalCnNssmfManager.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2020, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ #       http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.nssmf.manager.impl.internal;
+
+import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
+import org.onap.so.adapters.nssmf.manager.impl.InternalNssmfManager;
+import org.onap.so.beans.nsmf.*;
+import java.util.HashMap;
+import java.util.Map;
+import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
+
+public class InternalCnNssmfManager extends InternalNssmfManager {
+
+    @Override
+    protected String doWrapAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
+
+        NssmfRequest request =
+                new NssmfRequest(serviceInfo, nbiRequest.getEsrInfo().getNetworkType(), nbiRequest.getAllocateCnNssi());
+        request.setName(nbiRequest.getAllocateCnNssi().getNssiName());
+        return marshal(request);
+    }
+
+    @Override
+    protected String doWrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
+        AllocateCnNssi allocateCnNssi = nbiRequest.getAllocateCnNssi();
+        CnSliceProfile cnSliceProfile = allocateCnNssi.getSliceProfile();
+        Map<String, Object> additional = new HashMap<>();
+        additional.put("modifyAction", "allocate");
+        additional.put("nsiInfo", allocateCnNssi.getNsiInfo());
+        additional.put("scriptName", allocateCnNssi.getScriptName());
+        additional.put("snssaiList", cnSliceProfile.getSnssaiList());
+        additional.put("sliceProfileId", cnSliceProfile.getSliceProfileId());
+
+        NssmfRequest request = new NssmfRequest(serviceInfo, esrInfo.getNetworkType(), additional);
+        return marshal(request);
+    }
+
+}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalTnNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalTnNssmfManager.java
new file mode 100644
index 0000000..8bfbd55
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/internal/InternalTnNssmfManager.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2020, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ #       http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.nssmf.manager.impl.internal;
+
+import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
+import org.onap.so.adapters.nssmf.manager.impl.InternalNssmfManager;
+import org.onap.so.beans.nsmf.*;
+import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
+
+public class InternalTnNssmfManager extends InternalNssmfManager {
+
+    @Override
+    protected String doWrapAllocateReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
+
+        return marshal(new NssmfRequest(serviceInfo, nbiRequest.getEsrInfo().getNetworkType(),
+                nbiRequest.getAllocateTnNssi()));
+    }
+
+    @Override
+    protected String doWrapModifyReqBody(NssmfAdapterNBIRequest nbiRequest) throws ApplicationException {
+        // TODO
+        return null;
+    }
+}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/NssmfAdapterRest.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/NssmfAdapterRest.java
index d8e1e36..4fdcbf1 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/NssmfAdapterRest.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/NssmfAdapterRest.java
@@ -20,6 +20,7 @@
 
 package org.onap.so.adapters.nssmf.rest;
 
+import org.onap.so.adapters.nssmf.entity.RestResponse;
 import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
 import org.onap.so.beans.nsmf.JobStatusRequest;
 import org.onap.so.beans.nsmf.NssiActDeActRequest;
@@ -43,6 +44,7 @@
 import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
 import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.assertObjectNotNull;
 
+@Deprecated
 @Controller
 @RequestMapping(value = "/api/rest/provMns/v1", produces = {APPLICATION_JSON}, consumes = {APPLICATION_JSON})
 public class NssmfAdapterRest {
@@ -52,17 +54,6 @@
     @Autowired
     private NssmfManager nssmfMgr;
 
-    @PostMapping(value = "/NSS/SliceProfiles")
-    public ResponseEntity allocateNssi(@RequestBody NssiAllocateRequest allocate) {
-        try {
-            logger.info("Nssmi allocate request is invoked");
-            assertObjectNotNull(allocate);
-            RestResponse rsp = getNssmfMgr().allocateNssi(allocate);
-            return buildResponse(rsp);
-        } catch (ApplicationException e) {
-            return e.buildErrorResponse();
-        }
-    }
 
     @PostMapping(value = "/NSS/nssi")
     public ResponseEntity createNssi(@RequestBody NssiCreateRequest create) {
@@ -76,19 +67,6 @@
         }
     }
 
-    @PostMapping(value = "/NSS/SliceProfiles/{sliceProfileId}")
-    public ResponseEntity deAllocateNssi(@RequestBody NssiDeAllocateRequest deAllocate,
-            @PathVariable("sliceProfileId") final String sliceId) {
-        try {
-            logger.info("Nssmf deallocate request is invoked");
-            assertObjectNotNull(deAllocate);
-            RestResponse rsp = getNssmfMgr().deAllocateNssi(deAllocate, sliceId);
-            return buildResponse(rsp);
-        } catch (ApplicationException e) {
-            return e.buildErrorResponse();
-        }
-    }
-
     @PostMapping(value = "/NSS/nssi/{nssiId}")
     public ResponseEntity terminateNssi(@RequestBody NssiTerminateRequest terminate,
             @PathVariable("nssiId") String nssiId) {
@@ -128,44 +106,6 @@
         }
     }
 
-    @PostMapping(value = "/NSS/{snssai}/activation")
-    public ResponseEntity activateNssi(@RequestBody NssiActDeActRequest activate,
-            @PathVariable("snssai") String snssai) {
-        try {
-            logger.info("Nssmf activate request is invoked");
-            assertObjectNotNull(activate);
-            RestResponse rsp = getNssmfMgr().activateNssi(activate, snssai);
-            return buildResponse(rsp);
-        } catch (ApplicationException e) {
-            return e.buildErrorResponse();
-        }
-    }
-
-    @PostMapping(value = "/NSS/{snssai}/deactivation")
-    public ResponseEntity deactivateNssi(@RequestBody NssiActDeActRequest deActivate,
-            @PathVariable("snssai") String snssai) {
-        try {
-            logger.info("Nssmf activate request is invoked");
-            assertObjectNotNull(deActivate);
-            RestResponse rsp = getNssmfMgr().deActivateNssi(deActivate, snssai);
-            return buildResponse(rsp);
-        } catch (ApplicationException e) {
-            return e.buildErrorResponse();
-        }
-    }
-
-    @PostMapping(value = "/NSS/jobs/{jobId}")
-    public ResponseEntity queryJobStatus(@RequestBody JobStatusRequest jobStatusReq,
-            @PathVariable("jobId") String jobId) {
-        try {
-            logger.info("Nssmf query job status request is invoked");
-            assertObjectNotNull(jobStatusReq);
-            RestResponse rsp = getNssmfMgr().queryJobStatus(jobStatusReq, jobId);
-            return buildResponse(rsp);
-        } catch (ApplicationException e) {
-            return e.buildErrorResponse();
-        }
-    }
 
     @GetMapping(value = "/vendor/{vendorName}/type/{networkType}/NSS" + "/SliceProfiles/{sliceProfileId}")
     public ResponseEntity queryNssi(@PathVariable("vendorName") String vendorName,
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/NssmfInfo.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/NssmfInfo.java
deleted file mode 100644
index 6306643..0000000
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/NssmfInfo.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.nssmf.rest;
-
-public class NssmfInfo {
-
-    private String url;
-
-    private String ipAddress;
-
-    private String port;
-
-    private String insecure;
-
-    private String cacert;
-
-    private String userName;
-
-    private String password;
-
-    public String getInsecure() {
-        return insecure;
-    }
-
-    public void setInsecure(String insecure) {
-        this.insecure = insecure;
-    }
-
-    public String getCacert() {
-        return cacert;
-    }
-
-    public void setCacert(String cacert) {
-        this.cacert = cacert;
-    }
-
-    public String getIpAddress() {
-        return ipAddress;
-    }
-
-    public void setIpAddress(String ipAddress) {
-        this.ipAddress = ipAddress;
-    }
-
-    public String getPort() {
-        return port;
-    }
-
-    public void setPort(String port) {
-        this.port = port;
-    }
-
-    public String getUrl() {
-        return url;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/NssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/NssmfManager.java
index 00e5c4a..bcce69f 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/NssmfManager.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/NssmfManager.java
@@ -20,7 +20,10 @@
 
 package org.onap.so.adapters.nssmf.rest;
 
+import org.onap.so.adapters.nssmf.entity.RestResponse;
+import org.onap.so.adapters.nssmf.enums.JobStatus;
 import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
+import org.onap.so.adapters.nssmf.util.RestUtil;
 import org.onap.so.beans.nsmf.ActDeActNssi;
 import org.onap.so.beans.nsmf.AllocateAnNssi;
 import org.onap.so.beans.nsmf.AllocateCnNssi;
@@ -52,15 +55,15 @@
 import org.springframework.data.domain.Example;
 import org.springframework.stereotype.Component;
 import static java.lang.String.valueOf;
-import static org.onap.so.adapters.nssmf.rest.HttpMethod.DELETE;
-import static org.onap.so.adapters.nssmf.rest.HttpMethod.GET;
-import static org.onap.so.adapters.nssmf.rest.HttpMethod.POST;
-import static org.onap.so.adapters.nssmf.rest.HttpMethod.PUT;
-import static org.onap.so.adapters.nssmf.rest.JobStatus.ERROR;
-import static org.onap.so.adapters.nssmf.rest.JobStatus.FINISHED;
-import static org.onap.so.adapters.nssmf.rest.JobStatus.PROCESSING;
-import static org.onap.so.adapters.nssmf.rest.JobStatus.STARTED;
-import static org.onap.so.adapters.nssmf.rest.JobStatus.fromString;
+import static org.onap.so.adapters.nssmf.enums.HttpMethod.DELETE;
+import static org.onap.so.adapters.nssmf.enums.HttpMethod.GET;
+import static org.onap.so.adapters.nssmf.enums.HttpMethod.POST;
+import static org.onap.so.adapters.nssmf.enums.HttpMethod.PUT;
+import static org.onap.so.adapters.nssmf.enums.JobStatus.ERROR;
+import static org.onap.so.adapters.nssmf.enums.JobStatus.FINISHED;
+import static org.onap.so.adapters.nssmf.enums.JobStatus.PROCESSING;
+import static org.onap.so.adapters.nssmf.enums.JobStatus.STARTED;
+import static org.onap.so.adapters.nssmf.enums.JobStatus.fromString;
 import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.StatusDesc.ACTIVATE_NSS_SUCCESS;
 import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.StatusDesc.ALLOCATE_NSS_SUCCESS;
 import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.StatusDesc.CREATE_NSS_SUCCESS;
@@ -76,6 +79,7 @@
 
 @Component
 @Primary
+@Deprecated
 public class NssmfManager {
 
     private static final Logger logger = LoggerFactory.getLogger(NssmfManager.class);
@@ -127,9 +131,20 @@
                 break;
 
             case TRANSPORT:
+                AllocateTnNssi tn = nssmiAllocate.getAllocateTnNssi();
+                assertObjectNotNull(tn);
+                // assertObjectNotNull(tn.getNsiInfo());
+                // assertObjectNotNull(tn.getNsiInfo().getNsiId());
+                // nsiId = tn.getNsiInfo().getNsiId();
+                allocateReq = marshal(tn);
+                // allocateUrl = AllocateTnNssi.URL;
                 break;
 
         }
+
+        /**
+         * 内部的，调用 workflow 外部的，访问第三方api
+         */
         RestResponse rsp = restUtil.sendRequest(allocateUrl, POST, allocateReq, nssmiAllocate.getEsrInfo());
         assertObjectNotNull(rsp);
 
@@ -145,6 +160,8 @@
         return rsp;
     }
 
+
+
     public RestResponse createNssi(NssiCreateRequest nssiCreate) throws ApplicationException {
 
         assertObjectNotNull(nssiCreate.getEsrInfo());
@@ -185,6 +202,7 @@
         return rsp;
     }
 
+    @Deprecated
     public RestResponse deAllocateNssi(NssiDeAllocateRequest nssiDeallocate, String sliceId)
             throws ApplicationException {
 
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/TrustAllHostNameVerifier.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/TrustAllHostNameVerifier.java
index 254186b..fc0f3dd 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/TrustAllHostNameVerifier.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/TrustAllHostNameVerifier.java
@@ -23,6 +23,7 @@
 import javax.net.ssl.HostnameVerifier;
 import javax.net.ssl.SSLSession;
 
+@Deprecated
 public class TrustAllHostNameVerifier implements HostnameVerifier {
 
     public boolean verify(String hostname, SSLSession session) {
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/service/NssmfManagerService.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/service/NssmfManagerService.java
new file mode 100644
index 0000000..9ad191b
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/service/NssmfManagerService.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2020, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ #       http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.nssmf.service;
+
+import org.onap.so.beans.nsmf.*;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service
+public interface NssmfManagerService {
+    ResponseEntity allocateNssi(NssmfAdapterNBIRequest allocateRequest);
+
+    ResponseEntity deAllocateNssi(NssmfAdapterNBIRequest allocateRequest, String sliceProfileId);
+
+    ResponseEntity activateNssi(NssmfAdapterNBIRequest deActRequest, String snssai);
+
+    ResponseEntity deActivateNssi(NssmfAdapterNBIRequest nssiDeActivate, String snssai);
+
+    ResponseEntity queryJobStatus(NssmfAdapterNBIRequest jobReq, String jobId);
+
+    ResponseEntity queryNSSISelectionCapability(NssmfAdapterNBIRequest nbiRequest);
+
+    ResponseEntity querySubnetCapability(NssmfAdapterNBIRequest nbiRequest);
+
+}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImpl.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImpl.java
new file mode 100644
index 0000000..1408123
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImpl.java
@@ -0,0 +1,141 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2020, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ #       http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.nssmf.service.impl;
+
+import org.apache.commons.lang3.StringUtils;
+import org.onap.so.adapters.nssmf.config.NssmfAdapterConfig;
+import org.onap.so.adapters.nssmf.enums.ActionType;
+import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
+import org.onap.so.adapters.nssmf.manager.NssmfManagerBuilder;
+import org.onap.so.adapters.nssmf.entity.RestResponse;
+import org.onap.so.adapters.nssmf.manager.NssmfManager;
+import org.onap.so.adapters.nssmf.service.NssmfManagerService;
+import org.onap.so.adapters.nssmf.util.RestUtil;
+import org.onap.so.beans.nsmf.*;
+import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+
+@Service
+public class NssmfManagerServiceImpl implements NssmfManagerService {
+
+    @Autowired
+    private RestUtil restUtil;
+
+    @Autowired
+    private ResourceOperationStatusRepository repository;
+
+    @Autowired
+    private NssmfAdapterConfig nssmfAdapterConfig;
+
+    @Override
+    public ResponseEntity allocateNssi(NssmfAdapterNBIRequest request) {
+        try {
+
+            if (StringUtils.isNotBlank(request.getServiceInfo().getNssiId())) {
+                return buildResponse(buildNssmfManager(request, ActionType.MODIFY).modifyNssi(request));
+            }
+
+            return buildResponse(buildNssmfManager(request, ActionType.ALLOCATE).allocateNssi(request));
+
+        } catch (ApplicationException e) {
+            return e.buildErrorResponse();
+        }
+    }
+
+    @Override
+    public ResponseEntity deAllocateNssi(NssmfAdapterNBIRequest request, String sliceProfileId) {
+        try {
+            return buildResponse(
+                    buildNssmfManager(request, ActionType.DEALLOCATE).deAllocateNssi(request, sliceProfileId));
+        } catch (ApplicationException e) {
+            return e.buildErrorResponse();
+        }
+    }
+
+    @Override
+    public ResponseEntity activateNssi(NssmfAdapterNBIRequest request, String snssai) {
+        try {
+            return buildResponse(buildNssmfManager(request, ActionType.ACTIVATE).activateNssi(request, snssai));
+        } catch (ApplicationException e) {
+            return e.buildErrorResponse();
+        }
+    }
+
+    @Override
+    public ResponseEntity deActivateNssi(NssmfAdapterNBIRequest request, String snssai) {
+        try {
+            return buildResponse(buildNssmfManager(request, ActionType.DEACTIVATE).deActivateNssi(request, snssai));
+        } catch (ApplicationException e) {
+            return e.buildErrorResponse();
+        }
+    }
+
+    @Override
+    public ResponseEntity queryJobStatus(NssmfAdapterNBIRequest jobReq, String jobId) {
+        try {
+            return buildResponse(buildNssmfManager(jobReq, ActionType.QUERY_JOB_STATUS).queryJobStatus(jobReq, jobId));
+        } catch (ApplicationException e) {
+            return e.buildErrorResponse();
+        }
+    }
+
+    @Override
+    public ResponseEntity queryNSSISelectionCapability(NssmfAdapterNBIRequest nbiRequest) {
+        EsrInfo esrInfo = nbiRequest.getEsrInfo();
+        try {
+            return buildResponse(buildNssmfManager(esrInfo, ActionType.QUERY_JOB_STATUS, null)
+                    .queryNSSISelectionCapability(nbiRequest));
+        } catch (ApplicationException e) {
+            return e.buildErrorResponse();
+        }
+    }
+
+    @Override
+    public ResponseEntity querySubnetCapability(NssmfAdapterNBIRequest nbiRequest) {
+        EsrInfo esrInfo = nbiRequest.getEsrInfo();
+        try {
+            return buildResponse(
+                    buildNssmfManager(esrInfo, ActionType.QUERY_JOB_STATUS, null).querySubnetCapability(nbiRequest));
+        } catch (ApplicationException e) {
+            return e.buildErrorResponse();
+        }
+    }
+
+    private ResponseEntity buildResponse(RestResponse rsp) {
+        return ResponseEntity.status(rsp.getStatus()).body(rsp.getResponseContent());
+    }
+
+
+    private NssmfManager buildNssmfManager(NssmfAdapterNBIRequest request, ActionType actionType)
+            throws ApplicationException {
+        return buildNssmfManager(request.getEsrInfo(), actionType, request.getServiceInfo());
+    }
+
+    private NssmfManager buildNssmfManager(EsrInfo esrInfo, ActionType actionType, ServiceInfo serviceInfo)
+            throws ApplicationException {
+
+        return new NssmfManagerBuilder(esrInfo).setActionType(actionType).setRepository(repository)
+                .setRestUtil(restUtil).setAdapterConfig(nssmfAdapterConfig).setServiceInfo(serviceInfo).build();
+    }
+}
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/NssmfAdapterUtil.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/NssmfAdapterUtil.java
index 3a7c2f1..090417d 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/NssmfAdapterUtil.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/NssmfAdapterUtil.java
@@ -22,10 +22,12 @@
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 import java.io.IOException;
+import org.onap.so.adapters.nssmf.enums.ActionType;
 import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.onap.logging.filter.base.ErrorCode;
+import org.springframework.stereotype.Component;
 import static org.onap.so.logger.LoggingAnchor.THREE;
 import static org.onap.so.logger.MessageEnum.RA_NS_EXC;
 
@@ -45,6 +47,8 @@
 
         public static final String ALLOCATE_NSS_SUCCESS = "Allocating nss is " + "successful";
 
+        public static final String MODIFY_NSS_SUCCESS = "Modify nss is " + "successful";
+
         public static final String CREATE_NSS_SUCCESS = "Creating nss is " + "successful";
 
         public static final String DEALLOCATE_NSS_SUCCESS = "Deallocate nss " + "is successful";
@@ -91,4 +95,29 @@
         }
     }
 
+
+    public static String getStatusDesc(ActionType actionType) {
+        String desc = "";
+        switch (actionType) {
+            case ALLOCATE:
+                desc = StatusDesc.ALLOCATE_NSS_SUCCESS;
+                break;
+            case DEALLOCATE:
+                desc = StatusDesc.DEALLOCATE_NSS_SUCCESS;
+                break;
+            case ACTIVATE:
+                desc = StatusDesc.ACTIVATE_NSS_SUCCESS;
+                break;
+            case DEACTIVATE:
+                desc = StatusDesc.DEACTIVATE_NSS_SUCCESS;
+                break;
+            case MODIFY:
+                desc = StatusDesc.MODIFY_NSS_SUCCESS;
+                break;
+            default:
+                break;
+        }
+
+        return desc;
+    }
 }
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/RestUtil.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/RestUtil.java
similarity index 86%
rename from adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/RestUtil.java
rename to adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/RestUtil.java
index dcc6f5b..0c5999b 100644
--- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/rest/RestUtil.java
+++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/util/RestUtil.java
@@ -18,11 +18,9 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.so.adapters.nssmf.rest;
+package org.onap.so.adapters.nssmf.util;
 
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
+import javax.net.ssl.*;
 import javax.ws.rs.core.UriBuilder;
 import java.net.SocketTimeoutException;
 import java.net.URI;
@@ -30,32 +28,29 @@
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.config.RequestConfig;
-import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.client.methods.HttpPut;
-import org.apache.http.client.methods.HttpRequestBase;
+import org.apache.http.client.methods.*;
 import org.apache.http.conn.ConnectTimeoutException;
 import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
 import org.apache.http.entity.StringEntity;
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.message.BasicHeader;
 import org.apache.http.util.EntityUtils;
-import org.onap.aai.domain.yang.EsrSystemInfo;
-import org.onap.aai.domain.yang.EsrSystemInfoList;
-import org.onap.aai.domain.yang.EsrThirdpartySdnc;
-import org.onap.aai.domain.yang.EsrThirdpartySdncList;
+import org.onap.aai.domain.yang.*;
 import org.onap.so.adapters.nssmf.exceptions.ApplicationException;
 import org.onap.so.adapters.nssmf.extclients.aai.AaiServiceProvider;
-import org.onap.so.adapters.nssmf.model.TokenRequest;
-import org.onap.so.adapters.nssmf.model.TokenResponse;
+import org.onap.so.adapters.nssmf.entity.TokenRequest;
+import org.onap.so.adapters.nssmf.entity.TokenResponse;
+import org.onap.so.adapters.nssmf.enums.HttpMethod;
+import org.onap.so.adapters.nssmf.entity.NssmfInfo;
+import org.onap.so.adapters.nssmf.entity.RestResponse;
 import org.onap.so.beans.nsmf.EsrInfo;
+import org.onap.so.beans.nsmf.ServiceInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import static org.apache.http.entity.ContentType.APPLICATION_JSON;
-import static org.onap.so.adapters.nssmf.rest.HttpMethod.POST;
+import static org.onap.so.adapters.nssmf.enums.HttpMethod.POST;
 import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.BAD_REQUEST;
 import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
 import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.unMarshal;
@@ -77,6 +72,10 @@
     @Autowired
     private AaiServiceProvider aaiSvcProv;
 
+    public void createServiceInstance(ServiceInstance serviceInstance, ServiceInfo serviceInfo) {
+        aaiSvcProv.invokeCreateServiceInstance(serviceInstance, serviceInfo.getGlobalSubscriberId(),
+                serviceInfo.getSubscriptionServiceType(), serviceInfo.getNssiId());
+    }
 
     public NssmfInfo getNssmfHost(EsrInfo esrInfo) throws ApplicationException {
         EsrThirdpartySdncList sdncList = aaiSvcProv.invokeGetThirdPartySdncList();
@@ -112,10 +111,9 @@
         throw new ApplicationException(BAD_REQUEST, "ESR information is improper");
     }
 
-    public RestResponse sendRequest(String url, HttpMethod methodType, String content, EsrInfo esrInfo)
-            throws ApplicationException {
 
-        NssmfInfo nssmfInfo = getNssmfHost(esrInfo);
+    public String getToken(NssmfInfo nssmfInfo) throws ApplicationException {
+
 
         TokenRequest req = new TokenRequest();
         req.setGrantType("password");
@@ -128,13 +126,12 @@
         RestResponse tokenRes = send(nssmfInfo.getUrl() + TOKEN_URL, POST, tokenReq, null);
 
         TokenResponse res = unMarshal(tokenRes.getResponseContent(), TokenResponse.class);
-        String token = res.getAccessToken();
-        Header header = new BasicHeader("X-Auth-Token", token);
-        String nssmfUrl = nssmfInfo.getUrl() + url;
-        return send(nssmfUrl, methodType, content, header);
+
+        return res.getAccessToken();
     }
 
-    private RestResponse send(String url, HttpMethod methodType, String content, Header header) {
+
+    public RestResponse send(String url, HttpMethod methodType, String content, Header header) {
 
         HttpRequestBase req = null;
         HttpResponse res = null;
@@ -168,8 +165,6 @@
             }
             if (null != req) {
                 req.reset();
-            } else {
-                logger.debug("method is NULL:");
             }
             req = null;
 
@@ -201,7 +196,7 @@
         }
     }
 
-    private RestResponse createResponse(int statusCode, String errMsg) {
+    public RestResponse createResponse(int statusCode, String errMsg) {
         RestResponse restResponse = new RestResponse();
         restResponse.setStatus(statusCode);
         restResponse.setResponseContent(errMsg);
@@ -210,7 +205,7 @@
 
     private HttpRequestBase getHttpReq(String url, HttpMethod method, Header header, RequestConfig config,
             String content) throws ApplicationException {
-        HttpRequestBase base = null;
+        HttpRequestBase base;
         switch (method) {
             case POST:
                 HttpPost post = new HttpPost(url);
@@ -229,6 +224,7 @@
                 break;
 
             case PATCH:
+                base = new HttpPatch(url);
                 break;
 
             case DELETE:
@@ -238,6 +234,8 @@
                 }
                 base = delete;
                 break;
+            default:
+                throw new ApplicationException(404, "invalid method: " + method);
 
         }
         base.setConfig(config);
@@ -247,6 +245,14 @@
         return base;
     }
 
+    public RestResponse sendRequest(String allocateUrl, HttpMethod post, String allocateReq, EsrInfo esrInfo)
+            throws ApplicationException {
+        NssmfInfo nssmfInfo = getNssmfHost(esrInfo);
+        Header header = new BasicHeader("X-Auth-Token", getToken(nssmfInfo));
+        String nssmfUrl = nssmfInfo.getUrl() + allocateUrl;
+        return send(nssmfUrl, post, allocateReq, header);
+    }
+
     class HttpDeleteWithBody extends HttpEntityEnclosingRequestBase {
         public static final String METHOD_NAME = "DELETE";
 
@@ -289,7 +295,7 @@
             // HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
 
             SSLConnectionSocketFactory sslsf =
-                    new SSLConnectionSocketFactory(sc, new String[] {"TLSv1"}, null, new TrustAllHostNameVerifier());
+                    new SSLConnectionSocketFactory(sc, new String[] {"TLSv1"}, null, (s, sslSession) -> true);
             return HttpClients.custom().setSSLSocketFactory(sslsf).build();
         } catch (Exception e) {
             throw new IllegalArgumentException(e);
diff --git a/adapters/mso-nssmf-adapter/src/main/resources/application-test.yaml b/adapters/mso-nssmf-adapter/src/main/resources/application-test.yaml
new file mode 100644
index 0000000..8e10dfb
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/main/resources/application-test.yaml
@@ -0,0 +1,60 @@
+
+aai:
+  auth: 2A11B07DB6214A839394AA1EC5844695F5114FC407FF5422625FB00175A3DCB8A1FF745F22867EFA72D5369D599BBD88DA8BED4233CF5586
+  endpoint: https://aai.onap:30233
+logging:
+  path: logs
+
+spring:
+  datasource:
+    jdbcUrl: jdbc:mariadb://49.232.146.162:8989/requestdb
+    username: root
+    password: 123456
+    driver-class-name: org.mariadb.jdbc.Driver
+    initialization-mode: always
+    jpa:
+      generate-ddl: false
+      show-sql: false
+      hibernate:
+        ddl-auto: none
+        naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
+        enable-lazy-load-no-trans: true
+      database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+  security:
+    usercredentials:
+      - username: bpel
+        password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
+        role: BPEL-Client
+      - username: mso_admin
+        password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
+        role: ACTUATOR
+server:
+  port: 8080
+  tomcat:
+    max-threads: 50
+
+mso:
+  key: 07a7159d3bf51a0e53be7a8f89699be7
+  site-name: localSite
+  logPath: ./logs/nssmf
+  adapters:
+    requestDb:
+      endpoint: https://so-request-db-adapter.onap:8083
+      auth: Basic YnBlbDpwYXNzd29yZDEk
+  infra:
+    endpoint: https://so.onap:8080
+    auth: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==
+
+#Actuator
+management:
+  endpoints:
+    web:
+      base-path: /manage
+      exposure:
+        include: "*"
+  metrics:
+    se-global-registry: false
+    export:
+      prometheus:
+        enabled: true # Whether exporting of metrics to Prometheus is enabled.
+        step: 1m # Step size (i.e. reporting frequency) to use.
\ No newline at end of file
diff --git a/adapters/mso-nssmf-adapter/src/main/resources/application.yaml b/adapters/mso-nssmf-adapter/src/main/resources/application.yaml
index 303d63d..8da911d 100644
--- a/adapters/mso-nssmf-adapter/src/main/resources/application.yaml
+++ b/adapters/mso-nssmf-adapter/src/main/resources/application.yaml
@@ -58,6 +58,9 @@
     requestDb:
       endpoint: https://so-request-db-adapter.{{ include "common.namespace" . }}:8083
       auth: Basic YnBlbDpwYXNzd29yZDEk
+  infra:
+    endpoint: https://so.{{ include "common.namespace" . }}:8080
+    auth: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==
 
 #Actuator
 management:
