Sho SHIMIZU | 228140c | 2014-08-11 19:15:43 -0700 | [diff] [blame] | 1 | package net.onrc.onos.api.newintent; |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 2 | |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 3 | import net.onrc.onos.core.util.SwitchPort; |
| 4 | |
Sho SHIMIZU | 228140c | 2014-08-11 19:15:43 -0700 | [diff] [blame] | 5 | // TODO: consider if this intent should be sub-class of ConnectivityIntent |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 6 | /** |
| 7 | * An optical layer Intent for a connectivity from a transponder port to another |
| 8 | * transponder port. |
| 9 | * <p> |
| 10 | * This class doesn't accepts lambda specifier. This class computes path between |
| 11 | * ports and assign lambda automatically. The lambda can be specified using |
| 12 | * OpticalPathFlow class. |
| 13 | */ |
Sho SHIMIZU | 228140c | 2014-08-11 19:15:43 -0700 | [diff] [blame] | 14 | public class OpticalConnectivityIntent extends AbstractIntent { |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 15 | protected SwitchPort srcSwitchPort; |
| 16 | protected SwitchPort dstSwitchPort; |
| 17 | |
| 18 | /** |
| 19 | * Constructor. |
| 20 | * |
| 21 | * @param id ID for this new Intent object. |
| 22 | * @param srcSwitchPort The source transponder port. |
| 23 | * @param dstSwitchPort The destination transponder port. |
| 24 | */ |
Sho SHIMIZU | ec4f5a7 | 2014-07-21 18:21:23 -0700 | [diff] [blame] | 25 | public OpticalConnectivityIntent(IntentId id, |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 26 | SwitchPort srcSwitchPort, SwitchPort dstSwitchPort) { |
| 27 | super(id); |
| 28 | this.srcSwitchPort = srcSwitchPort; |
| 29 | this.dstSwitchPort = dstSwitchPort; |
| 30 | } |
| 31 | |
| 32 | /** |
| 33 | * Gets source transponder port. |
| 34 | * |
| 35 | * @return The source transponder port. |
| 36 | */ |
| 37 | public SwitchPort getSrcSwitchPort() { |
| 38 | return srcSwitchPort; |
| 39 | } |
| 40 | |
| 41 | /** |
| 42 | * Gets destination transponder port. |
| 43 | * |
| 44 | * @return The source transponder port. |
| 45 | */ |
| 46 | public SwitchPort getDstSwitchPort() { |
| 47 | return dstSwitchPort; |
| 48 | } |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 49 | } |