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; |
Sho SHIMIZU | 7cd8a42 | 2014-08-27 16:05:21 -0700 | [diff] [blame] | 6 | import net.onrc.onos.core.matchaction.MatchActionId; |
Ray Milkey | 42ae1b5 | 2014-08-15 16:37:06 -0700 | [diff] [blame] | 7 | import net.onrc.onos.core.matchaction.MatchActionOperations; |
Sho SHIMIZU | 7cd8a42 | 2014-08-27 16:05:21 -0700 | [diff] [blame] | 8 | import net.onrc.onos.core.matchaction.MatchActionOperationsId; |
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; |
Sho SHIMIZU | 7cd8a42 | 2014-08-27 16:05:21 -0700 | [diff] [blame] | 12 | import net.onrc.onos.core.util.IdGenerator; |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 13 | import net.onrc.onos.core.util.PortNumber; |
| 14 | |
| 15 | /** |
Toshio Koide | 7894ca0 | 2014-08-15 14:30:13 -0700 | [diff] [blame] | 16 | * Flow object representing an optical path. |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 17 | * <p> |
| 18 | * TODO: Think this: How do we deal the optical path flow going through the |
| 19 | * regenerators? Can we express it with multiple OpticalPathFlow objects? |
Toshio Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 20 | * <p> |
| 21 | * NOTE: This class is not fully supported for the August release. |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 22 | */ |
| 23 | public class OpticalPathFlow extends PathFlow { |
Toshio Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 24 | private final int lambda; |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 25 | |
| 26 | /** |
Toshio Koide | 2c67a2d | 2014-08-27 11:30:56 -0700 | [diff] [blame] | 27 | * Default constructor for Kryo deserialization. |
| 28 | */ |
| 29 | @Deprecated |
| 30 | protected OpticalPathFlow() { |
| 31 | lambda = 0; |
| 32 | } |
| 33 | |
| 34 | /** |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 35 | * Constructor. |
| 36 | * |
Toshio Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 37 | * @param id the ID for this new Flow object |
| 38 | * @param ingressPort the Ingress port number at the ingress edge node |
| 39 | * @param path the Path between ingress and egress edge node |
| 40 | * @param egressActions the list of Action objects at the egress edge node |
| 41 | * @param lambda the lambda to be used throughout the path |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 42 | */ |
Toshio Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 43 | public OpticalPathFlow(FlowId id, |
| 44 | PortNumber ingressPort, Path path, List<Action> egressActions, int lambda) { |
| 45 | super(id, ingressPort, path, egressActions); |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 46 | this.lambda = lambda; |
Toshio Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | /** |
Toshio Koide | 5c5ca10 | 2014-08-19 00:49:52 -0700 | [diff] [blame] | 50 | * Gets lambda which is used throughout the path. |
| 51 | * |
| 52 | * @return lambda which is used throughout the path |
| 53 | */ |
| 54 | public int getLambda() { |
| 55 | return lambda; |
| 56 | } |
| 57 | |
| 58 | /** |
Toshio Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 59 | * Gets traffic filter for this flow. |
| 60 | * <p> |
| 61 | * This method only returns wildcard match, because the ingress transponder |
| 62 | * port does not have filtering functionality. |
| 63 | */ |
| 64 | @Override |
| 65 | public PacketMatch getMatch() { |
| 66 | return (new PacketMatchBuilder()).build(); |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 67 | } |
| 68 | |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 69 | @Override |
Toshio Koide | d7d550c | 2014-08-21 16:08:55 -0700 | [diff] [blame] | 70 | public List<MatchActionOperations> compile(Operator op, |
Sho SHIMIZU | 7cd8a42 | 2014-08-27 16:05:21 -0700 | [diff] [blame] | 71 | IdGenerator<MatchActionId> maIdGenerator, |
| 72 | IdGenerator<MatchActionOperationsId> maoIdGenerator) { |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 73 | // TODO Auto-generated method stub |
Toshio Koide | 9aa4c0f | 2014-08-11 16:06:44 -0700 | [diff] [blame] | 74 | return null; |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 75 | } |
| 76 | } |