LOG.debug("Statment {}, returned {}", INSERT_ALARM_STRING, count);
statement.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing Alarm into DB", e);
}
return count;
}
int nodeExists = 0;
LOG.info("Checking if {} exists in DB", nodeId);
try (Connection connection = dataSource.getConnection();
- PreparedStatement preparedStmt = connection.prepareStatement(selectTableSQL)) {
+ PreparedStatement preparedStmt = connection.prepareStatement(selectTableSQL)) {
preparedStmt.setString(1, nodeId);
try (ResultSet rs = preparedStmt.executeQuery()) {
while (rs.next()) {
}
}
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when fetching node in DB", e);
}
return nodeExists == 0 ? false : true;
}
}
}
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when fetching data in DB", e);
}
return dataExists == 0 ? false : true;
}
String query = Queries.getQuery().deviceInfoInsert().get();
LOG.info("Running {} query ", query);
try (Connection connection = dataSource.getConnection();
- PreparedStatement preparedStatement = connection.prepareStatement(query)) {
+ PreparedStatement preparedStatement = connection.prepareStatement(query)) {
Object[] prepareParameters = prepareDeviceInfoParameters(deviceInfo);
for (int i = 0; i < prepareParameters.length; i++) {
LOG.debug("Parameter {} has value {}", i + 1, prepareParameters[i]);
persistDevConnectionMap(deviceId, connection);
LOG.debug("iNode persist Connection Map call complete");
- } catch (SQLException e) {
- LOG.error(e.getMessage(), e);
- } catch (InterruptedException e) {
- LOG.error(e.getMessage(), e);
- } catch (ExecutionException e) {
- LOG.error(e.getMessage(), e);
+ } catch (SQLException | InterruptedException | ExecutionException e) {
+ LOG.error("Something wrong when storing node into DB", e);
}
return sqlResult;
}
}
}
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when fetching node in DB", e);
}
return nodeExists == 0 ? false : true;
}
persistShelves(nodeId, connection, shelve);
}
} catch (SQLException e1) {
- LOG.error(e1.getMessage(), e1);
+ LOG.error("Something wrong when fetching ROADM shelves in DB", e1);
}
}
persistCircuitPacks(nodeId, connection, cp);
}
} catch (SQLException e1) {
- LOG.error(e1.getMessage(), e1);
+ LOG.error("Something wrong when fetching Circuit Packs in DB", e1);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing Circuit Packs in DB", e);
}
}
preparedStmt.execute();
preparedStmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing shelves in DB", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing shelves slots in DB", e);
}
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing Cirtcuits Packs slots in DB", e);
}
}
}
preparedStmt.execute();
preparedStmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing Cirtcuits Packs Ports in DB", e);
}
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices interfaces in DB", e);
}
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices protocols in DB", e);
}
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices protocols LLDP Port config in DB", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices protocols LLDP list number in DB", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices protocols LLDP RSTP", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices protocols LLDP RSTP bridge port", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices protocols LLDP RSTP bridge port attributes", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices internal links", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices external links", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices physical links", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices degrees", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices degrees circuit packs", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices degrees connection ports", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices SRG", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices SRG circuit packs", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices ROADM connection ", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices connection map", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices wavelength map", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices interface tcm", e);
}
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices interface OTN ODU Tx MSI", e);
}
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices interface OTN ODU Rx MSI", e);
}
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices interface OTN ODU Exp MSI", e);
}
}
}
String query = Queries.getQuery().deviceInfoInsert().get();
LOG.info("Running {} query ", query);
try (Connection connection = dataSource.getConnection();
- PreparedStatement preparedStatement = connection.prepareStatement(query)) {
+ PreparedStatement preparedStatement = connection.prepareStatement(query)) {
Object[] prepareParameters = prepareDeviceInfoParameters(deviceInfo);
for (int i = 0; i < prepareParameters.length; i++) {
LOG.debug("Parameter {} has value {}", i + 1, prepareParameters[i]);
persistDevConnectionMap(deviceId, connection);
LOG.debug("iNode persist Connection Map call complete");
- } catch (SQLException e) {
- LOG.error(e.getMessage(), e);
- } catch (InterruptedException e) {
- LOG.error(e.getMessage(), e);
- } catch (ExecutionException e) {
- LOG.error(e.getMessage(), e);
+ } catch (SQLException | InterruptedException | ExecutionException e) {
+ LOG.error("Something wrong when storing node into DB", e);
}
return sqlResult;
}
}
}
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when fetching node in DB", e);
}
return nodeExists == 0 ? false : true;
}
persistShelves(nodeId, connection, shelve);
}
} catch (SQLException e1) {
- LOG.error(e1.getMessage(), e1);
+ LOG.error("Something wrong when fetching ROADM shelves in DB", e1);
}
}
persistCircuitPacks(nodeId, connection, cp);
}
} catch (SQLException e1) {
- LOG.error(e1.getMessage(), e1);
+ LOG.error("Something wrong when fetching Circuit Packs in DB", e1);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing Circuit Packs in DB", e);
}
}
preparedStmt.execute();
preparedStmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing shelves in DB", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing shelves slots in DB", e);
}
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing Cirtcuits Packs slots in DB", e);
}
}
}
preparedStmt.execute();
preparedStmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing Cirtcuits Packs Ports in DB", e);
}
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices interfaces in DB", e);
}
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices protocols in DB", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices protocols LLDP Port config in DB", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices protocols LLDP list number in DB", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices protocols LLDP RSTP", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices protocols LLDP RSTP bridge port", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices protocols LLDP RSTP bridge port attributes", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices internal links", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices external links", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices physical links", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices degrees", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices degrees circuit packs", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices degrees connection ports", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices SRG", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices SRG circuit packs", e);
}
}
startTimestamp
};
+
String query = Queries.getQuery().deviceRoadmConnectionsInsert().get();
LOG.info("Running {} query ", query);
try (PreparedStatement stmt = connection.prepareStatement(query)) {
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices ROADM connection ", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices connection map", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices wavelength map", e);
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices interface tcm", e);
}
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices interface OTN ODU Tx MSI", e);
}
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices interface OTN ODU Rx MSI", e);
}
}
}
stmt.execute();
stmt.clearParameters();
} catch (SQLException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("Something wrong when storing devices interface OTN ODU Exp MSI", e);
}
}
}
@Override
public void onDataTreeChanged(Collection<DataTreeModification<Node>> changes) {
- //LOG.info("################testing np1:"+changes.toString());
+ //LOG.debug("testing np1: {}", changes.toString());
String openROADMversion = "";
List<DataTreeModification<Node>> changesWithoutDefaultNetconfNode = getRealDevicesOnly(changes);
for (DataTreeModification<Node> device : changesWithoutDefaultNetconfNode) {
DataObjectModification<Node> rootNode = device.getRootNode();
String nodeId = rootNode.getDataAfter().key().getNodeId().getValue();
- LOG.info("################nodeId {}", nodeId);
+ LOG.debug("nodeId {}", nodeId);
NetconfNode netconfNode = rootNode.getDataAfter().augmentation(NetconfNode.class);
NetconfNodeConnectionStatus.ConnectionStatus connectionStatus =
long count = netconfNode.getAvailableCapabilities().getAvailableCapability().stream()
.filter(cp -> cp.getCapability().contains(StringConstants.OPENROADM_DEVICE_MODEL_NAME))
.count();
- LOG.info("################## DCL Modification Type {}",
- device.getRootNode().getModificationType().toString());
- LOG.info("################## DCL Capability Count {}", count);
- LOG.info("################## DCL Connection Status {}", connectionStatus);
+ LOG.debug("DCL Modification Type {}", device.getRootNode().getModificationType().toString());
+ LOG.debug("DCL Capability Count {}", count);
+ LOG.debug("DCL Connection Status {}", connectionStatus);
if (isCreate(device) || isUpdate(device)) {
LOG.info("Node {} was modified", nodeId);
try {
processModifiedSubtree(nodeId, netconfNode, openROADMversion);
} catch (InterruptedException | ExecutionException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("something wrong when modifying node {}", nodeId, e);
}
-
} else if (isDelete(device)) {
LOG.info("Node {} was deleted", nodeId);
}
@Override
public void onDataTreeChanged(Collection<DataTreeModification<Node>> changes) {
- //LOG.debug("testing np1:"+changes.toString());
+ //LOG.debug("testing np1: {}", changes.toString());
String openROADMversion = "";
List<DataTreeModification<Node>> changesWithoutDefaultNetconfNode = getRealDevicesOnly(changes);
for (DataTreeModification<Node> device : changesWithoutDefaultNetconfNode) {
long count = netconfNode.getAvailableCapabilities().getAvailableCapability().stream()
.filter(cp -> cp.getCapability().contains(StringConstants.OPENROADM_DEVICE_MODEL_NAME))
.count();
- LOG.info("DL ################## Modification Type {}",
- device.getRootNode().getModificationType().toString());
- LOG.info("DL ################## Capability Count {}", count);
- LOG.info("DL ################## Connection Status {}", connectionStatus);
- LOG.info("DL ################## device.getRootNode().getDataBefore() {}",
- device.getRootNode().getDataBefore());
- LOG.info("DL ################## device.getRootNode().getDataAfter() {}",
- device.getRootNode().getDataAfter());
-
+ LOG.debug("DL Modification Type {}", device.getRootNode().getModificationType().toString());
+ LOG.debug("DL Capability Count {}", count);
+ LOG.debug("DL Connection Status {}", connectionStatus);
+ LOG.debug("DL device.getRootNode().getDataBefore() {}", device.getRootNode().getDataBefore());
+ LOG.debug("DL device.getRootNode().getDataAfter() {}", device.getRootNode().getDataAfter());
if (isCreate(device)) {
LOG.info("Node {} was created", nodeId);
try {
processModifiedSubtree(nodeId, netconfNode, openROADMversion);
} catch (InterruptedException | ExecutionException e) {
- LOG.error(e.getMessage(), e);
+ LOG.error("something wrong when creating node {}", nodeId, e);
}
} else if (isDelete(device)) {
LOG.info("Node {} was deleted", nodeId);