- } else {
- org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev181130.Node1 node1 =
- node.augmentation(
- org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev181130.Node1.class);
- SwitchingPools sp = node1.getSwitchingPools();
- List<OduSwitchingPools> osp = new ArrayList<OduSwitchingPools>();
- osp = sp.getOduSwitchingPools();
- for (OduSwitchingPools ospx : osp) {
- List<NonBlockingList> nbl = ospx.getNonBlockingList();
- for (NonBlockingList nbll : nbl) {
- if (nbll.getAvailableInterconnectBandwidth().toJava() >= neededBW) {
- List<TpId> tplist = new ArrayList<TpId>(nbll.getTpList());
- if ((tplist.contains(tp1.getTpId())) & (tplist.contains(tp2.getTpId()))) {
- LOG.debug("validateSwitchingPoolBandwidth: couple of tp {} x {} valid for crossconnection",
- tp1.getTpId().toString(), tp2.getTpId().toString());
- return true;
- }
- }
+ }
+ org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev181130.Node1 node1 =
+ node.augmentation(
+ org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev181130.Node1.class);
+ SwitchingPools sp = node1.getSwitchingPools();
+ List<OduSwitchingPools> osp = sp.getOduSwitchingPools();
+ for (OduSwitchingPools ospx : osp) {
+ List<NonBlockingList> nbl = ospx.getNonBlockingList();
+ for (NonBlockingList nbll : nbl) {
+ if (nbll.getAvailableInterconnectBandwidth().toJava() >= neededBW && nbll.getTpList() != null
+ && nbll.getTpList().contains(tp1.getTpId()) && nbll.getTpList().contains(tp2.getTpId())) {
+ LOG.debug("validateSwitchingPoolBandwidth: couple of tp {} x {} valid for crossconnection",
+ tp1.getTpId(), tp2.getTpId());
+ return true;