Committed by
Yuta HIGUCHI
[ONOS-3730] Populate portSpeed for ODUCLT and OCH ports.
Also move the enum definition of ODU client port signal type outside of OduCltPort class. Change-Id: Ibdff21d9707ad3d79587f579ad675f673cf9afeb
Showing
12 changed files
with
104 additions
and
46 deletions
| ... | @@ -26,6 +26,7 @@ import org.onosproject.cluster.NodeId; | ... | @@ -26,6 +26,7 @@ import org.onosproject.cluster.NodeId; |
| 26 | import org.onosproject.core.ApplicationId; | 26 | import org.onosproject.core.ApplicationId; |
| 27 | import org.onosproject.core.CoreService; | 27 | import org.onosproject.core.CoreService; |
| 28 | import org.onosproject.mastership.MastershipService; | 28 | import org.onosproject.mastership.MastershipService; |
| 29 | +import org.onosproject.net.CltSignalType; | ||
| 29 | import org.onosproject.net.ConnectPoint; | 30 | import org.onosproject.net.ConnectPoint; |
| 30 | import org.onosproject.net.Device; | 31 | import org.onosproject.net.Device; |
| 31 | import org.onosproject.net.Host; | 32 | import org.onosproject.net.Host; |
| ... | @@ -290,7 +291,7 @@ public class OpticalPathProvisioner { | ... | @@ -290,7 +291,7 @@ public class OpticalPathProvisioner { |
| 290 | .appId(appId) | 291 | .appId(appId) |
| 291 | .src(src) | 292 | .src(src) |
| 292 | .dst(dst) | 293 | .dst(dst) |
| 293 | - .signalType(OduCltPort.SignalType.CLT_10GBE) | 294 | + .signalType(CltSignalType.CLT_10GBE) |
| 294 | .bidirectional(true) | 295 | .bidirectional(true) |
| 295 | .build(); | 296 | .build(); |
| 296 | intents.add(circuitIntent); | 297 | intents.add(circuitIntent); | ... | ... |
| ... | @@ -18,6 +18,7 @@ package org.onosproject.cli.net; | ... | @@ -18,6 +18,7 @@ package org.onosproject.cli.net; |
| 18 | import org.apache.karaf.shell.commands.Argument; | 18 | import org.apache.karaf.shell.commands.Argument; |
| 19 | import org.apache.karaf.shell.commands.Command; | 19 | import org.apache.karaf.shell.commands.Command; |
| 20 | import org.apache.karaf.shell.commands.Option; | 20 | import org.apache.karaf.shell.commands.Option; |
| 21 | +import org.onosproject.net.CltSignalType; | ||
| 21 | import org.onosproject.net.ConnectPoint; | 22 | import org.onosproject.net.ConnectPoint; |
| 22 | import org.onosproject.net.OchPort; | 23 | import org.onosproject.net.OchPort; |
| 23 | import org.onosproject.net.OduCltPort; | 24 | import org.onosproject.net.OduCltPort; |
| ... | @@ -102,7 +103,7 @@ public class AddOpticalIntentCommand extends ConnectivityIntentCommand { | ... | @@ -102,7 +103,7 @@ public class AddOpticalIntentCommand extends ConnectivityIntentCommand { |
| 102 | .key(key()) | 103 | .key(key()) |
| 103 | .src(ingress) | 104 | .src(ingress) |
| 104 | .dst(egress) | 105 | .dst(egress) |
| 105 | - .signalType(OduCltPort.SignalType.CLT_10GBE) | 106 | + .signalType(CltSignalType.CLT_10GBE) |
| 106 | .bidirectional(bidirectional) | 107 | .bidirectional(bidirectional) |
| 107 | .build(); | 108 | .build(); |
| 108 | } else if (srcPort instanceof OchPort && dstPort instanceof OchPort) { | 109 | } else if (srcPort instanceof OchPort && dstPort instanceof OchPort) { | ... | ... |
| 1 | +/* | ||
| 2 | + * Copyright 2016 Open Networking Laboratory | ||
| 3 | + * | ||
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | + * you may not use this file except in compliance with the License. | ||
| 6 | + * You may obtain a copy of the License at | ||
| 7 | + * | ||
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | + * | ||
| 10 | + * Unless required by applicable law or agreed to in writing, software | ||
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | + * See the License for the specific language governing permissions and | ||
| 14 | + * limitations under the License. | ||
| 15 | + */ | ||
| 16 | + | ||
| 17 | +package org.onosproject.net; | ||
| 18 | + | ||
| 19 | +/** | ||
| 20 | + * Represents ODU (Optical channel Data Unit) client port signal type. | ||
| 21 | + * | ||
| 22 | + * <p> | ||
| 23 | + * See ITU G.709 "Interfaces for the Optical Transport Network (OTN)" and | ||
| 24 | + * Open Networking Foundation "Optical Transport Protocol Extensions Version 1.0". | ||
| 25 | + * </p> | ||
| 26 | + */ | ||
| 27 | +public enum CltSignalType { | ||
| 28 | + /** bit rate in Mbps. */ | ||
| 29 | + CLT_1GBE(1_000), | ||
| 30 | + CLT_10GBE(10_000), | ||
| 31 | + CLT_40GBE(40_000), | ||
| 32 | + CLT_100GBE(100_000); | ||
| 33 | + | ||
| 34 | + private final long bitRate; | ||
| 35 | + | ||
| 36 | + CltSignalType(long bitRate) { | ||
| 37 | + this.bitRate = bitRate; | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + /** | ||
| 41 | + * Return the bit rate in Mbps of the port. | ||
| 42 | + * @return bit rate | ||
| 43 | + */ | ||
| 44 | + public long bitRate() { | ||
| 45 | + return this.bitRate; | ||
| 46 | + } | ||
| 47 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -44,8 +44,8 @@ public class OchPort extends DefaultPort { | ... | @@ -44,8 +44,8 @@ public class OchPort extends DefaultPort { |
| 44 | */ | 44 | */ |
| 45 | public OchPort(Element element, PortNumber number, boolean isEnabled, OduSignalType signalType, | 45 | public OchPort(Element element, PortNumber number, boolean isEnabled, OduSignalType signalType, |
| 46 | boolean isTunable, OchSignal lambda, Annotations... annotations) { | 46 | boolean isTunable, OchSignal lambda, Annotations... annotations) { |
| 47 | - super(element, number, isEnabled, Type.OCH, 0, annotations); | 47 | + super(element, number, isEnabled, Type.OCH, checkNotNull(signalType).bitRate(), annotations); |
| 48 | - this.signalType = checkNotNull(signalType); | 48 | + this.signalType = signalType; |
| 49 | this.isTunable = isTunable; | 49 | this.isTunable = isTunable; |
| 50 | this.lambda = checkNotNull(lambda); | 50 | this.lambda = checkNotNull(lambda); |
| 51 | } | 51 | } | ... | ... |
| ... | @@ -28,15 +28,7 @@ import static com.google.common.base.Preconditions.checkNotNull; | ... | @@ -28,15 +28,7 @@ import static com.google.common.base.Preconditions.checkNotNull; |
| 28 | 28 | ||
| 29 | public class OduCltPort extends DefaultPort { | 29 | public class OduCltPort extends DefaultPort { |
| 30 | 30 | ||
| 31 | - public enum SignalType { | 31 | + private final CltSignalType signalType; |
| 32 | - CLT_1GBE, | ||
| 33 | - CLT_10GBE, | ||
| 34 | - CLT_40GBE, | ||
| 35 | - CLT_100GBE | ||
| 36 | - } | ||
| 37 | - | ||
| 38 | - private final SignalType signalType; | ||
| 39 | - | ||
| 40 | 32 | ||
| 41 | /** | 33 | /** |
| 42 | * Creates an ODU client port in the specified network element. | 34 | * Creates an ODU client port in the specified network element. |
| ... | @@ -48,9 +40,9 @@ public class OduCltPort extends DefaultPort { | ... | @@ -48,9 +40,9 @@ public class OduCltPort extends DefaultPort { |
| 48 | * @param annotations optional key/value annotations | 40 | * @param annotations optional key/value annotations |
| 49 | */ | 41 | */ |
| 50 | public OduCltPort(Element element, PortNumber number, boolean isEnabled, | 42 | public OduCltPort(Element element, PortNumber number, boolean isEnabled, |
| 51 | - SignalType signalType, Annotations... annotations) { | 43 | + CltSignalType signalType, Annotations... annotations) { |
| 52 | - super(element, number, isEnabled, Type.ODUCLT, 0, annotations); | 44 | + super(element, number, isEnabled, Type.ODUCLT, checkNotNull(signalType).bitRate(), annotations); |
| 53 | - this.signalType = checkNotNull(signalType); | 45 | + this.signalType = signalType; |
| 54 | } | 46 | } |
| 55 | 47 | ||
| 56 | /** | 48 | /** |
| ... | @@ -58,7 +50,7 @@ public class OduCltPort extends DefaultPort { | ... | @@ -58,7 +50,7 @@ public class OduCltPort extends DefaultPort { |
| 58 | * | 50 | * |
| 59 | * @return ODU client signal type | 51 | * @return ODU client signal type |
| 60 | */ | 52 | */ |
| 61 | - public SignalType signalType() { | 53 | + public CltSignalType signalType() { |
| 62 | return signalType; | 54 | return signalType; |
| 63 | } | 55 | } |
| 64 | 56 | ... | ... |
| ... | @@ -24,10 +24,25 @@ package org.onosproject.net; | ... | @@ -24,10 +24,25 @@ package org.onosproject.net; |
| 24 | * </p> | 24 | * </p> |
| 25 | */ | 25 | */ |
| 26 | public enum OduSignalType { | 26 | public enum OduSignalType { |
| 27 | - ODU0, | 27 | + /** bit rate in Mbps. */ |
| 28 | - ODU1, | 28 | + ODU0(1_250), |
| 29 | - ODU2, | 29 | + ODU1(2_500), |
| 30 | - ODU2e, | 30 | + ODU2(10_000), |
| 31 | - ODU3, | 31 | + ODU2e(10_000), |
| 32 | - ODU4 | 32 | + ODU3(40_000), |
| 33 | + ODU4(100_000); | ||
| 34 | + | ||
| 35 | + private final long bitRate; | ||
| 36 | + | ||
| 37 | + OduSignalType(long bitRate) { | ||
| 38 | + this.bitRate = bitRate; | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + /** | ||
| 42 | + * Return the bit rate in Mbps of the port. | ||
| 43 | + * @return bit rate | ||
| 44 | + */ | ||
| 45 | + public long bitRate() { | ||
| 46 | + return this.bitRate; | ||
| 47 | + } | ||
| 33 | } | 48 | } | ... | ... |
| ... | @@ -16,7 +16,7 @@ | ... | @@ -16,7 +16,7 @@ |
| 16 | package org.onosproject.net.device; | 16 | package org.onosproject.net.device; |
| 17 | 17 | ||
| 18 | import com.google.common.base.MoreObjects; | 18 | import com.google.common.base.MoreObjects; |
| 19 | -import org.onosproject.net.OduCltPort; | 19 | +import org.onosproject.net.CltSignalType; |
| 20 | import org.onosproject.net.Port; | 20 | import org.onosproject.net.Port; |
| 21 | import org.onosproject.net.PortNumber; | 21 | import org.onosproject.net.PortNumber; |
| 22 | import org.onosproject.net.SparseAnnotations; | 22 | import org.onosproject.net.SparseAnnotations; |
| ... | @@ -26,7 +26,7 @@ import org.onosproject.net.SparseAnnotations; | ... | @@ -26,7 +26,7 @@ import org.onosproject.net.SparseAnnotations; |
| 26 | */ | 26 | */ |
| 27 | public class OduCltPortDescription extends DefaultPortDescription { | 27 | public class OduCltPortDescription extends DefaultPortDescription { |
| 28 | 28 | ||
| 29 | - private final OduCltPort.SignalType signalType; | 29 | + private final CltSignalType signalType; |
| 30 | 30 | ||
| 31 | /** | 31 | /** |
| 32 | * Creates ODU client port description based on the supplied information. | 32 | * Creates ODU client port description based on the supplied information. |
| ... | @@ -36,7 +36,7 @@ public class OduCltPortDescription extends DefaultPortDescription { | ... | @@ -36,7 +36,7 @@ public class OduCltPortDescription extends DefaultPortDescription { |
| 36 | * @param signalType ODU client signal type | 36 | * @param signalType ODU client signal type |
| 37 | * @param annotations optional key/value annotations map | 37 | * @param annotations optional key/value annotations map |
| 38 | */ | 38 | */ |
| 39 | - public OduCltPortDescription(PortNumber number, boolean isEnabled, OduCltPort.SignalType signalType, | 39 | + public OduCltPortDescription(PortNumber number, boolean isEnabled, CltSignalType signalType, |
| 40 | SparseAnnotations... annotations) { | 40 | SparseAnnotations... annotations) { |
| 41 | super(number, isEnabled, Port.Type.ODUCLT, 0, annotations); | 41 | super(number, isEnabled, Port.Type.ODUCLT, 0, annotations); |
| 42 | this.signalType = signalType; | 42 | this.signalType = signalType; |
| ... | @@ -49,7 +49,7 @@ public class OduCltPortDescription extends DefaultPortDescription { | ... | @@ -49,7 +49,7 @@ public class OduCltPortDescription extends DefaultPortDescription { |
| 49 | * @param signalType ODU client signal type | 49 | * @param signalType ODU client signal type |
| 50 | * @param annotations optional key/value annotations map | 50 | * @param annotations optional key/value annotations map |
| 51 | */ | 51 | */ |
| 52 | - public OduCltPortDescription(PortDescription base, OduCltPort.SignalType signalType, | 52 | + public OduCltPortDescription(PortDescription base, CltSignalType signalType, |
| 53 | SparseAnnotations annotations) { | 53 | SparseAnnotations annotations) { |
| 54 | super(base, annotations); | 54 | super(base, annotations); |
| 55 | this.signalType = signalType; | 55 | this.signalType = signalType; |
| ... | @@ -60,7 +60,7 @@ public class OduCltPortDescription extends DefaultPortDescription { | ... | @@ -60,7 +60,7 @@ public class OduCltPortDescription extends DefaultPortDescription { |
| 60 | * | 60 | * |
| 61 | * @return ODU client signal type | 61 | * @return ODU client signal type |
| 62 | */ | 62 | */ |
| 63 | - public OduCltPort.SignalType signalType() { | 63 | + public CltSignalType signalType() { |
| 64 | return signalType; | 64 | return signalType; |
| 65 | } | 65 | } |
| 66 | 66 | ... | ... |
| ... | @@ -18,8 +18,8 @@ package org.onosproject.net.intent; | ... | @@ -18,8 +18,8 @@ package org.onosproject.net.intent; |
| 18 | import com.google.common.annotations.Beta; | 18 | import com.google.common.annotations.Beta; |
| 19 | import com.google.common.base.MoreObjects; | 19 | import com.google.common.base.MoreObjects; |
| 20 | import org.onosproject.core.ApplicationId; | 20 | import org.onosproject.core.ApplicationId; |
| 21 | +import org.onosproject.net.CltSignalType; | ||
| 21 | import org.onosproject.net.ConnectPoint; | 22 | import org.onosproject.net.ConnectPoint; |
| 22 | -import org.onosproject.net.OduCltPort; | ||
| 23 | 23 | ||
| 24 | import java.util.Collections; | 24 | import java.util.Collections; |
| 25 | 25 | ||
| ... | @@ -33,7 +33,7 @@ import static com.google.common.base.Preconditions.checkNotNull; | ... | @@ -33,7 +33,7 @@ import static com.google.common.base.Preconditions.checkNotNull; |
| 33 | public class OpticalCircuitIntent extends Intent { | 33 | public class OpticalCircuitIntent extends Intent { |
| 34 | private final ConnectPoint src; | 34 | private final ConnectPoint src; |
| 35 | private final ConnectPoint dst; | 35 | private final ConnectPoint dst; |
| 36 | - private final OduCltPort.SignalType signalType; | 36 | + private final CltSignalType signalType; |
| 37 | private final boolean isBidirectional; | 37 | private final boolean isBidirectional; |
| 38 | 38 | ||
| 39 | /** | 39 | /** |
| ... | @@ -49,7 +49,7 @@ public class OpticalCircuitIntent extends Intent { | ... | @@ -49,7 +49,7 @@ public class OpticalCircuitIntent extends Intent { |
| 49 | * @param priority priority to use for flows from this intent | 49 | * @param priority priority to use for flows from this intent |
| 50 | */ | 50 | */ |
| 51 | protected OpticalCircuitIntent(ApplicationId appId, Key key, ConnectPoint src, ConnectPoint dst, | 51 | protected OpticalCircuitIntent(ApplicationId appId, Key key, ConnectPoint src, ConnectPoint dst, |
| 52 | - OduCltPort.SignalType signalType, boolean isBidirectional, int priority) { | 52 | + CltSignalType signalType, boolean isBidirectional, int priority) { |
| 53 | super(appId, key, Collections.emptyList(), priority); | 53 | super(appId, key, Collections.emptyList(), priority); |
| 54 | this.src = checkNotNull(src); | 54 | this.src = checkNotNull(src); |
| 55 | this.dst = checkNotNull(dst); | 55 | this.dst = checkNotNull(dst); |
| ... | @@ -73,7 +73,7 @@ public class OpticalCircuitIntent extends Intent { | ... | @@ -73,7 +73,7 @@ public class OpticalCircuitIntent extends Intent { |
| 73 | public static class Builder extends Intent.Builder { | 73 | public static class Builder extends Intent.Builder { |
| 74 | private ConnectPoint src; | 74 | private ConnectPoint src; |
| 75 | private ConnectPoint dst; | 75 | private ConnectPoint dst; |
| 76 | - private OduCltPort.SignalType signalType; | 76 | + private CltSignalType signalType; |
| 77 | private boolean isBidirectional; | 77 | private boolean isBidirectional; |
| 78 | 78 | ||
| 79 | @Override | 79 | @Override |
| ... | @@ -119,7 +119,7 @@ public class OpticalCircuitIntent extends Intent { | ... | @@ -119,7 +119,7 @@ public class OpticalCircuitIntent extends Intent { |
| 119 | * @param signalType signal type to use for built intent | 119 | * @param signalType signal type to use for built intent |
| 120 | * @return this builder | 120 | * @return this builder |
| 121 | */ | 121 | */ |
| 122 | - public Builder signalType(OduCltPort.SignalType signalType) { | 122 | + public Builder signalType(CltSignalType signalType) { |
| 123 | this.signalType = signalType; | 123 | this.signalType = signalType; |
| 124 | return this; | 124 | return this; |
| 125 | } | 125 | } |
| ... | @@ -188,7 +188,7 @@ public class OpticalCircuitIntent extends Intent { | ... | @@ -188,7 +188,7 @@ public class OpticalCircuitIntent extends Intent { |
| 188 | * | 188 | * |
| 189 | * @return ODU signal type | 189 | * @return ODU signal type |
| 190 | */ | 190 | */ |
| 191 | - public OduCltPort.SignalType getSignalType() { | 191 | + public CltSignalType getSignalType() { |
| 192 | return signalType; | 192 | return signalType; |
| 193 | } | 193 | } |
| 194 | 194 | ... | ... |
| ... | @@ -17,6 +17,7 @@ package org.onosproject.net.device.impl; | ... | @@ -17,6 +17,7 @@ package org.onosproject.net.device.impl; |
| 17 | 17 | ||
| 18 | import org.junit.Before; | 18 | import org.junit.Before; |
| 19 | import org.junit.Test; | 19 | import org.junit.Test; |
| 20 | +import org.onosproject.net.CltSignalType; | ||
| 20 | import org.onosproject.net.config.Config; | 21 | import org.onosproject.net.config.Config; |
| 21 | import org.onosproject.net.config.ConfigApplyDelegate; | 22 | import org.onosproject.net.config.ConfigApplyDelegate; |
| 22 | import org.onosproject.net.config.basics.OpticalPortConfig; | 23 | import org.onosproject.net.config.basics.OpticalPortConfig; |
| ... | @@ -24,7 +25,6 @@ import org.onosproject.net.AnnotationKeys; | ... | @@ -24,7 +25,6 @@ import org.onosproject.net.AnnotationKeys; |
| 24 | import org.onosproject.net.ConnectPoint; | 25 | import org.onosproject.net.ConnectPoint; |
| 25 | import org.onosproject.net.DefaultAnnotations; | 26 | import org.onosproject.net.DefaultAnnotations; |
| 26 | import org.onosproject.net.DeviceId; | 27 | import org.onosproject.net.DeviceId; |
| 27 | -import org.onosproject.net.OduCltPort; | ||
| 28 | import org.onosproject.net.Port; | 28 | import org.onosproject.net.Port; |
| 29 | import org.onosproject.net.PortNumber; | 29 | import org.onosproject.net.PortNumber; |
| 30 | import org.onosproject.net.SparseAnnotations; | 30 | import org.onosproject.net.SparseAnnotations; |
| ... | @@ -50,9 +50,9 @@ public class OpticalPortOperatorTest { | ... | @@ -50,9 +50,9 @@ public class OpticalPortOperatorTest { |
| 50 | .build(); | 50 | .build(); |
| 51 | 51 | ||
| 52 | private static final OduCltPortDescription N_DESC = new OduCltPortDescription( | 52 | private static final OduCltPortDescription N_DESC = new OduCltPortDescription( |
| 53 | - NAMED, true, OduCltPort.SignalType.CLT_100GBE, SA); | 53 | + NAMED, true, CltSignalType.CLT_100GBE, SA); |
| 54 | private static final OduCltPortDescription FAULTY = new OduCltPortDescription( | 54 | private static final OduCltPortDescription FAULTY = new OduCltPortDescription( |
| 55 | - null, true, OduCltPort.SignalType.CLT_100GBE); | 55 | + null, true, CltSignalType.CLT_100GBE); |
| 56 | 56 | ||
| 57 | private final ConfigApplyDelegate delegate = new MockCfgDelegate(); | 57 | private final ConfigApplyDelegate delegate = new MockCfgDelegate(); |
| 58 | private final ObjectMapper mapper = new ObjectMapper(); | 58 | private final ObjectMapper mapper = new ObjectMapper(); | ... | ... |
| ... | @@ -49,6 +49,7 @@ import org.onosproject.incubator.net.domain.IntentDomainId; | ... | @@ -49,6 +49,7 @@ import org.onosproject.incubator.net.domain.IntentDomainId; |
| 49 | import org.onosproject.mastership.MastershipTerm; | 49 | import org.onosproject.mastership.MastershipTerm; |
| 50 | import org.onosproject.net.Annotations; | 50 | import org.onosproject.net.Annotations; |
| 51 | import org.onosproject.net.ChannelSpacing; | 51 | import org.onosproject.net.ChannelSpacing; |
| 52 | +import org.onosproject.net.CltSignalType; | ||
| 52 | import org.onosproject.net.ConnectPoint; | 53 | import org.onosproject.net.ConnectPoint; |
| 53 | import org.onosproject.net.DefaultAnnotations; | 54 | import org.onosproject.net.DefaultAnnotations; |
| 54 | import org.onosproject.net.DefaultDevice; | 55 | import org.onosproject.net.DefaultDevice; |
| ... | @@ -483,7 +484,7 @@ public final class KryoNamespaces { | ... | @@ -483,7 +484,7 @@ public final class KryoNamespaces { |
| 483 | .register(GridType.class) | 484 | .register(GridType.class) |
| 484 | .register(ChannelSpacing.class) | 485 | .register(ChannelSpacing.class) |
| 485 | .register(OduCltPort.class) | 486 | .register(OduCltPort.class) |
| 486 | - .register(OduCltPort.SignalType.class) | 487 | + .register(CltSignalType.class) |
| 487 | .register(IndexedLambda.class) | 488 | .register(IndexedLambda.class) |
| 488 | .register(OchSignal.class) | 489 | .register(OchSignal.class) |
| 489 | .register(OduSignalId.class) | 490 | .register(OduSignalId.class) | ... | ... |
| ... | @@ -34,6 +34,7 @@ import org.onosproject.core.DefaultGroupId; | ... | @@ -34,6 +34,7 @@ import org.onosproject.core.DefaultGroupId; |
| 34 | import org.onosproject.mastership.MastershipTerm; | 34 | import org.onosproject.mastership.MastershipTerm; |
| 35 | import org.onosproject.net.Annotations; | 35 | import org.onosproject.net.Annotations; |
| 36 | import org.onosproject.net.ChannelSpacing; | 36 | import org.onosproject.net.ChannelSpacing; |
| 37 | +import org.onosproject.net.CltSignalType; | ||
| 37 | import org.onosproject.net.ConnectPoint; | 38 | import org.onosproject.net.ConnectPoint; |
| 38 | import org.onosproject.net.DefaultAnnotations; | 39 | import org.onosproject.net.DefaultAnnotations; |
| 39 | import org.onosproject.net.DefaultDevice; | 40 | import org.onosproject.net.DefaultDevice; |
| ... | @@ -208,8 +209,8 @@ public class KryoSerializerTest { | ... | @@ -208,8 +209,8 @@ public class KryoSerializerTest { |
| 208 | 209 | ||
| 209 | @Test | 210 | @Test |
| 210 | public void testOduCltPort() { | 211 | public void testOduCltPort() { |
| 211 | - testSerializedEquals(new OduCltPort(DEV1, P1, true, OduCltPort.SignalType.CLT_10GBE)); | 212 | + testSerializedEquals(new OduCltPort(DEV1, P1, true, CltSignalType.CLT_10GBE)); |
| 212 | - testSerializedEquals(new OduCltPort(DEV1, P1, true, OduCltPort.SignalType.CLT_10GBE, A1_2)); | 213 | + testSerializedEquals(new OduCltPort(DEV1, P1, true, CltSignalType.CLT_10GBE, A1_2)); |
| 213 | } | 214 | } |
| 214 | 215 | ||
| 215 | @Test | 216 | @Test | ... | ... |
| ... | @@ -46,13 +46,13 @@ import org.onlab.util.Spectrum; | ... | @@ -46,13 +46,13 @@ import org.onlab.util.Spectrum; |
| 46 | import org.onosproject.cfg.ComponentConfigService; | 46 | import org.onosproject.cfg.ComponentConfigService; |
| 47 | import org.onosproject.net.AnnotationKeys; | 47 | import org.onosproject.net.AnnotationKeys; |
| 48 | import org.onosproject.net.ChannelSpacing; | 48 | import org.onosproject.net.ChannelSpacing; |
| 49 | +import org.onosproject.net.CltSignalType; | ||
| 49 | import org.onosproject.net.DefaultAnnotations; | 50 | import org.onosproject.net.DefaultAnnotations; |
| 50 | import org.onosproject.net.Device; | 51 | import org.onosproject.net.Device; |
| 51 | import org.onosproject.net.DeviceId; | 52 | import org.onosproject.net.DeviceId; |
| 52 | import org.onosproject.net.GridType; | 53 | import org.onosproject.net.GridType; |
| 53 | import org.onosproject.net.MastershipRole; | 54 | import org.onosproject.net.MastershipRole; |
| 54 | import org.onosproject.net.OchSignal; | 55 | import org.onosproject.net.OchSignal; |
| 55 | -import org.onosproject.net.OduCltPort; | ||
| 56 | import org.onosproject.net.OduSignalType; | 56 | import org.onosproject.net.OduSignalType; |
| 57 | import org.onosproject.net.Port; | 57 | import org.onosproject.net.Port; |
| 58 | import org.onosproject.net.PortNumber; | 58 | import org.onosproject.net.PortNumber; |
| ... | @@ -537,20 +537,20 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr | ... | @@ -537,20 +537,20 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr |
| 537 | boolean enabled = !port.getState().contains(OFPortState.LINK_DOWN) && | 537 | boolean enabled = !port.getState().contains(OFPortState.LINK_DOWN) && |
| 538 | !port.getConfig().contains(OFPortConfig.PORT_DOWN); | 538 | !port.getConfig().contains(OFPortConfig.PORT_DOWN); |
| 539 | Long portSpeedInMbps = portSpeed(port); | 539 | Long portSpeedInMbps = portSpeed(port); |
| 540 | - OduCltPort.SignalType sigType = null; | 540 | + CltSignalType sigType = null; |
| 541 | 541 | ||
| 542 | switch (portSpeedInMbps.toString()) { | 542 | switch (portSpeedInMbps.toString()) { |
| 543 | case "1000": | 543 | case "1000": |
| 544 | - sigType = OduCltPort.SignalType.CLT_1GBE; | 544 | + sigType = CltSignalType.CLT_1GBE; |
| 545 | break; | 545 | break; |
| 546 | case "10000": | 546 | case "10000": |
| 547 | - sigType = OduCltPort.SignalType.CLT_10GBE; | 547 | + sigType = CltSignalType.CLT_10GBE; |
| 548 | break; | 548 | break; |
| 549 | case "40000": | 549 | case "40000": |
| 550 | - sigType = OduCltPort.SignalType.CLT_40GBE; | 550 | + sigType = CltSignalType.CLT_40GBE; |
| 551 | break; | 551 | break; |
| 552 | case "100000": | 552 | case "100000": |
| 553 | - sigType = OduCltPort.SignalType.CLT_100GBE; | 553 | + sigType = CltSignalType.CLT_100GBE; |
| 554 | break; | 554 | break; |
| 555 | default: | 555 | default: |
| 556 | throw new RuntimeException("Un recognize OduClt speed: " + portSpeedInMbps.toString()); | 556 | throw new RuntimeException("Un recognize OduClt speed: " + portSpeedInMbps.toString()); | ... | ... |
-
Please register or login to post a comment