Committed by
Gerrit Code Review
SONA : OpenstackSwitching
- Added N/A status type in OpenstackPort class to support floating IP. Change-Id: Ife0276c87d8c8c6cdaf0b882ea7af0bde99199f2
Showing
2 changed files
with
7 additions
and
2 deletions
... | @@ -33,7 +33,8 @@ public final class OpenstackPort { | ... | @@ -33,7 +33,8 @@ public final class OpenstackPort { |
33 | public enum PortStatus { | 33 | public enum PortStatus { |
34 | UP, | 34 | UP, |
35 | DOWN, | 35 | DOWN, |
36 | - ACTIVE | 36 | + ACTIVE, |
37 | + NA, | ||
37 | } | 38 | } |
38 | 39 | ||
39 | private PortStatus status; | 40 | private PortStatus status; | ... | ... |
... | @@ -83,7 +83,11 @@ public class OpenstackPortCodec extends JsonCodec<OpenstackPort> { | ... | @@ -83,7 +83,11 @@ public class OpenstackPortCodec extends JsonCodec<OpenstackPort> { |
83 | String deviceId = portInfo.path(DEVICE_ID).asText(); | 83 | String deviceId = portInfo.path(DEVICE_ID).asText(); |
84 | 84 | ||
85 | OpenstackPort.Builder openstackPortBuilder = OpenstackPort.builder(); | 85 | OpenstackPort.Builder openstackPortBuilder = OpenstackPort.builder(); |
86 | - openstackPortBuilder.portStatus(OpenstackPort.PortStatus.valueOf(status)) | 86 | + OpenstackPort.PortStatus portStatus = |
87 | + status.equals("N/A") ? OpenstackPort.PortStatus.NA : | ||
88 | + OpenstackPort.PortStatus.valueOf(status); | ||
89 | + | ||
90 | + openstackPortBuilder.portStatus(portStatus) | ||
87 | .name(name) | 91 | .name(name) |
88 | .adminState(adminStateUp) | 92 | .adminState(adminStateUp) |
89 | .netwrokId(networkId) | 93 | .netwrokId(networkId) | ... | ... |
-
Please register or login to post a comment