diff options
author | Dan Timoney <dtimoney@att.com> | 2022-08-03 11:59:43 -0400 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2022-08-05 16:10:18 -0400 |
commit | 219b28ed3c3ee23f10d67c9c50583a8bd5a84f3a (patch) | |
tree | e3d5654f7cb1c16d899d652ab25c97992bf635b6 /generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/util/DataBrokerUtil.java | |
parent | 2b1dc5b10650ed62f71d4b84ef662b59ed663fc1 (diff) |
Changes to support ODL Sulfur update
Changes to sdnc/northbound to conform to changes in OpenDaylight Sulfur
release. Many of these changes are due to a change in yangtools, which
no longer implements a common ancestor for its builder classes. This broke
a utility method used in jUnit test cases (build()), which meant all
jUnits using that method had to be updated to call each individual
builder's build() method directly.
Issue-ID: CCSDK-1728
Signed-off-by: Dan Timoney <dtimoney@att.com>
Change-Id: Ia82aa3decd82d873120dd643a6a0427928890f99
Diffstat (limited to 'generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/util/DataBrokerUtil.java')
-rw-r--r-- | generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/util/DataBrokerUtil.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/util/DataBrokerUtil.java b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/util/DataBrokerUtil.java index 8bfea834..6ac43e86 100644 --- a/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/util/DataBrokerUtil.java +++ b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/util/DataBrokerUtil.java @@ -42,7 +42,7 @@ import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.re import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.service.status.ServiceStatusBuilder; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import static org.onap.sdnc.northbound.util.MDSALUtil.build; + /** @@ -72,12 +72,13 @@ public class DataBrokerUtil { //The toString() value from a Service object returned form data.get() is different than the toString() value //from a Service Object constructed from a Builder. This makes it difficult to compare deltas when doing a // assertEquals. That why we rebuild it her to solve that problem. - return build(ServiceBuilder::new,data.get(),(service) -> service - .setServiceStatus(build(ServiceStatusBuilder::new,service.getServiceStatus())) - .setServiceData(build(ServiceDataBuilder::new,service.getServiceData(),(serviceStatus)->serviceStatus - .setServiceLevelOperStatus(build(ServiceLevelOperStatusBuilder::new,serviceStatus.getServiceLevelOperStatus())) - )) - ); + ServiceBuilder svcBuilder = new ServiceBuilder(); + svcBuilder.setServiceStatus(data.get().getServiceStatus()); + ServiceDataBuilder svcDataBuilder = new ServiceDataBuilder(data.get().getServiceData()); + svcDataBuilder.setServiceLevelOperStatus(data.get().getServiceData().getServiceLevelOperStatus()); + svcBuilder.setServiceData(svcDataBuilder.build()); + svcBuilder.setServiceInstanceId(data.get().getServiceInstanceId()); + return svcBuilder.build(); } |