From e34e4d0df23d1919fd9630ba34a8659279086908 Mon Sep 17 00:00:00 2001 From: Rob Daugherty Date: Mon, 16 Oct 2017 18:05:26 -0400 Subject: alaCarteSet unrecognized field The aLaCarte and aLaCarteSet fields in RequestParameters class and their corresponsding methods are not consistently named, and thus they are not serialized/deserialized correctly by the Jackson JSON utilities. We were seeing this sort of thing in the requests database: "requestParameters": { "subscriptionServiceType": "vFW", "aLaCarte": true, "autoBuildVfModules": false, "cascadeDelete": false, "usePreload": true, "rebuildVolumeGroups": false, "alaCarteSet": true, "alaCarte": true } We obviously shouldn't have "alaCarte" as well as "aLaCarte". And I don't think we want "alaCarteSet" to be persisted in the DB at all (it should be ignored by the JSON mapper). Issue: SO-219 Change-Id: Ia943d2970cb7db153f3af73289f426a154917f7e Signed-off-by: Rob Daugherty --- .../test/java/org/openecomp/mso/apihandlerinfra/MsoRequestTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mso-api-handlers/mso-api-handler-infra/src/test') diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/MsoRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/MsoRequestTest.java index d20357d4be..6a7fc2c723 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/MsoRequestTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/MsoRequestTest.java @@ -84,7 +84,7 @@ public class MsoRequestTest { assertEquals(msoRequest.getRequestInfo().getSource(),"VID"); assertFalse(msoRequest.getALaCarteFlag()); assertEquals(msoRequest.getReqVersion(),3); - boolean testIsALaCarteSet = msoRequest.getServiceInstancesRequest().getRequestDetails().getRequestParameters().isALaCarteSet(); + boolean testIsALaCarteSet = msoRequest.getServiceInstancesRequest().getRequestDetails().getRequestParameters().isaLaCarteSet(); assertFalse(testIsALaCarteSet); } @@ -186,13 +186,13 @@ public class MsoRequestTest { ServiceInstancesRequest sir = mapper.readValue(requestJSON1, ServiceInstancesRequest.class); MsoRequest msoRequest = new MsoRequest ("1234"); msoRequest.parse(sir, instanceIdMap, Action.deleteInstance, "v3"); - boolean testIsALaCarteSet = msoRequest.getServiceInstancesRequest().getRequestDetails().getRequestParameters().isALaCarteSet(); + boolean testIsALaCarteSet = msoRequest.getServiceInstancesRequest().getRequestDetails().getRequestParameters().isaLaCarteSet(); assertTrue(testIsALaCarteSet); assertFalse(msoRequest.getALaCarteFlag()); sir = mapper.readValue(requestJSON2, ServiceInstancesRequest.class); msoRequest = new MsoRequest ("12345"); msoRequest.parse(sir, instanceIdMap, Action.deleteInstance, "v3"); - testIsALaCarteSet = msoRequest.getServiceInstancesRequest().getRequestDetails().getRequestParameters().isALaCarteSet(); + testIsALaCarteSet = msoRequest.getServiceInstancesRequest().getRequestDetails().getRequestParameters().isaLaCarteSet(); assertTrue(testIsALaCarteSet); assertTrue(msoRequest.getALaCarteFlag()); -- cgit 1.2.3-korg