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