HIGUCHI Yuta | 2051490 | 2013-06-12 11:24:16 -0700 | [diff] [blame] | 1 | package net.onrc.onos.ofcontroller.core; |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 2 | |
HIGUCHI Yuta | 60a1014 | 2013-06-14 15:50:10 -0700 | [diff] [blame] | 3 | import net.onrc.onos.ofcontroller.flowmanager.web.DatapathSummarySerializer; |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 4 | |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 5 | import org.codehaus.jackson.annotate.JsonIgnore; |
| 6 | import org.codehaus.jackson.annotate.JsonProperty; |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 7 | import org.codehaus.jackson.map.annotate.JsonSerialize; |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 8 | |
| 9 | import com.tinkerpop.blueprints.Direction; |
| 10 | import com.tinkerpop.frames.Adjacency; |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 11 | import com.tinkerpop.frames.Property; |
| 12 | import com.tinkerpop.frames.annotations.gremlin.GremlinGroovy; |
Pankaj Berde | f2f2f03 | 2013-06-10 21:08:14 -0700 | [diff] [blame] | 13 | import com.tinkerpop.frames.annotations.gremlin.GremlinParam; |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 14 | import com.tinkerpop.frames.VertexFrame; |
| 15 | |
Teru | 68076a4 | 2013-06-27 14:57:49 -0700 | [diff] [blame] | 16 | /* |
| 17 | * This is the interfaces to make the objects for Cassandra DB. |
| 18 | * They are interfaces, but it is also implementation, |
| 19 | * so this handles various control to the objects. |
| 20 | * Please take a look at tinkerpop/frames annotation doc to understand more. |
| 21 | */ |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 22 | public interface INetMapTopologyObjects { |
| 23 | |
| 24 | public interface IBaseObject extends VertexFrame { |
| 25 | |
| 26 | @JsonProperty("state") |
| 27 | @Property("state") |
| 28 | public String getState(); |
Pankaj Berde | 1cde50b | 2013-02-19 20:16:06 -0800 | [diff] [blame] | 29 | |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 30 | @Property("state") |
| 31 | public void setState(final String state); |
| 32 | |
| 33 | @JsonIgnore |
| 34 | @Property("type") |
| 35 | public String getType(); |
| 36 | @Property("type") |
| 37 | public void setType(final String type); |
| 38 | |
| 39 | } |
| 40 | |
| 41 | public interface ISwitchObject extends IBaseObject{ |
| 42 | |
| 43 | @JsonProperty("dpid") |
| 44 | @Property("dpid") |
| 45 | public String getDPID(); |
| 46 | |
| 47 | @Property("dpid") |
| 48 | public void setDPID(String dpid); |
| 49 | |
| 50 | @JsonProperty("ports") |
| 51 | @Adjacency(label="on") |
| 52 | public Iterable<IPortObject> getPorts(); |
Pankaj Berde | 6201614 | 2013-04-09 15:35:50 -0700 | [diff] [blame] | 53 | |
| 54 | // Requires Frames 2.3.0 |
Pankaj Berde | f2f2f03 | 2013-06-10 21:08:14 -0700 | [diff] [blame] | 55 | @JsonIgnore |
Toshio Koide | 46dec82 | 2013-06-17 14:21:16 -0700 | [diff] [blame] | 56 | @GremlinGroovy("it.out('on').has('number',port_num)") |
Pankaj Berde | f2f2f03 | 2013-06-10 21:08:14 -0700 | [diff] [blame] | 57 | public IPortObject getPort(@GremlinParam("port_num") final short port_num); |
Pankaj Berde | da80957 | 2013-02-22 15:31:20 -0800 | [diff] [blame] | 58 | |
| 59 | @Adjacency(label="on") |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 60 | public void addPort(final IPortObject port); |
| 61 | |
| 62 | @Adjacency(label="on") |
| 63 | public void removePort(final IPortObject port); |
| 64 | |
| 65 | @JsonIgnore |
Toshio Koide | 46dec82 | 2013-06-17 14:21:16 -0700 | [diff] [blame] | 66 | @GremlinGroovy("it.out('on').out('host')") |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 67 | public Iterable<IDeviceObject> getDevices(); |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 68 | |
| 69 | @JsonIgnore |
Teru | 68076a4 | 2013-06-27 14:57:49 -0700 | [diff] [blame] | 70 | @Adjacency(label="switch",direction = Direction.IN) |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 71 | public Iterable<IFlowEntry> getFlowEntries(); |
Pankaj Berde | f2f2f03 | 2013-06-10 21:08:14 -0700 | [diff] [blame] | 72 | |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 73 | } |
| 74 | |
| 75 | public interface IPortObject extends IBaseObject{ |
| 76 | |
| 77 | @JsonProperty("number") |
| 78 | @Property("number") |
| 79 | public Short getNumber(); |
| 80 | |
Pankaj Berde | bbd3861 | 2013-06-22 05:59:12 -0700 | [diff] [blame] | 81 | @JsonIgnore |
| 82 | @Property("port_id") |
| 83 | public void setPortId(String id); |
| 84 | |
| 85 | @JsonIgnore |
| 86 | @Property("port_id") |
| 87 | public String getPortId(); |
| 88 | |
Pankaj Berde | 1519309 | 2013-03-21 17:30:14 -0700 | [diff] [blame] | 89 | @Property("number") |
| 90 | public void setNumber(Short n); |
| 91 | |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 92 | @JsonProperty("desc") |
| 93 | @Property("desc") |
| 94 | public String getDesc(); |
| 95 | |
Pankaj Berde | 1519309 | 2013-03-21 17:30:14 -0700 | [diff] [blame] | 96 | @Property("desc") |
| 97 | public void setDesc(String s); |
| 98 | |
| 99 | @JsonIgnore |
Pankaj Berde | f1404a7 | 2013-04-03 11:50:07 -0700 | [diff] [blame] | 100 | @Property("port_state") |
Pankaj Berde | 1519309 | 2013-03-21 17:30:14 -0700 | [diff] [blame] | 101 | public Integer getPortState(); |
| 102 | |
| 103 | @Property("port_state") |
| 104 | public void setPortState(Integer s); |
| 105 | |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 106 | @JsonIgnore |
Toshio Koide | 2bab79f | 2013-06-17 14:29:15 -0700 | [diff] [blame] | 107 | // @GremlinGroovy("it.in('on')") |
Teru | 87cd2da | 2013-06-15 20:33:08 -0700 | [diff] [blame] | 108 | @Adjacency(label="on",direction = Direction.IN) |
Teru | 80f7513 | 2013-06-16 05:16:32 -0700 | [diff] [blame] | 109 | public ISwitchObject getSwitch(); |
Pankaj Berde | a6b80c3 | 2013-03-29 09:02:56 -0700 | [diff] [blame] | 110 | |
Pankaj Berde | ac1a8c3 | 2013-02-26 17:45:57 -0800 | [diff] [blame] | 111 | @JsonProperty("devices") |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 112 | @Adjacency(label="host") |
| 113 | public Iterable<IDeviceObject> getDevices(); |
| 114 | |
| 115 | @Adjacency(label="host") |
| 116 | public void setDevice(final IDeviceObject device); |
| 117 | |
| 118 | @Adjacency(label="host") |
| 119 | public void removeDevice(final IDeviceObject device); |
| 120 | |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 121 | @JsonIgnore |
Teru | 68076a4 | 2013-06-27 14:57:49 -0700 | [diff] [blame] | 122 | @Adjacency(label="inport",direction = Direction.IN) |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 123 | public Iterable<IFlowEntry> getInFlowEntries(); |
| 124 | |
| 125 | @JsonIgnore |
Teru | 68076a4 | 2013-06-27 14:57:49 -0700 | [diff] [blame] | 126 | @Adjacency(label="outport",direction = Direction.IN) |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 127 | public Iterable<IFlowEntry> getOutFlowEntries(); |
| 128 | |
Pankaj Berde | 5fb2763 | 2013-04-05 08:56:12 -0700 | [diff] [blame] | 129 | @JsonIgnore |
| 130 | @Adjacency(label="link") |
| 131 | public Iterable<IPortObject> getLinkedPorts(); |
| 132 | |
Pankaj Berde | a6b80c3 | 2013-03-29 09:02:56 -0700 | [diff] [blame] | 133 | @Adjacency(label="link") |
| 134 | public void removeLink(final IPortObject dest_port); |
| 135 | |
Pankaj Berde | 5fb2763 | 2013-04-05 08:56:12 -0700 | [diff] [blame] | 136 | @Adjacency(label="link") |
| 137 | public void setLinkPort(final IPortObject dest_port); |
| 138 | |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 139 | // @JsonIgnore |
| 140 | // @Adjacency(label="link") |
| 141 | // public Iterable<ILinkObject> getLinks(); |
| 142 | } |
| 143 | |
| 144 | public interface IDeviceObject extends IBaseObject { |
| 145 | |
| 146 | @JsonProperty("mac") |
| 147 | @Property("dl_addr") |
| 148 | public String getMACAddress(); |
| 149 | @Property("dl_addr") |
Pankaj Berde | 2497e54 | 2013-02-19 18:51:24 -0800 | [diff] [blame] | 150 | public void setMACAddress(String macaddr); |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 151 | |
| 152 | @JsonProperty("ipv4") |
| 153 | @Property("nw_addr") |
| 154 | public String getIPAddress(); |
Teru | 87cd2da | 2013-06-15 20:33:08 -0700 | [diff] [blame] | 155 | @Property("nw_addr") |
Pankaj Berde | 2497e54 | 2013-02-19 18:51:24 -0800 | [diff] [blame] | 156 | public void setIPAddress(String ipaddr); |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 157 | |
| 158 | @JsonIgnore |
Teru | 87cd2da | 2013-06-15 20:33:08 -0700 | [diff] [blame] | 159 | @Adjacency(label="host",direction = Direction.IN) |
Pankaj Berde | 2497e54 | 2013-02-19 18:51:24 -0800 | [diff] [blame] | 160 | public Iterable<IPortObject> getAttachedPorts(); |
| 161 | |
| 162 | @JsonIgnore |
Teru | 68076a4 | 2013-06-27 14:57:49 -0700 | [diff] [blame] | 163 | @Adjacency(label="host",direction=Direction.IN) |
Pankaj Berde | 2497e54 | 2013-02-19 18:51:24 -0800 | [diff] [blame] | 164 | public void setHostPort(final IPortObject port); |
| 165 | |
| 166 | @JsonIgnore |
Teru | 68076a4 | 2013-06-27 14:57:49 -0700 | [diff] [blame] | 167 | @Adjacency(label="host",direction=Direction.IN) |
Pankaj Berde | 2497e54 | 2013-02-19 18:51:24 -0800 | [diff] [blame] | 168 | public void removeHostPort(final IPortObject port); |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 169 | |
| 170 | @JsonIgnore |
Toshio Koide | 1326010 | 2013-06-17 13:44:27 -0700 | [diff] [blame] | 171 | @GremlinGroovy("it.in('host').in('on')") |
Pankaj Berde | 2497e54 | 2013-02-19 18:51:24 -0800 | [diff] [blame] | 172 | public Iterable<ISwitchObject> getSwitch(); |
| 173 | |
Pankaj Berde | ac1a8c3 | 2013-02-26 17:45:57 -0800 | [diff] [blame] | 174 | /* @JsonProperty("dpid") |
| 175 | @GremlinGroovy("_().in('host').in('on').next().getProperty('dpid')") |
| 176 | public Iterable<String> getSwitchDPID(); |
| 177 | |
| 178 | @JsonProperty("number") |
| 179 | @GremlinGroovy("_().in('host').transform{it.number}") |
| 180 | public Iterable<Short> getPortNumber(); |
| 181 | |
Pankaj Berde | 2497e54 | 2013-02-19 18:51:24 -0800 | [diff] [blame] | 182 | @JsonProperty("AttachmentPoint") |
| 183 | @GremlinGroovy("_().in('host').in('on').path(){it.number}{it.dpid}") |
Pankaj Berde | ac1a8c3 | 2013-02-26 17:45:57 -0800 | [diff] [blame] | 184 | public Iterable<SwitchPort> getAttachmentPoints();*/ |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 185 | } |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 186 | |
| 187 | public interface IFlowPath extends IBaseObject { |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 188 | @JsonProperty("flowId") |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 189 | @Property("flow_id") |
| 190 | public String getFlowId(); |
| 191 | |
| 192 | @Property("flow_id") |
| 193 | public void setFlowId(String flowId); |
| 194 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 195 | @JsonProperty("installerId") |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 196 | @Property("installer_id") |
| 197 | public String getInstallerId(); |
| 198 | |
| 199 | @Property("installer_id") |
| 200 | public void setInstallerId(String installerId); |
| 201 | |
Pavlin Radoslavov | d28cf7c | 2013-10-26 11:27:43 -0700 | [diff] [blame] | 202 | @JsonProperty("flowPathType") |
| 203 | @Property("flow_path_type") |
| 204 | public String getFlowPathType(); |
| 205 | |
| 206 | @Property("flow_path_type") |
| 207 | public void setFlowPathType(String flowPathType); |
| 208 | |
Pavlin Radoslavov | 7d4a40e | 2013-10-27 23:39:40 -0700 | [diff] [blame] | 209 | @JsonProperty("flowPathUserState") |
| 210 | @Property("user_state") |
| 211 | public String getFlowPathUserState(); |
| 212 | |
| 213 | @Property("user_state") |
| 214 | public void setFlowPathUserState(String userState); |
| 215 | |
Pavlin Radoslavov | 204b286 | 2013-07-12 14:15:36 -0700 | [diff] [blame] | 216 | @JsonProperty("flowPathFlags") |
| 217 | @Property("flow_path_flags") |
| 218 | public Long getFlowPathFlags(); |
| 219 | |
| 220 | @Property("flow_path_flags") |
| 221 | public void setFlowPathFlags(Long flowPathFlags); |
| 222 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 223 | @JsonProperty("srcDpid") |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 224 | @Property("src_switch") |
| 225 | public String getSrcSwitch(); |
| 226 | |
| 227 | @Property("src_switch") |
| 228 | public void setSrcSwitch(String srcSwitch); |
| 229 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 230 | @JsonProperty("srcPort") |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 231 | @Property("src_port") |
| 232 | public Short getSrcPort(); |
| 233 | |
| 234 | @Property("src_port") |
| 235 | public void setSrcPort(Short srcPort); |
| 236 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 237 | @JsonProperty("dstDpid") |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 238 | @Property("dst_switch") |
| 239 | public String getDstSwitch(); |
| 240 | |
| 241 | @Property("dst_switch") |
| 242 | public void setDstSwitch(String dstSwitch); |
| 243 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 244 | @JsonProperty("dstPort") |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 245 | @Property("dst_port") |
| 246 | public Short getDstPort(); |
| 247 | |
| 248 | @Property("dst_port") |
| 249 | public void setDstPort(Short dstPort); |
| 250 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 251 | @JsonProperty("dataPath") |
| 252 | @JsonSerialize(using=DatapathSummarySerializer.class) |
Pavlin Radoslavov | dbaaf2e | 2013-03-29 04:25:55 -0700 | [diff] [blame] | 253 | @Property("data_path_summary") |
| 254 | public String getDataPathSummary(); |
| 255 | |
| 256 | @Property("data_path_summary") |
| 257 | public void setDataPathSummary(String dataPathSummary); |
| 258 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 259 | @JsonIgnore |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 260 | @Adjacency(label="flow", direction=Direction.IN) |
| 261 | public Iterable<IFlowEntry> getFlowEntries(); |
| 262 | |
| 263 | @Adjacency(label="flow", direction=Direction.IN) |
| 264 | public void addFlowEntry(final IFlowEntry flowEntry); |
| 265 | |
| 266 | @Adjacency(label="flow", direction=Direction.IN) |
| 267 | public void removeFlowEntry(final IFlowEntry flowEntry); |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 268 | |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 269 | // |
| 270 | // Matching fields |
| 271 | // |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 272 | @JsonIgnore |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 273 | @Property("matchSrcMac") |
| 274 | public String getMatchSrcMac(); |
| 275 | |
| 276 | @Property("matchSrcMac") |
| 277 | public void setMatchSrcMac(String matchSrcMac); |
| 278 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 279 | @JsonIgnore |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 280 | @Property("matchDstMac") |
| 281 | public String getMatchDstMac(); |
| 282 | |
| 283 | @Property("matchDstMac") |
| 284 | public void setMatchDstMac(String matchDstMac); |
| 285 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 286 | @JsonIgnore |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 287 | @Property("matchEthernetFrameType") |
| 288 | public Short getMatchEthernetFrameType(); |
| 289 | |
| 290 | @Property("matchEthernetFrameType") |
| 291 | public void setMatchEthernetFrameType(Short matchEthernetFrameType); |
| 292 | |
| 293 | @JsonIgnore |
| 294 | @Property("matchVlanId") |
| 295 | public Short getMatchVlanId(); |
| 296 | |
| 297 | @Property("matchVlanId") |
| 298 | public void setMatchVlanId(Short matchVlanId); |
| 299 | |
| 300 | @JsonIgnore |
| 301 | @Property("matchVlanPriority") |
| 302 | public Byte getMatchVlanPriority(); |
| 303 | |
| 304 | @Property("matchVlanPriority") |
| 305 | public void setMatchVlanPriority(Byte matchVlanPriority); |
| 306 | |
| 307 | @JsonIgnore |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 308 | @Property("matchSrcIPv4Net") |
| 309 | public String getMatchSrcIPv4Net(); |
| 310 | |
| 311 | @Property("matchSrcIPv4Net") |
| 312 | public void setMatchSrcIPv4Net(String matchSrcIPv4Net); |
| 313 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 314 | @JsonIgnore |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 315 | @Property("matchDstIPv4Net") |
| 316 | public String getMatchDstIPv4Net(); |
| 317 | |
| 318 | @Property("matchDstIPv4Net") |
| 319 | public void setMatchDstIPv4Net(String matchDstIPv4Net); |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 320 | |
| 321 | @JsonIgnore |
| 322 | @Property("matchIpProto") |
| 323 | public Byte getMatchIpProto(); |
| 324 | |
| 325 | @Property("matchIpProto") |
| 326 | public void setMatchIpProto(Byte matchIpProto); |
| 327 | |
| 328 | @JsonIgnore |
| 329 | @Property("matchIpToS") |
| 330 | public Byte getMatchIpToS(); |
| 331 | |
| 332 | @Property("matchIpToS") |
| 333 | public void setMatchIpToS(Byte matchIpToS); |
| 334 | |
| 335 | @JsonIgnore |
| 336 | @Property("matchSrcTcpUdpPort") |
| 337 | public Short getMatchSrcTcpUdpPort(); |
| 338 | |
| 339 | @Property("matchSrcTcpUdpPort") |
| 340 | public void setMatchSrcTcpUdpPort(Short matchSrcTcpUdpPort); |
| 341 | |
| 342 | @JsonIgnore |
| 343 | @Property("matchDstTcpUdpPort") |
| 344 | public Short getMatchDstTcpUdpPort(); |
| 345 | |
| 346 | @Property("matchDstTcpUdpPort") |
| 347 | public void setMatchDstTcpUdpPort(Short matchDstTcpUdpPort); |
| 348 | |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 349 | // |
| 350 | // Action-related fields |
| 351 | // |
| 352 | @Property("actions") |
| 353 | public String getActions(); |
| 354 | |
| 355 | @Property("actions") |
| 356 | public void setActions(String actionsStr); |
| 357 | |
| 358 | // |
| 359 | // Other fields |
| 360 | // |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 361 | @JsonIgnore |
Toshio Koide | 1326010 | 2013-06-17 13:44:27 -0700 | [diff] [blame] | 362 | @GremlinGroovy("it.in('flow').out('switch')") |
Pankaj Berde | f1404a7 | 2013-04-03 11:50:07 -0700 | [diff] [blame] | 363 | public Iterable<ISwitchObject> getSwitches(); |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 364 | |
| 365 | @JsonIgnore |
| 366 | @Property("state") |
| 367 | public String getState(); |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 368 | } |
| 369 | |
| 370 | public interface IFlowEntry extends IBaseObject { |
| 371 | @Property("flow_entry_id") |
| 372 | public String getFlowEntryId(); |
| 373 | |
| 374 | @Property("flow_entry_id") |
| 375 | public void setFlowEntryId(String flowEntryId); |
| 376 | |
| 377 | @Property("switch_dpid") |
| 378 | public String getSwitchDpid(); |
| 379 | |
| 380 | @Property("switch_dpid") |
| 381 | public void setSwitchDpid(String switchDpid); |
| 382 | |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 383 | @Property("user_state") |
| 384 | public String getUserState(); |
| 385 | |
| 386 | @Property("user_state") |
| 387 | public void setUserState(String userState); |
| 388 | |
| 389 | @Property("switch_state") |
| 390 | public String getSwitchState(); |
| 391 | |
| 392 | @Property("switch_state") |
| 393 | public void setSwitchState(String switchState); |
| 394 | |
| 395 | @Property("error_state_type") |
| 396 | public String getErrorStateType(); |
| 397 | |
| 398 | @Property("error_state_type") |
| 399 | public void setErrorStateType(String errorStateType); |
| 400 | |
| 401 | @Property("error_state_code") |
| 402 | public String getErrorStateCode(); |
| 403 | |
| 404 | @Property("error_state_code") |
| 405 | public void setErrorStateCode(String errorStateCode); |
Pavlin Radoslavov | e2f0de8 | 2013-03-12 01:39:30 -0700 | [diff] [blame] | 406 | |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 407 | // |
| 408 | // Matching fields |
| 409 | // |
Pavlin Radoslavov | e2f0de8 | 2013-03-12 01:39:30 -0700 | [diff] [blame] | 410 | @Property("matchInPort") |
| 411 | public Short getMatchInPort(); |
| 412 | |
| 413 | @Property("matchInPort") |
| 414 | public void setMatchInPort(Short matchInPort); |
| 415 | |
Pavlin Radoslavov | e2f0de8 | 2013-03-12 01:39:30 -0700 | [diff] [blame] | 416 | @Property("matchSrcMac") |
| 417 | public String getMatchSrcMac(); |
| 418 | |
| 419 | @Property("matchSrcMac") |
| 420 | public void setMatchSrcMac(String matchSrcMac); |
| 421 | |
| 422 | @Property("matchDstMac") |
| 423 | public String getMatchDstMac(); |
| 424 | |
| 425 | @Property("matchDstMac") |
| 426 | public void setMatchDstMac(String matchDstMac); |
| 427 | |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 428 | @Property("matchEthernetFrameType") |
| 429 | public Short getMatchEthernetFrameType(); |
| 430 | |
| 431 | @Property("matchEthernetFrameType") |
| 432 | public void setMatchEthernetFrameType(Short matchEthernetFrameType); |
| 433 | |
| 434 | @Property("matchVlanId") |
| 435 | public Short getMatchVlanId(); |
| 436 | |
| 437 | @Property("matchVlanId") |
| 438 | public void setMatchVlanId(Short matchVlanId); |
| 439 | |
| 440 | @Property("matchVlanPriority") |
| 441 | public Byte getMatchVlanPriority(); |
| 442 | |
| 443 | @Property("matchVlanPriority") |
| 444 | public void setMatchVlanPriority(Byte matchVlanPriority); |
| 445 | |
Pavlin Radoslavov | e2f0de8 | 2013-03-12 01:39:30 -0700 | [diff] [blame] | 446 | @Property("matchSrcIPv4Net") |
| 447 | public String getMatchSrcIPv4Net(); |
| 448 | |
| 449 | @Property("matchSrcIPv4Net") |
| 450 | public void setMatchSrcIPv4Net(String matchSrcIPv4Net); |
| 451 | |
| 452 | @Property("matchDstIPv4Net") |
| 453 | public String getMatchDstIPv4Net(); |
| 454 | |
| 455 | @Property("matchDstIPv4Net") |
| 456 | public void setMatchDstIPv4Net(String matchDstIPv4Net); |
| 457 | |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 458 | @Property("matchIpProto") |
| 459 | public Byte getMatchIpProto(); |
| 460 | |
| 461 | @Property("matchIpProto") |
| 462 | public void setMatchIpProto(Byte matchIpProto); |
| 463 | |
| 464 | @Property("matchIpToS") |
| 465 | public Byte getMatchIpToS(); |
| 466 | |
| 467 | @Property("matchIpToS") |
| 468 | public void setMatchIpToS(Byte matchIpToS); |
| 469 | |
| 470 | @Property("matchSrcTcpUdpPort") |
| 471 | public Short getMatchSrcTcpUdpPort(); |
| 472 | |
| 473 | @Property("matchSrcTcpUdpPort") |
| 474 | public void setMatchSrcTcpUdpPort(Short matchSrcTcpUdpPort); |
| 475 | |
| 476 | @Property("matchDstTcpUdpPort") |
| 477 | public Short getMatchDstTcpUdpPort(); |
| 478 | |
| 479 | @Property("matchDstTcpUdpPort") |
| 480 | public void setMatchDstTcpUdpPort(Short matchDstTcpUdpPort); |
| 481 | |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 482 | // |
| 483 | // Action-related fields |
| 484 | // |
Pavlin Radoslavov | c1bafd1 | 2013-07-12 17:00:35 -0700 | [diff] [blame] | 485 | @Property("actionOutputPort") |
| 486 | public Short getActionOutputPort(); |
Pavlin Radoslavov | e2f0de8 | 2013-03-12 01:39:30 -0700 | [diff] [blame] | 487 | |
Pavlin Radoslavov | c1bafd1 | 2013-07-12 17:00:35 -0700 | [diff] [blame] | 488 | @Property("actionOutputPort") |
| 489 | public void setActionOutputPort(Short actionOutputPort); |
Pavlin Radoslavov | 1d4a107 | 2013-03-28 05:29:49 -0700 | [diff] [blame] | 490 | |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 491 | @Property("actions") |
| 492 | public String getActions(); |
| 493 | |
| 494 | @Property("actions") |
| 495 | public void setActions(String actionsStr); |
| 496 | |
| 497 | // |
| 498 | // Other fields |
| 499 | // |
Pavlin Radoslavov | 1d4a107 | 2013-03-28 05:29:49 -0700 | [diff] [blame] | 500 | @Adjacency(label="flow") |
| 501 | public IFlowPath getFlow(); |
| 502 | |
| 503 | @Adjacency(label="flow") |
| 504 | public void setFlow(IFlowPath flow); |
| 505 | |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 506 | @Adjacency(label="switch") |
| 507 | public ISwitchObject getSwitch(); |
Pavlin Radoslavov | 1d4a107 | 2013-03-28 05:29:49 -0700 | [diff] [blame] | 508 | |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 509 | @Adjacency(label="switch") |
| 510 | public void setSwitch(ISwitchObject sw); |
Pavlin Radoslavov | 1d4a107 | 2013-03-28 05:29:49 -0700 | [diff] [blame] | 511 | |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 512 | @Adjacency(label="inport") |
| 513 | public IPortObject getInPort(); |
Pavlin Radoslavov | 1d4a107 | 2013-03-28 05:29:49 -0700 | [diff] [blame] | 514 | |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 515 | @Adjacency(label="inport") |
| 516 | public void setInPort(IPortObject port); |
Pavlin Radoslavov | 1d4a107 | 2013-03-28 05:29:49 -0700 | [diff] [blame] | 517 | |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 518 | @Adjacency(label="outport") |
| 519 | public IPortObject getOutPort(); |
Pavlin Radoslavov | 1d4a107 | 2013-03-28 05:29:49 -0700 | [diff] [blame] | 520 | |
Pavlin Radoslavov | 4fead9c | 2013-03-28 03:09:27 -0700 | [diff] [blame] | 521 | @Adjacency(label="outport") |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 522 | public void setOutPort(IPortObject port); |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 523 | } |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 524 | } |