blob: 4018a7c5fed3d0ffbe5fb5df6095b6863411d0fd [file] [log] [blame]
Toshio Koidea03915e2014-07-01 18:39:52 -07001package net.onrc.onos.api.flowmanager;
2
3import java.util.List;
4
Ray Milkey42ae1b52014-08-15 16:37:06 -07005import net.onrc.onos.core.matchaction.MatchActionOperations;
Toshio Koided8b077a2014-08-13 10:47:21 -07006import net.onrc.onos.core.matchaction.action.Action;
Toshio Koide9aa4c0f2014-08-11 16:06:44 -07007import net.onrc.onos.core.matchaction.match.PacketMatch;
8import net.onrc.onos.core.matchaction.match.PacketMatchBuilder;
Toshio Koidea03915e2014-07-01 18:39:52 -07009import net.onrc.onos.core.util.PortNumber;
10
11/**
Toshio Koide7894ca02014-08-15 14:30:13 -070012 * Flow object representing an optical path.
Toshio Koidea03915e2014-07-01 18:39:52 -070013 * <p>
14 * TODO: Think this: How do we deal the optical path flow going through the
15 * regenerators? Can we express it with multiple OpticalPathFlow objects?
Toshio Koide9aa4c0f2014-08-11 16:06:44 -070016 * <p>
17 * NOTE: This class is not fully supported for the August release.
Toshio Koidea03915e2014-07-01 18:39:52 -070018 */
19public class OpticalPathFlow extends PathFlow {
Toshio Koide9aa4c0f2014-08-11 16:06:44 -070020 private final int lambda;
Toshio Koidea03915e2014-07-01 18:39:52 -070021
22 /**
23 * Constructor.
24 *
Toshio Koide9aa4c0f2014-08-11 16:06:44 -070025 * @param id the ID for this new Flow object
26 * @param ingressPort the Ingress port number at the ingress edge node
27 * @param path the Path between ingress and egress edge node
28 * @param egressActions the list of Action objects at the egress edge node
29 * @param lambda the lambda to be used throughout the path
Toshio Koidea03915e2014-07-01 18:39:52 -070030 */
Toshio Koide9aa4c0f2014-08-11 16:06:44 -070031 public OpticalPathFlow(FlowId id,
32 PortNumber ingressPort, Path path, List<Action> egressActions, int lambda) {
33 super(id, ingressPort, path, egressActions);
Toshio Koidea03915e2014-07-01 18:39:52 -070034 this.lambda = lambda;
Toshio Koide9aa4c0f2014-08-11 16:06:44 -070035 }
36
37 /**
38 * Gets traffic filter for this flow.
39 * <p>
40 * This method only returns wildcard match, because the ingress transponder
41 * port does not have filtering functionality.
42 */
43 @Override
44 public PacketMatch getMatch() {
45 return (new PacketMatchBuilder()).build();
Toshio Koidea03915e2014-07-01 18:39:52 -070046 }
47
48 /**
49 * Gets lambda which is used throughout the path.
50 *
Toshio Koide9aa4c0f2014-08-11 16:06:44 -070051 * @return lambda which is used throughout the path
Toshio Koidea03915e2014-07-01 18:39:52 -070052 */
53 public int getLambda() {
54 return lambda;
55 }
56
57 @Override
Ray Milkey42ae1b52014-08-15 16:37:06 -070058 public MatchActionOperations compile() {
Toshio Koidea03915e2014-07-01 18:39:52 -070059 // TODO Auto-generated method stub
Toshio Koide9aa4c0f2014-08-11 16:06:44 -070060 return null;
Toshio Koidea03915e2014-07-01 18:39:52 -070061 }
62}