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 | /** |
Toshio Koide | 2c67a2d | 2014-08-27 11:30:56 -0700 | [diff] [blame] | 26 | * Default constructor for Kryo deserialization. |
| 27 | */ |
| 28 | @Deprecated |
| 29 | protected OpticalPathFlow() { |
| 30 | lambda = 0; |
| 31 | } |
| 32 | |
| 33 | /** |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 34 | * Constructor. |
| 35 | * |
Toshio Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 36 | * @param id the ID for this new Flow object |
| 37 | * @param ingressPort the Ingress port number at the ingress edge node |
| 38 | * @param path the Path between ingress and egress edge node |
| 39 | * @param egressActions the list of Action objects at the egress edge node |
| 40 | * @param lambda the lambda to be used throughout the path |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 41 | */ |
Toshio Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 42 | public OpticalPathFlow(FlowId id, |
| 43 | PortNumber ingressPort, Path path, List<Action> egressActions, int lambda) { |
| 44 | super(id, ingressPort, path, egressActions); |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 45 | this.lambda = lambda; |
Toshio Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 46 | } |
| 47 | |
| 48 | /** |
Toshio Koide | 5c5ca10 | 2014-08-19 00:49:52 -0700 | [diff] [blame] | 49 | * Gets lambda which is used throughout the path. |
| 50 | * |
| 51 | * @return lambda which is used throughout the path |
| 52 | */ |
| 53 | public int getLambda() { |
| 54 | return lambda; |
| 55 | } |
| 56 | |
| 57 | /** |
Toshio Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 58 | * Gets traffic filter for this flow. |
| 59 | * <p> |
| 60 | * This method only returns wildcard match, because the ingress transponder |
| 61 | * port does not have filtering functionality. |
| 62 | */ |
| 63 | @Override |
| 64 | public PacketMatch getMatch() { |
| 65 | return (new PacketMatchBuilder()).build(); |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 66 | } |
| 67 | |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 68 | @Override |
Toshio Koide | d7d550c | 2014-08-21 16:08:55 -0700 | [diff] [blame] | 69 | public List<MatchActionOperations> compile(Operator op, |
| 70 | MatchActionIdGenerator maIdGenerator, |
| 71 | MatchActionOperationsIdGenerator maoIdGenerator) { |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 72 | // TODO Auto-generated method stub |
Toshio Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 73 | return null; |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 74 | } |
| 75 | } |