summaryrefslogtreecommitdiffstats
path: root/adapters/mso-vfc-adapter/src
diff options
context:
space:
mode:
authorc00149107 <chenchuanyu@huawei.com>2017-09-18 09:59:31 +0800
committerc00149107 <chenchuanyu@huawei.com>2017-09-18 09:59:31 +0800
commit5d8490e4c2aabebe4e34a28bc47a42a17fbfa1f1 (patch)
treee7042540f06e084f6deab5fb43c0e7294768d34b /adapters/mso-vfc-adapter/src
parent776ff0e6f96650515e1431741cb61df1a9d9248f (diff)
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>
Diffstat (limited to 'adapters/mso-vfc-adapter/src')
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcManager.java16
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/model/NSResourceInputParameter.java34
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/model/NsOperationKey.java26
3 files changed, 38 insertions, 38 deletions
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 f463f5e344..f4572c8351 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 class VfcManager {
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 @@ public class VfcManager {
// 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 @@ public class VfcManager {
// 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 @@ public class VfcManager {
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 @@ public class VfcManager {
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 @@ public class VfcManager {
// 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 @@ public class VfcManager {
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 ca1807ce62..f88a11dee8 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 @@ public class NSResourceInputParameter {
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 884c3d2468..d6cfbde906 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 @@ public class NsOperationKey {
/**
* the NS template uuid
*/
- private String nodeTemplateId;
+ private String nodeTemplateUUID;
/**
*
@@ -89,26 +89,20 @@ public class NsOperationKey {
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
+ * @param nodeTemplateUUID The nodeTemplateUUID to set.
*/
- public void setNodeTemplateId(String nodeTemplateId) {
- this.nodeTemplateId = nodeTemplateId;
+ public void setNodeTemplateUUID(String nodeTemplateUUID) {
+ this.nodeTemplateUUID = nodeTemplateUUID;
}
-
+
}