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