Fix the API dismatch

Make the class definition match to the API

Change-Id: I0e133af4ffc74ee1a826622a37592779be6dd9e8
Issue-ID:SO-140
Signed-off-by: c00149107 <chenchuanyu@huawei.com>
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcManager.java b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcManager.java
index f463f5e..f4572c8 100644
--- a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcManager.java
+++ b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcManager.java
@@ -85,7 +85,7 @@
     public RestfulResponse createNs(NSResourceInputParameter segInput) throws ApplicationException {
 
         // Step1: get service template by node type
-        String nsdId = segInput.getNsOperationKey().getNodeTemplateId();
+        String nsdId = segInput.getNsOperationKey().getNodeTemplateUUID();
         // nsdId for NFVO is "id" in the response, while for SDNO is "servcice template id"
         LOGGER.info("serviceTemplateId is {}, id is {}", nsdId);
 
@@ -97,8 +97,8 @@
         // Step3: Prepare restful parameters and options
         NsCreateReq oRequest = new NsCreateReq();
         oRequest.setNsdId(nsdId);
-        oRequest.setNsName(segInput.getSubServiceName());
-        oRequest.setDescription(segInput.getSubServiceDesc());
+        oRequest.setNsName(segInput.getNsServiceName());
+        oRequest.setDescription(segInput.getNsServiceDescription());
         String createReq = JsonUtil.marshal(oRequest);
 
         // Step4: Call NFVO or SDNO lcm to create ns
@@ -122,7 +122,7 @@
         // Step 6: save resource operation information
         ResourceOperationStatus nsOperInfo = (RequestsDatabase.getInstance()).getResourceOperationStatus(
                 segInput.getNsOperationKey().getServiceId(), segInput.getNsOperationKey().getOperationId(),
-                segInput.getNsOperationKey().getNodeTemplateId());
+                segInput.getNsOperationKey().getNodeTemplateUUID());
         nsOperInfo.setStatus(RequestsDbConstant.Status.PROCESSING);
         (RequestsDatabase.getInstance()).updateResOperStatus(nsOperInfo);
 
@@ -159,7 +159,7 @@
         LOGGER.info("delete ns response content is : {}", deleteRsp.getResponseContent());
         LOGGER.info("delete ns -> end");
         ResourceOperationStatus nsOperInfo = (RequestsDatabase.getInstance()).getResourceOperationStatus(nsOperationKey.getServiceId(),
-                nsOperationKey.getOperationId(), nsOperationKey.getNodeTemplateId());
+                nsOperationKey.getOperationId(), nsOperationKey.getNodeTemplateUUID());
         if(!HttpCode.isSucess(deleteRsp.getStatus())) {
             LOGGER.error("fail to delete ns");
 
@@ -218,7 +218,7 @@
         String jobId = rsp.get(CommonConstant.JOB_ID);
         ResourceOperationStatus nsOperInfo = (RequestsDatabase.getInstance()).getResourceOperationStatus(
                 segInput.getNsOperationKey().getServiceId(), segInput.getNsOperationKey().getOperationId(),
-                segInput.getNsOperationKey().getNodeTemplateId());
+                segInput.getNsOperationKey().getNodeTemplateUUID());
         if(ValidateUtil.isStrEmpty(jobId)) {
             LOGGER.error("Invalid jobId from instantiate operation");
             nsOperInfo.setStatus(RequestsDbConstant.Status.ERROR);
@@ -261,7 +261,7 @@
         // Step1: save segment operation info for delete process
         LOGGER.info("save segment operation for delete process");
         ResourceOperationStatus nsOperInfo = (RequestsDatabase.getInstance()).getResourceOperationStatus(nsOperationKey.getServiceId(),
-                nsOperationKey.getOperationId(), nsOperationKey.getNodeTemplateId());
+                nsOperationKey.getOperationId(), nsOperationKey.getNodeTemplateUUID());
         nsOperInfo.setStatus(RequestsDbConstant.Status.PROCESSING);
         (RequestsDatabase.getInstance()).updateResOperStatus(nsOperInfo);
 
@@ -327,7 +327,7 @@
         ValidateUtil.assertObjectNotNull(jobId);
         // Step 1: query the current resource operation status
         ResourceOperationStatus nsOperInfo = (RequestsDatabase.getInstance()).getResourceOperationStatus(nsOperationKey.getServiceId(),
-                nsOperationKey.getOperationId(), nsOperationKey.getNodeTemplateId());
+                nsOperationKey.getOperationId(), nsOperationKey.getNodeTemplateUUID());
 
         // Step 2: start query
         LOGGER.info("query ns status -> begin");
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/model/NSResourceInputParameter.java b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/model/NSResourceInputParameter.java
index ca1807c..f88a11d 100644
--- a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/model/NSResourceInputParameter.java
+++ b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/model/NSResourceInputParameter.java
@@ -30,38 +30,44 @@
 
     private NsOperationKey nsOperationKey;
 
-    private String subServiceName;
+    private String nsServiceName;
 
-    private String subServiceDesc;
+    private String nsServiceDescription;
 
     private NsParameters nsParameters;
 
+
+
+    
     /**
-     * @return Returns the subServiceName.
+     * @return Returns the nsServiceName.
      */
-    public String getSubServiceName() {
-        return subServiceName;
+    public String getNsServiceName() {
+        return nsServiceName;
     }
 
+    
     /**
-     * @param subServiceName The subServiceName to set.
+     * @param nsServiceName The nsServiceName to set.
      */
-    public void setSubServiceName(String subServiceName) {
-        this.subServiceName = subServiceName;
+    public void setNsServiceName(String nsServiceName) {
+        this.nsServiceName = nsServiceName;
     }
 
+    
     /**
-     * @return Returns the subServiceDesc.
+     * @return Returns the nsServiceDescription.
      */
-    public String getSubServiceDesc() {
-        return subServiceDesc;
+    public String getNsServiceDescription() {
+        return nsServiceDescription;
     }
 
+    
     /**
-     * @param subServiceDesc The subServiceDesc to set.
+     * @param nsServiceDescription The nsServiceDescription to set.
      */
-    public void setSubServiceDesc(String subServiceDesc) {
-        this.subServiceDesc = subServiceDesc;
+    public void setNsServiceDescription(String nsServiceDescription) {
+        this.nsServiceDescription = nsServiceDescription;
     }
 
     /**
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/model/NsOperationKey.java b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/model/NsOperationKey.java
index 884c3d2..d6cfbde 100644
--- a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/model/NsOperationKey.java
+++ b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/model/NsOperationKey.java
@@ -43,7 +43,7 @@
     /**

      * the NS template uuid

      */

-    private String nodeTemplateId;

+    private String nodeTemplateUUID;

 

     /**

      * 

@@ -89,26 +89,20 @@
         this.operationId = operationId;

     }

 

+    

     /**

-     * 

-     * <br>

-     * 

-     * @return

-     * @since ONAP Amsterdam Release

+     * @return Returns the nodeTemplateUUID.

      */

-    public String getNodeTemplateId() {

-        return nodeTemplateId;

+    public String getNodeTemplateUUID() {

+        return nodeTemplateUUID;

     }

 

-    /**

-     * 

-     * <br>

-     * 

-     * @param nodeTemplateId

-     * @since ONAP Amsterdam Release

-     */

-    public void setNodeTemplateId(String nodeTemplateId) {

-        this.nodeTemplateId = nodeTemplateId;

-    }

     

+    /**

+     * @param nodeTemplateUUID The nodeTemplateUUID to set.

+     */

+    public void setNodeTemplateUUID(String nodeTemplateUUID) {

+        this.nodeTemplateUUID = nodeTemplateUUID;

+    }

+

 }