Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 1 | package net.onrc.onos.api.flowmanager; |
| 2 | |
| 3 | import java.util.List; |
| 4 | |
Toshio Koide | d7d550c | 2014-08-21 16:08:55 -0700 | [diff] [blame^] | 5 | import net.onrc.onos.api.flowmanager.FlowBatchOperation.Operator; |
| 6 | import net.onrc.onos.core.matchaction.MatchActionIdGenerator; |
Ray Milkey | 42ae1b5 | 2014-08-15 16:37:06 -0700 | [diff] [blame] | 7 | import net.onrc.onos.core.matchaction.MatchActionOperations; |
Toshio Koide | d7d550c | 2014-08-21 16:08:55 -0700 | [diff] [blame^] | 8 | import net.onrc.onos.core.matchaction.MatchActionOperationsIdGenerator; |
Toshio Koide | d8b077a | 2014-08-13 10:47:21 -0700 | [diff] [blame] | 9 | import net.onrc.onos.core.matchaction.action.Action; |
Toshio Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 10 | import net.onrc.onos.core.matchaction.match.PacketMatch; |
| 11 | import net.onrc.onos.core.matchaction.match.PacketMatchBuilder; |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 12 | import net.onrc.onos.core.util.PortNumber; |
| 13 | |
| 14 | /** |
Toshio Koide | 7894ca0 | 2014-08-15 14:30:13 -0700 | [diff] [blame] | 15 | * Flow object representing an optical path. |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 16 | * <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 Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 19 | * <p> |
| 20 | * NOTE: This class is not fully supported for the August release. |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 21 | */ |
| 22 | public class OpticalPathFlow extends PathFlow { |
Toshio Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 23 | private final int lambda; |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 24 | |
| 25 | /** |
| 26 | * Constructor. |
| 27 | * |
Toshio Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 28 | * @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 Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 33 | */ |
Toshio Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 34 | public OpticalPathFlow(FlowId id, |
| 35 | PortNumber ingressPort, Path path, List<Action> egressActions, int lambda) { |
| 36 | super(id, ingressPort, path, egressActions); |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 37 | this.lambda = lambda; |
Toshio Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | /** |
Toshio Koide | 5c5ca10 | 2014-08-19 00:49:52 -0700 | [diff] [blame] | 41 | * 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 Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 50 | * 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 Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 58 | } |
| 59 | |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 60 | @Override |
Toshio Koide | d7d550c | 2014-08-21 16:08:55 -0700 | [diff] [blame^] | 61 | public List<MatchActionOperations> compile(Operator op, |
| 62 | MatchActionIdGenerator maIdGenerator, |
| 63 | MatchActionOperationsIdGenerator maoIdGenerator) { |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 64 | // TODO Auto-generated method stub |
Toshio Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 65 | return null; |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 66 | } |
| 67 | } |