From 6067e755ff30476a33ca409a24f148e231995c98 Mon Sep 17 00:00:00 2001 From: Christophe Betoule Date: Wed, 7 Jul 2021 16:29:24 +0200 Subject: [PATCH] Update path description with OpucnTribSlots - complement transportpce-pathDescription yang model with min and max trib-slot in aToZ and zToA directions - remove trib-port-number and trib-slot-number from transportpce-pathDescription yang model and adapt the code - set the min and max trib-slots in path description to be compliant with otn-service-path - update min and max trib-port and trib-slot calculation wrt the different possible rates - assign them in the correct format OpucnTribSlots (A.B) - adapt pce400G UT and func tests accordingly JIRA: TRNSPRTPCE-477 JIRA: TRNSPRTPCE-478 Signed-off-by: Christophe Betoule Change-Id: I0020d7b539ca89504e4a8a285ef1de1f47c6b064 --- ...nsportpce-pathDescription@2021-07-05.yang} | 45 ++++++--- .../controllers/tpce/utils/TPCEUtils.java | 2 +- .../service/FrequenciesService.java | 4 +- .../service/FrequenciesServiceImpl.java | 10 +- .../transportpce/pce/PcePathDescription.java | 64 ++++++------- .../transportpce/pce/PceSendingPceRPCs.java | 4 +- .../pce/constraints/PceConstraintsCalc.java | 8 +- .../pce/gnpy/GnpyServiceImpl.java | 22 ++--- .../pce/gnpy/GnpyUtilitiesImpl.java | 6 +- .../pce/gnpy/utils/AToZComparator.java | 2 +- .../pce/gnpy/utils/ZToAComparator.java | 2 +- .../pce/graph/PostAlgoPathValidator.java | 96 +++++++++++++------ .../pce/networkanalyzer/PceResult.java | 35 ++----- .../service/PathComputationServiceImpl.java | 8 +- .../pce/gnpy/GnpyUtilitiesImplTest.java | 24 ++--- .../pce/networkanalyzer/PceResultTest.java | 14 ++- .../transportpce/pce/utils/PceTestData.java | 8 +- .../transportpce/pce/utils/PceTestUtils.java | 6 +- .../renderer/ModelMappingUtils.java | 20 ++-- .../RendererServiceOperationsImpl.java | 2 +- .../renderer/utils/ServiceDataUtils.java | 34 +++---- .../utils/ServiceDeleteDataUtils.java | 26 ++--- .../listeners/NetworkModelListenerImpl.java | 26 ++--- .../servicehandler/ModelMappingUtilsTest.java | 4 +- .../ServiceDataStoreOperationsImplTest.java | 4 +- .../utils/ServiceDataUtils.java | 8 +- .../tapi/connectivity/ConnectivityUtils.java | 14 +-- .../tapi/listeners/TapiPceListenerImpl.java | 6 +- .../path-description-stub@2020-12-11.yang | 2 +- .../2.2.1/test_otn_sh_renderer.py | 8 +- tests/transportpce_tests/7.1/test_pce_400G.py | 16 ++-- 31 files changed, 291 insertions(+), 239 deletions(-) rename api/src/main/yang/service_path/{transportpce-pathDescription@2020-12-10.yang => transportpce-pathDescription@2021-07-05.yang} (80%) diff --git a/api/src/main/yang/service_path/transportpce-pathDescription@2020-12-10.yang b/api/src/main/yang/service_path/transportpce-pathDescription@2021-07-05.yang similarity index 80% rename from api/src/main/yang/service_path/transportpce-pathDescription@2020-12-10.yang rename to api/src/main/yang/service_path/transportpce-pathDescription@2021-07-05.yang index 300906928..69442c582 100644 --- a/api/src/main/yang/service_path/transportpce-pathDescription@2020-12-10.yang +++ b/api/src/main/yang/service_path/transportpce-pathDescription@2021-07-05.yang @@ -11,6 +11,10 @@ module transportpce-pathDescription { prefix org-openroadm-common-state-types; revision-date 2019-11-29; } + import org-openroadm-otn-common-types { + prefix org-openroadm-otn-common-types; + revision-date 2018-11-30; + } organization "transportPCE"; @@ -47,13 +51,18 @@ module transportpce-pathDescription { ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE"; + revision 2021-07-05 { + description + "Version 1.6.4. To add a list of trib-slots and complex-trib-slots + to be compliant with transportpce-device-renderer yang model"; + } revision 2020-12-10 { - description - "Version 1.6.3. To add states in path description elements"; + description + "Version 1.6.3. To add states in path description elements"; } revision 2020-11-26 { - description - "Version 1.6.2. To manage flexgrid"; + description + "Version 1.6.2. To manage flexgrid"; } revision 2020-06-29 { description @@ -127,11 +136,17 @@ module transportpce-pathDescription { description "Maximum frequency in THz."; } - leaf trib-port-number { - type uint16; + leaf min-trib-slot { + type org-openroadm-otn-common-types:opucn-trib-slot-def; + description + "Minimum trib slots in the form of 'A.B', + where A and B correspond to port-number and trib-slots respectively"; } - leaf trib-slot-number { - type uint16; + leaf max-trib-slot { + type org-openroadm-otn-common-types:opucn-trib-slot-def; + description + "Maximum trib slots in the form of 'A.B', + where A and B correspond to port-number and trib-slots respectively"; } leaf rate { type uint32; @@ -165,11 +180,17 @@ module transportpce-pathDescription { description "Maximum frequency in THz."; } - leaf trib-port-number { - type uint16; + leaf min-trib-slot { + type org-openroadm-otn-common-types:opucn-trib-slot-def; + description + "Minimum trib slots in the form of 'A.B', + where A and B correspond to port-number and trib-slots respectively"; } - leaf trib-slot-number { - type uint16; + leaf max-trib-slot { + type org-openroadm-otn-common-types:opucn-trib-slot-def; + description + "Maximum trib slots in the form of 'A.B', + where A and B correspond to port-number and trib-slots respectively"; } leaf rate { type uint32; diff --git a/lighty/src/main/java/io/lighty/controllers/tpce/utils/TPCEUtils.java b/lighty/src/main/java/io/lighty/controllers/tpce/utils/TPCEUtils.java index f88522529..49420c29d 100644 --- a/lighty/src/main/java/io/lighty/controllers/tpce/utils/TPCEUtils.java +++ b/lighty/src/main/java/io/lighty/controllers/tpce/utils/TPCEUtils.java @@ -314,7 +314,7 @@ public final class TPCEUtils { org.opendaylight.yang.gen.v1.gnpy.path.rev200909.$YangModuleInfoImpl.getInstance(), org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210426 .$YangModuleInfoImpl.getInstance(), - org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210 + org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705 .$YangModuleInfoImpl.getInstance(), org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017 .$YangModuleInfoImpl.getInstance(), diff --git a/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/service/FrequenciesService.java b/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/service/FrequenciesService.java index 9494e565b..a48f5c385 100644 --- a/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/service/FrequenciesService.java +++ b/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/service/FrequenciesService.java @@ -7,8 +7,8 @@ */ package org.opendaylight.transportpce.networkmodel.service; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection; public interface FrequenciesService { diff --git a/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/service/FrequenciesServiceImpl.java b/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/service/FrequenciesServiceImpl.java index 930642a98..05a6bf8b6 100644 --- a/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/service/FrequenciesServiceImpl.java +++ b/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/service/FrequenciesServiceImpl.java @@ -57,11 +57,11 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.a import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.available.freq.map.AvailFreqMapsBuilder; import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.available.freq.map.AvailFreqMapsKey; import org.opendaylight.yang.gen.v1.http.org.openroadm.xponder.rev200529.xpdr.port.connection.attributes.WavelengthBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZ; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToA; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.TerminationPoint; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZ; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToA; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.TerminationPoint; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.common.Uint32; import org.slf4j.Logger; diff --git a/pce/src/main/java/org/opendaylight/transportpce/pce/PcePathDescription.java b/pce/src/main/java/org/opendaylight/transportpce/pce/PcePathDescription.java index c5967f278..4125c13a5 100644 --- a/pce/src/main/java/org/opendaylight/transportpce/pce/PcePathDescription.java +++ b/pce/src/main/java/org/opendaylight/transportpce/pce/PcePathDescription.java @@ -19,22 +19,22 @@ import org.opendaylight.transportpce.pce.networkanalyzer.PceResult; import org.opendaylight.yang.gen.v1.http.org.openroadm.common.optical.channel.types.rev200529.FrequencyTHz; import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State; import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev181019.ModulationFormat; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirectionBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirectionBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZ; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZKey; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToA; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToABuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToAKey; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.Resource; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.ResourceBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.LinkBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.NodeBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.TerminationPoint; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.TerminationPointBuilder; +import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev181130.OpucnTribSlotDef; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirectionBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirectionBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZ; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZKey; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToA; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToABuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToAKey; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.Resource; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.ResourceBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.LinkBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.NodeBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.TerminationPoint; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.TerminationPointBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.LinkId; -import org.opendaylight.yangtools.yang.common.Uint16; import org.opendaylight.yangtools.yang.common.Uint32; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -105,15 +105,14 @@ public class PcePathDescription { case StringConstants.SERVICE_TYPE_1GE: case StringConstants.SERVICE_TYPE_ODU4: case StringConstants.SERVICE_TYPE_ODUC4: - if (rc.getResultTribSlot() != null && rc.getResultTribPort() != null) { - @SuppressWarnings("unchecked") - List tribSlotList = (List) rc.getResultTribSlot().values().toArray()[0]; + if (rc.getResultTribPortTribSlot().get(0) != null && rc.getResultTribPortTribSlot().get(1) != null) { atoZDirectionBldr.setAToZWavelengthNumber(Uint32.valueOf(0)) - .setTribPortNumber(Uint16.valueOf(rc.getResultTribPort().values().toArray()[0].toString())) - .setTribSlotNumber(tribSlotList.get(0)); + .setMinTribSlot(rc.getResultTribPortTribSlot().get(0)) + .setMaxTribSlot(rc.getResultTribPortTribSlot().get(1)); } else { LOG.error("Trib port and trib slot number should be present"); - atoZDirectionBldr.setTribSlotNumber(Uint16.valueOf(0)).setTribPortNumber(Uint16.valueOf(0)); + atoZDirectionBldr.setMinTribSlot(new OpucnTribSlotDef("0.0")) + .setMaxTribSlot(new OpucnTribSlotDef("0.0")); } break; default: @@ -146,15 +145,14 @@ public class PcePathDescription { case StringConstants.SERVICE_TYPE_10GE: case StringConstants.SERVICE_TYPE_1GE: case StringConstants.SERVICE_TYPE_ODU4: - if (rc.getResultTribSlot() != null && rc.getResultTribPort() != null) { - @SuppressWarnings("unchecked") - List tribSlotList = (List) rc.getResultTribSlot().values().toArray()[0]; + if (rc.getResultTribPortTribSlot().get(0) != null && rc.getResultTribPortTribSlot().get(1) != null) { ztoADirectionBldr.setZToAWavelengthNumber(Uint32.valueOf(0)) - .setTribPortNumber(Uint16.valueOf(rc.getResultTribPort().values().toArray()[0].toString())) - .setTribSlotNumber(tribSlotList.get(0)); + .setMinTribSlot(rc.getResultTribPortTribSlot().get(0)) + .setMaxTribSlot(rc.getResultTribPortTribSlot().get(1)); } else { LOG.error("Trib port and trib slot number should be present"); - ztoADirectionBldr.setTribSlotNumber(Uint16.valueOf(0)).setTribPortNumber(Uint16.valueOf(0)); + ztoADirectionBldr.setMinTribSlot(new OpucnTribSlotDef("0.0")) + .setMaxTribSlot(new OpucnTribSlotDef("0.0")); } break; default: @@ -187,7 +185,7 @@ public class PcePathDescription { for (PceLink pcelink : path) { String srcName = pcelink.getSourceId().getValue(); // Nodes - org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce + org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce .resource.resource.resource.Node sourceNode = new NodeBuilder() .setNodeId(srcName) .build(); @@ -214,7 +212,7 @@ public class PcePathDescription { String linkName = pcelink.getLinkId().getValue(); // Link - org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce + org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce .resource.resource.resource.Link atozLink = new LinkBuilder() .setLinkId(linkName) .build(); @@ -240,7 +238,7 @@ public class PcePathDescription { index += 1; atozMap.put(ttpResource.key(),ttpResource); - org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce + org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce .resource.resource.resource.Node targetNode = new NodeBuilder() .setNodeId(destName) .build(); @@ -300,7 +298,7 @@ public class PcePathDescription { // Nodes - org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce + org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce .resource.resource.resource.Node sourceNode = new NodeBuilder() .setNodeId(srcName).build(); @@ -327,7 +325,7 @@ public class PcePathDescription { String linkName = pcelink.getLinkId().getValue(); // Link - org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce + org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce .resource.resource.resource.Link ztoaLink = new LinkBuilder() .setLinkId(linkName).build(); @@ -352,7 +350,7 @@ public class PcePathDescription { ztoaList.put(ttpResource.key(),ttpResource); - org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce + org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce .resource.resource.resource.Node targetNode = new NodeBuilder() .setNodeId(destName).build(); // Target Resource diff --git a/pce/src/main/java/org/opendaylight/transportpce/pce/PceSendingPceRPCs.java b/pce/src/main/java/org/opendaylight/transportpce/pce/PceSendingPceRPCs.java index 7f3ce50a0..f7c55cccb 100644 --- a/pce/src/main/java/org/opendaylight/transportpce/pce/PceSendingPceRPCs.java +++ b/pce/src/main/java/org/opendaylight/transportpce/pce/PceSendingPceRPCs.java @@ -23,8 +23,8 @@ import org.opendaylight.transportpce.pce.networkanalyzer.PceResult; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.PathComputationRequestInput; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.PathComputationRequestInputBuilder; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.service.path.rpc.result.PathDescriptionBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.RoutingConstraintsSp.PceMetric; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.routing.constraints.sp.HardConstraints; import org.slf4j.Logger; diff --git a/pce/src/main/java/org/opendaylight/transportpce/pce/constraints/PceConstraintsCalc.java b/pce/src/main/java/org/opendaylight/transportpce/pce/constraints/PceConstraintsCalc.java index dda3ea280..df6d67212 100644 --- a/pce/src/main/java/org/opendaylight/transportpce/pce/constraints/PceConstraintsCalc.java +++ b/pce/src/main/java/org/opendaylight/transportpce/pce/constraints/PceConstraintsCalc.java @@ -20,10 +20,10 @@ import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.transportpce.common.Timeouts; import org.opendaylight.transportpce.common.network.NetworkTransactionService; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.PathComputationRequestInput; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.PathDescription; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZ; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.Link; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.Node; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.PathDescription; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZ; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.Link; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.Node; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.RoutingConstraintsSp.PceMetric; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.constraints.sp.CoRoutingOrGeneral; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.constraints.sp.co.routing.or.general.CoRouting; diff --git a/pce/src/main/java/org/opendaylight/transportpce/pce/gnpy/GnpyServiceImpl.java b/pce/src/main/java/org/opendaylight/transportpce/pce/gnpy/GnpyServiceImpl.java index e9722038c..0b5af998d 100644 --- a/pce/src/main/java/org/opendaylight/transportpce/pce/gnpy/GnpyServiceImpl.java +++ b/pce/src/main/java/org/opendaylight/transportpce/pce/gnpy/GnpyServiceImpl.java @@ -57,11 +57,11 @@ import org.opendaylight.yang.gen.v1.gnpy.path.rev200909.synchronization.info.syn import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.PathComputationRequestInput; import org.opendaylight.yang.gen.v1.http.org.openroadm.common.optical.channel.types.rev200529.FrequencyTHz; import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev181019.ModulationFormat; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZ; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToA; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.Resource; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZ; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToA; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.Resource; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress; import org.opendaylight.yangtools.yang.common.Uint32; import org.slf4j.Logger; @@ -229,11 +229,11 @@ public class GnpyServiceImpl { Long idx = index; if (resource instanceof - org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210 + org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705 .pce.resource.resource.resource.Node) { - org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210 + org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705 .pce.resource.resource.resource.Node node = - (org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210 + (org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705 .pce.resource.resource.resource.Node) resource; if (node.getNodeId() == null) { throw new GnpyException("In gnpyServiceImpl: nodeId is null"); @@ -243,11 +243,11 @@ public class GnpyServiceImpl { if (resource instanceof - org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210 + org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705 .pce.resource.resource.resource.Link) { - org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210 + org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705 .pce.resource.resource.resource.Link link = - (org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210 + (org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705 .pce.resource.resource.resource.Link) resource; idx = addLinkToRouteObject(link.getLinkId(),idx); } diff --git a/pce/src/main/java/org/opendaylight/transportpce/pce/gnpy/GnpyUtilitiesImpl.java b/pce/src/main/java/org/opendaylight/transportpce/pce/gnpy/GnpyUtilitiesImpl.java index f44711201..b4ec760b5 100644 --- a/pce/src/main/java/org/opendaylight/transportpce/pce/gnpy/GnpyUtilitiesImpl.java +++ b/pce/src/main/java/org/opendaylight/transportpce/pce/gnpy/GnpyUtilitiesImpl.java @@ -25,9 +25,9 @@ import org.opendaylight.yang.gen.v1.gnpy.path.rev200909.generic.path.properties. import org.opendaylight.yang.gen.v1.gnpy.path.rev200909.service.PathRequest; import org.opendaylight.yang.gen.v1.gnpy.path.rev200909.synchronization.info.Synchronization; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.PathComputationRequestInput; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirectionBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirectionBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.routing.constraints.sp.HardConstraints; import org.opendaylight.yangtools.yang.common.Uint32; diff --git a/pce/src/main/java/org/opendaylight/transportpce/pce/gnpy/utils/AToZComparator.java b/pce/src/main/java/org/opendaylight/transportpce/pce/gnpy/utils/AToZComparator.java index 2a0ac7b4d..333107dc7 100644 --- a/pce/src/main/java/org/opendaylight/transportpce/pce/gnpy/utils/AToZComparator.java +++ b/pce/src/main/java/org/opendaylight/transportpce/pce/gnpy/utils/AToZComparator.java @@ -10,7 +10,7 @@ package org.opendaylight.transportpce.pce.gnpy.utils; import java.io.Serializable; import java.util.Comparator; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZ; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZ; @edu.umd.cs.findbugs.annotations.SuppressFBWarnings( value = "SE_NO_SERIALVERSIONID", diff --git a/pce/src/main/java/org/opendaylight/transportpce/pce/gnpy/utils/ZToAComparator.java b/pce/src/main/java/org/opendaylight/transportpce/pce/gnpy/utils/ZToAComparator.java index b2dbae0fd..095b7b6b0 100644 --- a/pce/src/main/java/org/opendaylight/transportpce/pce/gnpy/utils/ZToAComparator.java +++ b/pce/src/main/java/org/opendaylight/transportpce/pce/gnpy/utils/ZToAComparator.java @@ -10,7 +10,7 @@ package org.opendaylight.transportpce.pce.gnpy.utils; import java.io.Serializable; import java.util.Comparator; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToA; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToA; @edu.umd.cs.findbugs.annotations.SuppressFBWarnings( value = "SE_NO_SERIALVERSIONID", diff --git a/pce/src/main/java/org/opendaylight/transportpce/pce/graph/PostAlgoPathValidator.java b/pce/src/main/java/org/opendaylight/transportpce/pce/graph/PostAlgoPathValidator.java index eaafcb6a4..d9b31d76b 100644 --- a/pce/src/main/java/org/opendaylight/transportpce/pce/graph/PostAlgoPathValidator.java +++ b/pce/src/main/java/org/opendaylight/transportpce/pce/graph/PostAlgoPathValidator.java @@ -28,6 +28,7 @@ import org.opendaylight.transportpce.pce.networkanalyzer.PceResult; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.SpectrumAssignment; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.SpectrumAssignmentBuilder; import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.OpenroadmLinkType; +import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev181130.OpucnTribSlotDef; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId; import org.opendaylight.yangtools.yang.common.Uint16; import org.slf4j.Logger; @@ -118,18 +119,27 @@ public class PostAlgoPathValidator { break; case StringConstants.SERVICE_TYPE_100GE_M: case StringConstants.SERVICE_TYPE_10GE: - tribSlotNb = StringConstants.SERVICE_TYPE_10GE.equals(serviceType) ? 8 : 20; - //fallthrough case StringConstants.SERVICE_TYPE_1GE: + if (StringConstants.SERVICE_TYPE_100GE_M.equals(serviceType)) { + tribSlotNb = 20; + } else if (StringConstants.SERVICE_TYPE_10GE.equals(serviceType)) { + tribSlotNb = 8; + } else if (StringConstants.SERVICE_TYPE_1GE.equals(serviceType)) { + tribSlotNb = 1; + } else { + pceResult.setRC(ResponseCodes.RESPONSE_FAILED); + LOG.warn("In PostAlgoPathValidator checkPath: unsupported serviceType {} found {}", + serviceType, path); + break; + } pceResult.setRC(ResponseCodes.RESPONSE_FAILED); pceResult.setServiceType(serviceType); - Map tribPort = chooseTribPort(path, allPceNodes); Map> tribSlot = chooseTribSlot(path, allPceNodes, tribSlotNb); + Map tribPort = chooseTribPort(path, allPceNodes, tribSlot, tribSlotNb); + List resultTribPortTribSlot = getMinMaxTpTs(tribPort, tribSlot); - if (tribPort != null && tribSlot != null) { - pceResult.setResultTribPort(tribPort); - pceResult.setResultTribSlot(tribSlot); - pceResult.setResultTribSlotNb(tribSlotNb); + if (resultTribPortTribSlot.get(0) != null && resultTribPortTribSlot.get(1) != null) { + pceResult.setResultTribPortTribSlot(resultTribPortTribSlot); pceResult.setRC(ResponseCodes.RESPONSE_OK); LOG.info("In PostAlgoPathValidator: found TribPort {} - tribSlot {} - tribSlotNb {}", tribPort, tribSlot, tribSlotNb); @@ -273,7 +283,7 @@ public class PostAlgoPathValidator { } private Map chooseTribPort(GraphPath path, Map allPceNodes) { + PceGraphEdge> path, Map allPceNodes, Map> tribSlotMap, int nbSlot) { LOG.info("In choosetribPort: edgeList = {} ", path.getEdgeList()); Map tribPortMap = new HashMap<>(); @@ -287,14 +297,20 @@ public class PostAlgoPathValidator { List srcTpnPool = pceOtnNodeSrc.getAvailableTribPorts().get(linkSrcTp); List destTpnPool = pceOtnNodeDest.getAvailableTribPorts().get(linkDestTp); List commonEdgeTpnPool = new ArrayList<>(); - for (Uint16 integer : srcTpnPool) { - if (destTpnPool.contains(integer)) { - commonEdgeTpnPool.add(integer); + for (Uint16 srcTpn : srcTpnPool) { + if (destTpnPool.contains(srcTpn)) { + commonEdgeTpnPool.add(srcTpn); } } Collections.sort(commonEdgeTpnPool); if (!commonEdgeTpnPool.isEmpty()) { - tribPortMap.put(edge.link().getLinkId().getValue(), commonEdgeTpnPool.get(0)); + Integer startTribSlot = tribSlotMap.values().stream().findFirst().get().get(0).toJava(); + Integer tribPort = (int) Math.ceil((double)startTribSlot / nbSlot); + for (Uint16 commonTribPort : commonEdgeTpnPool) { + if (tribPort.equals(commonTribPort.toJava())) { + tribPortMap.put(edge.link().getLinkId().getValue(), commonTribPort); + } + } } } tribPortMap.forEach((k,v) -> LOG.info("TribPortMap : k = {}, v = {}", k, v)); @@ -315,27 +331,37 @@ public class PostAlgoPathValidator { PceNode pceOtnNodeDest = allPceNodes.get(linkDestNode); List srcTsPool = pceOtnNodeSrc.getAvailableTribSlots().get(linkSrcTp); List destTsPool = pceOtnNodeDest.getAvailableTribSlots().get(linkDestTp); - List commonEdgeTsPool = new ArrayList<>(); + List commonEdgeTsPoolList = new ArrayList<>(); List tribSlotList = new ArrayList<>(); for (Uint16 integer : srcTsPool) { if (destTsPool.contains(integer)) { - commonEdgeTsPool.add(integer); + commonEdgeTsPoolList.add(integer); } } - Collections.sort(commonEdgeTsPool); - boolean discontinue = true; - int index = 0; - while (discontinue && (commonEdgeTsPool.size() - index >= nbSlot)) { - discontinue = false; - Integer val = commonEdgeTsPool.get(index).toJava(); - for (int i = 0; i < nbSlot; i++) { - if (commonEdgeTsPool.get(index + i).equals(Uint16.valueOf(val + i))) { - tribSlotList.add(commonEdgeTsPool.get(index + i)); - } else { - discontinue = true; - tribSlotList.clear(); - index += i; - break; + Collections.sort(commonEdgeTsPoolList); + List commonGoodStartEdgeTsPoolList = new ArrayList<>(); + for (Uint16 startEdgeTsPool : commonEdgeTsPoolList) { + if (Integer.valueOf(1).equals(startEdgeTsPool.toJava() % nbSlot)) { + commonGoodStartEdgeTsPoolList.add(startEdgeTsPool); + } else if (nbSlot == 1) { + commonGoodStartEdgeTsPoolList.add(startEdgeTsPool); + } + } + Collections.sort(commonGoodStartEdgeTsPoolList); + boolean goodTsList = false; + for (Uint16 goodStartTsPool : commonGoodStartEdgeTsPoolList) { + int goodStartIndex = commonEdgeTsPoolList.indexOf(Uint16.valueOf(goodStartTsPool.intValue())); + if (!goodTsList && commonEdgeTsPoolList.size() - goodStartIndex >= nbSlot) { + for (int i = 0; i < nbSlot; i++) { + if (commonEdgeTsPoolList.get(goodStartIndex + i) + .equals(Uint16.valueOf(goodStartTsPool.toJava() + i))) { + tribSlotList.add(commonEdgeTsPoolList.get(goodStartIndex + i)); + goodTsList = true; + } else { + goodTsList = false; + tribSlotList.clear(); + break; + } } } } @@ -345,6 +371,20 @@ public class PostAlgoPathValidator { return tribSlotMap; } + private List getMinMaxTpTs(Map tribPort, Map> tribSlot) { + String tribport = tribPort.values().toArray()[0].toString(); + @SuppressWarnings("unchecked") + List tsList = (List) tribSlot.values().toArray()[0]; + OpucnTribSlotDef minOpucnTs = OpucnTribSlotDef + .getDefaultInstance(String.join(".", tribport, tsList.get(0).toString())); + OpucnTribSlotDef maxOpucnTs = OpucnTribSlotDef + .getDefaultInstance(String.join(".", tribport, tsList.get(tsList.size() - 1).toString())); + List minmaxTpTsList = new ArrayList<>(); + minmaxTpTsList.add(minOpucnTs); + minmaxTpTsList.add(maxOpucnTs); + return minmaxTpTsList; + } + // Check the path OSNR private boolean checkOSNR(GraphPath path) { double linkOsnrDb; diff --git a/pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceResult.java b/pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceResult.java index b84c95ba6..f826006d5 100644 --- a/pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceResult.java +++ b/pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceResult.java @@ -10,13 +10,12 @@ package org.opendaylight.transportpce.pce.networkanalyzer; import java.math.BigDecimal; import java.util.List; -import java.util.Map; import org.opendaylight.transportpce.common.ResponseCodes; import org.opendaylight.transportpce.common.fixedflex.GridConstant; +import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev181130.OpucnTribSlotDef; import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirection; -import org.opendaylight.yangtools.yang.common.Uint16; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -26,9 +25,7 @@ public class PceResult { private boolean calcStatus = false; private String responseCode = ResponseCodes.RESPONSE_FAILED; private long resultWavelength = GridConstant.IRRELEVANT_WAVELENGTH_NUMBER; - private Map resultTribPort; - private Map> resultTribSlot; - private Integer resultTribSlotNb = -1; + private List resultTribSlotDefList; private String serviceType = ""; private BigDecimal minFreq; private BigDecimal maxFreq; @@ -132,28 +129,12 @@ public class PceResult { this.calcMessage = calcMessage; } - public Map getResultTribPort() { - return resultTribPort; + public List getResultTribPortTribSlot() { + return resultTribSlotDefList; } - public void setResultTribPort(Map resultTribPort) { - this.resultTribPort = resultTribPort; - } - - public Map> getResultTribSlot() { - return resultTribSlot; - } - - public void setResultTribSlot(Map> resultTribSlot) { - this.resultTribSlot = resultTribSlot; - } - - public int getResultTribSlotNb() { - return resultTribSlotNb; - } - - public void setResultTribSlotNb(int resultTribSlotNb) { - this.resultTribSlotNb = resultTribSlotNb; + public void setResultTribPortTribSlot(List resultTribPortTribSlot) { + this.resultTribSlotDefList = resultTribPortTribSlot; } public String getServiceType() { diff --git a/pce/src/main/java/org/opendaylight/transportpce/pce/service/PathComputationServiceImpl.java b/pce/src/main/java/org/opendaylight/transportpce/pce/service/PathComputationServiceImpl.java index 01bfc3024..519f057f1 100644 --- a/pce/src/main/java/org/opendaylight/transportpce/pce/service/PathComputationServiceImpl.java +++ b/pce/src/main/java/org/opendaylight/transportpce/pce/service/PathComputationServiceImpl.java @@ -47,8 +47,8 @@ import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev21 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.service.path.rpc.result.PathDescription; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.service.path.rpc.result.PathDescriptionBuilder; import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommonBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.RpcStatusEx; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.ServicePathNotificationTypes; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.response.parameters.sp.ResponseParametersBuilder; @@ -217,7 +217,7 @@ public class PathComputationServiceImpl implements PathComputationService { AToZDirection atoz = pathDescription.getAToZDirection(); if ((atoz != null) && (atoz.getAToZ() != null)) { LOG.debug("Impl AtoZ Notification: [{}] elements in description", atoz.getAToZ().size()); - for (org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210 + for (org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705 .path.description.atoz.direction.AToZKey key : atoz.getAToZ().keySet()) { LOG.debug("Impl AtoZ Notification: [{}] {}", key, atoz.getAToZ().get(key)); } @@ -225,7 +225,7 @@ public class PathComputationServiceImpl implements PathComputationService { ZToADirection ztoa = pathDescription.getZToADirection(); if ((ztoa != null) && (ztoa.getZToA() != null)) { LOG.debug("Impl ZtoA Notification: [{}] elements in description", ztoa.getZToA().size()); - for (org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210 + for (org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705 .path.description.ztoa.direction.ZToAKey key : ztoa.getZToA().keySet()) { LOG.debug("Impl ZtoA Notification: [{}] {}", key, ztoa.getZToA().get(key)); } diff --git a/pce/src/test/java/org/opendaylight/transportpce/pce/gnpy/GnpyUtilitiesImplTest.java b/pce/src/test/java/org/opendaylight/transportpce/pce/gnpy/GnpyUtilitiesImplTest.java index b55cc763b..4c94f0628 100644 --- a/pce/src/test/java/org/opendaylight/transportpce/pce/gnpy/GnpyUtilitiesImplTest.java +++ b/pce/src/test/java/org/opendaylight/transportpce/pce/gnpy/GnpyUtilitiesImplTest.java @@ -41,18 +41,18 @@ import org.opendaylight.transportpce.pce.gnpy.consumer.GnpyStub; import org.opendaylight.transportpce.pce.utils.JsonUtil; import org.opendaylight.transportpce.pce.utils.PceTestData; import org.opendaylight.transportpce.test.AbstractTest; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirectionBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirectionBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZ; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZKey; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToA; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToABuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToAKey; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.Resource; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.ResourceBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.TerminationPoint; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.TerminationPointBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirectionBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirectionBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZ; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZKey; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToA; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToABuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToAKey; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.Resource; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.ResourceBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.TerminationPoint; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.TerminationPointBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network; diff --git a/pce/src/test/java/org/opendaylight/transportpce/pce/networkanalyzer/PceResultTest.java b/pce/src/test/java/org/opendaylight/transportpce/pce/networkanalyzer/PceResultTest.java index 00ca6a1b8..a058340df 100644 --- a/pce/src/test/java/org/opendaylight/transportpce/pce/networkanalyzer/PceResultTest.java +++ b/pce/src/test/java/org/opendaylight/transportpce/pce/networkanalyzer/PceResultTest.java @@ -7,10 +7,13 @@ */ package org.opendaylight.transportpce.pce.networkanalyzer; +import java.util.ArrayList; +import java.util.List; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.opendaylight.transportpce.test.AbstractTest; +import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev181130.OpucnTribSlotDef; public class PceResultTest extends AbstractTest { @@ -30,9 +33,14 @@ public class PceResultTest extends AbstractTest { @Test public void setResultTribSlotNbTest() { - int nb = 10; - pceResult.setResultTribSlotNb(nb); - Assert.assertEquals(pceResult.getResultTribSlotNb(), nb); + OpucnTribSlotDef minOpucnTs = new OpucnTribSlotDef("1.1"); + OpucnTribSlotDef maxOpucnTs = new OpucnTribSlotDef("1.20"); + List minmaxTpTsList = new ArrayList<>(); + minmaxTpTsList.add(minOpucnTs); + minmaxTpTsList.add(maxOpucnTs); + pceResult.setResultTribPortTribSlot(minmaxTpTsList); + Assert.assertEquals(pceResult.getResultTribPortTribSlot().get(0), new OpucnTribSlotDef("1.1")); + Assert.assertEquals(pceResult.getResultTribPortTribSlot().get(1), new OpucnTribSlotDef("1.20")); } @Test diff --git a/pce/src/test/java/org/opendaylight/transportpce/pce/utils/PceTestData.java b/pce/src/test/java/org/opendaylight/transportpce/pce/utils/PceTestData.java index 50bd0f457..945f920b0 100644 --- a/pce/src/test/java/org/opendaylight/transportpce/pce/utils/PceTestData.java +++ b/pce/src/test/java/org/opendaylight/transportpce/pce/utils/PceTestData.java @@ -27,10 +27,10 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev1 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat; import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput; import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInputBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirectionBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirectionBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirectionBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirectionBuilder; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.RoutingConstraintsSp.PceMetric; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.constraints.sp.co.routing.or.general.CoRoutingBuilder; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.constraints.sp.co.routing.or.general.GeneralBuilder; diff --git a/pce/src/test/java/org/opendaylight/transportpce/pce/utils/PceTestUtils.java b/pce/src/test/java/org/opendaylight/transportpce/pce/utils/PceTestUtils.java index 37518dfaf..4b0405c97 100644 --- a/pce/src/test/java/org/opendaylight/transportpce/pce/utils/PceTestUtils.java +++ b/pce/src/test/java/org/opendaylight/transportpce/pce/utils/PceTestUtils.java @@ -30,9 +30,9 @@ import org.opendaylight.transportpce.test.DataStoreContext; import org.opendaylight.transportpce.test.converter.DataObjectConverter; import org.opendaylight.transportpce.test.converter.XMLDataObjectConverter; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.PathComputationRequestOutput; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZ; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZKey; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.Node; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZ; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZKey; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.Node; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network; diff --git a/renderer/src/main/java/org/opendaylight/transportpce/renderer/ModelMappingUtils.java b/renderer/src/main/java/org/opendaylight/transportpce/renderer/ModelMappingUtils.java index 1844c5ec8..84477dc49 100644 --- a/renderer/src/main/java/org/opendaylight/transportpce/renderer/ModelMappingUtils.java +++ b/renderer/src/main/java/org/opendaylight/transportpce/renderer/ModelMappingUtils.java @@ -35,12 +35,12 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev181019.Fr import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev181019.FrequencyTHz; import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev181019.ModulationFormat; import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteInput; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.PathDescription; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZ; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToA; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.TerminationPoint; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.PathDescription; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZ; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToA; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.TerminationPoint; import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev201211.olm.renderer.input.Nodes; import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev201211.olm.renderer.input.NodesBuilder; import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev201211.olm.renderer.input.NodesKey; @@ -241,9 +241,13 @@ public final class ModelMappingUtils { // set the trib-slots and trib-ports for the lower oder odu if (serviceRate.equals("1G") || (serviceRate.equals("10G"))) { + Short tribPort = Short.valueOf(pathDescription.getAToZDirection().getMinTribSlot().getValue() + .split("\\.")[0]); + Short minTribSlot = Short.valueOf(pathDescription.getAToZDirection().getMinTribSlot().getValue() + .split("\\.")[1]); otnServicePathInputBuilder - .setTribPortNumber(pathDescription.getAToZDirection().getTribPortNumber().shortValue()) - .setTribSlot(pathDescription.getAToZDirection().getTribSlotNumber().shortValue()); + .setTribPortNumber(tribPort) + .setTribSlot(minTribSlot); } return otnServicePathInputBuilder.build(); } diff --git a/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/RendererServiceOperationsImpl.java b/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/RendererServiceOperationsImpl.java index daca8aec5..6826a0b8c 100644 --- a/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/RendererServiceOperationsImpl.java +++ b/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/RendererServiceOperationsImpl.java @@ -59,7 +59,7 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.types.rev161014.PmGran import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.types.rev161014.ResourceTypeEnum; import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat; import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.PathDescription; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.PathDescription; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.RpcStatusEx; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.ServicePathNotificationTypes; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.ServicePathList; diff --git a/renderer/src/test/java/org/opendaylight/transportpce/renderer/utils/ServiceDataUtils.java b/renderer/src/test/java/org/opendaylight/transportpce/renderer/utils/ServiceDataUtils.java index 80b3e6b79..e76b810e2 100644 --- a/renderer/src/test/java/org/opendaylight/transportpce/renderer/utils/ServiceDataUtils.java +++ b/renderer/src/test/java/org/opendaylight/transportpce/renderer/utils/ServiceDataUtils.java @@ -26,23 +26,23 @@ import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer. import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ConnectionType; import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.port.PortBuilder; import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirectionBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirectionBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZ; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZKey; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToA; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToABuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToAKey; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.ResourceBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.Link; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.LinkBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.Node; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.NodeBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.TerminationPoint; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.TerminationPointBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirectionBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirectionBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZ; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZKey; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToA; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToABuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToAKey; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.ResourceBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.Link; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.LinkBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.Node; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.NodeBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.TerminationPoint; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.TerminationPointBuilder; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.service.endpoint.sp.RxDirectionBuilder; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.service.endpoint.sp.TxDirectionBuilder; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.service.handler.header.ServiceHandlerHeaderBuilder; diff --git a/renderer/src/test/java/org/opendaylight/transportpce/renderer/utils/ServiceDeleteDataUtils.java b/renderer/src/test/java/org/opendaylight/transportpce/renderer/utils/ServiceDeleteDataUtils.java index 7b1952710..67bd8ddb8 100644 --- a/renderer/src/test/java/org/opendaylight/transportpce/renderer/utils/ServiceDeleteDataUtils.java +++ b/renderer/src/test/java/org/opendaylight/transportpce/renderer/utils/ServiceDeleteDataUtils.java @@ -12,19 +12,19 @@ import java.util.HashMap; import java.util.Map; import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.port.PortBuilder; import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirectionBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirectionBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZ; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZKey; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToA; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToABuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToAKey; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.ResourceBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.TerminationPoint; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.TerminationPointBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirectionBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirectionBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZ; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZKey; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToA; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToABuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToAKey; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.ResourceBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.TerminationPoint; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.TerminationPointBuilder; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.service.endpoint.sp.RxDirectionBuilder; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.service.endpoint.sp.TxDirectionBuilder; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.service.path.PathDescription; diff --git a/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/listeners/NetworkModelListenerImpl.java b/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/listeners/NetworkModelListenerImpl.java index a9a9f0299..2bb428a97 100644 --- a/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/listeners/NetworkModelListenerImpl.java +++ b/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/listeners/NetworkModelListenerImpl.java @@ -24,19 +24,19 @@ import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkmo import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State; import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev191129.AdminStates; import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirectionBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirectionBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZ; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZKey; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToA; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToABuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToAKey; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.Resource; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.ResourceBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.TerminationPoint; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirectionBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirectionBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZ; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZKey; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToA; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToABuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToAKey; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.Resource; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.ResourceBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.TerminationPoint; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.service.path.PathDescription; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.service.path.PathDescriptionBuilder; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.ServicePathList; diff --git a/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/ModelMappingUtilsTest.java b/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/ModelMappingUtilsTest.java index f5aae0ca5..9bd9a9506 100644 --- a/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/ModelMappingUtilsTest.java +++ b/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/ModelMappingUtilsTest.java @@ -56,8 +56,8 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempSer import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services; import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.ServicesBuilder; import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.ServicesKey; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirectionBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirectionBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirectionBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirectionBuilder; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.response.parameters.sp.ResponseParameters; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.response.parameters.sp.ResponseParametersBuilder; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.response.parameters.sp.response.parameters.PathDescriptionBuilder; diff --git a/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/service/ServiceDataStoreOperationsImplTest.java b/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/service/ServiceDataStoreOperationsImplTest.java index 995639d9a..0a0c7ae56 100644 --- a/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/service/ServiceDataStoreOperationsImplTest.java +++ b/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/service/ServiceDataStoreOperationsImplTest.java @@ -28,8 +28,8 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.re import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput; import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateInput; import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirectionBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirectionBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirectionBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirectionBuilder; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.response.parameters.sp.ResponseParameters; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.response.parameters.sp.ResponseParametersBuilder; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.response.parameters.sp.response.parameters.PathDescriptionBuilder; diff --git a/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/utils/ServiceDataUtils.java b/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/utils/ServiceDataUtils.java index 2c79b0aa2..e9e78b0ca 100644 --- a/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/utils/ServiceDataUtils.java +++ b/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/utils/ServiceDataUtils.java @@ -63,10 +63,10 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.feasibility.check.inputs.ServiceAEndBuilder; import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.feasibility.check.inputs.ServiceZEnd; import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.feasibility.check.inputs.ServiceZEndBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.AToZDirectionBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirection; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ZToADirectionBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirectionBuilder; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirectionBuilder; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.RoutingConstraintsSp.PceMetric; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.RpcStatusEx; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.ServicePathNotificationTypes; diff --git a/tapi/src/main/java/org/opendaylight/transportpce/tapi/connectivity/ConnectivityUtils.java b/tapi/src/main/java/org/opendaylight/transportpce/tapi/connectivity/ConnectivityUtils.java index e1d7d056f..969c0ef09 100644 --- a/tapi/src/main/java/org/opendaylight/transportpce/tapi/connectivity/ConnectivityUtils.java +++ b/tapi/src/main/java/org/opendaylight/transportpce/tapi/connectivity/ConnectivityUtils.java @@ -42,13 +42,13 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input.ServiceAEndBuilder; import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input.ServiceZEnd; import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input.ServiceZEndBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.PathDescription; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZ; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZKey; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToA; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.ztoa.direction.ZToAKey; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.Node; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.TerminationPoint; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.PathDescription; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZ; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZKey; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToA; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ztoa.direction.ZToAKey; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.Node; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.TerminationPoint; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.service.path.list.ServicePaths; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime; import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.AdministrativeState; diff --git a/tapi/src/main/java/org/opendaylight/transportpce/tapi/listeners/TapiPceListenerImpl.java b/tapi/src/main/java/org/opendaylight/transportpce/tapi/listeners/TapiPceListenerImpl.java index cc8cdc540..89dbdad1d 100644 --- a/tapi/src/main/java/org/opendaylight/transportpce/tapi/listeners/TapiPceListenerImpl.java +++ b/tapi/src/main/java/org/opendaylight/transportpce/tapi/listeners/TapiPceListenerImpl.java @@ -28,9 +28,9 @@ import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev21 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.TransportpcePceListener; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.service.path.rpc.result.PathDescription; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.service.path.rpc.result.PathDescriptionBuilder; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.path.description.atoz.direction.AToZ; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.Node; -import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.pce.resource.resource.resource.TerminationPoint; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZ; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.Node; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.TerminationPoint; import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.RpcStatusEx; import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.Context; import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.ForwardingDirection; diff --git a/test-common/src/main/yang/path-description-stub@2020-12-11.yang b/test-common/src/main/yang/path-description-stub@2020-12-11.yang index e4a229acb..4332e0047 100644 --- a/test-common/src/main/yang/path-description-stub@2020-12-11.yang +++ b/test-common/src/main/yang/path-description-stub@2020-12-11.yang @@ -5,7 +5,7 @@ module pathdescription-stub { import transportpce-pathDescription { prefix transportpce-pathDescription; - revision-date 2020-12-10; + revision-date 2021-07-05; } description diff --git a/tests/transportpce_tests/2.2.1/test_otn_sh_renderer.py b/tests/transportpce_tests/2.2.1/test_otn_sh_renderer.py index 4d583c8c5..44e2e8fef 100644 --- a/tests/transportpce_tests/2.2.1/test_otn_sh_renderer.py +++ b/tests/transportpce_tests/2.2.1/test_otn_sh_renderer.py @@ -450,8 +450,8 @@ class TransportPCEtesting(unittest.TestCase): "transportpce-renderer:path-description": { "aToZ-direction": { "rate": 10, - "trib-port-number": 1, - "trib-slot-number": 1, + "min-trib-slot": "1.1", + "max-trib-slot": "1.8", "aToZ": [ { "id": "0", @@ -486,8 +486,8 @@ class TransportPCEtesting(unittest.TestCase): }, "transportpce-renderer:zToA-direction": { "rate": "10", - "trib-port-number": 1, - "trib-slot-number": 1, + "min-trib-slot": "1.1", + "max-trib-slot": "1.8", "zToA": [ { "id": "0", diff --git a/tests/transportpce_tests/7.1/test_pce_400G.py b/tests/transportpce_tests/7.1/test_pce_400G.py index 0a8ed7320..a8a563e49 100644 --- a/tests/transportpce_tests/7.1/test_pce_400G.py +++ b/tests/transportpce_tests/7.1/test_pce_400G.py @@ -230,19 +230,19 @@ class TransportPCE400Gtesting(unittest.TestCase): self.assertEqual(100, res['output']['response-parameters']['path-description'] ['aToZ-direction']['rate']) - self.assertEqual(1, res['output']['response-parameters']['path-description'] - ['aToZ-direction']['trib-port-number']) - self.assertEqual(1, res['output']['response-parameters']['path-description'] - ['aToZ-direction']['trib-slot-number']) + self.assertEqual('1.1', res['output']['response-parameters']['path-description'] + ['aToZ-direction']['min-trib-slot']) + self.assertEqual('1.20', res['output']['response-parameters']['path-description'] + ['aToZ-direction']['max-trib-slot']) self.assertEqual('dp-qpsk', res['output']['response-parameters']['path-description'] ['aToZ-direction']['modulation-format']) self.assertEqual(100, res['output']['response-parameters']['path-description'] ['zToA-direction']['rate']) - self.assertEqual(1, res['output']['response-parameters']['path-description'] - ['zToA-direction']['trib-port-number']) - self.assertEqual(1, res['output']['response-parameters']['path-description'] - ['zToA-direction']['trib-slot-number']) + self.assertEqual('1.1', res['output']['response-parameters']['path-description'] + ['zToA-direction']['min-trib-slot']) + self.assertEqual('1.20', res['output']['response-parameters']['path-description'] + ['zToA-direction']['max-trib-slot']) self.assertEqual('dp-qpsk', res['output']['response-parameters']['path-description'] ['zToA-direction']['modulation-format']) time.sleep(5) -- 2.36.6