+ private List<String> inf2Del(String termPoint, Map<String, List<String>> suffixListMap, String nodeId) {
+ List<String> inf2Del = new LinkedList<>();
+ try {
+ for (String suffix : suffixListMap.get("ODU")) {
+ if (this.openRoadmInterfaces.getInterface(
+ nodeId, String.join(GridConstant.NAME_PARAMETERS_SEPARATOR, termPoint, suffix)).isPresent()) {
+ inf2Del.add(String.join(GridConstant.NAME_PARAMETERS_SEPARATOR, termPoint, suffix));
+ }
+ }
+ }
+ catch (OpenRoadmInterfaceException e) {
+ LOG.error("impossible to get one of the interfaces {}",
+ termPoint + GridConstant.NAME_PARAMETERS_SEPARATOR + String.join(
+ " or " + termPoint + GridConstant.NAME_PARAMETERS_SEPARATOR,
+ suffixListMap.get("ODU")),
+ e);
+ }
+ try {
+ for (String suffix : suffixListMap.get("other")) {
+ if (this.openRoadmInterfaces.getInterface(
+ nodeId, String.join(GridConstant.NAME_PARAMETERS_SEPARATOR, termPoint, suffix)).isPresent()) {
+ LOG.info("Deleting the interface {}",
+ String.join(GridConstant.NAME_PARAMETERS_SEPARATOR, termPoint, suffix));
+ inf2Del.add(String.join(GridConstant.NAME_PARAMETERS_SEPARATOR, termPoint, suffix));
+ }
+ }
+ }
+ catch (OpenRoadmInterfaceException e) {
+ LOG.error("impossible to get one of the interfaces {}",
+ termPoint + GridConstant.NAME_PARAMETERS_SEPARATOR + String.join(
+ " or " + termPoint + GridConstant.NAME_PARAMETERS_SEPARATOR,
+ suffixListMap.get("ODU")),
+ e);
+ }
+ return inf2Del;
+ }