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 | |
| 3 | import org.codehaus.jackson.annotate.JsonIgnore; |
| 4 | import org.codehaus.jackson.annotate.JsonProperty; |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 5 | import org.codehaus.jackson.map.annotate.JsonSerialize; |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 6 | |
| 7 | import com.tinkerpop.blueprints.Direction; |
| 8 | import com.tinkerpop.frames.Adjacency; |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 9 | import com.tinkerpop.frames.Property; |
| 10 | import com.tinkerpop.frames.annotations.gremlin.GremlinGroovy; |
Pankaj Berde | f2f2f03 | 2013-06-10 21:08:14 -0700 | [diff] [blame] | 11 | import com.tinkerpop.frames.annotations.gremlin.GremlinParam; |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 12 | import com.tinkerpop.frames.VertexFrame; |
| 13 | |
Pavlin Radoslavov | e9b61a9 | 2013-12-11 17:23:32 -0800 | [diff] [blame] | 14 | import net.onrc.onos.ofcontroller.flowmanager.web.DatapathSummarySerializer; |
| 15 | import net.floodlightcontroller.core.web.serializers.IPv4Serializer; |
| 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") |
Pavlin Radoslavov | e9b61a9 | 2013-12-11 17:23:32 -0800 | [diff] [blame] | 209 | @JsonSerialize(using=IPv4Serializer.class) |
Jonathan Hart | d6ed62b | 2013-11-01 13:18:25 -0700 | [diff] [blame] | 210 | public int getIpv4Address(); |
| 211 | |
| 212 | @Property("ipv4_address") |
| 213 | public void setIpv4Address(int ipv4Address); |
| 214 | |
| 215 | @JsonIgnore |
pingping-lin | 568c601 | 2013-12-14 05:57:11 +0800 | [diff] [blame] | 216 | //@GremlinGroovy("it.in('hasAddress')") |
| 217 | @Adjacency(label = "hasAddress", direction = Direction.IN) |
Jonathan Hart | d6ed62b | 2013-11-01 13:18:25 -0700 | [diff] [blame] | 218 | public IDeviceObject getDevice(); |
| 219 | } |
| 220 | |
Jonathan Hart | c8ae36c | 2013-11-03 19:06:40 -0800 | [diff] [blame] | 221 | public interface IFlowPath extends IBaseObject { |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 222 | @JsonProperty("flowId") |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 223 | @Property("flow_id") |
| 224 | public String getFlowId(); |
| 225 | |
| 226 | @Property("flow_id") |
| 227 | public void setFlowId(String flowId); |
| 228 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 229 | @JsonProperty("installerId") |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 230 | @Property("installer_id") |
| 231 | public String getInstallerId(); |
| 232 | |
| 233 | @Property("installer_id") |
| 234 | public void setInstallerId(String installerId); |
| 235 | |
Pavlin Radoslavov | d28cf7c | 2013-10-26 11:27:43 -0700 | [diff] [blame] | 236 | @JsonProperty("flowPathType") |
| 237 | @Property("flow_path_type") |
| 238 | public String getFlowPathType(); |
| 239 | |
| 240 | @Property("flow_path_type") |
| 241 | public void setFlowPathType(String flowPathType); |
| 242 | |
Pavlin Radoslavov | 7d4a40e | 2013-10-27 23:39:40 -0700 | [diff] [blame] | 243 | @JsonProperty("flowPathUserState") |
| 244 | @Property("user_state") |
| 245 | public String getFlowPathUserState(); |
| 246 | |
| 247 | @Property("user_state") |
| 248 | public void setFlowPathUserState(String userState); |
| 249 | |
Pavlin Radoslavov | 204b286 | 2013-07-12 14:15:36 -0700 | [diff] [blame] | 250 | @JsonProperty("flowPathFlags") |
| 251 | @Property("flow_path_flags") |
| 252 | public Long getFlowPathFlags(); |
| 253 | |
| 254 | @Property("flow_path_flags") |
| 255 | public void setFlowPathFlags(Long flowPathFlags); |
| 256 | |
Pavlin Radoslavov | 5139c0b | 2013-12-09 18:04:53 -0800 | [diff] [blame] | 257 | @JsonProperty("idleTimeout") |
| 258 | @Property("idle_timeout") |
| 259 | public Integer getIdleTimeout(); |
| 260 | |
| 261 | @Property("idle_timeout") |
| 262 | public void setIdleTimeout(Integer idleTimeout); |
| 263 | |
| 264 | @JsonProperty("hardTimeout") |
| 265 | @Property("hard_timeout") |
| 266 | public Integer getHardTimeout(); |
| 267 | |
| 268 | @Property("hard_timeout") |
| 269 | public void setHardTimeout(Integer hardTimeout); |
| 270 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 271 | @JsonProperty("srcDpid") |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 272 | @Property("src_switch") |
| 273 | public String getSrcSwitch(); |
| 274 | |
| 275 | @Property("src_switch") |
| 276 | public void setSrcSwitch(String srcSwitch); |
| 277 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 278 | @JsonProperty("srcPort") |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 279 | @Property("src_port") |
| 280 | public Short getSrcPort(); |
| 281 | |
| 282 | @Property("src_port") |
| 283 | public void setSrcPort(Short srcPort); |
| 284 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 285 | @JsonProperty("dstDpid") |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 286 | @Property("dst_switch") |
| 287 | public String getDstSwitch(); |
| 288 | |
| 289 | @Property("dst_switch") |
| 290 | public void setDstSwitch(String dstSwitch); |
| 291 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 292 | @JsonProperty("dstPort") |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 293 | @Property("dst_port") |
| 294 | public Short getDstPort(); |
| 295 | |
| 296 | @Property("dst_port") |
| 297 | public void setDstPort(Short dstPort); |
| 298 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 299 | @JsonProperty("dataPath") |
| 300 | @JsonSerialize(using=DatapathSummarySerializer.class) |
Pavlin Radoslavov | dbaaf2e | 2013-03-29 04:25:55 -0700 | [diff] [blame] | 301 | @Property("data_path_summary") |
| 302 | public String getDataPathSummary(); |
| 303 | |
| 304 | @Property("data_path_summary") |
| 305 | public void setDataPathSummary(String dataPathSummary); |
| 306 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 307 | @JsonIgnore |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 308 | @Adjacency(label="flow", direction=Direction.IN) |
| 309 | public Iterable<IFlowEntry> getFlowEntries(); |
| 310 | |
| 311 | @Adjacency(label="flow", direction=Direction.IN) |
| 312 | public void addFlowEntry(final IFlowEntry flowEntry); |
| 313 | |
| 314 | @Adjacency(label="flow", direction=Direction.IN) |
| 315 | public void removeFlowEntry(final IFlowEntry flowEntry); |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 316 | |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 317 | // |
| 318 | // Matching fields |
| 319 | // |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 320 | @JsonIgnore |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 321 | @Property("matchSrcMac") |
| 322 | public String getMatchSrcMac(); |
| 323 | |
| 324 | @Property("matchSrcMac") |
| 325 | public void setMatchSrcMac(String matchSrcMac); |
| 326 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 327 | @JsonIgnore |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 328 | @Property("matchDstMac") |
| 329 | public String getMatchDstMac(); |
| 330 | |
| 331 | @Property("matchDstMac") |
| 332 | public void setMatchDstMac(String matchDstMac); |
| 333 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 334 | @JsonIgnore |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 335 | @Property("matchEthernetFrameType") |
| 336 | public Short getMatchEthernetFrameType(); |
| 337 | |
| 338 | @Property("matchEthernetFrameType") |
| 339 | public void setMatchEthernetFrameType(Short matchEthernetFrameType); |
| 340 | |
| 341 | @JsonIgnore |
| 342 | @Property("matchVlanId") |
| 343 | public Short getMatchVlanId(); |
| 344 | |
| 345 | @Property("matchVlanId") |
| 346 | public void setMatchVlanId(Short matchVlanId); |
| 347 | |
| 348 | @JsonIgnore |
| 349 | @Property("matchVlanPriority") |
| 350 | public Byte getMatchVlanPriority(); |
| 351 | |
| 352 | @Property("matchVlanPriority") |
| 353 | public void setMatchVlanPriority(Byte matchVlanPriority); |
| 354 | |
| 355 | @JsonIgnore |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 356 | @Property("matchSrcIPv4Net") |
| 357 | public String getMatchSrcIPv4Net(); |
| 358 | |
| 359 | @Property("matchSrcIPv4Net") |
| 360 | public void setMatchSrcIPv4Net(String matchSrcIPv4Net); |
| 361 | |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 362 | @JsonIgnore |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 363 | @Property("matchDstIPv4Net") |
| 364 | public String getMatchDstIPv4Net(); |
| 365 | |
| 366 | @Property("matchDstIPv4Net") |
| 367 | public void setMatchDstIPv4Net(String matchDstIPv4Net); |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 368 | |
| 369 | @JsonIgnore |
| 370 | @Property("matchIpProto") |
| 371 | public Byte getMatchIpProto(); |
| 372 | |
| 373 | @Property("matchIpProto") |
| 374 | public void setMatchIpProto(Byte matchIpProto); |
| 375 | |
| 376 | @JsonIgnore |
| 377 | @Property("matchIpToS") |
| 378 | public Byte getMatchIpToS(); |
| 379 | |
| 380 | @Property("matchIpToS") |
| 381 | public void setMatchIpToS(Byte matchIpToS); |
| 382 | |
| 383 | @JsonIgnore |
| 384 | @Property("matchSrcTcpUdpPort") |
| 385 | public Short getMatchSrcTcpUdpPort(); |
| 386 | |
| 387 | @Property("matchSrcTcpUdpPort") |
| 388 | public void setMatchSrcTcpUdpPort(Short matchSrcTcpUdpPort); |
| 389 | |
| 390 | @JsonIgnore |
| 391 | @Property("matchDstTcpUdpPort") |
| 392 | public Short getMatchDstTcpUdpPort(); |
| 393 | |
| 394 | @Property("matchDstTcpUdpPort") |
| 395 | public void setMatchDstTcpUdpPort(Short matchDstTcpUdpPort); |
| 396 | |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 397 | // |
| 398 | // Action-related fields |
| 399 | // |
| 400 | @Property("actions") |
| 401 | public String getActions(); |
| 402 | |
| 403 | @Property("actions") |
| 404 | public void setActions(String actionsStr); |
| 405 | |
| 406 | // |
| 407 | // Other fields |
| 408 | // |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 409 | @JsonIgnore |
Toshio Koide | 1326010 | 2013-06-17 13:44:27 -0700 | [diff] [blame] | 410 | @GremlinGroovy("it.in('flow').out('switch')") |
Pankaj Berde | f1404a7 | 2013-04-03 11:50:07 -0700 | [diff] [blame] | 411 | public Iterable<ISwitchObject> getSwitches(); |
Jonathan Hart | 01f2d27 | 2013-04-04 20:03:46 -0700 | [diff] [blame] | 412 | |
| 413 | @JsonIgnore |
| 414 | @Property("state") |
| 415 | public String getState(); |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 416 | } |
| 417 | |
Jonathan Hart | c8ae36c | 2013-11-03 19:06:40 -0800 | [diff] [blame] | 418 | public interface IFlowEntry extends IBaseObject { |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 419 | @Property("flow_entry_id") |
| 420 | public String getFlowEntryId(); |
| 421 | |
| 422 | @Property("flow_entry_id") |
| 423 | public void setFlowEntryId(String flowEntryId); |
| 424 | |
Pavlin Radoslavov | 5139c0b | 2013-12-09 18:04:53 -0800 | [diff] [blame] | 425 | @JsonProperty("idleTimeout") |
| 426 | @Property("idle_timeout") |
| 427 | public Integer getIdleTimeout(); |
| 428 | |
| 429 | @Property("idle_timeout") |
| 430 | public void setIdleTimeout(Integer idleTimeout); |
| 431 | |
| 432 | @JsonProperty("hardTimeout") |
| 433 | @Property("hard_timeout") |
| 434 | public Integer getHardTimeout(); |
| 435 | |
| 436 | @Property("hard_timeout") |
| 437 | public void setHardTimeout(Integer hardTimeout); |
| 438 | |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 439 | @Property("switch_dpid") |
| 440 | public String getSwitchDpid(); |
| 441 | |
| 442 | @Property("switch_dpid") |
| 443 | public void setSwitchDpid(String switchDpid); |
| 444 | |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 445 | @Property("user_state") |
| 446 | public String getUserState(); |
| 447 | |
| 448 | @Property("user_state") |
| 449 | public void setUserState(String userState); |
| 450 | |
| 451 | @Property("switch_state") |
| 452 | public String getSwitchState(); |
| 453 | |
| 454 | @Property("switch_state") |
| 455 | public void setSwitchState(String switchState); |
| 456 | |
| 457 | @Property("error_state_type") |
| 458 | public String getErrorStateType(); |
| 459 | |
| 460 | @Property("error_state_type") |
| 461 | public void setErrorStateType(String errorStateType); |
| 462 | |
| 463 | @Property("error_state_code") |
| 464 | public String getErrorStateCode(); |
| 465 | |
| 466 | @Property("error_state_code") |
| 467 | public void setErrorStateCode(String errorStateCode); |
Pavlin Radoslavov | e2f0de8 | 2013-03-12 01:39:30 -0700 | [diff] [blame] | 468 | |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 469 | // |
| 470 | // Matching fields |
| 471 | // |
Pavlin Radoslavov | e2f0de8 | 2013-03-12 01:39:30 -0700 | [diff] [blame] | 472 | @Property("matchInPort") |
| 473 | public Short getMatchInPort(); |
| 474 | |
| 475 | @Property("matchInPort") |
| 476 | public void setMatchInPort(Short matchInPort); |
| 477 | |
Pavlin Radoslavov | e2f0de8 | 2013-03-12 01:39:30 -0700 | [diff] [blame] | 478 | @Property("matchSrcMac") |
| 479 | public String getMatchSrcMac(); |
| 480 | |
| 481 | @Property("matchSrcMac") |
| 482 | public void setMatchSrcMac(String matchSrcMac); |
| 483 | |
| 484 | @Property("matchDstMac") |
| 485 | public String getMatchDstMac(); |
| 486 | |
| 487 | @Property("matchDstMac") |
| 488 | public void setMatchDstMac(String matchDstMac); |
| 489 | |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 490 | @Property("matchEthernetFrameType") |
| 491 | public Short getMatchEthernetFrameType(); |
| 492 | |
| 493 | @Property("matchEthernetFrameType") |
| 494 | public void setMatchEthernetFrameType(Short matchEthernetFrameType); |
| 495 | |
| 496 | @Property("matchVlanId") |
| 497 | public Short getMatchVlanId(); |
| 498 | |
| 499 | @Property("matchVlanId") |
| 500 | public void setMatchVlanId(Short matchVlanId); |
| 501 | |
| 502 | @Property("matchVlanPriority") |
| 503 | public Byte getMatchVlanPriority(); |
| 504 | |
| 505 | @Property("matchVlanPriority") |
| 506 | public void setMatchVlanPriority(Byte matchVlanPriority); |
| 507 | |
Pavlin Radoslavov | e2f0de8 | 2013-03-12 01:39:30 -0700 | [diff] [blame] | 508 | @Property("matchSrcIPv4Net") |
| 509 | public String getMatchSrcIPv4Net(); |
| 510 | |
| 511 | @Property("matchSrcIPv4Net") |
| 512 | public void setMatchSrcIPv4Net(String matchSrcIPv4Net); |
| 513 | |
| 514 | @Property("matchDstIPv4Net") |
| 515 | public String getMatchDstIPv4Net(); |
| 516 | |
| 517 | @Property("matchDstIPv4Net") |
| 518 | public void setMatchDstIPv4Net(String matchDstIPv4Net); |
| 519 | |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 520 | @Property("matchIpProto") |
| 521 | public Byte getMatchIpProto(); |
| 522 | |
| 523 | @Property("matchIpProto") |
| 524 | public void setMatchIpProto(Byte matchIpProto); |
| 525 | |
| 526 | @Property("matchIpToS") |
| 527 | public Byte getMatchIpToS(); |
| 528 | |
| 529 | @Property("matchIpToS") |
| 530 | public void setMatchIpToS(Byte matchIpToS); |
| 531 | |
| 532 | @Property("matchSrcTcpUdpPort") |
| 533 | public Short getMatchSrcTcpUdpPort(); |
| 534 | |
| 535 | @Property("matchSrcTcpUdpPort") |
| 536 | public void setMatchSrcTcpUdpPort(Short matchSrcTcpUdpPort); |
| 537 | |
| 538 | @Property("matchDstTcpUdpPort") |
| 539 | public Short getMatchDstTcpUdpPort(); |
| 540 | |
| 541 | @Property("matchDstTcpUdpPort") |
| 542 | public void setMatchDstTcpUdpPort(Short matchDstTcpUdpPort); |
| 543 | |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 544 | // |
| 545 | // Action-related fields |
| 546 | // |
Pavlin Radoslavov | c1bafd1 | 2013-07-12 17:00:35 -0700 | [diff] [blame] | 547 | @Property("actionOutputPort") |
| 548 | public Short getActionOutputPort(); |
Pavlin Radoslavov | e2f0de8 | 2013-03-12 01:39:30 -0700 | [diff] [blame] | 549 | |
Pavlin Radoslavov | c1bafd1 | 2013-07-12 17:00:35 -0700 | [diff] [blame] | 550 | @Property("actionOutputPort") |
| 551 | public void setActionOutputPort(Short actionOutputPort); |
Pavlin Radoslavov | 1d4a107 | 2013-03-28 05:29:49 -0700 | [diff] [blame] | 552 | |
Pavlin Radoslavov | 1bc2c47 | 2013-07-17 18:11:37 -0700 | [diff] [blame] | 553 | @Property("actions") |
| 554 | public String getActions(); |
| 555 | |
| 556 | @Property("actions") |
| 557 | public void setActions(String actionsStr); |
| 558 | |
| 559 | // |
| 560 | // Other fields |
| 561 | // |
Pavlin Radoslavov | 1d4a107 | 2013-03-28 05:29:49 -0700 | [diff] [blame] | 562 | @Adjacency(label="flow") |
| 563 | public IFlowPath getFlow(); |
| 564 | |
| 565 | @Adjacency(label="flow") |
| 566 | public void setFlow(IFlowPath flow); |
| 567 | |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 568 | @Adjacency(label="switch") |
| 569 | public ISwitchObject getSwitch(); |
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="switch") |
| 572 | public void setSwitch(ISwitchObject sw); |
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 IPortObject getInPort(); |
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="inport") |
| 578 | public void setInPort(IPortObject port); |
Pavlin Radoslavov | 1d4a107 | 2013-03-28 05:29:49 -0700 | [diff] [blame] | 579 | |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 580 | @Adjacency(label="outport") |
| 581 | public IPortObject getOutPort(); |
Pavlin Radoslavov | 1d4a107 | 2013-03-28 05:29:49 -0700 | [diff] [blame] | 582 | |
Pavlin Radoslavov | 4fead9c | 2013-03-28 03:09:27 -0700 | [diff] [blame] | 583 | @Adjacency(label="outport") |
Pankaj Berde | d007974 | 2013-03-27 17:53:25 -0700 | [diff] [blame] | 584 | public void setOutPort(IPortObject port); |
Pavlin Radoslavov | b6f5354 | 2013-03-01 16:02:14 -0800 | [diff] [blame] | 585 | } |
Pankaj Berde | 1b8a42f | 2013-02-15 08:25:03 -0800 | [diff] [blame] | 586 | } |