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