blob: 174d8c0424628fb201b7d88d9925126e6e71ace5 [file] [log] [blame]
Sho SHIMIZU228140c2014-08-11 19:15:43 -07001package net.onrc.onos.api.newintent;
Toshio Koidea03915e2014-07-01 18:39:52 -07002
Toshio Koidea03915e2014-07-01 18:39:52 -07003import net.onrc.onos.core.util.SwitchPort;
4
Sho SHIMIZU228140c2014-08-11 19:15:43 -07005// TODO: consider if this intent should be sub-class of ConnectivityIntent
Toshio Koidea03915e2014-07-01 18:39:52 -07006/**
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 SHIMIZU228140c2014-08-11 19:15:43 -070014public class OpticalConnectivityIntent extends AbstractIntent {
Toshio Koidea03915e2014-07-01 18:39:52 -070015 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 SHIMIZUec4f5a72014-07-21 18:21:23 -070025 public OpticalConnectivityIntent(IntentId id,
Toshio Koidea03915e2014-07-01 18:39:52 -070026 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 Koidea03915e2014-07-01 18:39:52 -070049}