Brian O'Connor | b876bf1 | 2014-10-02 14:59:37 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.intent; |
| 2 | |
| 3 | import org.onlab.onos.net.ConnectPoint; |
| 4 | |
| 5 | // TODO: consider if this intent should be sub-class of ConnectivityIntent |
tom | a1d16b6 | 2014-10-02 23:45:11 -0700 | [diff] [blame] | 6 | |
Brian O'Connor | b876bf1 | 2014-10-02 14:59:37 -0700 | [diff] [blame] | 7 | /** |
| 8 | * An optical layer Intent for a connectivity from a transponder port to another |
| 9 | * transponder port. |
tom | a1d16b6 | 2014-10-02 23:45:11 -0700 | [diff] [blame] | 10 | * <p/> |
Brian O'Connor | b876bf1 | 2014-10-02 14:59:37 -0700 | [diff] [blame] | 11 | * This class doesn't accepts lambda specifier. This class computes path between |
| 12 | * ports and assign lambda automatically. The lambda can be specified using |
| 13 | * OpticalPathFlow class. |
| 14 | */ |
| 15 | public class OpticalConnectivityIntent extends AbstractIntent { |
tom | a1d16b6 | 2014-10-02 23:45:11 -0700 | [diff] [blame] | 16 | protected ConnectPoint src; |
| 17 | protected ConnectPoint dst; |
Brian O'Connor | b876bf1 | 2014-10-02 14:59:37 -0700 | [diff] [blame] | 18 | |
| 19 | /** |
| 20 | * Constructor. |
| 21 | * |
tom | a1d16b6 | 2014-10-02 23:45:11 -0700 | [diff] [blame] | 22 | * @param id ID for this new Intent object. |
| 23 | * @param src The source transponder port. |
| 24 | * @param dst The destination transponder port. |
Brian O'Connor | b876bf1 | 2014-10-02 14:59:37 -0700 | [diff] [blame] | 25 | */ |
tom | a1d16b6 | 2014-10-02 23:45:11 -0700 | [diff] [blame] | 26 | public OpticalConnectivityIntent(IntentId id, ConnectPoint src, ConnectPoint dst) { |
Brian O'Connor | b876bf1 | 2014-10-02 14:59:37 -0700 | [diff] [blame] | 27 | super(id); |
tom | a1d16b6 | 2014-10-02 23:45:11 -0700 | [diff] [blame] | 28 | this.src = src; |
| 29 | this.dst = dst; |
Brian O'Connor | b876bf1 | 2014-10-02 14:59:37 -0700 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | /** |
| 33 | * Constructor for serializer. |
| 34 | */ |
| 35 | protected OpticalConnectivityIntent() { |
| 36 | super(); |
tom | a1d16b6 | 2014-10-02 23:45:11 -0700 | [diff] [blame] | 37 | this.src = null; |
| 38 | this.dst = null; |
Brian O'Connor | b876bf1 | 2014-10-02 14:59:37 -0700 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | /** |
| 42 | * Gets source transponder port. |
| 43 | * |
| 44 | * @return The source transponder port. |
| 45 | */ |
| 46 | public ConnectPoint getSrcConnectPoint() { |
tom | a1d16b6 | 2014-10-02 23:45:11 -0700 | [diff] [blame] | 47 | return src; |
Brian O'Connor | b876bf1 | 2014-10-02 14:59:37 -0700 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | /** |
| 51 | * Gets destination transponder port. |
| 52 | * |
| 53 | * @return The source transponder port. |
| 54 | */ |
tom | a1d16b6 | 2014-10-02 23:45:11 -0700 | [diff] [blame] | 55 | public ConnectPoint getDst() { |
| 56 | return dst; |
Brian O'Connor | b876bf1 | 2014-10-02 14:59:37 -0700 | [diff] [blame] | 57 | } |
| 58 | } |