Fix bug in 200G 31.6 GBaud renderer 03/101303/1
authorBalagangadhar Bathula <bb4341@att.com>
Thu, 26 May 2022 11:35:57 +0000 (07:35 -0400)
committerBalagangadhar Bathula <bb4341@att.com>
Thu, 26 May 2022 11:49:44 +0000 (07:49 -0400)
- Instance ID for 200G OTSi group should be
  2 not 4.
- Fix the issue with interface naming when the
  source-tp is not null and has network-token

Signed-off-by: Balagangadhar Bathula <bb4341@att.com>
Change-Id: Iad341cb0f4357feb8288141d87b3348fb03f3f6d

renderer/src/main/java/org/opendaylight/transportpce/renderer/openroadminterface/OpenRoadmInterface710.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/DeviceRendererServiceImpl.java

index 01ed89c376488eac4a901fedf5d3072c1a0381c0..51fdf96269f14444154ed275a2494318baaa050e 100644 (file)
@@ -224,8 +224,7 @@ public class OpenRoadmInterface710 {
                     LOG.info("FOIC is 2.8 for 31.6 Gbaud and rate is 200");
                     // FOIC rate is different
                     flexoBuilder.setFoicType(Foic28.class)
-                        .setIid(new ArrayList<>(Arrays.asList(Uint8.valueOf(1), Uint8.valueOf(2),
-                            Uint8.valueOf(3), Uint8.valueOf(4))));
+                        .setIid(new ArrayList<>(Arrays.asList(Uint8.valueOf(1), Uint8.valueOf(2))));
                 } else {
                     // default is dp-qpsk for 200G under 63.1 GBaud
                     flexoBuilder.setFoicType(Foic24.class)
index bf2e12eaab75dd3e66dc07eba6fa66adc9b17b46..a861d59e119e47112a626c924b61925bcf58c5b1 100644 (file)
@@ -188,6 +188,12 @@ public class DeviceRendererServiceImpl implements DeviceRendererService {
                         String supportingOchInterface = this.openRoadmInterfaceFactory.createOpenRoadmOchInterface(
                                 nodeId, srcTp, spectrumInformation);
                         createdOchInterfaces.add(supportingOchInterface);
+                        // Split the string based on # pass the last element as the supported Interface
+                        // This is needed for 7.1 device models with B100G, we have OTSI, OTSI-group combined as OCH
+                        String[] listOfSuppOchInf = supportingOchInterface.split("#");
+                        createdOchInterfaces = Arrays.asList(listOfSuppOchInf);
+                        // Taking the last element
+                        supportingOchInterface = createdOchInterfaces.get(createdOchInterfaces.size() - 1);
                         String supportingOtuInterface = this.openRoadmInterfaceFactory.createOpenRoadmOtu4Interface(
                                 nodeId, srcTp, supportingOchInterface, apiInfoA, apiInfoZ);
                         createdOtuInterfaces.add(supportingOtuInterface);