import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.ChangeNotification;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.OrgOpenroadmDeviceListener;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.OtdrScanResult;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.ChangeNotification;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.OrgOpenroadmDeviceListener;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.OtdrScanResult;
private final PortMapping portMapping;
public DeviceListener121(String nodeId, PortMapping portMapping) {
private final PortMapping portMapping;
public DeviceListener121(String nodeId, PortMapping portMapping) {
public void onChangeNotification(ChangeNotification notification) {
if (notification.getEdit() == null) {
LOG.warn("unable to handle {} notificatin received - list of edit is null", ChangeNotification.QNAME);
return;
}
for (Edit edit : notification.getEdit()) {
public void onChangeNotification(ChangeNotification notification) {
if (notification.getEdit() == null) {
LOG.warn("unable to handle {} notificatin received - list of edit is null", ChangeNotification.QNAME);
return;
}
for (Edit edit : notification.getEdit()) {
// 1. Detect the org-openroadm-device object modified
switch (edit.getTarget().getTargetType().getSimpleName()) {
case "Ports":
LinkedList<PathArgument> path = new LinkedList<>();
// 1. Detect the org-openroadm-device object modified
switch (edit.getTarget().getTargetType().getSimpleName()) {
case "Ports":
LinkedList<PathArgument> path = new LinkedList<>();
InstanceIdentifier<Ports> portIID = (InstanceIdentifier<Ports>) InstanceIdentifier
.create(path);
String portName = InstanceIdentifier.keyOf(portIID).getPortName();
InstanceIdentifier<Ports> portIID = (InstanceIdentifier<Ports>) InstanceIdentifier
.create(path);
String portName = InstanceIdentifier.keyOf(portIID).getPortName();