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