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