</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
- <artifactId>odl-netconf-console</artifactId>
+ <artifactId>netconf-console</artifactId>
<version>${netconf.version}</version>
- <classifier>features</classifier>
- <type>xml</type>
</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
-
import javax.annotation.Nonnull;
-
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
import org.opendaylight.controller.md.sal.binding.api.DataObjectModification.ModificationType;
case SUBTREE_MODIFIED:
NetconfNodeConnectionStatus.ConnectionStatus connectionStatus =
netconfNode.getConnectionStatus();
- long count = netconfNode.getAvailableCapabilities().getAvailableCapability().stream()
- .filter(cp -> cp.getCapability().contains(StringConstants.OPENROADM_DEVICE_MODEL_NAME))
- .count();
- if (count > 0) {
- LOG.info("OpenROADM node detected: {} {}", nodeId, connectionStatus.name());
- switch (connectionStatus) {
- case Connected:
- this.networkModelService.createOpenROADMnode(nodeId);
- onDeviceConnected(nodeId);
- break;
- case Connecting:
- case UnableToConnect:
- this.networkModelService.setOpenROADMnodeStatus(nodeId, connectionStatus);
- onDeviceDisConnected(nodeId);
- break;
- default:
- LOG.warn("Unsupported device state {}", connectionStatus.getName());
- break;
+ try {
+ long count = netconfNode.getAvailableCapabilities().getAvailableCapability().stream()
+ .filter(cp -> cp.getCapability().contains(StringConstants.OPENROADM_DEVICE_MODEL_NAME))
+ .count();
+ if (count > 0) {
+ LOG.info("OpenROADM node detected: {} {}", nodeId, connectionStatus.name());
+ switch (connectionStatus) {
+ case Connected:
+ this.networkModelService.createOpenROADMnode(nodeId);
+ onDeviceConnected(nodeId);
+ break;
+ case Connecting:
+ case UnableToConnect:
+ this.networkModelService.setOpenROADMnodeStatus(nodeId, connectionStatus);
+ onDeviceDisConnected(nodeId);
+ break;
+ default:
+ LOG.warn("Unsupported device state {}", connectionStatus.getName());
+ break;
+ }
}
+ } catch (NullPointerException e) {
+ LOG.error("Cannot get available Capabilities");
}
break;
default:
*/
public void init() {
LOG.info("StubpceProvider Session Initiated");
- final StubpceImpl consumer = new StubpceImpl(notificationPublishService,dataBroker);
- rpcRegistration = rpcRegistry.addRpcImplementation(StubpceService.class, consumer);
+ final StubpceImpl consumer = new StubpceImpl(this.notificationPublishService,this.dataBroker);
+ this.rpcRegistration = this.rpcRegistry.addRpcImplementation(StubpceService.class, consumer);
}
/**
*/
public void close() {
LOG.info("StubpceProvider Closed");
- rpcRegistration.close();
- stubPcelistenerRegistration.close();
+ this.rpcRegistration.close();
}
}
*/
public void init() {
LOG.info("StubrendererProvider Session Initiated");
- final StubrendererImpl consumer = new StubrendererImpl(notificationPublishService);
- rpcRegistration = rpcRegistry.addRpcImplementation(StubrendererService.class, consumer);
+ final StubrendererImpl consumer = new StubrendererImpl(this.notificationPublishService);
+ this.rpcRegistration = this.rpcRegistry.addRpcImplementation(StubrendererService.class, consumer);
}
/**
*/
public void close() {
LOG.info("StubrendererProvider Closed");
- rpcRegistration.close();
- stubRendererlistenerRegistration.close();
+ this.rpcRegistration.close();
}
}