Merge "Change the ODU4 type to ODU-TTP-CTP"
authorBalagangadhar Bathula <bb4341@att.com>
Tue, 22 Feb 2022 12:17:05 +0000 (12:17 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 22 Feb 2022 12:17:05 +0000 (12:17 +0000)
35 files changed:
api/pom.xml
common/pom.xml
common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMappingVersion121.java
common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMappingVersion710.java
common/src/main/java/org/opendaylight/transportpce/common/openroadminterfaces/OpenRoadmInterfacesImpl121.java
common/src/main/java/org/opendaylight/transportpce/common/openroadminterfaces/OpenRoadmInterfacesImpl221.java
common/src/main/java/org/opendaylight/transportpce/common/openroadminterfaces/OpenRoadmInterfacesImpl710.java
dmaap-client/pom.xml
features/odl-transportpce-dmaap-client/pom.xml
features/odl-transportpce-inventory/pom.xml
features/odl-transportpce-nbinotifications/pom.xml
features/odl-transportpce-swagger/pom.xml
features/odl-transportpce-tapi/pom.xml
features/odl-transportpce/pom.xml
features/pom.xml
inventory/pom.xml
karaf/pom.xml
nbinotifications/pom.xml
networkmodel/pom.xml
olm/pom.xml
ordmodels/common/pom.xml
ordmodels/device/pom.xml
ordmodels/network/pom.xml
ordmodels/pom.xml
ordmodels/service/pom.xml
pce/pom.xml
pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/PceOtnNode.java
pce/src/test/java/org/opendaylight/transportpce/pce/networkanalyzer/PceOtnNodeTest.java
pom.xml
renderer/pom.xml
servicehandler/pom.xml
tapi/pom.xml
tapimodels/pom.xml
test-common/pom.xml
tests/transportpce_tests/7.1/test02_otn_renderer.py

index c78d64d889aa2bb91d40b631f4c0ee6834d12544..7668f70b0b30a9c929bd9bfac3b13e3ee466d717 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.7</version>
+    <version>8.0.11</version>
     <relativePath/>
   </parent>
 
index b1d768d9de47a2f752c1b264f325c7d68e83ffbb..5ec69a27a965874ed83b3134d06292a92611dbe7 100644 (file)
@@ -10,7 +10,7 @@
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>8.0.7</version>
+        <version>8.0.11</version>
         <relativePath />
     </parent>
 
@@ -24,7 +24,7 @@
             <dependency>
                 <groupId>org.opendaylight.netconf</groupId>
                 <artifactId>netconf-artifacts</artifactId>
-                <version>2.0.11</version>
+                <version>2.0.14</version>
                 <scope>import</scope>
                 <type>pom</type>
             </dependency>
index f2ec53a68924a07f25213481eebc35c58dd20920..bbf229dde1f20cecbb1aa4ad97c62117335202df 100644 (file)
@@ -74,6 +74,7 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.interfaces.rev161014.OtnO
 import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev161014.Protocols1;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev161014.lldp.container.Lldp;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev161014.lldp.container.lldp.PortConfig;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev170929.SupportedIfCapability;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.Uint16;
 import org.opendaylight.yangtools.yang.common.Uint32;
@@ -632,6 +633,13 @@ public class PortMappingVersion121 {
 
     private Mapping createNewXpdrMapping(String nodeId, Ports port, String circuitPackName,
             String logicalConnectionPoint, String partnerLcp) {
+        List<Class<? extends org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev200327
+            .SupportedIfCapability>> supportedIntf = new ArrayList<>();
+        for (String sup: getSupIfCapList(port)) {
+            if (MappingUtilsImpl.convertSupIfCapa(sup) != null) {
+                supportedIntf.add(MappingUtilsImpl.convertSupIfCapa(sup));
+            }
+        }
         MappingBuilder mpBldr = new MappingBuilder()
                 .withKey(new MappingKey(logicalConnectionPoint))
                 .setLogicalConnectionPoint(logicalConnectionPoint)
@@ -639,7 +647,8 @@ public class PortMappingVersion121 {
                 .setSupportingPort(port.getPortName())
                 .setPortDirection(port.getPortDirection().getName())
                 .setXponderType(XpdrNodeTypes.Tpdr)
-                .setLcpHashVal(PortMappingUtils.fnv1size64(nodeId + "-" + logicalConnectionPoint));
+                .setLcpHashVal(PortMappingUtils.fnv1size64(nodeId + "-" + logicalConnectionPoint))
+                .setSupportedInterfaceCapability(supportedIntf);
         if (port.getPortQual() != null) {
             mpBldr.setPortQual(port.getPortQual().getName());
         }
@@ -655,6 +664,16 @@ public class PortMappingVersion121 {
         return mpBldr.build();
     }
 
+    private List<String> getSupIfCapList(Ports port) {
+        List<Class<? extends SupportedIfCapability>> supIfCapClassList = port.getSupportedInterfaceCapability();
+        return
+            supIfCapClassList == null
+                ? Collections.emptyList()
+                : supIfCapClassList
+                    .stream().map(e -> e.getSimpleName())
+                    .collect(Collectors.toList());
+    }
+
     private Ports getPort2(Ports port, String nodeId, String circuitPackName, StringBuilder circuitPackName2,
             //circuitPackName2 will be updated by reference contrary to circuitPackName
             List<CircuitPacks> circuitPackList, Map<String, String> lcpMap) {
index 01e97c7a5e5ef5da9c481232dbbc28b92ad555df..d1697fd21228595bf01341cd873fb8e972b0072f 100644 (file)
@@ -942,7 +942,9 @@ public class PortMappingVersion710 {
 
     private MappingBuilder updateMappingInterfaces(String nodeId, MappingBuilder mpBldr, Ports port) {
         mpBldr.setSupportingOtu4(null)
-            .setSupportingOdu4(null);
+            .setSupportingOdu4(null)
+            .setSupportingOducn(null)
+            .setSupportingOtucn(null);
         for (Interfaces interfaces : port.getInterfaces()) {
             Optional<Interface> openRoadmInterface = getInterfaceFromDevice(nodeId,
                 interfaces.getInterfaceName());
index fb940790463ee51a357f763352b159ba41cdbec5..6d103d9013ef2ca61bcf3554fa1a83382da9f9d5 100755 (executable)
@@ -31,14 +31,6 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.org.open
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.port.Interfaces;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev161014.AdminStates;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev161014.States;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.interfaces.rev161014.OtnOdu;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.interfaces.rev161014.OtnOtu;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.maintenance.loopback.rev161014.maint.loopback.MaintLoopbackBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.maintenance.testsignal.rev161014.maint.testsignal.MaintTestsignalBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.odu.interfaces.rev161014.Interface1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.odu.interfaces.rev161014.Interface1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.odu.interfaces.rev161014.odu.container.OduBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev161014.otu.container.OtuBuilder;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
 import org.slf4j.Logger;
@@ -91,13 +83,17 @@ public class OpenRoadmInterfacesImpl121 {
         };
         try {
             txSubmitFuture.get();
-            LOG.info("Successfully posted interface {} on node {}", ifBuilder.getName(), nodeId);
-            boolean devicePortIsUptodated = false;
-            while (!devicePortIsUptodated) {
-                devicePortIsUptodated = checkIfDevicePortIsUpdatedWithInterface(nodeId, ifBuilder);
+            LOG.info("Successfully posted/deleted interface {} on node {}", ifBuilder.getName(), nodeId);
+            // this check is not needed during the delete operation
+            // during the delete operation, ifBuilder does not contain supporting-cp and supporting-port
+            if (ifBuilder.getSupportingCircuitPackName() != null && ifBuilder.getSupportingPort() != null) {
+                boolean devicePortIsUptodated = false;
+                while (!devicePortIsUptodated) {
+                    devicePortIsUptodated = checkIfDevicePortIsUpdatedWithInterface(nodeId, ifBuilder);
+                }
+                LOG.info("{} - {} - interface {} updated on port {}", nodeId, ifBuilder.getSupportingCircuitPackName(),
+                    ifBuilder.getName(), ifBuilder.getSupportingPort());
             }
-            LOG.info("{} - {} - interface {} updated on port {}", nodeId, ifBuilder.getSupportingCircuitPackName(),
-                ifBuilder.getName(), ifBuilder.getSupportingPort());
             timer.interrupt();
         } catch (InterruptedException | ExecutionException e) {
             throw new OpenRoadmInterfaceException(String.format("Failed to post interface %s on node %s!", ifBuilder
@@ -125,34 +121,10 @@ public class OpenRoadmInterfacesImpl121 {
         if (intf2DeleteOpt.isPresent()) {
             Interface intf2Delete = intf2DeleteOpt.get();
             // State admin state to out of service
-            InterfaceBuilder ifBuilder = new InterfaceBuilder(intf2Delete);
-            if (ifBuilder.getType() == OtnOdu.class) {
-                Interface1Builder oduBuilder = new Interface1Builder(intf2Delete.augmentation(Interface1.class));
-                OduBuilder odu = new OduBuilder(oduBuilder.getOdu());
-                if (odu.getMaintTestsignal() != null) {
-                    MaintTestsignalBuilder maintSignalBuilder = new MaintTestsignalBuilder();
-                    maintSignalBuilder.setEnabled(false);
-                    odu.setMaintTestsignal(maintSignalBuilder.build());
-                }
-                oduBuilder.setOdu(odu.build());
-                ifBuilder.addAugmentation(oduBuilder.build());
-            } else if (ifBuilder.getType() == OtnOtu.class) {
-                org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev161014.Interface1Builder
-                    otuBuilder =
-                    new org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev161014.Interface1Builder(
-                        intf2Delete.augmentation(
-                            org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev161014.Interface1
-                                .class));
-                OtuBuilder otu = new OtuBuilder(otuBuilder.getOtu());
-                if (otu.getMaintLoopback() != null) {
-                    MaintLoopbackBuilder maintLoopBackBuilder = new MaintLoopbackBuilder();
-                    maintLoopBackBuilder.setEnabled(false);
-                    otu.setMaintLoopback(maintLoopBackBuilder.build());
-                }
-                otuBuilder.setOtu(otu.build());
-                ifBuilder.addAugmentation(otuBuilder.build());
-            }
-            ifBuilder.setAdministrativeState(AdminStates.OutOfService);
+            InterfaceBuilder ifBuilder = new InterfaceBuilder()
+                .setAdministrativeState(AdminStates.OutOfService)
+                .setName(intf2Delete.getName())
+                .setType(intf2Delete.getType());
             // post interface with updated admin state
             try {
                 postInterface(nodeId, ifBuilder);
index ab79254e944a33ca1c6424e211af5cfa4aa64fb0..aad28e334d065e5c236b06a8daa5a8a305ab6297 100755 (executable)
@@ -34,14 +34,6 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev181019.org.open
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev181019.port.Interfaces;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev171215.AdminStates;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev171215.States;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.interfaces.rev170626.OtnOdu;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.interfaces.rev170626.OtnOtu;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.maintenance.loopback.rev171215.maint.loopback.MaintLoopbackBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.maintenance.testsignal.rev171215.maint.testsignal.MaintTestsignalBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.odu.interfaces.rev181019.Interface1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.odu.interfaces.rev181019.Interface1Builder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.odu.interfaces.rev181019.odu.container.OduBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev181019.otu.container.OtuBuilder;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
 import org.slf4j.Logger;
@@ -101,13 +93,17 @@ public class OpenRoadmInterfacesImpl221 {
         };
         try {
             txSubmitFuture.get();
-            LOG.info("Successfully posted interface {} on node {}", ifBuilder.getName(), nodeId);
-            boolean devicePortIsUptodated = false;
-            while (!devicePortIsUptodated) {
-                devicePortIsUptodated = checkIfDevicePortIsUpdatedWithInterface(nodeId, ifBuilder);
+            LOG.info("Successfully posted/deleted interface {} on node {}", ifBuilder.getName(), nodeId);
+            // this check is not needed during the delete operation
+            // during the delete operation, ifBuilder does not contain supporting-cp and supporting-port
+            if (ifBuilder.getSupportingCircuitPackName() != null && ifBuilder.getSupportingPort() != null) {
+                boolean devicePortIsUptodated = false;
+                while (!devicePortIsUptodated) {
+                    devicePortIsUptodated = checkIfDevicePortIsUpdatedWithInterface(nodeId, ifBuilder);
+                }
+                LOG.info("{} - {} - interface {} updated on port {}", nodeId, ifBuilder.getSupportingCircuitPackName(),
+                    ifBuilder.getName(), ifBuilder.getSupportingPort());
             }
-            LOG.info("{} - {} - interface {} updated on port {}", nodeId, ifBuilder.getSupportingCircuitPackName(),
-                ifBuilder.getName(), ifBuilder.getSupportingPort());
             timer.interrupt();
         } catch (InterruptedException | ExecutionException e) {
             throw new OpenRoadmInterfaceException(String.format("Failed to post interface %s on node %s!", ifBuilder
@@ -136,34 +132,10 @@ public class OpenRoadmInterfacesImpl221 {
         if (intf2DeleteOpt.isPresent()) {
             Interface intf2Delete = intf2DeleteOpt.get();
             // State admin state to out of service
-            InterfaceBuilder ifBuilder = new InterfaceBuilder(intf2Delete);
-            if (ifBuilder.getType() == OtnOdu.class) {
-                Interface1Builder oduBuilder = new Interface1Builder(intf2Delete.augmentation(Interface1.class));
-                OduBuilder odu = new OduBuilder(oduBuilder.getOdu());
-                if (odu.getMaintTestsignal() != null) {
-                    MaintTestsignalBuilder maintSignalBuilder = new MaintTestsignalBuilder();
-                    maintSignalBuilder.setEnabled(false);
-                    odu.setMaintTestsignal(maintSignalBuilder.build());
-                }
-                oduBuilder.setOdu(odu.build());
-                ifBuilder.addAugmentation(oduBuilder.build());
-            } else if (ifBuilder.getType() == OtnOtu.class) {
-                org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev181019.Interface1Builder
-                    otuBuilder =
-                    new org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev181019.Interface1Builder(
-                        intf2Delete.augmentation(
-                            org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev181019.Interface1
-                            .class));
-                OtuBuilder otu = new OtuBuilder(otuBuilder.getOtu());
-                if (otu.getMaintLoopback() != null) {
-                    MaintLoopbackBuilder maintLoopBackBuilder = new MaintLoopbackBuilder();
-                    maintLoopBackBuilder.setEnabled(false);
-                    otu.setMaintLoopback(maintLoopBackBuilder.build());
-                }
-                otuBuilder.setOtu(otu.build());
-                ifBuilder.addAugmentation(otuBuilder.build());
-            }
-            ifBuilder.setAdministrativeState(AdminStates.OutOfService);
+            InterfaceBuilder ifBuilder = new InterfaceBuilder()
+                .setAdministrativeState(AdminStates.OutOfService)
+                .setName(intf2Delete.getName())
+                .setType(intf2Delete.getType());
             // post interface with updated admin state
             try {
                 postInterface(nodeId, ifBuilder);
index 4152b2e38d7549abbee43b7d8d958277e5444740..bd9e62ec0b1cd39aef34d302269011c7575bdbda 100644 (file)
@@ -93,13 +93,17 @@ public class OpenRoadmInterfacesImpl710 {
         };
         try {
             txSubmitFuture.get();
-            LOG.info("Successfully posted interface {} on node {}", ifBuilder.getName(), nodeId);
-            boolean devicePortIsUptodated = false;
-            while (!devicePortIsUptodated) {
-                devicePortIsUptodated = checkIfDevicePortIsUpdatedWithInterface(nodeId, ifBuilder);
+            LOG.info("Successfully posted/deleted interface {} on node {}", ifBuilder.getName(), nodeId);
+            // this check is not needed during the delete operation
+            // during the delete operation, ifBuilder does not contain supporting-cp and supporting-port
+            if (ifBuilder.getSupportingCircuitPackName() != null && ifBuilder.getSupportingPort() != null) {
+                boolean devicePortIsUptodated = false;
+                while (!devicePortIsUptodated) {
+                    devicePortIsUptodated = checkIfDevicePortIsUpdatedWithInterface(nodeId, ifBuilder);
+                }
+                LOG.info("{} - {} - interface {} updated on port {}", nodeId, ifBuilder.getSupportingCircuitPackName(),
+                    ifBuilder.getName(), ifBuilder.getSupportingPort());
             }
-            LOG.info("{} - {} - interface {} updated on port {}", nodeId, ifBuilder.getSupportingCircuitPackName(),
-                ifBuilder.getName(), ifBuilder.getSupportingPort());
             timer.interrupt();
         } catch (InterruptedException | ExecutionException e) {
             throw new OpenRoadmInterfaceException(String.format("Failed to post interface %s on node %s!", ifBuilder
@@ -136,10 +140,7 @@ public class OpenRoadmInterfacesImpl710 {
                 // Though these could be redundant, but 'when' statements are causing problem,
                 // when deleting the interfaces trying to be deleted
                 .setName(intf2Delete.getName())
-                .setType(intf2Delete.getType())
-                // CP name and the ports are needed, since the post interface is validated
-                .setSupportingCircuitPackName(intf2Delete.getSupportingCircuitPackName())
-                .setSupportingPort(intf2Delete.getSupportingPort());
+                .setType(intf2Delete.getType());
 
             // post interface with updated admin state
             try {
index 57d2e1d616df2916547f6516aeaf63b7cf992f0a..8a6563552c11dafa3ac9e768cb9ec0ebe4f70bd7 100644 (file)
@@ -9,7 +9,7 @@
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>8.0.7</version>
+        <version>8.0.11</version>
         <relativePath />
     </parent>
     <groupId>org.opendaylight.transportpce</groupId>
index 781e52dc4168ce749348bbd45e5e463788d85226..5b9e0ffe4ba86f02731bf0322ebf166b341e0953 100644 (file)
@@ -10,7 +10,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>9.0.8</version>
+        <version>9.0.13</version>
         <relativePath />
     </parent>
     <groupId>org.opendaylight.transportpce</groupId>
index 4449819c4c48da650e9ab036570c6c24bced1d27..ab7042e63c06ea63a5b2d75bc775e4a549fe7a2e 100644 (file)
@@ -9,7 +9,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>9.0.8</version>
+        <version>9.0.13</version>
         <relativePath/>
     </parent>
 
index 8e84062afdbf68a8efae467b3d936f94ead82ff0..72d244167a1c0a6d684a6cbcdf66eab9f835d24c 100644 (file)
@@ -11,7 +11,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>9.0.8</version>
+        <version>9.0.13</version>
         <relativePath />
     </parent>
 
index d70d83c51d15607f1bd250d247d71b9c968772e2..b4c79809ab975f69f7f6e311dac7ac25db5a64d3 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>9.0.8</version>
+    <version>9.0.13</version>
     <relativePath/>
   </parent>
 
@@ -24,7 +24,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <name>OpenDaylight :: transportpce :: swagger</name>
 
   <properties>
-    <netconf.version>2.0.11</netconf.version>
+    <netconf.version>2.0.14</netconf.version>
     <configfile.directory>etc/opendaylight/karaf</configfile.directory>
   </properties>
 
index a5edc613e9666e1e57dae6e01c2a7d8f79d1f577..1e9f5ac0287484e7da9624f665fcf77a99b00853 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>9.0.8</version>
+    <version>9.0.13</version>
     <relativePath/>
   </parent>
 
index 07c27e325161e5a673f65c7c8a51527ff3f34f02..e3cbd7cff8a447b72caf37eb70aea159182fde18 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>9.0.8</version>
+    <version>9.0.13</version>
     <relativePath/>
   </parent>
 
@@ -24,7 +24,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <name>OpenDaylight :: transportpce</name>
 
   <properties>
-    <netconf.version>2.0.11</netconf.version>
+    <netconf.version>2.0.14</netconf.version>
     <configfile.directory>etc/opendaylight/karaf</configfile.directory>
   </properties>
 
index 3f55cd9aa9bcece0c8ecf55e75f2c4ad5df7b004..40f2fa42e39b23eb97cef556889a025b3b8b0b90 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>9.0.8</version>
+    <version>9.0.13</version>
     <relativePath/>
   </parent>
 
index dd88fed09d0d4913f36c23baa9cf0cbfd87e48dc..5a76f551d91f3e6dfe1376292688d141d57bb579 100644 (file)
@@ -10,7 +10,7 @@
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>8.0.7</version>
+        <version>8.0.11</version>
         <relativePath />
     </parent>
 
index 8ed99ad436d894745ee129451847bc9192aa7271..880884a1a3cfbc9580a184bc2a01388388c5c98f 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>karaf4-parent</artifactId>
-    <version>9.0.8</version>
+    <version>9.0.13</version>
     <relativePath/>
   </parent>
 
index 4726600364dfc11f864cc8c1acb988ec3d428cc2..aa34dfbe65e45e15e0a2275d44c6d73b4afd7cf9 100644 (file)
@@ -11,7 +11,7 @@
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>8.0.7</version>
+        <version>8.0.11</version>
         <relativePath />
     </parent>
 
index 491e3647b1e95a5a44c081c3e415772cd71cce8a..699ac6302149f2a1bbc7001cee8ab707dbc7053d 100644 (file)
@@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>bundle-parent</artifactId>
-    <version>9.0.8</version>
+    <version>9.0.13</version>
     <relativePath/>
   </parent>
 
@@ -27,7 +27,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <dependency>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>mdsal-artifacts</artifactId>
-        <version>8.0.7</version>
+        <version>8.0.11</version>
         <scope>import</scope>
         <type>pom</type>
       </dependency>
index 77d4217dec4d5a1d1987a8f564987425366b73fc..50d51da0f289e4bc9b68682f6b8e437dce7bb216 100644 (file)
@@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.7</version>
+    <version>8.0.11</version>
     <relativePath/>
   </parent>
 
index de036e1825f1570a51fa6fcd48c647d65dcabc29..3dd728c2ea6de955ecac29386655c91352117b60 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.7</version>
+    <version>8.0.11</version>
     <relativePath/>
   </parent>
 
index d31dfc952f658cc717cff8f2fdc29d6eea21a243..e925f06be893ae9e26abb4b1564066a7c9caf82d 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.7</version>
+    <version>8.0.11</version>
     <relativePath/>
   </parent>
 
@@ -26,7 +26,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <dependency>
         <groupId>org.opendaylight.netconf</groupId>
         <artifactId>netconf-artifacts</artifactId>
-        <version>2.0.11</version>
+        <version>2.0.14</version>
         <scope>import</scope>
         <type>pom</type>
       </dependency>
index f21f9bcb779b69e60241ab08336c6de3bd95abaa..2090e6ecec3fe4d50bd0305be37bb2f5ef890bf0 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.7</version>
+    <version>8.0.11</version>
     <relativePath/>
   </parent>
 
index 3396ae393033c6e11b3bb87d9d824f3e0dcc4ff9..6342c531a8e6a2b79346c28a3fbb74e46a99d470 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.7</version>
+    <version>8.0.11</version>
     <relativePath/>
   </parent>
 
index f318e6c5d245916846e92ae2d21cb125105fbb72..a384152a94602d805428f0c4700cbe44dafada9a 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.7</version>
+    <version>8.0.11</version>
     <relativePath/>
   </parent>
 
index 273caa99b5f38c61651ac2b009cb144dd690f444..8bff084efc9c50e542fdad3fcbb0e2e04d72a182 100644 (file)
@@ -14,7 +14,7 @@
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>8.0.7</version>
+        <version>8.0.11</version>
         <relativePath />
     </parent>
 
index f7cfc4a5bbd1616f1504c1558c8488dd03d4b667..3ef3cf2fbb37a30e4fa7682e21403f9b881b5225 100644 (file)
@@ -65,7 +65,6 @@ public class PceOtnNode implements PceNode {
     private static final Map<String, Class<? extends SupportedIfCapability>> SERVICE_TYPE_ETH_CLASS_MAP = Map.of(
         StringConstants.SERVICE_TYPE_1GE, If1GEODU0.class,
         StringConstants.SERVICE_TYPE_10GE, If10GEODU2e.class,
-        StringConstants.SERVICE_TYPE_100GE_T, If100GEODU4.class,
         StringConstants.SERVICE_TYPE_100GE_M, If100GEODU4.class,
         StringConstants.SERVICE_TYPE_100GE_S, If100GEODU4.class);
     private static final Map<String, Integer> SERVICE_TYPE_ETH_TS_NB_MAP = Map.of(
@@ -132,6 +131,11 @@ public class PceOtnNode implements PceNode {
             LOG.error("PceOtnNode: one of parameters is not populated : nodeId, node type");
             this.valid = false;
         }
+        if (!SERVICE_TYPE_ETH_CLASS_MAP.containsKey(serviceType)
+                && !SERVICE_TYPE_ODU_LIST.contains(serviceType)) {
+            LOG.error("PceOtnNode: unsupported OTN Service Type {}", serviceType);
+            this.valid = false;
+        }
     }
 
     public void initXndrTps(String mode) {
@@ -182,7 +186,6 @@ public class PceOtnNode implements PceNode {
                                 node.getNodeId().getValue());
                             continue;
                         }
-                    // TODO what about SERVICE_TYPE_100GE_T ?
                     } else {
                         LOG.error("TP {} of {} does not allow any termination creation",
                             tp.getTpId().getValue(), node.getNodeId().getValue());
@@ -193,9 +196,7 @@ public class PceOtnNode implements PceNode {
                     break;
 
                 case XPONDERCLIENT:
-                    if (SERVICE_TYPE_ETH_CLASS_MAP.containsKey(otnServiceType)
-                            && !StringConstants.SERVICE_TYPE_100GE_T.equals(this.otnServiceType)) {
-                            // TODO should we really exclude SERVICE_TYPE_100GE_T ?
+                    if (SERVICE_TYPE_ETH_CLASS_MAP.containsKey(otnServiceType)) {
                         if (tp.augmentation(TerminationPoint1.class) == null) {
                             continue;
                         }
@@ -214,59 +215,69 @@ public class PceOtnNode implements PceNode {
             }
         }
         this.valid = SERVICE_TYPE_ODU_LIST.contains(this.otnServiceType)
-                || SERVICE_TYPE_ETH_TS_NB_MAP.containsKey(this.otnServiceType)
-                    && isAzOrIntermediateAvl(mode, null, availableXpdrClientTps, availableXpdrNWTps)
-                || StringConstants.SERVICE_TYPE_100GE_S.equals(this.otnServiceType)
-                    && isAzOrIntermediateAvl(mode, availableXpdrClientTps, availableXpdrClientTps, availableXpdrNWTps);
-                //TODO very similar to isOtnServiceTypeValid method
-                //     check whether the different treatment for SERVICE_TYPE_100GE_S here is appropriate or not
+                || SERVICE_TYPE_ETH_CLASS_MAP.containsKey(this.otnServiceType)
+                    && checkSwPool(availableXpdrNWTps, availableXpdrClientTps);
     }
 
-    private boolean checkSwPool(List<TpId> clientTps, List<TpId> netwTps, int nbClient, int nbNetw) {
+    private boolean checkSwPool(List<TpId> netwTps, List<TpId> clientTps) {
+
         if (netwTps == null) {
             return false;
         }
-        if (clientTps != null && nbClient == 1 && nbNetw == 1) {
-            clientTps.sort(Comparator.comparing(TpId::getValue));
-            netwTps.sort(Comparator.comparing(TpId::getValue));
-            for (TpId nwTp : netwTps) {
-                for (TpId clTp : clientTps) {
-                    for (NonBlockingList nbl : new ArrayList<>(node.augmentation(Node1.class).getSwitchingPools()
-                            .nonnullOduSwitchingPools().values().stream().findFirst().get()
-                                .getNonBlockingList().values())) {
-                        if (nbl.getTpList().contains(clTp) && nbl.getTpList().contains(nwTp)) {
-                            usableXpdrClientTps.add(clTp);
+        Node1 node1 = node.augmentation(Node1.class);
+        if (node1 == null) {
+            return false;
+        }
+        List<NonBlockingList> nblList = new ArrayList<>(
+                node1.getSwitchingPools().nonnullOduSwitchingPools()
+                        .values().stream().findFirst().get()
+                                .getNonBlockingList().values());
+        if (nblList == null) {
+            return false;
+        }
+        netwTps.sort(Comparator.comparing(TpId::getValue));
+
+        switch (modeType) {
+
+            case "intermediate":
+                for (NonBlockingList nbl: nblList) {
+                    for (TpId nwTp : netwTps) {
+                        if (nbl.getTpList().contains(nwTp)) {
                             usableXpdrNWTps.add(nwTp);
                         }
-                        if (usableXpdrClientTps.size() >= 1 && usableXpdrNWTps.size() >= 1
-                            //since nbClient == 1 && nbNetw == 1...
-                                && (this.clientPort == null || this.clientPort.equals(clTp.getValue()))) {
-                            clientPerNwTp.put(nwTp.getValue(), clTp.getValue());
+                        if (usableXpdrNWTps.size() >= 2) {
                             return true;
                         }
                     }
                 }
-            }
-        }
-        if (nbClient == 0 && nbNetw == 2) {
-            netwTps.sort(Comparator.comparing(TpId::getValue));
-            //TODO compared to above, nested loops are inverted below - does it make really sense ?
-            //     there is room to rationalize things here
-            for (NonBlockingList nbl : new ArrayList<>(node.augmentation(Node1.class).getSwitchingPools()
-                    .nonnullOduSwitchingPools().values().stream().findFirst().get()
-                        .getNonBlockingList().values())) {
-                for (TpId nwTp : netwTps) {
-                    if (nbl.getTpList().contains(nwTp)) {
-                        usableXpdrNWTps.add(nwTp);
-                    }
-                    if (usableXpdrNWTps.size() >= 2) {
-                    //since nbClient == 0 && nbNetw == 2...
-                        return true;
+                return false;
+
+            case "AZ":
+                if (clientTps == null) {
+                    return false;
+                }
+                clientTps.sort(Comparator.comparing(TpId::getValue));
+                for (NonBlockingList nbl: nblList) {
+                    for (TpId nwTp : netwTps) {
+                        for (TpId clTp : clientTps) {
+                            if (nbl.getTpList().contains(clTp) && nbl.getTpList().contains(nwTp)) {
+                                usableXpdrClientTps.add(clTp);
+                                usableXpdrNWTps.add(nwTp);
+                            }
+                            if (usableXpdrClientTps.size() >= 1 && usableXpdrNWTps.size() >= 1
+                                    && (this.clientPort == null || this.clientPort.equals(clTp.getValue()))) {
+                                clientPerNwTp.put(nwTp.getValue(), clTp.getValue());
+                                return true;
+                            }
+                        }
                     }
                 }
-            }
+                return false;
+
+            default:
+                LOG.error("Unsupported mode type {}", modeType);
+                return false;
         }
-        return false;
     }
 
     private boolean checkTpForOdtuTermination(TerminationPoint1 ontTp1) {
@@ -409,55 +420,14 @@ public class PceOtnNode implements PceNode {
     }
 
     public boolean isValid() {
-        if (isNotValid(this)) {
+        if (nodeId == null || nodeType == null
+                || this.getSupNetworkNodeId() == null || this.getSupClliNodeId() == null) {
             LOG.error("PceNode: one of parameters is not populated : nodeId, node type, supporting nodeId");
             valid = false;
         }
         return valid;
     }
 
-    private boolean isNotValid(final PceOtnNode poNode) {
-        return poNode == null || poNode.nodeId == null || poNode.nodeType == null
-                || poNode.getSupNetworkNodeId() == null || poNode.getSupClliNodeId() == null;
-    }
-
-    public boolean isPceOtnNodeValid(final PceOtnNode pceOtnNode) {
-        if (isNotValid(pceOtnNode) || pceOtnNode.otnServiceType == null) {
-            LOG.error(
-                "PceOtnNode: one of parameters is not populated : nodeId, node type, supporting nodeId, otnServiceType"
-            );
-            return false;
-        }
-        if (VALID_NODETYPES_LIST.contains(pceOtnNode.nodeType)) {
-            return isOtnServiceTypeValid(pceOtnNode);
-        }
-        LOG.error("PceOtnNode node type: node type is not one of MUXPDR or SWITCH or TPDR");
-        return false;
-    }
-
-    private boolean isOtnServiceTypeValid(final PceOtnNode poNode) {
-        if (poNode.modeType == null) {
-            return false;
-        }
-        //Todo refactor Strings (mode and otnServiceType ) to enums
-        if (poNode.otnServiceType.equals(StringConstants.SERVICE_TYPE_ODU4)
-                && poNode.modeType.equals("AZ")) {
-            return true;
-        }
-        return (poNode.otnServiceType.equals(StringConstants.SERVICE_TYPE_10GE)
-                || poNode.otnServiceType.equals(StringConstants.SERVICE_TYPE_1GE)
-                || poNode.otnServiceType.equals(StringConstants.SERVICE_TYPE_100GE_S))
-            && isAzOrIntermediateAvl(poNode.modeType, null, poNode.availableXpdrClientTps, poNode.availableXpdrNWTps);
-        //TODO SERVICE_TYPE_ETH_TS_NB_MAP.containsKey(this.otnServiceType) might be more appropriate here
-        //     but only SERVICE_TYPE_100GE_S is managed and not SERVICE_TYPE_100GE_M and _T
-    }
-
-    private boolean isAzOrIntermediateAvl(
-            String mdType, List<TpId> clientTps0, List<TpId> clientTps, List<TpId> netwTps) {
-        return mdType.equals("intermediate") && checkSwPool(clientTps0, netwTps, 0, 2)
-               || mdType.equals("AZ") && checkSwPool(clientTps, netwTps, 1, 1);
-    }
-
     @Override
     public void addOutgoingLink(PceLink outLink) {
         this.outgoingLinks.add(outLink);
index 09803b5c94c539eabd3c9129626d4a9f7a9043c3..da59ba14cb0cedd67f8df70a257b02a1b22883fc 100644 (file)
@@ -13,7 +13,6 @@ import java.util.Map;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.Mockito;
 import org.opendaylight.transportpce.common.NetworkUtils;
 import org.opendaylight.transportpce.common.StringConstants;
 import org.opendaylight.transportpce.common.fixedflex.GridUtils;
@@ -131,67 +130,6 @@ public class PceOtnNodeTest extends AbstractTest {
 
     }
 
-    @Test
-    public void testIsPceOtnNodeValid() {
-        pceOtnNode = new PceOtnNode(node, OpenroadmNodeType.MUXPDR,
-                new NodeId("optical"), ServiceFormat.OMS.getName(), StringConstants.SERVICE_TYPE_10GE, null);
-        pceOtnNode.initXndrTps("AZ");
-        pceOtnNode.checkAvailableTribPort();
-        pceOtnNode.checkAvailableTribSlot();
-        Assert.assertFalse("not valid otn service Type" , pceOtnNode.isPceOtnNodeValid(pceOtnNode));
-    }
-
-    @Test
-    public void testIsPceOtnNodeValidNode() {
-        pceOtnNode = new PceOtnNode(node, OpenroadmNodeType.DEGREE,
-                new NodeId("optical"), ServiceFormat.OMS.getName(), StringConstants.SERVICE_TYPE_100GE_M, null);
-        pceOtnNode.initXndrTps("AZ");
-        pceOtnNode.checkAvailableTribPort();
-        pceOtnNode.checkAvailableTribSlot();
-        pceOtnNode = Mockito.spy(pceOtnNode);
-        Mockito.when(pceOtnNode.getNodeId()).thenReturn(null);
-        Assert.assertFalse("not valid node , nodeId is null" , pceOtnNode.isPceOtnNodeValid(pceOtnNode));
-
-    }
-
-    @Test
-    public void testIsPceOtnNodeValidNodeTypeNull() {
-        pceOtnNode = new PceOtnNode(node, null,
-                new NodeId("optical"), ServiceFormat.OMS.getName(), StringConstants.SERVICE_TYPE_100GE_M, null);
-        pceOtnNode.initXndrTps("AZ");
-        pceOtnNode.checkAvailableTribPort();
-        pceOtnNode.checkAvailableTribSlot();
-        Assert.assertFalse("not valid type, nodeType is null " , pceOtnNode.isPceOtnNodeValid(pceOtnNode));
-    }
-
-    @Test
-    public void testIsPceOtnNodeValidNodeTypeDeg() {
-        pceOtnNode = new PceOtnNode(node, OpenroadmNodeType.DEGREE,
-                new NodeId("optical"), ServiceFormat.OMS.getName(), StringConstants.SERVICE_TYPE_100GE_M, null);
-        pceOtnNode.initXndrTps("AZ");
-        Assert.assertFalse("not valid node , its type isn't one of MUXPDR or SWITCH or TPDR" ,
-                pceOtnNode.isPceOtnNodeValid(pceOtnNode));
-    }
-
-    @Test
-    public void testIsPceOtnNodeValidTrue() {
-        pceOtnNode = new PceOtnNode(node, OpenroadmNodeType.MUXPDR,
-                new NodeId("optical"), ServiceFormat.OMS.getName(), StringConstants.SERVICE_TYPE_ODU4, null);
-        pceOtnNode.initXndrTps("AZ");
-        pceOtnNode.checkAvailableTribPort();
-        pceOtnNode.checkAvailableTribSlot();
-        Assert.assertTrue("valid otn service type ", pceOtnNode.isPceOtnNodeValid(pceOtnNode));
-    }
-
-    @Test
-    public void testIsPceOtnNodeValidChecksw() {
-        node = getNodeBuilder(geSupportingNodes(), OpenroadmTpType.XPONDERCLIENT).build();
-        pceOtnNode = new PceOtnNode(node, OpenroadmNodeType.MUXPDR,
-                new NodeId("optical"), ServiceFormat.OMS.getName(), StringConstants.SERVICE_TYPE_1GE, null);
-        pceOtnNode.initXndrTps("mode");
-        Assert.assertFalse("not valid otn service Type" , pceOtnNode.isPceOtnNodeValid(pceOtnNode));
-    }
-
     private Map<SupportingNodeKey, SupportingNode> geSupportingNodes() {
         Map<SupportingNodeKey, SupportingNode> supportingNodes1 = new HashMap<>();
         SupportingNode supportingNode1 = new SupportingNodeBuilder()
diff --git a/pom.xml b/pom.xml
index 6a20de91669df4f9dd5cb3ae7667c44cfae620aa..02c57461b6e2320cdb72a0c93559f6d8026648aa 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent</artifactId>
-        <version>9.0.8</version>
+        <version>9.0.13</version>
         <relativePath/>
     </parent>
 
index a437696d608c8b83130b6043fb83fef4ff9b2e15..6cd224479b5398a2b3ce7fab1526b804db6e64b2 100644 (file)
@@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.7</version>
+    <version>8.0.11</version>
     <relativePath/>
   </parent>
 
index d42c4459709d1996998995e85c8ba604eca9aa2a..d66118bbf8fd418343c6f68363d06462a63a0b62 100644 (file)
@@ -15,7 +15,7 @@ Author: Martial Coulibaly <martial.coulibaly@gfi.com> on behalf of Orange
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.7</version>
+    <version>8.0.11</version>
     <relativePath/>
   </parent>
 
index 618fc4cd3b99c1edbde3e905f39974521796d616..6a2509596b84c4d039638ddc572c52a935ed8aac 100644 (file)
@@ -15,7 +15,7 @@ Author: Martial Coulibaly <martial.coulibaly@gfi.com> on behalf of Orange
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.7</version>
+    <version>8.0.11</version>
     <relativePath/>
   </parent>
 
index cf73cfa15159f2ca0799c8c89e8a7f4f9242312a..7dff629c28a4fd8797a40e7c6b74cd389b7f9b45 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>8.0.7</version>
+    <version>8.0.11</version>
     <relativePath/>
   </parent>
 
index fda49f1f1f628de63bbed9787e61f330e14ec9f6..234ab71f324771b2ee0824f29c0543c359d69752 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>8.0.7</version>
+        <version>8.0.11</version>
         <relativePath />
     </parent>
 
@@ -25,7 +25,7 @@
             <dependency>
                 <groupId>org.opendaylight.netconf</groupId>
                 <artifactId>netconf-artifacts</artifactId>
-                <version>2.0.11</version>
+                <version>2.0.14</version>
                 <scope>import</scope>
                 <type>pom</type>
             </dependency>
index 2ef26c1e28365419661e8d1e7ce9e67f86a610e4..bf697475c57327e3945237aa59d9a6253068889d 100644 (file)
@@ -376,12 +376,20 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase):
             })
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn('Request processed', response['output']['result'])
+        # Here you have remove the added oducn supporting port interface
+        del self.NETWORK2_CHECK_DICT["supporting-oducn"]
 
     def test_21_check_no_interface_oduc2(self):
         response = test_utils_rfc8040.check_node_attribute_request("XPDR-A2", "interface", "XPDR2-NETWORK1-ODUC2")
         self.assertEqual(response['status_code'], requests.codes.conflict)
 
+    # Check if port-mapping data is updated, where the supporting-oducn is deleted
+    def test_21a_check_no_oduc2(self):
+        response = test_utils_rfc8040.portmapping_request("XPDR-A2", "XPDR2-NETWORK1")
+        self.assertRaises(KeyError, lambda: response["supporting-oducn"])
+
     # 1f) Delete OTUC2 device interfaces
+
     def test_22_service_path_delete_otuc2(self):
         response = test_utils_rfc8040.device_renderer_service_path_request(
             {
@@ -399,6 +407,7 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase):
             })
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn('Request processed', response['output']['result'])
+        del self.NETWORK2_CHECK_DICT["supporting-otucn"]
 
     def test_23_check_no_interface_otuc2(self):
         response = test_utils_rfc8040.check_node_attribute_request("XPDR-A1", "interface", "XPDR2-NETWORK1-OTUC2")
@@ -413,6 +422,10 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase):
         response = test_utils_rfc8040.check_node_attribute_request("XPDR-A1", "interface", "XPDR2-NETWORK1-755:768")
         self.assertEqual(response['status_code'], requests.codes.conflict)
 
+    def test_25a_check_no_otuc2(self):
+        response = test_utils_rfc8040.portmapping_request("XPDR-A2", "XPDR2-NETWORK1")
+        self.assertRaises(KeyError, lambda: response["supporting-otucn"])
+
     # 2a) create a OTUC3 device renderer
     def test_26_service_path_create_otuc3(self):
         response = test_utils_rfc8040.device_renderer_service_path_request(
@@ -582,11 +595,16 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase):
             })
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn('Request processed', response['output']['result'])
+        del self.NETWORK2_CHECK_DICT["supporting-oducn"]
 
     def test_35_check_no_interface_oduc3(self):
         response = test_utils_rfc8040.check_node_attribute_request("XPDR-A2", "interface", "XPDR2-NETWORK1-ODUC3")
         self.assertEqual(response['status_code'], requests.codes.conflict)
 
+    def test_35a_check_no_oduc3(self):
+        response = test_utils_rfc8040.portmapping_request("XPDR-A2", "XPDR2-NETWORK1")
+        self.assertRaises(KeyError, lambda: response["supporting-oducn"])
+
     # 2f) Delete OTUC3 device interfaces
     def test_36_service_path_delete_otuc3(self):
         response = test_utils_rfc8040.device_renderer_service_path_request(
@@ -605,6 +623,7 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase):
             })
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn('Request processed', response['output']['result'])
+        del self.NETWORK2_CHECK_DICT["supporting-otucn"]
 
     def test_37_check_no_interface_otuc3(self):
         response = test_utils_rfc8040.check_node_attribute_request("XPDR-A1", "interface", "XPDR2-NETWORK1-OTUC3")
@@ -619,8 +638,12 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase):
         response = test_utils_rfc8040.check_node_attribute_request("XPDR-A1", "interface", "XPDR2-NETWORK1-755:768")
         self.assertEqual(response['status_code'], requests.codes.conflict)
 
+    def test_39a_check_no_otuc3(self):
+        response = test_utils_rfc8040.portmapping_request("XPDR-A2", "XPDR2-NETWORK1")
+        self.assertRaises(KeyError, lambda: response["supporting-otucn"])
+
     # 3a) create a OTUC4 device renderer
-    def test_40_service_path_create_otuc3(self):
+    def test_40_service_path_create_otuc4(self):
         response = test_utils_rfc8040.device_renderer_service_path_request(
             {
                 'service-name': 'service_OTUC4',
@@ -788,11 +811,16 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase):
             })
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn('Request processed', response['output']['result'])
+        del self.NETWORK2_CHECK_DICT["supporting-oducn"]
 
     def test_49_check_no_interface_oduc4(self):
         response = test_utils_rfc8040.check_node_attribute_request("XPDR-A2", "interface", "XPDR2-NETWORK1-ODUC4")
         self.assertEqual(response['status_code'], requests.codes.conflict)
 
+    def test_49a_check_no_oduc4(self):
+        response = test_utils_rfc8040.portmapping_request("XPDR-A2", "XPDR2-NETWORK1")
+        self.assertRaises(KeyError, lambda: response["supporting-oducn"])
+
     # 3f) Delete OTUC4 device interfaces
     def test_50_service_path_delete_otuc4(self):
         response = test_utils_rfc8040.device_renderer_service_path_request(
@@ -811,6 +839,7 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase):
             })
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn('Request processed', response['output']['result'])
+        del self.NETWORK2_CHECK_DICT["supporting-otucn"]
 
     def test_51_check_no_interface_otuc4(self):
         response = test_utils_rfc8040.check_node_attribute_request("XPDR-A1", "interface", "XPDR2-NETWORK1-OTUC4")
@@ -825,6 +854,10 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase):
         response = test_utils_rfc8040.check_node_attribute_request("XPDR-A1", "interface", "XPDR2-NETWORK1-755:768")
         self.assertEqual(response['status_code'], requests.codes.conflict)
 
+    def test_53a_check_no_otuc4(self):
+        response = test_utils_rfc8040.portmapping_request("XPDR-A2", "XPDR2-NETWORK1")
+        self.assertRaises(KeyError, lambda: response["supporting-otucn"])
+
     # Disconnect the XPDR
     def test_54_xpdr_device_disconnection(self):
         response = test_utils_rfc8040.unmount_device("XPDR-A2")