@Override
public void onSessionUp(NetconfManagementSession session) {
logger.debug("Session {} up", session);
- Preconditions.checkState(sessions.contains(session) == false, "Session %s was already added", session);
+ Preconditions.checkState(!sessions.contains(session), "Session %s was already added", session);
sessions.add(session);
}
@Override
public Schemas getSchemas() {
// capabilities should be split from operations (it will allow to move getSchema operation to monitoring module)
- try (NetconfOperationServiceSnapshot snapshot = netconfOperationProvider.getSnapshot("netconf-monitoring")) {
+ try (NetconfOperationServiceSnapshot snapshot = netconfOperationProvider.openSnapshot("netconf-monitoring")) {
return transformSchemas(snapshot.getServices());
} catch (RuntimeException e) {
throw e;