blob: 9e5c3bc75a17e3a1f8bb1389c0f42e71c91fbfd6 [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 /**
Sho SHIMIZU1674fb32014-08-20 14:44:31 -070033 * Constructor for serializer.
34 */
35 protected OpticalConnectivityIntent() {
36 super();
37 this.srcSwitchPort = null;
38 this.dstSwitchPort = null;
39 }
40
41 /**
Toshio Koidea03915e2014-07-01 18:39:52 -070042 * Gets source transponder port.
43 *
44 * @return The source transponder port.
45 */
46 public SwitchPort getSrcSwitchPort() {
47 return srcSwitchPort;
48 }
49
50 /**
51 * Gets destination transponder port.
52 *
53 * @return The source transponder port.
54 */
55 public SwitchPort getDstSwitchPort() {
56 return dstSwitchPort;
57 }
Toshio Koidea03915e2014-07-01 18:39:52 -070058}