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(); |
Pavlin Radoslavov | c934b4a | 2013-11-02 14:53:52 -0700 | [diff] [blame^] | 132 | |
| 133 | @JsonIgnore |
| 134 | @Adjacency(label="link",direction = Direction.IN) |
| 135 | public Iterable<IPortObject> getReverseLinkedPorts(); |
Pankaj Berde | 5fb2763 | 2013-04-05 08:56:12 -0700 | [diff] [blame] | 136 | |
Pankaj Berde | a6b80c3 | 2013-03-29 09:02:56 -0700 | [diff] [blame] | 137 | @Adjacency(label="link") |
| 138 | public void removeLink(final IPortObject dest_port); |
| 139 | |
Pankaj Berde | 5fb2763 | 2013-04-05 08:56:12 -0700 | [diff] [blame] | 140 | @Adjacency(label="link") |
| 141 | public void setLinkPort(final IPortObject dest_port); |
| 142 | |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 143 | // @JsonIgnore |
| 144 | // @Adjacency(label="link") |
| 145 | // public Iterable<ILinkObject> getLinks(); |
| 146 | } |
| 147 | |
| 148 | public interface IDeviceObject extends IBaseObject { |
| 149 | |
| 150 | @JsonProperty("mac") |
| 151 | @Property("dl_addr") |
| 152 | public String getMACAddress(); |
| 153 | @Property("dl_addr") |
Pankaj Berde | 2497e54 | 2013-02-19 18:51:24 -0800 | [diff] [blame] | 154 | public void setMACAddress(String macaddr); |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 155 | |
| 156 | @JsonProperty("ipv4") |
| 157 | @Property("nw_addr") |
| 158 | public String getIPAddress(); |
Teru | 87cd2da | 2013-06-15 20:33:08 -0700 | [diff] [blame] | 159 | @Property("nw_addr") |
Pankaj Berde | 2497e54 | 2013-02-19 18:51:24 -0800 | [diff] [blame] | 160 | public void setIPAddress(String ipaddr); |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 161 | |
| 162 | @JsonIgnore |
Teru | 87cd2da | 2013-06-15 20:33:08 -0700 | [diff] [blame] | 163 | @Adjacency(label="host",direction = Direction.IN) |
Pankaj Berde | 2497e54 | 2013-02-19 18:51:24 -0800 | [diff] [blame] | 164 | public Iterable<IPortObject> getAttachedPorts(); |
| 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 setHostPort(final IPortObject port); |
| 169 | |
| 170 | @JsonIgnore |
Teru | 68076a4 | 2013-06-27 14:57:49 -0700 | [diff] [blame] | 171 | @Adjacency(label="host",direction=Direction.IN) |
Pankaj Berde | 2497e54 | 2013-02-19 18:51:24 -0800 | [diff] [blame] | 172 | public void removeHostPort(final IPortObject port); |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 173 | |
| 174 | @JsonIgnore |
Toshio Koide | 1326010 | 2013-06-17 13:44:27 -0700 | [diff] [blame] | 175 | @GremlinGroovy("it.in('host').in('on')") |
Pankaj Berde | 2497e54 | 2013-02-19 18:51:24 -0800 | [diff] [blame] | 176 | public Iterable<ISwitchObject> getSwitch(); |
| 177 | |
Pankaj Berde | ac1a8c3 | 2013-02-26 17:45:57 -0800 | [diff] [blame] | 178 | /* @JsonProperty("dpid") |
| 179 | @GremlinGroovy("_().in('host').in('on').next().getProperty('dpid')") |
| 180 | public Iterable<String> getSwitchDPID(); |
| 181 | |
| 182 | @JsonProperty("number") |
| 183 | @GremlinGroovy("_().in('host').transform{it.number}") |
| 184 | public Iterable<Short> getPortNumber(); |
| 185 | |
Pankaj Berde | 2497e54 | 2013-02-19 18:51:24 -0800 | [diff] [blame] | 186 | @JsonProperty("AttachmentPoint") |
| 187 | @GremlinGroovy("_().in('host').in('on').path(){it.number}{it.dpid}") |
Pankaj Berde | ac1a8c3 | 2013-02-26 17:45:57 -0800 | [diff] [blame] | 188 | public Iterable<SwitchPort> getAttachmentPoints();*/ |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 189 | } |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 190 | |
| 191 | public interface IFlowPath extends IBaseObject { |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 192 | @JsonProperty("flowId") |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 193 | @Property("flow_id") |
| 194 | public String getFlowId(); |
| 195 | |
| 196 | @Property("flow_id") |
| 197 | public void setFlowId(String flowId); |
| 198 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 199 | @JsonProperty("installerId") |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 200 | @Property("installer_id") |
| 201 | public String getInstallerId(); |
| 202 | |
| 203 | @Property("installer_id") |
| 204 | public void setInstallerId(String installerId); |
| 205 | |
Pavlin Radoslavov | d28cf7c | 2013-10-26 11:27:43 -0700 | [diff] [blame] | 206 | @JsonProperty("flowPathType") |
| 207 | @Property("flow_path_type") |
| 208 | public String getFlowPathType(); |
| 209 | |
| 210 | @Property("flow_path_type") |
| 211 | public void setFlowPathType(String flowPathType); |
| 212 | |
Pavlin Radoslavov | 7d4a40e | 2013-10-27 23:39:40 -0700 | [diff] [blame] | 213 | @JsonProperty("flowPathUserState") |
| 214 | @Property("user_state") |
| 215 | public String getFlowPathUserState(); |
| 216 | |
| 217 | @Property("user_state") |
| 218 | public void setFlowPathUserState(String userState); |
| 219 | |
Pavlin Radoslavov | 204b286 | 2013-07-12 14:15:36 -0700 | [diff] [blame] | 220 | @JsonProperty("flowPathFlags") |
| 221 | @Property("flow_path_flags") |
| 222 | public Long getFlowPathFlags(); |
| 223 | |
| 224 | @Property("flow_path_flags") |
| 225 | public void setFlowPathFlags(Long flowPathFlags); |
| 226 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 227 | @JsonProperty("srcDpid") |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 228 | @Property("src_switch") |
| 229 | public String getSrcSwitch(); |
| 230 | |
| 231 | @Property("src_switch") |
| 232 | public void setSrcSwitch(String srcSwitch); |
| 233 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 234 | @JsonProperty("srcPort") |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 235 | @Property("src_port") |
| 236 | public Short getSrcPort(); |
| 237 | |
| 238 | @Property("src_port") |
| 239 | public void setSrcPort(Short srcPort); |
| 240 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 241 | @JsonProperty("dstDpid") |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 242 | @Property("dst_switch") |
| 243 | public String getDstSwitch(); |
| 244 | |
| 245 | @Property("dst_switch") |
| 246 | public void setDstSwitch(String dstSwitch); |
| 247 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 248 | @JsonProperty("dstPort") |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 249 | @Property("dst_port") |
| 250 | public Short getDstPort(); |
| 251 | |
| 252 | @Property("dst_port") |
| 253 | public void setDstPort(Short dstPort); |
| 254 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 255 | @JsonProperty("dataPath") |
| 256 | @JsonSerialize(using=DatapathSummarySerializer.class) |
Pavlin Radoslavov | dbaaf2e | 2013-03-29 04:25:55 -0700 | [diff] [blame] | 257 | @Property("data_path_summary") |
| 258 | public String getDataPathSummary(); |
| 259 | |
| 260 | @Property("data_path_summary") |
| 261 | public void setDataPathSummary(String dataPathSummary); |
| 262 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 263 | @JsonIgnore |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 264 | @Adjacency(label="flow", direction=Direction.IN) |
| 265 | public Iterable<IFlowEntry> getFlowEntries(); |
| 266 | |
| 267 | @Adjacency(label="flow", direction=Direction.IN) |
| 268 | public void addFlowEntry(final IFlowEntry flowEntry); |
| 269 | |
| 270 | @Adjacency(label="flow", direction=Direction.IN) |
| 271 | public void removeFlowEntry(final IFlowEntry flowEntry); |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 272 | |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 273 | // |
| 274 | // Matching fields |
| 275 | // |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 276 | @JsonIgnore |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 277 | @Property("matchSrcMac") |
| 278 | public String getMatchSrcMac(); |
| 279 | |
| 280 | @Property("matchSrcMac") |
| 281 | public void setMatchSrcMac(String matchSrcMac); |
| 282 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 283 | @JsonIgnore |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 284 | @Property("matchDstMac") |
| 285 | public String getMatchDstMac(); |
| 286 | |
| 287 | @Property("matchDstMac") |
| 288 | public void setMatchDstMac(String matchDstMac); |
| 289 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 290 | @JsonIgnore |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 291 | @Property("matchEthernetFrameType") |
| 292 | public Short getMatchEthernetFrameType(); |
| 293 | |
| 294 | @Property("matchEthernetFrameType") |
| 295 | public void setMatchEthernetFrameType(Short matchEthernetFrameType); |
| 296 | |
| 297 | @JsonIgnore |
| 298 | @Property("matchVlanId") |
| 299 | public Short getMatchVlanId(); |
| 300 | |
| 301 | @Property("matchVlanId") |
| 302 | public void setMatchVlanId(Short matchVlanId); |
| 303 | |
| 304 | @JsonIgnore |
| 305 | @Property("matchVlanPriority") |
| 306 | public Byte getMatchVlanPriority(); |
| 307 | |
| 308 | @Property("matchVlanPriority") |
| 309 | public void setMatchVlanPriority(Byte matchVlanPriority); |
| 310 | |
| 311 | @JsonIgnore |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 312 | @Property("matchSrcIPv4Net") |
| 313 | public String getMatchSrcIPv4Net(); |
| 314 | |
| 315 | @Property("matchSrcIPv4Net") |
| 316 | public void setMatchSrcIPv4Net(String matchSrcIPv4Net); |
| 317 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 318 | @JsonIgnore |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 319 | @Property("matchDstIPv4Net") |
| 320 | public String getMatchDstIPv4Net(); |
| 321 | |
| 322 | @Property("matchDstIPv4Net") |
| 323 | public void setMatchDstIPv4Net(String matchDstIPv4Net); |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 324 | |
| 325 | @JsonIgnore |
| 326 | @Property("matchIpProto") |
| 327 | public Byte getMatchIpProto(); |
| 328 | |
| 329 | @Property("matchIpProto") |
| 330 | public void setMatchIpProto(Byte matchIpProto); |
| 331 | |
| 332 | @JsonIgnore |
| 333 | @Property("matchIpToS") |
| 334 | public Byte getMatchIpToS(); |
| 335 | |
| 336 | @Property("matchIpToS") |
| 337 | public void setMatchIpToS(Byte matchIpToS); |
| 338 | |
| 339 | @JsonIgnore |
| 340 | @Property("matchSrcTcpUdpPort") |
| 341 | public Short getMatchSrcTcpUdpPort(); |
| 342 | |
| 343 | @Property("matchSrcTcpUdpPort") |
| 344 | public void setMatchSrcTcpUdpPort(Short matchSrcTcpUdpPort); |
| 345 | |
| 346 | @JsonIgnore |
| 347 | @Property("matchDstTcpUdpPort") |
| 348 | public Short getMatchDstTcpUdpPort(); |
| 349 | |
| 350 | @Property("matchDstTcpUdpPort") |
| 351 | public void setMatchDstTcpUdpPort(Short matchDstTcpUdpPort); |
| 352 | |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 353 | // |
| 354 | // Action-related fields |
| 355 | // |
| 356 | @Property("actions") |
| 357 | public String getActions(); |
| 358 | |
| 359 | @Property("actions") |
| 360 | public void setActions(String actionsStr); |
| 361 | |
| 362 | // |
| 363 | // Other fields |
| 364 | // |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 365 | @JsonIgnore |
Toshio Koide | 1326010 | 2013-06-17 13:44:27 -0700 | [diff] [blame] | 366 | @GremlinGroovy("it.in('flow').out('switch')") |
Pankaj Berde | f1404a7 | 2013-04-03 11:50:07 -0700 | [diff] [blame] | 367 | public Iterable<ISwitchObject> getSwitches(); |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 368 | |
| 369 | @JsonIgnore |
| 370 | @Property("state") |
| 371 | public String getState(); |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 372 | } |
| 373 | |
| 374 | public interface IFlowEntry extends IBaseObject { |
| 375 | @Property("flow_entry_id") |
| 376 | public String getFlowEntryId(); |
| 377 | |
| 378 | @Property("flow_entry_id") |
| 379 | public void setFlowEntryId(String flowEntryId); |
| 380 | |
| 381 | @Property("switch_dpid") |
| 382 | public String getSwitchDpid(); |
| 383 | |
| 384 | @Property("switch_dpid") |
| 385 | public void setSwitchDpid(String switchDpid); |
| 386 | |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 387 | @Property("user_state") |
| 388 | public String getUserState(); |
| 389 | |
| 390 | @Property("user_state") |
| 391 | public void setUserState(String userState); |
| 392 | |
| 393 | @Property("switch_state") |
| 394 | public String getSwitchState(); |
| 395 | |
| 396 | @Property("switch_state") |
| 397 | public void setSwitchState(String switchState); |
| 398 | |
| 399 | @Property("error_state_type") |
| 400 | public String getErrorStateType(); |
| 401 | |
| 402 | @Property("error_state_type") |
| 403 | public void setErrorStateType(String errorStateType); |
| 404 | |
| 405 | @Property("error_state_code") |
| 406 | public String getErrorStateCode(); |
| 407 | |
| 408 | @Property("error_state_code") |
| 409 | public void setErrorStateCode(String errorStateCode); |
Pavlin Radoslavov | e2f0de8 | 2013-03-12 01:39:30 -0700 | [diff] [blame] | 410 | |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 411 | // |
| 412 | // Matching fields |
| 413 | // |
Pavlin Radoslavov | e2f0de8 | 2013-03-12 01:39:30 -0700 | [diff] [blame] | 414 | @Property("matchInPort") |
| 415 | public Short getMatchInPort(); |
| 416 | |
| 417 | @Property("matchInPort") |
| 418 | public void setMatchInPort(Short matchInPort); |
| 419 | |
Pavlin Radoslavov | e2f0de8 | 2013-03-12 01:39:30 -0700 | [diff] [blame] | 420 | @Property("matchSrcMac") |
| 421 | public String getMatchSrcMac(); |
| 422 | |
| 423 | @Property("matchSrcMac") |
| 424 | public void setMatchSrcMac(String matchSrcMac); |
| 425 | |
| 426 | @Property("matchDstMac") |
| 427 | public String getMatchDstMac(); |
| 428 | |
| 429 | @Property("matchDstMac") |
| 430 | public void setMatchDstMac(String matchDstMac); |
| 431 | |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 432 | @Property("matchEthernetFrameType") |
| 433 | public Short getMatchEthernetFrameType(); |
| 434 | |
| 435 | @Property("matchEthernetFrameType") |
| 436 | public void setMatchEthernetFrameType(Short matchEthernetFrameType); |
| 437 | |
| 438 | @Property("matchVlanId") |
| 439 | public Short getMatchVlanId(); |
| 440 | |
| 441 | @Property("matchVlanId") |
| 442 | public void setMatchVlanId(Short matchVlanId); |
| 443 | |
| 444 | @Property("matchVlanPriority") |
| 445 | public Byte getMatchVlanPriority(); |
| 446 | |
| 447 | @Property("matchVlanPriority") |
| 448 | public void setMatchVlanPriority(Byte matchVlanPriority); |
| 449 | |
Pavlin Radoslavov | e2f0de8 | 2013-03-12 01:39:30 -0700 | [diff] [blame] | 450 | @Property("matchSrcIPv4Net") |
| 451 | public String getMatchSrcIPv4Net(); |
| 452 | |
| 453 | @Property("matchSrcIPv4Net") |
| 454 | public void setMatchSrcIPv4Net(String matchSrcIPv4Net); |
| 455 | |
| 456 | @Property("matchDstIPv4Net") |
| 457 | public String getMatchDstIPv4Net(); |
| 458 | |
| 459 | @Property("matchDstIPv4Net") |
| 460 | public void setMatchDstIPv4Net(String matchDstIPv4Net); |
| 461 | |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 462 | @Property("matchIpProto") |
| 463 | public Byte getMatchIpProto(); |
| 464 | |
| 465 | @Property("matchIpProto") |
| 466 | public void setMatchIpProto(Byte matchIpProto); |
| 467 | |
| 468 | @Property("matchIpToS") |
| 469 | public Byte getMatchIpToS(); |
| 470 | |
| 471 | @Property("matchIpToS") |
| 472 | public void setMatchIpToS(Byte matchIpToS); |
| 473 | |
| 474 | @Property("matchSrcTcpUdpPort") |
| 475 | public Short getMatchSrcTcpUdpPort(); |
| 476 | |
| 477 | @Property("matchSrcTcpUdpPort") |
| 478 | public void setMatchSrcTcpUdpPort(Short matchSrcTcpUdpPort); |
| 479 | |
| 480 | @Property("matchDstTcpUdpPort") |
| 481 | public Short getMatchDstTcpUdpPort(); |
| 482 | |
| 483 | @Property("matchDstTcpUdpPort") |
| 484 | public void setMatchDstTcpUdpPort(Short matchDstTcpUdpPort); |
| 485 | |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 486 | // |
| 487 | // Action-related fields |
| 488 | // |
Pavlin Radoslavov | c1bafd1 | 2013-07-12 17:00:35 -0700 | [diff] [blame] | 489 | @Property("actionOutputPort") |
| 490 | public Short getActionOutputPort(); |
Pavlin Radoslavov | e2f0de8 | 2013-03-12 01:39:30 -0700 | [diff] [blame] | 491 | |
Pavlin Radoslavov | c1bafd1 | 2013-07-12 17:00:35 -0700 | [diff] [blame] | 492 | @Property("actionOutputPort") |
| 493 | public void setActionOutputPort(Short actionOutputPort); |
Pavlin Radoslavov | 1d4a107 | 2013-03-28 05:29:49 -0700 | [diff] [blame] | 494 | |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 495 | @Property("actions") |
| 496 | public String getActions(); |
| 497 | |
| 498 | @Property("actions") |
| 499 | public void setActions(String actionsStr); |
| 500 | |
| 501 | // |
| 502 | // Other fields |
| 503 | // |
Pavlin Radoslavov | 1d4a107 | 2013-03-28 05:29:49 -0700 | [diff] [blame] | 504 | @Adjacency(label="flow") |
| 505 | public IFlowPath getFlow(); |
| 506 | |
| 507 | @Adjacency(label="flow") |
| 508 | public void setFlow(IFlowPath flow); |
| 509 | |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 510 | @Adjacency(label="switch") |
| 511 | public ISwitchObject getSwitch(); |
Pavlin Radoslavov | 1d4a107 | 2013-03-28 05:29:49 -0700 | [diff] [blame] | 512 | |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 513 | @Adjacency(label="switch") |
| 514 | public void setSwitch(ISwitchObject sw); |
Pavlin Radoslavov | 1d4a107 | 2013-03-28 05:29:49 -0700 | [diff] [blame] | 515 | |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 516 | @Adjacency(label="inport") |
| 517 | public IPortObject getInPort(); |
Pavlin Radoslavov | 1d4a107 | 2013-03-28 05:29:49 -0700 | [diff] [blame] | 518 | |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 519 | @Adjacency(label="inport") |
| 520 | public void setInPort(IPortObject port); |
Pavlin Radoslavov | 1d4a107 | 2013-03-28 05:29:49 -0700 | [diff] [blame] | 521 | |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 522 | @Adjacency(label="outport") |
| 523 | public IPortObject getOutPort(); |
Pavlin Radoslavov | 1d4a107 | 2013-03-28 05:29:49 -0700 | [diff] [blame] | 524 | |
Pavlin Radoslavov | 4fead9c | 2013-03-28 03:09:27 -0700 | [diff] [blame] | 525 | @Adjacency(label="outport") |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 526 | public void setOutPort(IPortObject port); |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 527 | } |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 528 | } |