blob: b99eb700cc8acf30924d4cd7e38c4c9d38637767 [file] [log] [blame]
Brian O'Connorb876bf12014-10-02 14:59:37 -07001package org.onlab.onos.net.intent;
2
3import org.onlab.onos.net.ConnectPoint;
4
5// TODO: consider if this intent should be sub-class of ConnectivityIntent
toma1d16b62014-10-02 23:45:11 -07006
Brian O'Connorb876bf12014-10-02 14:59:37 -07007/**
8 * An optical layer Intent for a connectivity from a transponder port to another
9 * transponder port.
toma1d16b62014-10-02 23:45:11 -070010 * <p/>
Brian O'Connorb876bf12014-10-02 14:59:37 -070011 * 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 */
15public class OpticalConnectivityIntent extends AbstractIntent {
toma1d16b62014-10-02 23:45:11 -070016 protected ConnectPoint src;
17 protected ConnectPoint dst;
Brian O'Connorb876bf12014-10-02 14:59:37 -070018
19 /**
20 * Constructor.
21 *
toma1d16b62014-10-02 23:45:11 -070022 * @param id ID for this new Intent object.
23 * @param src The source transponder port.
24 * @param dst The destination transponder port.
Brian O'Connorb876bf12014-10-02 14:59:37 -070025 */
toma1d16b62014-10-02 23:45:11 -070026 public OpticalConnectivityIntent(IntentId id, ConnectPoint src, ConnectPoint dst) {
Brian O'Connorb876bf12014-10-02 14:59:37 -070027 super(id);
toma1d16b62014-10-02 23:45:11 -070028 this.src = src;
29 this.dst = dst;
Brian O'Connorb876bf12014-10-02 14:59:37 -070030 }
31
32 /**
33 * Constructor for serializer.
34 */
35 protected OpticalConnectivityIntent() {
36 super();
toma1d16b62014-10-02 23:45:11 -070037 this.src = null;
38 this.dst = null;
Brian O'Connorb876bf12014-10-02 14:59:37 -070039 }
40
41 /**
42 * Gets source transponder port.
43 *
44 * @return The source transponder port.
45 */
46 public ConnectPoint getSrcConnectPoint() {
toma1d16b62014-10-02 23:45:11 -070047 return src;
Brian O'Connorb876bf12014-10-02 14:59:37 -070048 }
49
50 /**
51 * Gets destination transponder port.
52 *
53 * @return The source transponder port.
54 */
toma1d16b62014-10-02 23:45:11 -070055 public ConnectPoint getDst() {
56 return dst;
Brian O'Connorb876bf12014-10-02 14:59:37 -070057 }
58}