blob: 46bf4e7b292a931e1d69f8c33553031260a6659e [file] [log] [blame]
Toshio Koidea03915e2014-07-01 18:39:52 -07001package net.onrc.onos.api.flowmanager;
2
3import java.util.List;
4
Toshio Koided7d550c2014-08-21 16:08:55 -07005import net.onrc.onos.api.flowmanager.FlowBatchOperation.Operator;
6import net.onrc.onos.core.matchaction.MatchActionIdGenerator;
Ray Milkey42ae1b52014-08-15 16:37:06 -07007import net.onrc.onos.core.matchaction.MatchActionOperations;
Toshio Koided7d550c2014-08-21 16:08:55 -07008import net.onrc.onos.core.matchaction.MatchActionOperationsIdGenerator;
Toshio Koided8b077a2014-08-13 10:47:21 -07009import net.onrc.onos.core.matchaction.action.Action;
Toshio Koide9aa4c0f2014-08-11 16:06:44 -070010import net.onrc.onos.core.matchaction.match.PacketMatch;
11import net.onrc.onos.core.matchaction.match.PacketMatchBuilder;
Toshio Koidea03915e2014-07-01 18:39:52 -070012import net.onrc.onos.core.util.PortNumber;
13
14/**
Toshio Koide7894ca02014-08-15 14:30:13 -070015 * Flow object representing an optical path.
Toshio Koidea03915e2014-07-01 18:39:52 -070016 * <p>
17 * TODO: Think this: How do we deal the optical path flow going through the
18 * regenerators? Can we express it with multiple OpticalPathFlow objects?
Toshio Koide9aa4c0f2014-08-11 16:06:44 -070019 * <p>
20 * NOTE: This class is not fully supported for the August release.
Toshio Koidea03915e2014-07-01 18:39:52 -070021 */
22public class OpticalPathFlow extends PathFlow {
Toshio Koide9aa4c0f2014-08-11 16:06:44 -070023 private final int lambda;
Toshio Koidea03915e2014-07-01 18:39:52 -070024
25 /**
26 * Constructor.
27 *
Toshio Koide9aa4c0f2014-08-11 16:06:44 -070028 * @param id the ID for this new Flow object
29 * @param ingressPort the Ingress port number at the ingress edge node
30 * @param path the Path between ingress and egress edge node
31 * @param egressActions the list of Action objects at the egress edge node
32 * @param lambda the lambda to be used throughout the path
Toshio Koidea03915e2014-07-01 18:39:52 -070033 */
Toshio Koide9aa4c0f2014-08-11 16:06:44 -070034 public OpticalPathFlow(FlowId id,
35 PortNumber ingressPort, Path path, List<Action> egressActions, int lambda) {
36 super(id, ingressPort, path, egressActions);
Toshio Koidea03915e2014-07-01 18:39:52 -070037 this.lambda = lambda;
Toshio Koide9aa4c0f2014-08-11 16:06:44 -070038 }
39
40 /**
Toshio Koide5c5ca102014-08-19 00:49:52 -070041 * Gets lambda which is used throughout the path.
42 *
43 * @return lambda which is used throughout the path
44 */
45 public int getLambda() {
46 return lambda;
47 }
48
49 /**
Toshio Koide9aa4c0f2014-08-11 16:06:44 -070050 * Gets traffic filter for this flow.
51 * <p>
52 * This method only returns wildcard match, because the ingress transponder
53 * port does not have filtering functionality.
54 */
55 @Override
56 public PacketMatch getMatch() {
57 return (new PacketMatchBuilder()).build();
Toshio Koidea03915e2014-07-01 18:39:52 -070058 }
59
Toshio Koidea03915e2014-07-01 18:39:52 -070060 @Override
Toshio Koided7d550c2014-08-21 16:08:55 -070061 public List<MatchActionOperations> compile(Operator op,
62 MatchActionIdGenerator maIdGenerator,
63 MatchActionOperationsIdGenerator maoIdGenerator) {
Toshio Koidea03915e2014-07-01 18:39:52 -070064 // TODO Auto-generated method stub
Toshio Koide9aa4c0f2014-08-11 16:06:44 -070065 return null;
Toshio Koidea03915e2014-07-01 18:39:52 -070066 }
67}