HIGUCHI Yuta | 356086e | 2013-06-12 15:21:19 -0700 | [diff] [blame] | 1 | package net.onrc.onos.ofcontroller.util; |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 2 | |
Pankaj Berde | 6a97eb8 | 2013-03-28 12:12:43 -0700 | [diff] [blame] | 3 | import java.util.ArrayList; |
| 4 | |
HIGUCHI Yuta | 356086e | 2013-06-12 15:21:19 -0700 | [diff] [blame] | 5 | import net.floodlightcontroller.util.MACAddress; |
HIGUCHI Yuta | 2051490 | 2013-06-12 11:24:16 -0700 | [diff] [blame] | 6 | import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IFlowEntry; |
| 7 | import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IFlowPath; |
Pavlin Radoslavov | 204b286 | 2013-07-12 14:15:36 -0700 | [diff] [blame] | 8 | import net.onrc.onos.ofcontroller.util.FlowPathFlags; |
Pavlin Radoslavov | ad008e0 | 2013-02-21 18:42:42 -0800 | [diff] [blame] | 9 | |
| 10 | import org.codehaus.jackson.annotate.JsonProperty; |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 11 | |
| 12 | /** |
| 13 | * The class representing the Flow Path. |
| 14 | */ |
Umesh Krishnaswamy | 57a32a9 | 2013-03-21 14:21:15 -0700 | [diff] [blame] | 15 | public class FlowPath implements Comparable<FlowPath> { |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 16 | private FlowId flowId; // The Flow ID |
| 17 | private CallerId installerId; // The Caller ID of the path installer |
Pavlin Radoslavov | 204b286 | 2013-07-12 14:15:36 -0700 | [diff] [blame] | 18 | private FlowPathFlags flowPathFlags; // The Flow Path flags |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 19 | private DataPath dataPath; // The data path |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 20 | private FlowEntryMatch flowEntryMatch; // Common Flow Entry Match for all |
| 21 | // Flow Entries |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 22 | private FlowEntryActions flowEntryActions; // The Flow Entry Actions for |
| 23 | // the first Flow Entry |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 24 | |
| 25 | /** |
| 26 | * Default constructor. |
| 27 | */ |
| 28 | public FlowPath() { |
Pavlin Radoslavov | 204b286 | 2013-07-12 14:15:36 -0700 | [diff] [blame] | 29 | flowPathFlags = new FlowPathFlags(); |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 30 | dataPath = new DataPath(); |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 31 | flowEntryActions = new FlowEntryActions(); |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 32 | } |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 33 | |
Pankaj Berde | 6a97eb8 | 2013-03-28 12:12:43 -0700 | [diff] [blame] | 34 | /** |
| 35 | * Constructor to instantiate from object in Network Map |
| 36 | */ |
| 37 | public FlowPath(IFlowPath flowObj) { |
| 38 | dataPath = new DataPath(); |
| 39 | this.setFlowId(new FlowId(flowObj.getFlowId())); |
| 40 | this.setInstallerId(new CallerId(flowObj.getInstallerId())); |
Pavlin Radoslavov | 204b286 | 2013-07-12 14:15:36 -0700 | [diff] [blame] | 41 | this.setFlowPathFlags(new FlowPathFlags(flowObj.getFlowPathFlags())); |
Pankaj Berde | 6a97eb8 | 2013-03-28 12:12:43 -0700 | [diff] [blame] | 42 | this.dataPath().srcPort().setDpid(new Dpid(flowObj.getSrcSwitch())); |
| 43 | this.dataPath().srcPort().setPort(new Port(flowObj.getSrcPort())); |
| 44 | this.dataPath().dstPort().setDpid(new Dpid(flowObj.getDstSwitch())); |
| 45 | this.dataPath().dstPort().setPort(new Port(flowObj.getDstPort())); |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 46 | // |
| 47 | // Extract the match conditions that are common for all Flow Entries |
| 48 | // |
| 49 | { |
| 50 | FlowEntryMatch match = new FlowEntryMatch(); |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 51 | String matchSrcMac = flowObj.getMatchSrcMac(); |
| 52 | if (matchSrcMac != null) |
| 53 | match.enableSrcMac(MACAddress.valueOf(matchSrcMac)); |
| 54 | String matchDstMac = flowObj.getMatchDstMac(); |
| 55 | if (matchDstMac != null) |
| 56 | match.enableDstMac(MACAddress.valueOf(matchDstMac)); |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 57 | Short matchEthernetFrameType = flowObj.getMatchEthernetFrameType(); |
| 58 | if (matchEthernetFrameType != null) |
| 59 | match.enableEthernetFrameType(matchEthernetFrameType); |
| 60 | Short matchVlanId = flowObj.getMatchVlanId(); |
| 61 | if (matchVlanId != null) |
| 62 | match.enableVlanId(matchVlanId); |
| 63 | Byte matchVlanPriority = flowObj.getMatchVlanPriority(); |
| 64 | if (matchVlanPriority != null) |
| 65 | match.enableVlanPriority(matchVlanPriority); |
| 66 | String matchSrcIPv4Net = flowObj.getMatchSrcIPv4Net(); |
| 67 | if (matchSrcIPv4Net != null) |
| 68 | match.enableSrcIPv4Net(new IPv4Net(matchSrcIPv4Net)); |
| 69 | String matchDstIPv4Net = flowObj.getMatchDstIPv4Net(); |
| 70 | if (matchDstIPv4Net != null) |
| 71 | match.enableDstIPv4Net(new IPv4Net(matchDstIPv4Net)); |
| 72 | Byte matchIpProto = flowObj.getMatchIpProto(); |
| 73 | if (matchIpProto != null) |
| 74 | match.enableIpProto(matchIpProto); |
| 75 | Byte matchIpToS = flowObj.getMatchIpToS(); |
| 76 | if (matchIpToS != null) |
| 77 | match.enableIpToS(matchIpToS); |
| 78 | Short matchSrcTcpUdpPort = flowObj.getMatchSrcTcpUdpPort(); |
| 79 | if (matchSrcTcpUdpPort != null) |
| 80 | match.enableSrcTcpUdpPort(matchSrcTcpUdpPort); |
| 81 | Short matchDstTcpUdpPort = flowObj.getMatchDstTcpUdpPort(); |
| 82 | if (matchDstTcpUdpPort != null) |
| 83 | match.enableDstTcpUdpPort(matchDstTcpUdpPort); |
| 84 | |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 85 | this.setFlowEntryMatch(match); |
| 86 | } |
Pankaj Berde | 6a97eb8 | 2013-03-28 12:12:43 -0700 | [diff] [blame] | 87 | |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 88 | // |
| 89 | // Extract the actions for the first Flow Entry |
| 90 | // |
| 91 | { |
| 92 | FlowEntryActions actions = new FlowEntryActions(); |
| 93 | |
| 94 | String actionsStr = flowObj.getActions(); |
| 95 | if (actions != null) |
| 96 | actions = new FlowEntryActions(actionsStr); |
| 97 | |
| 98 | this.setFlowEntryActions(actions); |
| 99 | } |
| 100 | |
Pankaj Berde | 6a97eb8 | 2013-03-28 12:12:43 -0700 | [diff] [blame] | 101 | // |
| 102 | // Extract all Flow Entries |
| 103 | // |
| 104 | Iterable<IFlowEntry> flowEntries = flowObj.getFlowEntries(); |
| 105 | for (IFlowEntry flowEntryObj : flowEntries) { |
| 106 | FlowEntry flowEntry = new FlowEntry(); |
| 107 | flowEntry.setFlowEntryId(new FlowEntryId(flowEntryObj.getFlowEntryId())); |
| 108 | flowEntry.setDpid(new Dpid(flowEntryObj.getSwitchDpid())); |
| 109 | |
| 110 | // |
| 111 | // Extract the match conditions |
| 112 | // |
| 113 | FlowEntryMatch match = new FlowEntryMatch(); |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 114 | // |
Pankaj Berde | 6a97eb8 | 2013-03-28 12:12:43 -0700 | [diff] [blame] | 115 | Short matchInPort = flowEntryObj.getMatchInPort(); |
| 116 | if (matchInPort != null) |
| 117 | match.enableInPort(new Port(matchInPort)); |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 118 | // |
Pankaj Berde | 6a97eb8 | 2013-03-28 12:12:43 -0700 | [diff] [blame] | 119 | String matchSrcMac = flowEntryObj.getMatchSrcMac(); |
| 120 | if (matchSrcMac != null) |
| 121 | match.enableSrcMac(MACAddress.valueOf(matchSrcMac)); |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 122 | // |
Pankaj Berde | 6a97eb8 | 2013-03-28 12:12:43 -0700 | [diff] [blame] | 123 | String matchDstMac = flowEntryObj.getMatchDstMac(); |
| 124 | if (matchDstMac != null) |
| 125 | match.enableDstMac(MACAddress.valueOf(matchDstMac)); |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 126 | // |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 127 | Short matchEthernetFrameType = flowEntryObj.getMatchEthernetFrameType(); |
| 128 | if (matchEthernetFrameType != null) |
| 129 | match.enableEthernetFrameType(matchEthernetFrameType); |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 130 | // |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 131 | Short matchVlanId = flowEntryObj.getMatchVlanId(); |
| 132 | if (matchVlanId != null) |
| 133 | match.enableVlanId(matchVlanId); |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 134 | // |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 135 | Byte matchVlanPriority = flowEntryObj.getMatchVlanPriority(); |
| 136 | if (matchVlanPriority != null) |
| 137 | match.enableVlanPriority(matchVlanPriority); |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 138 | // |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 139 | String matchSrcIPv4Net = flowEntryObj.getMatchSrcIPv4Net(); |
| 140 | if (matchSrcIPv4Net != null) |
| 141 | match.enableSrcIPv4Net(new IPv4Net(matchSrcIPv4Net)); |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 142 | // |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 143 | String matchDstIPv4Net = flowEntryObj.getMatchDstIPv4Net(); |
| 144 | if (matchDstIPv4Net != null) |
| 145 | match.enableDstIPv4Net(new IPv4Net(matchDstIPv4Net)); |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 146 | // |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 147 | Byte matchIpProto = flowEntryObj.getMatchIpProto(); |
| 148 | if (matchIpProto != null) |
| 149 | match.enableIpProto(matchIpProto); |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 150 | // |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 151 | Byte matchIpToS = flowEntryObj.getMatchIpToS(); |
| 152 | if (matchIpToS != null) |
| 153 | match.enableIpToS(matchIpToS); |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 154 | // |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 155 | Short matchSrcTcpUdpPort = flowEntryObj.getMatchSrcTcpUdpPort(); |
| 156 | if (matchSrcTcpUdpPort != null) |
| 157 | match.enableSrcTcpUdpPort(matchSrcTcpUdpPort); |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 158 | // |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 159 | Short matchDstTcpUdpPort = flowEntryObj.getMatchDstTcpUdpPort(); |
| 160 | if (matchDstTcpUdpPort != null) |
| 161 | match.enableDstTcpUdpPort(matchDstTcpUdpPort); |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 162 | // |
Pankaj Berde | 6a97eb8 | 2013-03-28 12:12:43 -0700 | [diff] [blame] | 163 | flowEntry.setFlowEntryMatch(match); |
| 164 | |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 165 | // |
| 166 | // Extract the actions |
| 167 | // |
| 168 | { |
| 169 | FlowEntryActions actions = new FlowEntryActions(); |
| 170 | |
| 171 | String actionsStr = flowObj.getActions(); |
| 172 | if (actions != null) |
| 173 | actions = new FlowEntryActions(actionsStr); |
| 174 | |
| 175 | flowEntry.setFlowEntryActions(actions); |
| 176 | } |
Pankaj Berde | 6a97eb8 | 2013-03-28 12:12:43 -0700 | [diff] [blame] | 177 | |
| 178 | String userState = flowEntryObj.getUserState(); |
| 179 | flowEntry.setFlowEntryUserState(FlowEntryUserState.valueOf(userState)); |
| 180 | String switchState = flowEntryObj.getSwitchState(); |
| 181 | flowEntry.setFlowEntrySwitchState(FlowEntrySwitchState.valueOf(switchState)); |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 182 | // |
| 183 | // TODO: Take care of the FlowEntryErrorState. |
| 184 | // |
Pankaj Berde | 6a97eb8 | 2013-03-28 12:12:43 -0700 | [diff] [blame] | 185 | this.dataPath().flowEntries().add(flowEntry); |
| 186 | } |
| 187 | } |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 188 | |
| 189 | /** |
| 190 | * Get the flow path Flow ID. |
| 191 | * |
| 192 | * @return the flow path Flow ID. |
| 193 | */ |
Pavlin Radoslavov | 2013cbb | 2013-02-26 10:15:18 -0800 | [diff] [blame] | 194 | @JsonProperty("flowId") |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 195 | public FlowId flowId() { return flowId; } |
| 196 | |
| 197 | /** |
| 198 | * Set the flow path Flow ID. |
| 199 | * |
| 200 | * @param flowId the flow path Flow ID to set. |
| 201 | */ |
Pavlin Radoslavov | 2013cbb | 2013-02-26 10:15:18 -0800 | [diff] [blame] | 202 | @JsonProperty("flowId") |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 203 | public void setFlowId(FlowId flowId) { |
| 204 | this.flowId = flowId; |
| 205 | } |
| 206 | |
| 207 | /** |
| 208 | * Get the Caller ID of the flow path installer. |
| 209 | * |
| 210 | * @return the Caller ID of the flow path installer. |
| 211 | */ |
Pavlin Radoslavov | 2013cbb | 2013-02-26 10:15:18 -0800 | [diff] [blame] | 212 | @JsonProperty("installerId") |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 213 | public CallerId installerId() { return installerId; } |
| 214 | |
| 215 | /** |
| 216 | * Set the Caller ID of the flow path installer. |
| 217 | * |
| 218 | * @param installerId the Caller ID of the flow path installer. |
| 219 | */ |
Pavlin Radoslavov | 2013cbb | 2013-02-26 10:15:18 -0800 | [diff] [blame] | 220 | @JsonProperty("installerId") |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 221 | public void setInstallerId(CallerId installerId) { |
| 222 | this.installerId = installerId; |
| 223 | } |
| 224 | |
| 225 | /** |
Pavlin Radoslavov | 204b286 | 2013-07-12 14:15:36 -0700 | [diff] [blame] | 226 | * Get the flow path flags. |
| 227 | * |
| 228 | * @return the flow path flags. |
| 229 | */ |
| 230 | @JsonProperty("flowPathFlags") |
| 231 | public FlowPathFlags flowPathFlags() { return flowPathFlags; } |
| 232 | |
| 233 | /** |
| 234 | * Set the flow path flags. |
| 235 | * |
| 236 | * @param flowPathFlags the flow path flags to set. |
| 237 | */ |
| 238 | @JsonProperty("flowPathFlags") |
| 239 | public void setFlowPathFlags(FlowPathFlags flowPathFlags) { |
| 240 | this.flowPathFlags = flowPathFlags; |
| 241 | } |
| 242 | |
| 243 | /** |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 244 | * Get the flow path's data path. |
| 245 | * |
| 246 | * @return the flow path's data path. |
| 247 | */ |
Pavlin Radoslavov | 2013cbb | 2013-02-26 10:15:18 -0800 | [diff] [blame] | 248 | @JsonProperty("dataPath") |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 249 | public DataPath dataPath() { return dataPath; } |
| 250 | |
| 251 | /** |
| 252 | * Set the flow path's data path. |
| 253 | * |
| 254 | * @param dataPath the flow path's data path to set. |
| 255 | */ |
Pavlin Radoslavov | 2013cbb | 2013-02-26 10:15:18 -0800 | [diff] [blame] | 256 | @JsonProperty("dataPath") |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 257 | public void setDataPath(DataPath dataPath) { |
| 258 | this.dataPath = dataPath; |
| 259 | } |
| 260 | |
| 261 | /** |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 262 | * Get the flow path's match conditions common for all Flow Entries. |
| 263 | * |
| 264 | * @return the flow path's match conditions common for all Flow Entries. |
| 265 | */ |
| 266 | @JsonProperty("flowEntryMatch") |
| 267 | public FlowEntryMatch flowEntryMatch() { return flowEntryMatch; } |
| 268 | |
| 269 | /** |
| 270 | * Set the flow path's match conditions common for all Flow Entries. |
| 271 | * |
| 272 | * @param flowEntryMatch the flow path's match conditions common for all |
| 273 | * Flow Entries. |
| 274 | */ |
| 275 | @JsonProperty("flowEntryMatch") |
| 276 | public void setFlowEntryMatch(FlowEntryMatch flowEntryMatch) { |
| 277 | this.flowEntryMatch = flowEntryMatch; |
| 278 | } |
| 279 | |
| 280 | /** |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 281 | * Get the flow path's flow entry actions for the first Flow Entry. |
| 282 | * |
| 283 | * @return the flow path's flow entry actions for the first Flow Entry. |
| 284 | */ |
| 285 | @JsonProperty("flowEntryActions") |
| 286 | public FlowEntryActions flowEntryActions() { |
| 287 | return flowEntryActions; |
| 288 | } |
| 289 | |
| 290 | /** |
| 291 | * Set the flow path's flow entry actions for the first Flow Entry. |
| 292 | * |
| 293 | * @param flowEntryActions the flow path's flow entry actions for the first |
| 294 | * Flow Entry. |
| 295 | */ |
| 296 | @JsonProperty("flowEntryActions") |
| 297 | public void setFlowEntryActions(FlowEntryActions flowEntryActions) { |
| 298 | this.flowEntryActions = flowEntryActions; |
| 299 | } |
| 300 | |
| 301 | /** |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 302 | * Convert the flow path to a string. |
| 303 | * |
Pavlin Radoslavov | a10a9a8 | 2013-02-22 11:47:54 -0800 | [diff] [blame] | 304 | * The string has the following form: |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 305 | * [flowId=XXX installerId=XXX flowPathFlags=XXX dataPath=XXX |
| 306 | * flowEntryMatch=XXX flowEntryActions=XXX] |
Pavlin Radoslavov | a10a9a8 | 2013-02-22 11:47:54 -0800 | [diff] [blame] | 307 | * |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 308 | * @return the flow path as a string. |
| 309 | */ |
| 310 | @Override |
| 311 | public String toString() { |
Pavlin Radoslavov | a10a9a8 | 2013-02-22 11:47:54 -0800 | [diff] [blame] | 312 | String ret = "[flowId=" + this.flowId.toString(); |
| 313 | ret += " installerId=" + this.installerId.toString(); |
Pavlin Radoslavov | 204b286 | 2013-07-12 14:15:36 -0700 | [diff] [blame] | 314 | ret += " flowPathFlags=" + this.flowPathFlags.toString(); |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 315 | if (dataPath != null) |
| 316 | ret += " dataPath=" + this.dataPath.toString(); |
| 317 | if (flowEntryMatch != null) |
| 318 | ret += " flowEntryMatch=" + this.flowEntryMatch.toString(); |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame^] | 319 | if (flowEntryActions != null) |
| 320 | ret += " flowEntryActions=" + this.flowEntryActions.toString(); |
Pavlin Radoslavov | a10a9a8 | 2013-02-22 11:47:54 -0800 | [diff] [blame] | 321 | ret += "]"; |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 322 | return ret; |
| 323 | } |
Umesh Krishnaswamy | 57a32a9 | 2013-03-21 14:21:15 -0700 | [diff] [blame] | 324 | |
| 325 | /** |
| 326 | * CompareTo method to order flowPath by Id |
| 327 | */ |
| 328 | @Override |
| 329 | public int compareTo(FlowPath f) { |
| 330 | return (int) (this.flowId.value() - f.flowId.value()); |
| 331 | } |
Pavlin Radoslavov | 5363c2a | 2013-02-18 09:55:42 -0800 | [diff] [blame] | 332 | } |