sanghoshin
Committed by Gerrit Code Review

SONA : OpenstackSwitching

 - Added N/A status type in OpenstackPort class to support floating IP.

Change-Id: Ife0276c87d8c8c6cdaf0b882ea7af0bde99199f2
......@@ -33,7 +33,8 @@ public final class OpenstackPort {
public enum PortStatus {
UP,
DOWN,
ACTIVE
ACTIVE,
NA,
}
private PortStatus status;
......
......@@ -83,7 +83,11 @@ public class OpenstackPortCodec extends JsonCodec<OpenstackPort> {
String deviceId = portInfo.path(DEVICE_ID).asText();
OpenstackPort.Builder openstackPortBuilder = OpenstackPort.builder();
openstackPortBuilder.portStatus(OpenstackPort.PortStatus.valueOf(status))
OpenstackPort.PortStatus portStatus =
status.equals("N/A") ? OpenstackPort.PortStatus.NA :
OpenstackPort.PortStatus.valueOf(status);
openstackPortBuilder.portStatus(portStatus)
.name(name)
.adminState(adminStateUp)
.netwrokId(networkId)
......