Address yang name change for transportpce-pce 05/110405/1
authorJoakim Törnqvist <joakim.tornqvist@smartoptics.com>
Thu, 29 Feb 2024 14:53:22 +0000 (14:53 +0000)
committerJoakim Törnqvist <joakim.tornqvist@smartoptics.com>
Thu, 29 Feb 2024 15:04:01 +0000 (15:04 +0000)
In TRNSPRTPCE-783, there is name revision update from
transportpce-pce@2023-09-25 to transportpce-pce@2024-02-05.

JIRA: TRNSPRTPCE-176
Change-Id: I68ba63411045c18087e15854835a2d9913e20424
Signed-off-by: Joakim Törnqvist <joakim.tornqvist@smartoptics.com>
pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/port/Factory.java
pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/port/PreferenceFactory.java
pce/src/test/java/org/opendaylight/transportpce/pce/networkanalyzer/port/PreferenceFactoryTest.java

index 11721f5209f5cf4b9e49a29bc369efce86ca3f4b..82da45d2f22d56f8afded8a5e4ca9187c88370b7 100644 (file)
@@ -8,7 +8,7 @@
 
 package org.opendaylight.transportpce.pce.networkanalyzer.port;
 
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev230925.PathComputationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev240205.PathComputationRequestInput;
 
 public interface Factory {
 
index 6d36d821259e06168b5fbf21318f7b6ad6d3191e..1d62e187fd6650b26579faaa60f9dd1e10f3e2d0 100644 (file)
@@ -13,9 +13,9 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev230925.PathComputationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev230925.path.computation.request.input.ServiceAEnd;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev230925.path.computation.request.input.ServiceZEnd;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev240205.PathComputationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev240205.path.computation.request.input.ServiceAEnd;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev240205.path.computation.request.input.ServiceZEnd;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev230526.service.port.Port;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.RxDirection;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.TxDirection;
@@ -26,7 +26,11 @@ public class PreferenceFactory implements Factory {
 
     private static final Logger LOG = LoggerFactory.getLogger(PreferenceFactory.class);
 
-    private final String portNamePattern = "(?i)SRG\\d+-PP\\d+-(TXRX|TX|RX)";
+    private String portNamePattern;
+
+    public PreferenceFactory() {
+        this.portNamePattern = "(?i)SRG\\d+-PP\\d+-(TXRX|TX|RX)";
+    }
 
     @Override
     public Preference portPreference(PathComputationRequestInput pathComputationRequestInput) {
index 34ebb5cae00059b0d3bb59e4d93a77a67e7d9e29..818bbf6b7861163132b20ca1c9d1b249449c3532 100644 (file)
@@ -14,9 +14,9 @@ import java.util.Set;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 import org.mockito.Mockito;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev230925.PathComputationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev230925.path.computation.request.input.ServiceAEnd;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev230925.path.computation.request.input.ServiceZEnd;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev240205.PathComputationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev240205.path.computation.request.input.ServiceAEnd;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev240205.path.computation.request.input.ServiceZEnd;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev230526.service.port.PortBuilder;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.RxDirection;
 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.TxDirection;