Fix deprecated warnings caused by YangTools update
[transportpce.git] / renderer / src / main / java / org / opendaylight / transportpce / renderer / provisiondevice / tasks / DeviceRenderingTask.java
index d75a8174eaeca7875e0287c1704e322fe05dc783..7b15923276b74763b7fb663716aab81f646384d5 100644 (file)
@@ -7,14 +7,15 @@
  */
 package org.opendaylight.transportpce.renderer.provisiondevice.tasks;
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.Callable;
 import org.opendaylight.transportpce.renderer.ServicePathInputData;
 import org.opendaylight.transportpce.renderer.provisiondevice.DeviceRendererService;
 import org.opendaylight.transportpce.renderer.provisiondevice.DeviceRenderingResult;
 import org.opendaylight.transportpce.renderer.provisiondevice.servicepath.ServicePathDirection;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev200128.ServicePathOutput;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev200615.olm.renderer.input.Nodes;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.device.renderer.rev200128.ServicePathOutput;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev201211.olm.renderer.input.Nodes;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -37,13 +38,13 @@ public class DeviceRenderingTask implements Callable<DeviceRenderingResult> {
     public DeviceRenderingResult call() throws Exception {
         ServicePathOutput output = this.deviceRenderer.setupServicePath(this.servicePathInputData.getServicePathInput(),
                 this.direction);
-        if (!output.isSuccess()) {
+        if (!output.getSuccess()) {
             LOG.warn("Device rendering not successfully finished.");
             return DeviceRenderingResult.failed("Operation Failed");
         }
         List<Nodes> olmList = this.servicePathInputData.getNodeLists().getOlmList();
         LOG.info("Device rendering finished successfully.");
-        return DeviceRenderingResult.ok(olmList, output.getNodeInterface());
+        return DeviceRenderingResult.ok(olmList, new ArrayList<>(output.nonnullNodeInterface().values()));
     }
 
 }