diff options
author | root1 <srinivasa.mohan@huawei.com> | 2017-12-13 14:24:43 +0530 |
---|---|---|
committer | SRINIVAS V <srinivasa.mohan@huawei.com> | 2017-12-19 09:57:16 +0000 |
commit | 383d433f5cbb7394a9c335eff7759c9e2126f106 (patch) | |
tree | eee84c852274cad804c3f3a799a9f16797cb1141 /asdcApi | |
parent | 416a026a496c933941f4d2ebfebc627a59ac647c (diff) |
Fixed to improve the Maintainability of code
Issue-ID: CCSDK-151
Change-Id: If8bf17dd0e5387855ddbff9198107f334ded59c5
Signed-off-by: SRINIVAS V <srinivasa.mohan@huawei.com>
Diffstat (limited to 'asdcApi')
-rw-r--r-- | asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java index cebcb998..ea574096 100644 --- a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java +++ b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java @@ -301,19 +301,20 @@ public Future<RpcResult<VfLicenseModelUpdateOutput>> vfLicenseModelUpdate(VfLice } VfLicenseModelUpdateInputBuilder inputBuilder = new VfLicenseModelUpdateInputBuilder(input); - input = inputBuilder.build(); + + VfLicenseModelUpdateInput inputVfLic = inputBuilder.build(); String errorMessage = "Success"; String errorCode = "200"; // If this artifact already exists, reject this update - if (artifactVersionExists(input.getArtifactName(), input.getArtifactVersion())) { + if (artifactVersionExists(inputVfLic.getArtifactName(), inputVfLic.getArtifactVersion())) { errorCode = "409"; errorMessage = "Artifact version already exists"; } else { // Translate input object into SLI-consumable properties - LOG.info("Adding INPUT data for "+SVC_OPERATION+" input: " + input); - AsdcApiUtil.toProperties(parms, input); + LOG.info("Adding INPUT data for "+SVC_OPERATION+" input: " + inputVfLic); + AsdcApiUtil.toProperties(parms, inputVfLic); // Call directed graph @@ -356,8 +357,8 @@ public Future<RpcResult<VfLicenseModelUpdateOutput>> vfLicenseModelUpdate(VfLice LOG.info("ASDC update succeeded"); // Update config tree - applyVfLicenseModelUpdate(input); - addArtifactVersion(input.getArtifactName(), input.getArtifactVersion()); + applyVfLicenseModelUpdate(inputVfLic); + addArtifactVersion(inputVfLic.getArtifactName(), inputVfLic.getArtifactVersion()); } else { LOG.info("ASDC update failed ("+errorCode+" : "+errorMessage); |