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