+ private void readIncludeNodes(List<OrderedHops> listHops, PceConstraints constraints) {
+ for (int i = 0; i < listHops.size(); i++) {
+ HopType hoptype = listHops.get(i).getHopType().getHopType();
+
+ String hopt = hoptype.implementedInterface().getSimpleName();
+ LOG.info("in readIncludeNodes next hop to include {}", hopt);
+ switch (hopt) {
+ case "Node":
+ org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints
+ .rev171017.ordered.constraints.sp.hop.type.hop.type.Node
+ node = (org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing
+ .constraints.rev171017.ordered.constraints.sp.hop.type.hop.type.Node) hoptype;
+ constraints.setListToInclude(constraints.new ResourcePair(PceConstraints.ResourceType.NODE,
+ node.getNodeId()));
+ break;
+ case "SRLG":
+ org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints
+ .rev171017.ordered.constraints.sp.hop.type.hop.type.SRLG
+ srlg = (org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing
+ .constraints.rev171017.ordered.constraints.sp.hop.type.hop.type.SRLG) hoptype;
+ constraints.setListToInclude(constraints.new ResourcePair(PceConstraints.ResourceType.SRLG,
+ srlg.getSRLG()));
+ break;
+ case "Clli":
+ org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints
+ .rev171017.ordered.constraints.sp.hop.type.hop.type.Clli
+ clli = (org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing
+ .constraints.rev171017.ordered.constraints.sp.hop.type.hop.type.Clli) hoptype;
+ constraints.setListToInclude(constraints.new ResourcePair(PceConstraints.ResourceType.CLLI,
+ clli.getClli()));
+ break;
+ default:
+ LOG.error("in readIncludeNodes unsupported include type {}", hopt);
+ }
+ }
+ }
+
+ private void readDiversity(List<String> srvList, PceConstraints constraints, PceConstraints.ResourceType rt) {