Rimon Ashkenazy
Committed by Ray Milkey

Fix RuntimeException of 'Un recognize OduClt speed'

Change-Id: I86a1d399206b8d260a8f9fa53da0ffa16f73ff6d
...@@ -534,24 +534,24 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr ...@@ -534,24 +534,24 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr
534 PortNumber portNo = PortNumber.portNumber(port.getPortNo().getPortNumber()); 534 PortNumber portNo = PortNumber.portNumber(port.getPortNo().getPortNumber());
535 boolean enabled = !port.getState().contains(OFPortState.LINK_DOWN) && 535 boolean enabled = !port.getState().contains(OFPortState.LINK_DOWN) &&
536 !port.getConfig().contains(OFPortConfig.PORT_DOWN); 536 !port.getConfig().contains(OFPortConfig.PORT_DOWN);
537 - Long portSpeed = portSpeed(port); 537 + Long portSpeedInMbps = portSpeed(port);
538 OduCltPort.SignalType sigType = null; 538 OduCltPort.SignalType sigType = null;
539 539
540 - switch (portSpeed.toString()) { 540 + switch (portSpeedInMbps.toString()) {
541 - case "1": 541 + case "1000":
542 sigType = OduCltPort.SignalType.CLT_1GBE; 542 sigType = OduCltPort.SignalType.CLT_1GBE;
543 break; 543 break;
544 - case "10": 544 + case "10000":
545 sigType = OduCltPort.SignalType.CLT_10GBE; 545 sigType = OduCltPort.SignalType.CLT_10GBE;
546 break; 546 break;
547 - case "40": 547 + case "40000":
548 sigType = OduCltPort.SignalType.CLT_40GBE; 548 sigType = OduCltPort.SignalType.CLT_40GBE;
549 break; 549 break;
550 - case "100": 550 + case "100000":
551 sigType = OduCltPort.SignalType.CLT_100GBE; 551 sigType = OduCltPort.SignalType.CLT_100GBE;
552 break; 552 break;
553 default: 553 default:
554 - throw new RuntimeException("Un recognize OduClt speed: " + portSpeed.toString()); 554 + throw new RuntimeException("Un recognize OduClt speed: " + portSpeedInMbps.toString());
555 } 555 }
556 556
557 SparseAnnotations annotations = buildOduCltAnnotation(port); 557 SparseAnnotations annotations = buildOduCltAnnotation(port);
......