Code Review
/
transportpce.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Enable 400G rate for OC service-format
[transportpce.git]
/
common
/
src
/
main
/
java
/
org
/
opendaylight
/
transportpce
/
common
/
service
/
ServiceTypes.java
diff --git
a/common/src/main/java/org/opendaylight/transportpce/common/service/ServiceTypes.java
b/common/src/main/java/org/opendaylight/transportpce/common/service/ServiceTypes.java
index bdad027878c0ba96a93d392756972a0bf7941a5b..368e81c13397db7929638a2c7235ecb88945b582 100644
(file)
--- a/
common/src/main/java/org/opendaylight/transportpce/common/service/ServiceTypes.java
+++ b/
common/src/main/java/org/opendaylight/transportpce/common/service/ServiceTypes.java
@@
-10,7
+10,7
@@
package org.opendaylight.transportpce.common.service;
import java.util.Map;
import org.opendaylight.transportpce.common.StringConstants;
import java.util.Map;
import org.opendaylight.transportpce.common.StringConstants;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220
114
.mapping.Mapping;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220
922
.mapping.Mapping;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.types.rev191129.PortQual;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.types.rev191129.XpdrNodeTypes;
import org.opendaylight.yangtools.yang.common.Uint32;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.types.rev191129.PortQual;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.types.rev191129.XpdrNodeTypes;
import org.opendaylight.yangtools.yang.common.Uint32;
@@
-30,6
+30,9
@@
public final class ServiceTypes {
if (Uint32.valueOf(100).equals(serviceRate)) {
return StringConstants.SERVICE_TYPE_100GE_T;
}
if (Uint32.valueOf(100).equals(serviceRate)) {
return StringConstants.SERVICE_TYPE_100GE_T;
}
+ if (Uint32.valueOf(400).equals(serviceRate)) {
+ return StringConstants.SERVICE_TYPE_400GE;
+ }
LOG.warn("Invalid service-rate {}", serviceRate);
return null;
LOG.warn("Invalid service-rate {}", serviceRate);
return null;
@@
-41,7
+44,7
@@
public final class ServiceTypes {
if (mapping == null || !PortQual.SwitchClient.getName().equals(mapping.getPortQual())) {
return StringConstants.SERVICE_TYPE_100GE_T;
}
if (mapping == null || !PortQual.SwitchClient.getName().equals(mapping.getPortQual())) {
return StringConstants.SERVICE_TYPE_100GE_T;
}
- if (XpdrNodeTypes.Switch.equals(mapping.getXp
onde
rType())) {
+ if (XpdrNodeTypes.Switch.equals(mapping.getXp
d
rType())) {
return StringConstants.SERVICE_TYPE_100GE_S;
}
}
return StringConstants.SERVICE_TYPE_100GE_S;
}
}
@@
-62,9
+65,13
@@
public final class ServiceTypes {
Uint32.valueOf(100), StringConstants.SERVICE_TYPE_100GE_M),
"OTU", Map.of(
Uint32.valueOf(100), StringConstants.SERVICE_TYPE_OTU4,
Uint32.valueOf(100), StringConstants.SERVICE_TYPE_100GE_M),
"OTU", Map.of(
Uint32.valueOf(100), StringConstants.SERVICE_TYPE_OTU4,
+ Uint32.valueOf(200), StringConstants.SERVICE_TYPE_OTUC2,
+ Uint32.valueOf(300), StringConstants.SERVICE_TYPE_OTUC3,
Uint32.valueOf(400), StringConstants.SERVICE_TYPE_OTUC4),
"ODU", Map.of(
Uint32.valueOf(100), StringConstants.SERVICE_TYPE_ODU4,
Uint32.valueOf(400), StringConstants.SERVICE_TYPE_OTUC4),
"ODU", Map.of(
Uint32.valueOf(100), StringConstants.SERVICE_TYPE_ODU4,
+ Uint32.valueOf(200), StringConstants.SERVICE_TYPE_ODUC2,
+ Uint32.valueOf(300), StringConstants.SERVICE_TYPE_ODUC3,
Uint32.valueOf(400), StringConstants.SERVICE_TYPE_ODUC4));
if (!otnMap.containsKey(serviceFormat)) {
Uint32.valueOf(400), StringConstants.SERVICE_TYPE_ODUC4));
if (!otnMap.containsKey(serviceFormat)) {