blob: 361f5ddc2409343f6dba4c5b5032ca4f18b0093d [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
2 * Copyright 2014 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
weibitf32383b2014-10-22 10:17:31 -070016package org.onlab.onos.net.intent;
17
Thomas Vachuskae0f804a2014-10-27 23:40:48 -070018import org.onlab.onos.core.ApplicationId;
weibitf32383b2014-10-22 10:17:31 -070019import org.onlab.onos.net.ConnectPoint;
20
21/**
Jonathan Hartc9d76732014-11-18 10:52:20 -080022 * An optical layer intent for connectivity from one transponder port to another
23 * transponder port. No traffic selector or traffic treatment are needed.
weibitf32383b2014-10-22 10:17:31 -070024 */
weibit7e583462014-10-23 10:14:05 -070025public class OpticalConnectivityIntent extends Intent {
Jonathan Hartc9d76732014-11-18 10:52:20 -080026 protected final ConnectPoint src;
27 protected final ConnectPoint dst;
weibitf32383b2014-10-22 10:17:31 -070028
29 /**
Thomas Vachuska4b420772014-10-30 16:46:17 -070030 * Creates an optical connectivity intent between the specified
31 * connection points.
weibitf32383b2014-10-22 10:17:31 -070032 *
Thomas Vachuska4b420772014-10-30 16:46:17 -070033 * @param appId application identification
34 * @param src the source transponder port
35 * @param dst the destination transponder port
weibitf32383b2014-10-22 10:17:31 -070036 */
Jonathan Hartc9d76732014-11-18 10:52:20 -080037 public OpticalConnectivityIntent(ApplicationId appId,
38 ConnectPoint src, ConnectPoint dst) {
weibit7e583462014-10-23 10:14:05 -070039 super(id(OpticalConnectivityIntent.class, src, dst),
40 appId, null);
weibitf32383b2014-10-22 10:17:31 -070041 this.src = src;
42 this.dst = dst;
43 }
44
45 /**
46 * Constructor for serializer.
47 */
48 protected OpticalConnectivityIntent() {
49 super();
50 this.src = null;
51 this.dst = null;
52 }
53
54 /**
Thomas Vachuska4b420772014-10-30 16:46:17 -070055 * Returns the source transponder port.
weibitf32383b2014-10-22 10:17:31 -070056 *
Thomas Vachuska4b420772014-10-30 16:46:17 -070057 * @return source transponder port
weibitf32383b2014-10-22 10:17:31 -070058 */
Jonathan Hartc9d76732014-11-18 10:52:20 -080059 public ConnectPoint getSrc() {
weibitf32383b2014-10-22 10:17:31 -070060 return src;
61 }
62
63 /**
Thomas Vachuska4b420772014-10-30 16:46:17 -070064 * Returns the destination transponder port.
weibitf32383b2014-10-22 10:17:31 -070065 *
Thomas Vachuska4b420772014-10-30 16:46:17 -070066 * @return source transponder port
weibitf32383b2014-10-22 10:17:31 -070067 */
68 public ConnectPoint getDst() {
69 return dst;
70 }
71}