diff options
author | Jakub Dudycz <jakub.dudycz@nokia.com> | 2018-03-20 16:27:15 +0100 |
---|---|---|
committer | Jakub Dudycz <jakub.dudycz@nokia.com> | 2018-03-20 16:27:15 +0100 |
commit | 29c3b1e0557e10b1ee4570324e85771f6db8b2c3 (patch) | |
tree | fbd84871cb62b9b91558b753deb0d6c9a667003d /generic-resource-api/provider/src/main | |
parent | 398fdce0b850ccd7bdbed1d8098fb289400e00ab (diff) |
GenericResourceApiProvider unit tests part 5.
Added unit tests for contrailRouteTopologyOperation method
Change-Id: I8519c5e1f3b8e076186f1965a8e316d0a35095ff
Issue-ID: SDNC-275
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
Diffstat (limited to 'generic-resource-api/provider/src/main')
-rw-r--r-- | generic-resource-api/provider/src/main/java/org/onap/sdnc/northbound/GenericResourceApiProvider.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic-resource-api/provider/src/main/java/org/onap/sdnc/northbound/GenericResourceApiProvider.java b/generic-resource-api/provider/src/main/java/org/onap/sdnc/northbound/GenericResourceApiProvider.java index 197ffdc5..13b02f95 100644 --- a/generic-resource-api/provider/src/main/java/org/onap/sdnc/northbound/GenericResourceApiProvider.java +++ b/generic-resource-api/provider/src/main/java/org/onap/sdnc/northbound/GenericResourceApiProvider.java @@ -1322,7 +1322,7 @@ public class GenericResourceApiProvider implements AutoCloseable, GENERICRESOURC final String svcOperation = "contrail-route-topology-operation"; ServiceData serviceData; ServiceStatusBuilder serviceStatusBuilder = new ServiceStatusBuilder(); - Properties parms = new Properties(); + Properties properties = new Properties(); log.info(CALLED_STR, svcOperation); // create a new response object @@ -1349,7 +1349,7 @@ public class GenericResourceApiProvider implements AutoCloseable, GENERICRESOURC log.info("Adding INPUT data for " + svcOperation + " [" + siid + "] input: " + input); ContrailRouteTopologyOperationInputBuilder inputBuilder = new ContrailRouteTopologyOperationInputBuilder(input); - GenericResourceApiUtil.toProperties(parms, inputBuilder.build()); + GenericResourceApiUtil.toProperties(properties, inputBuilder.build()); // Call SLI sync method // Get SvcLogicService reference @@ -1358,7 +1358,7 @@ public class GenericResourceApiProvider implements AutoCloseable, GENERICRESOURC String allottedResourceId = ERROR_NETWORK_ID; String serviceObjectPath = null; String contrailRouteObjectPath = null; - Properties respProps = tryGetProperties(svcOperation, parms, serviceDataBuilder, error); + Properties respProps = tryGetProperties(svcOperation, properties, serviceDataBuilder, error); if (respProps != null) { error.setStatusCode(respProps.getProperty(ERROR_CODE_PARAM)); @@ -1410,7 +1410,7 @@ public class GenericResourceApiProvider implements AutoCloseable, GENERICRESOURC } catch (IllegalStateException e) { log.error(UPDATING_MDSAL_ERROR_MESSAGE, svcOperation, siid, e); responseBuilder.setResponseCode("500"); - responseBuilder.setResponseMessage(e.toString()); + responseBuilder.setResponseMessage(e.getMessage()); responseBuilder.setAckFinalIndicator("Y"); log.error(RETURNED_FAILED_MESSAGE, svcOperation, siid, responseBuilder.build()); |