diff --git a/adapters/mso-nssmf-adapter/pom.xml b/adapters/mso-nssmf-adapter/pom.xml
index db79182..45fe77e 100644
--- a/adapters/mso-nssmf-adapter/pom.xml
+++ b/adapters/mso-nssmf-adapter/pom.xml
@@ -162,7 +162,6 @@
     <dependency>
       <groupId>org.projectlombok</groupId>
       <artifactId>lombok</artifactId>
-      <version>1.18.2</version>
     </dependency>
   </dependencies>
 </project>
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:
diff --git a/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java b/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java
index 5bfd390..a9c732e 100644
--- a/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java
+++ b/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/NssmfAdapterRestTest.java
@@ -24,6 +24,7 @@
 import java.io.InputStream;
 import java.util.LinkedList;
 import java.util.List;
+import org.apache.http.Header;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
 import org.apache.http.StatusLine;
@@ -35,12 +36,12 @@
 import org.mockito.Mock;
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
-import org.onap.so.adapters.nssmf.model.TokenResponse;
-import org.onap.so.adapters.nssmf.rest.HttpMethod;
+import org.onap.so.adapters.nssmf.entity.TokenResponse;
+import org.onap.so.adapters.nssmf.enums.HttpMethod;
 import org.onap.so.adapters.nssmf.rest.NssmfAdapterRest;
-import org.onap.so.adapters.nssmf.rest.NssmfInfo;
+import org.onap.so.adapters.nssmf.entity.NssmfInfo;
 import org.onap.so.adapters.nssmf.rest.NssmfManager;
-import org.onap.so.adapters.nssmf.rest.RestUtil;
+import org.onap.so.adapters.nssmf.util.RestUtil;
 import org.onap.so.beans.nsmf.ActDeActNssi;
 import org.onap.so.beans.nsmf.AllocateCnNssi;
 import org.onap.so.beans.nsmf.CnSliceProfile;
@@ -127,13 +128,16 @@
     }
 
     private void createCommonMock(int statusCode, NssmfInfo nssmf) throws Exception {
+        when(this.restUtil.send(any(String.class), any(HttpMethod.class), any(String.class), any(Header.class)))
+                .thenCallRealMethod();
+        when(this.restUtil.createResponse(any(Integer.class), any(String.class))).thenCallRealMethod();
         when(nssmfRest.getNssmfMgr()).thenReturn(nssmfMgr);
-        when(nssmfRest.allocateNssi(any(NssiAllocateRequest.class))).thenCallRealMethod();
-        when(nssmfRest.deAllocateNssi(any(NssiDeAllocateRequest.class), any(String.class))).thenCallRealMethod();
-        when(nssmfRest.activateNssi(any(NssiActDeActRequest.class), any(String.class))).thenCallRealMethod();
-        when(nssmfRest.deactivateNssi(any(NssiActDeActRequest.class), any(String.class))).thenCallRealMethod();
-
-        when(nssmfRest.queryJobStatus(any(JobStatusRequest.class), any(String.class))).thenCallRealMethod();
+        // when(nssmfRest.createAllocateNssi(any(NssiAllocateRequest.class))).thenCallRealMethod();
+        // when(nssmfRest.deAllocateNssi(any(NssiDeAllocateRequest.class), any(String.class))).thenCallRealMethod();
+        // when(nssmfRest.activateNssi(any(NssiActDeActRequest.class), any(String.class))).thenCallRealMethod();
+        // when(nssmfRest.deactivateNssi(any(NssiActDeActRequest.class), any(String.class))).thenCallRealMethod();
+        //
+        // when(nssmfRest.queryJobStatus(any(JobStatusRequest.class), any(String.class))).thenCallRealMethod();
         when(restUtil.sendRequest(any(String.class), any(HttpMethod.class), any(String.class), any(EsrInfo.class)))
                 .thenCallRealMethod();
         when(restUtil.getHttpsClient()).thenReturn(httpClient);
@@ -168,113 +172,113 @@
         doAnswer(answer).when(httpClient).execute(any(HttpRequestBase.class));
     }
 
-    @Test
-    public void testNssiAllocate() throws Exception {
-        NssmfInfo nssmf = new NssmfInfo();
-        nssmf.setUserName("nssmf-user");
-        nssmf.setPassword("nssmf-pass");
-        nssmf.setPort("8080");
-        nssmf.setIpAddress("127.0.0.1");
-
-        NssiResponse nssiRes = new NssiResponse();
-        nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
-        nssiRes.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
-
-        TokenResponse token = new TokenResponse();
-        token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
-        token.setExpires(1800);
-
-        postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
-        tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
-
-        createCommonMock(200, nssmf);
-        // assertEquals(prettyPrint(allocateNssi()), ALLOCATE);
-        ResponseEntity res = nssmfRest.allocateNssi(allocateNssi());
-        assertNotNull(res);
-        assertNotNull(res.getBody());
-        NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
-        assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
-        assertEquals(allRes.getNssiId(), "NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
-    }
-
-    @Test
-    public void testNssiDeAllocate() throws Exception {
-        NssmfInfo nssmf = new NssmfInfo();
-        nssmf.setUserName("nssmf-user");
-        nssmf.setPassword("nssmf-pass");
-        nssmf.setPort("8080");
-        nssmf.setIpAddress("127.0.0.1");
-
-        NssiResponse nssiRes = new NssiResponse();
-        nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
-
-        TokenResponse token = new TokenResponse();
-        token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
-        token.setExpires(1800);
-
-        postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
-        tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
-
-        createCommonMock(200, nssmf);
-        ResponseEntity res = nssmfRest.deAllocateNssi(deAllocateNssi(), "ab9af40f13f721b5f13539d87484098");
-        assertNotNull(res);
-        assertNotNull(res.getBody());
-        NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
-        assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
-    }
-
-    @Test
-    public void testNssiActivate() throws Exception {
-        NssmfInfo nssmf = new NssmfInfo();
-        nssmf.setUserName("nssmf-user");
-        nssmf.setPassword("nssmf-pass");
-        nssmf.setPort("8080");
-        nssmf.setIpAddress("127.0.0.1");
-
-        NssiResponse nssiRes = new NssiResponse();
-        nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
-
-        TokenResponse token = new TokenResponse();
-        token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
-        token.setExpires(1800);
-
-        postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
-        tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
-
-        createCommonMock(200, nssmf);
-        ResponseEntity res = nssmfRest.activateNssi(activateNssi(), "001-100001");
-        assertNotNull(res);
-        assertNotNull(res.getBody());
-        NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
-        assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
-    }
-
-    @Test
-    public void testNssiDeActivate() throws Exception {
-        NssmfInfo nssmf = new NssmfInfo();
-        nssmf.setUserName("nssmf-user");
-        nssmf.setPassword("nssmf-pass");
-        nssmf.setPort("8080");
-        nssmf.setIpAddress("127.0.0.1");
-
-        NssiResponse nssiRes = new NssiResponse();
-        nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
-
-        TokenResponse token = new TokenResponse();
-        token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
-        token.setExpires(1800);
-
-        postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
-        tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
-
-        createCommonMock(200, nssmf);
-        ResponseEntity res = nssmfRest.deactivateNssi(deActivateNssi(), "001-100001");
-        assertNotNull(res);
-        assertNotNull(res.getBody());
-        NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
-        assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
-    }
-
+    // @Test
+    // public void testNssiAllocate() throws Exception {
+    // NssmfInfo nssmf = new NssmfInfo();
+    // nssmf.setUserName("nssmf-user");
+    // nssmf.setPassword("nssmf-pass");
+    // nssmf.setPort("8080");
+    // nssmf.setIpAddress("127.0.0.1");
+    //
+    // NssiResponse nssiRes = new NssiResponse();
+    // nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
+    // nssiRes.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
+    //
+    // TokenResponse token = new TokenResponse();
+    // token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
+    // token.setExpires(1800);
+    //
+    // postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
+    // tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
+    //
+    // createCommonMock(200, nssmf);
+    // // assertEquals(prettyPrint(createAllocateNssi()), ALLOCATE);
+    // ResponseEntity res = nssmfRest.createAllocateNssi(createAllocateNssi());
+    // assertNotNull(res);
+    // assertNotNull(res.getBody());
+    // NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
+    // assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
+    // assertEquals(allRes.getNssiId(), "NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
+    // }
+    //
+    // @Test
+    // public void testNssiDeAllocate() throws Exception {
+    // NssmfInfo nssmf = new NssmfInfo();
+    // nssmf.setUserName("nssmf-user");
+    // nssmf.setPassword("nssmf-pass");
+    // nssmf.setPort("8080");
+    // nssmf.setIpAddress("127.0.0.1");
+    //
+    // NssiResponse nssiRes = new NssiResponse();
+    // nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
+    //
+    // TokenResponse token = new TokenResponse();
+    // token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
+    // token.setExpires(1800);
+    //
+    // postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
+    // tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
+    //
+    // createCommonMock(200, nssmf);
+    // ResponseEntity res = nssmfRest.deAllocateNssi(deAllocateNssi(), "ab9af40f13f721b5f13539d87484098");
+    // assertNotNull(res);
+    // assertNotNull(res.getBody());
+    // NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
+    // assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
+    // }
+    //
+    // @Test
+    // public void testNssiActivate() throws Exception {
+    // NssmfInfo nssmf = new NssmfInfo();
+    // nssmf.setUserName("nssmf-user");
+    // nssmf.setPassword("nssmf-pass");
+    // nssmf.setPort("8080");
+    // nssmf.setIpAddress("127.0.0.1");
+    //
+    // NssiResponse nssiRes = new NssiResponse();
+    // nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
+    //
+    // TokenResponse token = new TokenResponse();
+    // token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
+    // token.setExpires(1800);
+    //
+    // postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
+    // tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
+    //
+    // createCommonMock(200, nssmf);
+    // ResponseEntity res = nssmfRest.activateNssi(activateNssi(), "001-100001");
+    // assertNotNull(res);
+    // assertNotNull(res.getBody());
+    // NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
+    // assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
+    // }
+    //
+    // @Test
+    // public void testNssiDeActivate() throws Exception {
+    // NssmfInfo nssmf = new NssmfInfo();
+    // nssmf.setUserName("nssmf-user");
+    // nssmf.setPassword("nssmf-pass");
+    // nssmf.setPort("8080");
+    // nssmf.setIpAddress("127.0.0.1");
+    //
+    // NssiResponse nssiRes = new NssiResponse();
+    // nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
+    //
+    // TokenResponse token = new TokenResponse();
+    // token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
+    // token.setExpires(1800);
+    //
+    // postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
+    // tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
+    //
+    // createCommonMock(200, nssmf);
+    // ResponseEntity res = nssmfRest.deactivateNssi(deActivateNssi(), "001-100001");
+    // assertNotNull(res);
+    // assertNotNull(res.getBody());
+    // NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
+    // assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
+    // }
+    //
     @Test
     public void testAllocateJsonSerDeSer() throws Exception {
         assertEquals(marshal(allocateNssi()), ALLOCATE);
@@ -334,50 +338,51 @@
         return allocate;
     }
 
-    public NssiDeAllocateRequest deAllocateNssi() throws Exception {
-        DeAllocateNssi deAllocateNssi = new DeAllocateNssi();
-        deAllocateNssi.setTerminateNssiOption(0);
-        List<String> snssai = new LinkedList<>();
-        snssai.add("001-100001");
-        deAllocateNssi.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
-        deAllocateNssi.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
-        deAllocateNssi.setScriptName("CN1");
-        deAllocateNssi.setSnssaiList(snssai);
-        EsrInfo esrInfo = new EsrInfo();
-        esrInfo.setVendor("huawei");
-        esrInfo.setNetworkType(CORE);
-        NssiDeAllocateRequest deAllocate = new NssiDeAllocateRequest();
-        deAllocate.setDeAllocateNssi(deAllocateNssi);
-        deAllocate.setEsrInfo(esrInfo);
-        return deAllocate;
-    }
-
-    public NssiActDeActRequest activateNssi() throws Exception {
-        EsrInfo esrInfo = new EsrInfo();
-        esrInfo.setVendor("huawei");
-        esrInfo.setNetworkType(CORE);
-        ActDeActNssi act = new ActDeActNssi();
-        act.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
-        act.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
-        NssiActDeActRequest actReq = new NssiActDeActRequest();
-        actReq.setActDeActNssi(act);
-        actReq.setEsrInfo(esrInfo);
-        return actReq;
-    }
-
-    public NssiActDeActRequest deActivateNssi() throws Exception {
-        EsrInfo esrInfo = new EsrInfo();
-        esrInfo.setVendor("huawei");
-        esrInfo.setNetworkType(CORE);
-        ActDeActNssi deAct = new ActDeActNssi();
-        deAct.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
-        deAct.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
-        NssiActDeActRequest deActReq = new NssiActDeActRequest();
-        deActReq.setActDeActNssi(deAct);
-        deActReq.setEsrInfo(esrInfo);
-        return deActReq;
-    }
-
+    //
+    // public NssiDeAllocateRequest deAllocateNssi() throws Exception {
+    // DeAllocateNssi deAllocateNssi = new DeAllocateNssi();
+    // deAllocateNssi.setTerminateNssiOption(0);
+    // List<String> snssai = new LinkedList<>();
+    // snssai.add("001-100001");
+    // deAllocateNssi.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
+    // deAllocateNssi.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
+    // deAllocateNssi.setScriptName("CN1");
+    // deAllocateNssi.setSnssaiList(snssai);
+    // EsrInfo esrInfo = new EsrInfo();
+    // esrInfo.setVendor("huawei");
+    // esrInfo.setNetworkType(CORE);
+    // NssiDeAllocateRequest deAllocate = new NssiDeAllocateRequest();
+    // deAllocate.setDeAllocateNssi(deAllocateNssi);
+    // deAllocate.setEsrInfo(esrInfo);
+    // return deAllocate;
+    // }
+    //
+    // public NssiActDeActRequest activateNssi() throws Exception {
+    // EsrInfo esrInfo = new EsrInfo();
+    // esrInfo.setVendor("huawei");
+    // esrInfo.setNetworkType(CORE);
+    // ActDeActNssi act = new ActDeActNssi();
+    // act.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
+    // act.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
+    // NssiActDeActRequest actReq = new NssiActDeActRequest();
+    // actReq.setActDeActNssi(act);
+    // actReq.setEsrInfo(esrInfo);
+    // return actReq;
+    // }
+    //
+    // public NssiActDeActRequest deActivateNssi() throws Exception {
+    // EsrInfo esrInfo = new EsrInfo();
+    // esrInfo.setVendor("huawei");
+    // esrInfo.setNetworkType(CORE);
+    // ActDeActNssi deAct = new ActDeActNssi();
+    // deAct.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
+    // deAct.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
+    // NssiActDeActRequest deActReq = new NssiActDeActRequest();
+    // deActReq.setActDeActNssi(deAct);
+    // deActReq.setEsrInfo(esrInfo);
+    // return deActReq;
+    // }
+    //
     public String queryJobStatusNssi() throws Exception {
         EsrInfo esrInfo = new EsrInfo();
         esrInfo.setVendor("huawei");
diff --git a/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImplTest.java b/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImplTest.java
new file mode 100644
index 0000000..3108ade
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/test/java/org/onap/so/adapters/nssmf/service/impl/NssmfManagerServiceImplTest.java
@@ -0,0 +1,438 @@
+/*-
+ * ============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.http.Header;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.StatusLine;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpRequestBase;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.stubbing.Answer;
+import org.onap.so.adapters.nssmf.consts.NssmfAdapterConsts;
+import org.onap.so.adapters.nssmf.entity.NssmfInfo;
+import org.onap.so.adapters.nssmf.entity.TokenResponse;
+import org.onap.so.adapters.nssmf.enums.HttpMethod;
+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.springframework.http.ResponseEntity;
+import org.springframework.test.context.junit4.SpringRunner;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.util.*;
+import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.when;
+import static org.mockito.MockitoAnnotations.initMocks;
+import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.marshal;
+import static org.onap.so.adapters.nssmf.util.NssmfAdapterUtil.unMarshal;
+import static org.onap.so.beans.nsmf.NetworkType.CORE;
+import static org.onap.so.beans.nsmf.ResourceSharingLevel.NON_SHARED;
+
+@RunWith(SpringRunner.class)
+public class NssmfManagerServiceImplTest {
+
+    @Mock
+    private RestUtil restUtil;
+
+
+    private NssmfManagerServiceImpl nssiManagerService;
+
+    @Mock
+    private HttpResponse tokenResponse;
+
+    @Mock
+    private HttpEntity tokenEntity;
+
+    @Mock
+    private HttpResponse commonResponse;
+
+    @Mock
+    private HttpEntity commonEntity;
+
+    @Mock
+    private StatusLine statusLine;
+
+    @Mock
+    private HttpClient httpClient;
+
+    private InputStream postStream;
+
+    private InputStream tokenStream;
+
+    @Mock
+    private ResourceOperationStatusRepository repository;
+
+    @Before
+    public void setUp() throws Exception {
+        initMocks(this);
+
+        nssiManagerService = new NssmfManagerServiceImpl();
+
+        Field restUtil = nssiManagerService.getClass().getDeclaredField("restUtil");
+        restUtil.setAccessible(true);
+        restUtil.set(nssiManagerService, this.restUtil);
+
+        Field repository = nssiManagerService.getClass().getDeclaredField("repository");
+        repository.setAccessible(true);
+        repository.set(nssiManagerService, this.repository);
+        // nssiManagerService.setRestUtil(this.restUtil);
+
+        when(this.restUtil.send(any(String.class), any(HttpMethod.class), any(), any(Header.class)))
+                .thenCallRealMethod();
+        when(this.restUtil.createResponse(any(Integer.class), any(String.class))).thenCallRealMethod();
+    }
+
+    private void createCommonMock(int statusCode, NssmfInfo nssmf) throws Exception {
+        when(restUtil.getToken(any(NssmfInfo.class))).thenReturn("7512eb3feb5249eca5ddd742fedddd39");
+        when(restUtil.getHttpsClient()).thenReturn(httpClient);
+
+        when(statusLine.getStatusCode()).thenReturn(statusCode);
+        when(restUtil.getNssmfHost(any(EsrInfo.class))).thenReturn(nssmf);
+
+        when(tokenResponse.getEntity()).thenReturn(tokenEntity);
+        when(tokenResponse.getStatusLine()).thenReturn(statusLine);
+        when(tokenEntity.getContent()).thenReturn(tokenStream);
+
+        when(commonResponse.getEntity()).thenReturn(commonEntity);
+        when(commonResponse.getStatusLine()).thenReturn(statusLine);
+        when(commonEntity.getContent()).thenReturn(postStream);
+
+        Answer<HttpResponse> answer = invocation -> {
+            Object[] arguments = invocation.getArguments();
+            if (arguments != null && arguments.length == 1 && arguments[0] != null) {
+
+                HttpRequestBase base = (HttpRequestBase) arguments[0];
+                if (base.getURI().toString().endsWith("/oauth/token")) {
+                    return tokenResponse;
+                } else {
+                    return commonResponse;
+                }
+            }
+            return commonResponse;
+        };
+
+        doAnswer(answer).when(httpClient).execute(any(HttpRequestBase.class));
+
+    }
+
+    @Test
+    public void allocateNssi() throws Exception {
+
+        NssmfInfo nssmf = new NssmfInfo();
+        nssmf.setUserName("nssmf-user");
+        nssmf.setPassword("nssmf-pass");
+        nssmf.setPort("8080");
+        nssmf.setIpAddress("127.0.0.1");
+        nssmf.setUrl("http://127.0.0.1:8080");
+
+        NssiResponse nssiRes = new NssiResponse();
+        nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
+        nssiRes.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
+
+        TokenResponse token = new TokenResponse();
+        token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
+        token.setExpires(1800);
+
+        postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
+        tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
+
+        createCommonMock(200, nssmf);
+
+
+        NssmfAdapterNBIRequest nbiRequest = createAllocateNssi();
+        assertNotNull(nbiRequest);
+        System.out.println(marshal(nbiRequest));
+        ResponseEntity res = nssiManagerService.allocateNssi(nbiRequest);
+        assertNotNull(res);
+        assertNotNull(res.getBody());
+        NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
+        assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
+        assertEquals(allRes.getNssiId(), "NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
+
+        System.out.println(res);
+    }
+
+
+
+    private NssmfAdapterNBIRequest createAllocateNssi() {
+        CnSliceProfile sP = new CnSliceProfile();
+        List<String> sns = new LinkedList<>();
+        sns.add("001-100001");
+        List<String> plmn = new LinkedList<>();
+        plmn.add("460-00");
+        plmn.add("460-01");
+        PerfReqEmbbList embb = new PerfReqEmbbList();
+        embb.setActivityFactor(50);
+        List<PerfReqEmbbList> embbList = new LinkedList<>();
+        embbList.add(embb);
+        PerfReq perfReq = new PerfReq();
+        perfReq.setPerfReqEmbbList(embbList);
+        List<String> taList = new LinkedList<>();
+        taList.add("1");
+        taList.add("2");
+        taList.add("3");
+        sP.setSnssaiList(sns);
+        sP.setSliceProfileId("ab9af40f13f721b5f13539d87484098");
+        sP.setPlmnIdList(plmn);
+        sP.setPerfReq(perfReq);
+        sP.setMaxNumberofUEs(200);
+        sP.setCoverageAreaTAList(taList);
+        sP.setLatency(6);
+        sP.setResourceSharingLevel(NON_SHARED);
+        NsiInfo nsiInfo = new NsiInfo();
+        nsiInfo.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
+        nsiInfo.setNsiName("eMBB-001");
+        AllocateCnNssi cnNssi = new AllocateCnNssi();
+        cnNssi.setNssiId("NSST-C-001-HDBNJ-NSSMF-01-A-ZX");
+        cnNssi.setNssiName("eMBB-001");
+        cnNssi.setScriptName("CN1");
+        cnNssi.setSliceProfile(sP);
+        cnNssi.setNsiInfo(nsiInfo);
+
+        NssmfAdapterNBIRequest nbiRequest = createNbiRequest();
+        nbiRequest.setAllocateCnNssi(cnNssi);
+        return nbiRequest;
+    }
+
+    @Test
+    public void deAllocateNssi() throws Exception {
+        DeAllocateNssi deAllocateNssi = new DeAllocateNssi();
+        deAllocateNssi.setTerminateNssiOption(0);
+        List<String> snssai = new LinkedList<>();
+        snssai.add("001-100001");
+        deAllocateNssi.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
+        deAllocateNssi.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
+        deAllocateNssi.setScriptName("CN1");
+        deAllocateNssi.setSnssaiList(snssai);
+
+        NssmfAdapterNBIRequest nbiRequest = createNbiRequest();
+        nbiRequest.setDeAllocateNssi(deAllocateNssi);
+
+        NssmfInfo nssmf = new NssmfInfo();
+        nssmf.setUserName("nssmf-user");
+        nssmf.setPassword("nssmf-pass");
+        nssmf.setPort("8080");
+        nssmf.setIpAddress("127.0.0.1");
+
+        NssiResponse nssiRes = new NssiResponse();
+        nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
+
+        TokenResponse token = new TokenResponse();
+        token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
+        token.setExpires(1800);
+
+        postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
+        tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
+
+        createCommonMock(202, nssmf);
+        ResponseEntity res = nssiManagerService.deAllocateNssi(nbiRequest, "ab9af40f13f721b5f13539d87484098");
+        assertNotNull(res);
+        assertNotNull(res.getBody());
+        NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
+        assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
+        assertNotNull(res);
+        assertNotNull(res.getBody());
+    }
+
+    @Test
+    public void activateNssi() throws Exception {
+        NssmfInfo nssmf = new NssmfInfo();
+        nssmf.setUserName("nssmf-user");
+        nssmf.setPassword("nssmf-pass");
+        nssmf.setPort("8080");
+        nssmf.setIpAddress("127.0.0.1");
+
+        NssiResponse nssiRes = new NssiResponse();
+        nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
+
+        TokenResponse token = new TokenResponse();
+        token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
+        token.setExpires(1800);
+
+        postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
+        tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
+
+        ActDeActNssi act = new ActDeActNssi();
+        act.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
+        act.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
+
+        NssmfAdapterNBIRequest nbiRequest = createNbiRequest();
+        nbiRequest.setActDeActNssi(act);
+
+        createCommonMock(200, nssmf);
+        ResponseEntity res = nssiManagerService.activateNssi(nbiRequest, "001-100001");
+        assertNotNull(res);
+        assertNotNull(res.getBody());
+        NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
+        assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
+    }
+
+    @Test
+    public void deActivateNssi() throws Exception {
+        NssmfInfo nssmf = new NssmfInfo();
+        nssmf.setUserName("nssmf-user");
+        nssmf.setPassword("nssmf-pass");
+        nssmf.setPort("8080");
+        nssmf.setIpAddress("127.0.0.1");
+
+        NssiResponse nssiRes = new NssiResponse();
+        nssiRes.setJobId("4b45d919816ccaa2b762df5120f72067");
+
+        TokenResponse token = new TokenResponse();
+        token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
+        token.setExpires(1800);
+
+        postStream = new ByteArrayInputStream(marshal(nssiRes).getBytes(UTF_8));
+        tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
+
+        ActDeActNssi act = new ActDeActNssi();
+        act.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
+        act.setNssiId("NSSI-C-001-HDBNJ-NSSMF-01-A-ZX");
+
+        NssmfAdapterNBIRequest nbiRequest = createNbiRequest();
+        nbiRequest.setActDeActNssi(act);
+
+        createCommonMock(200, nssmf);
+        ResponseEntity res = nssiManagerService.deActivateNssi(nbiRequest, "001-100001");
+        assertNotNull(res);
+        assertNotNull(res.getBody());
+        NssiResponse allRes = unMarshal(res.getBody().toString(), NssiResponse.class);
+        assertEquals(allRes.getJobId(), "4b45d919816ccaa2b762df5120f72067");
+    }
+
+    @Test
+    public void queryJobStatus() throws Exception {
+        NssmfInfo nssmf = new NssmfInfo();
+        nssmf.setUserName("nssmf-user");
+        nssmf.setPassword("nssmf-pass");
+        nssmf.setPort("8080");
+        nssmf.setIpAddress("127.0.0.1");
+
+        JobStatusResponse jobStatusResponse = new JobStatusResponse();
+        ResponseDescriptor descriptor = new ResponseDescriptor();
+        descriptor.setResponseId("7512eb3feb5249eca5ddd742fedddd39");
+        descriptor.setProgress(20);
+        descriptor.setStatusDescription("Initiating VNF Instance");
+        descriptor.setStatus("processing");
+        jobStatusResponse.setResponseDescriptor(descriptor);
+
+        TokenResponse token = new TokenResponse();
+        token.setAccessToken("7512eb3feb5249eca5ddd742fedddd39");
+        token.setExpires(1800);
+
+        postStream = new ByteArrayInputStream(marshal(jobStatusResponse).getBytes(UTF_8));
+        tokenStream = new ByteArrayInputStream(marshal(token).getBytes(UTF_8));
+
+        ResourceOperationStatus operationStatus = new ResourceOperationStatus();
+        operationStatus.setOperationId("4b45d919816ccaa2b762df5120f72067");
+        operationStatus.setResourceTemplateUUID("8ee5926d-720b-4bb2-86f9-d20e921c143b");
+        operationStatus.setServiceId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
+
+        NssmfAdapterNBIRequest nbiRequest = createNbiRequest();
+        nbiRequest.setResponseId("7512eb3feb5249eca5ddd742fedddd39");
+        Optional<ResourceOperationStatus> optional = Optional.of(operationStatus);
+
+        doAnswer(invocation -> optional).when(repository).findOne(any());
+
+        createCommonMock(200, nssmf);
+
+        ResponseEntity res = nssiManagerService.queryJobStatus(nbiRequest, "4b45d919816ccaa2b762df5120f72067");
+        assertNotNull(res);
+        assertNotNull(res.getBody());
+        JobStatusResponse allRes = unMarshal(res.getBody().toString(), JobStatusResponse.class);
+        assertEquals(allRes.getResponseDescriptor().getProgress(), 20);
+        assertEquals(allRes.getResponseDescriptor().getStatus(), "processing");
+        assertEquals(allRes.getResponseDescriptor().getResponseId(), "7512eb3feb5249eca5ddd742fedddd39");
+
+        System.out.println(res);
+
+    }
+
+    @Test
+    public void queryNSSISelectionCapability() throws Exception {
+
+        NssmfAdapterNBIRequest nbiRequest = createNbiRequest();
+        ResponseEntity res = nssiManagerService.queryNSSISelectionCapability(nbiRequest);
+        assertNotNull(res);
+        assertNotNull(res.getBody());
+        Map allRes = unMarshal(res.getBody().toString(), Map.class);
+        assertEquals(allRes.get("selection"), "NSMF");
+
+        System.out.println(res);
+
+        nbiRequest.getEsrInfo().setVendor(NssmfAdapterConsts.ONAP_INTERNAL_TAG);
+        res = nssiManagerService.queryNSSISelectionCapability(nbiRequest);
+        assertNotNull(res);
+        assertNotNull(res.getBody());
+        allRes = unMarshal(res.getBody().toString(), Map.class);
+        assertEquals(allRes.get("selection"), "NSSMF");
+
+        System.out.println(res);
+
+        nbiRequest.getEsrInfo().setNetworkType(NetworkType.ACCESS);
+        res = nssiManagerService.queryNSSISelectionCapability(nbiRequest);
+        assertNotNull(res);
+        assertNotNull(res.getBody());
+        allRes = unMarshal(res.getBody().toString(), Map.class);
+        assertEquals(allRes.get("selection"), "NSSMF");
+
+        System.out.println(res);
+    }
+
+    private NssmfAdapterNBIRequest createNbiRequest() {
+        NssmfAdapterNBIRequest nbiRequest = new NssmfAdapterNBIRequest();
+        EsrInfo esrInfo = new EsrInfo();
+        esrInfo.setVendor("huawei");
+        esrInfo.setNetworkType(CORE);
+        ServiceInfo serviceInfo = new ServiceInfo();
+        serviceInfo.setServiceUuid("8ee5926d-720b-4bb2-86f9-d20e921c143b");
+        serviceInfo.setServiceInvariantUuid("e75698d9-925a-4cdd-a6c0-edacbe6a0b51");
+        serviceInfo.setGlobalSubscriberId("5GCustomer");
+        serviceInfo.setServiceType("5G");
+        serviceInfo.setNsiId("NSI-M-001-HDBNJ-NSMF-01-A-ZX");
+        nbiRequest.setEsrInfo(esrInfo);
+        nbiRequest.setServiceInfo(serviceInfo);
+        return nbiRequest;
+    }
+
+    @Test
+    public void querySubnetCapability() {
+        NssmfAdapterNBIRequest nbiRequest = createNbiRequest();
+
+        String subnetCapabilityQuery = "\"subnetTypes\": [\"TN-FH\",\"TN-MH\",\"TN-BH\"]";
+        nbiRequest.setSubnetCapabilityQuery(subnetCapabilityQuery);
+        ResponseEntity res = nssiManagerService.queryNSSISelectionCapability(nbiRequest);
+        assertNotNull(res);
+        assertNotNull(res.getBody());
+    }
+}
diff --git a/adapters/mso-nssmf-adapter/src/test/resources/application-test.yaml b/adapters/mso-nssmf-adapter/src/test/resources/application-test.yaml
new file mode 100644
index 0000000..fa323e8
--- /dev/null
+++ b/adapters/mso-nssmf-adapter/src/test/resources/application-test.yaml
@@ -0,0 +1,60 @@
+
+aai:
+  auth: 2A11B07DB6214A839394AA1EC5844695F5114FC407FF5422625FB00175A3DCB8A1FF745F22867EFA72D5369D599BBD88DA8BED4233CF5586
+  endpoint: https://aai.onap:30233
+logging:
+  path: logs
+
+spring:
+  datasource:
+    username: root
+    password: 123456
+    driver-class-name: org.mariadb.jdbc.Driver
+    initialization-mode: always
+    url: jdbc:mariadb://49.232.146.162:8989/requestdb
+  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.{{ include "common.namespace" . }}:8083
+      auth: Basic YnBlbDpwYXNzd29yZDEk
+  infra:
+    endpoint: https://so.{{ include "common.namespace" . }}: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
