blob: 6b944721f66d03aed38c2e6cdfbf5de1b08f2042 [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 /**
Toshio Koide5c5ca102014-08-19 00:49:52 -070038 * Gets lambda which is used throughout the path.
39 *
40 * @return lambda which is used throughout the path
41 */
42 public int getLambda() {
43 return lambda;
44 }
45
46 /**
Toshio Koide9aa4c0f2014-08-11 16:06:44 -070047 * Gets traffic filter for this flow.
48 * <p>
49 * This method only returns wildcard match, because the ingress transponder
50 * port does not have filtering functionality.
51 */
52 @Override
53 public PacketMatch getMatch() {
54 return (new PacketMatchBuilder()).build();
Toshio Koidea03915e2014-07-01 18:39:52 -070055 }
56
Toshio Koidea03915e2014-07-01 18:39:52 -070057 @Override
Toshio Koide5c5ca102014-08-19 00:49:52 -070058 public List<MatchActionOperations> compile(FlowBatchOperation.Operator op) {
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}