use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev200120.pcep.client.attributes.PathComputationClient in project bgpcep by opendaylight.
the class Stateful07TopologySessionListener method loadLspData.
/**
* Recover lspData and mark any LSPs in the LSP database that were previously reported by the PCC as stale.
*/
@Override
protected synchronized void loadLspData(final Node node, final Map<String, ReportedLsp> lspData, final Map<PlspId, String> lsps, final boolean incrementalSynchro) {
// load node's lsps from DS
final PathComputationClient pcc = node.getAugmentation(Node1.class).getPathComputationClient();
final List<ReportedLsp> reportedLsps = pcc.getReportedLsp();
for (final ReportedLsp reportedLsp : reportedLsps) {
final String lspName = reportedLsp.getName();
lspData.put(lspName, reportedLsp);
if (!reportedLsp.getPath().isEmpty()) {
final Path1 path1 = reportedLsp.getPath().get(0).getAugmentation(Path1.class);
if (path1 != null) {
final PlspId plspId = path1.getLsp().getPlspId();
if (!incrementalSynchro) {
this.staleLsps.add(plspId);
}
lsps.put(plspId, lspName);
}
}
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev200120.pcep.client.attributes.PathComputationClient in project bgpcep by opendaylight.
the class PCEPTopologySessionListener method loadLspData.
/**
* Recover lspData and mark any LSPs in the LSP database that were previously reported by the PCC as stale.
*/
@Override
protected synchronized void loadLspData(final Node node, final Map<String, ReportedLsp> lspData, final Map<PlspId, String> lsps, final boolean incrementalSynchro) {
// load node's lsps from DS
final PathComputationClient pcc = node.augmentation(Node1.class).getPathComputationClient();
for (final ReportedLsp reportedLsp : pcc.nonnullReportedLsp().values()) {
final String lspName = reportedLsp.getName();
lspData.put(lspName, reportedLsp);
if (!reportedLsp.getPath().isEmpty()) {
final Path1 path1 = reportedLsp.getPath().values().iterator().next().augmentation(Path1.class);
if (path1 != null) {
final PlspId plspId = path1.getLsp().getPlspId();
if (!incrementalSynchro) {
staleLsps.add(plspId);
}
lsps.put(plspId, lspName);
}
}
}
}
Aggregations