blob: 332f430dbc9494263591b6c76fb8dfadf9d96a65 [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 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.net.intent;
weibitf32383b2014-10-22 10:17:31 -070017
Brian O'Connorabafb502014-12-02 22:26:20 -080018import org.onosproject.core.ApplicationId;
19import org.onosproject.net.ConnectPoint;
weibitf32383b2014-10-22 10:17:31 -070020
Sho SHIMIZUd7d18002015-01-21 14:37:14 -080021import java.util.Collections;
22
weibitf32383b2014-10-22 10:17:31 -070023/**
Jonathan Hartc9d76732014-11-18 10:52:20 -080024 * An optical layer intent for connectivity from one transponder port to another
25 * transponder port. No traffic selector or traffic treatment are needed.
weibitf32383b2014-10-22 10:17:31 -070026 */
weibit7e583462014-10-23 10:14:05 -070027public class OpticalConnectivityIntent extends Intent {
Jonathan Hartc9d76732014-11-18 10:52:20 -080028 protected final ConnectPoint src;
29 protected final ConnectPoint dst;
weibitf32383b2014-10-22 10:17:31 -070030
31 /**
Thomas Vachuska4b420772014-10-30 16:46:17 -070032 * Creates an optical connectivity intent between the specified
33 * connection points.
weibitf32383b2014-10-22 10:17:31 -070034 *
Thomas Vachuska4b420772014-10-30 16:46:17 -070035 * @param appId application identification
36 * @param src the source transponder port
37 * @param dst the destination transponder port
weibitf32383b2014-10-22 10:17:31 -070038 */
Jonathan Hartc9d76732014-11-18 10:52:20 -080039 public OpticalConnectivityIntent(ApplicationId appId,
40 ConnectPoint src, ConnectPoint dst) {
Sho SHIMIZUd7d18002015-01-21 14:37:14 -080041 super(appId, Collections.emptyList());
weibitf32383b2014-10-22 10:17:31 -070042 this.src = src;
43 this.dst = dst;
44 }
45
46 /**
47 * Constructor for serializer.
48 */
49 protected OpticalConnectivityIntent() {
50 super();
51 this.src = null;
52 this.dst = null;
53 }
54
55 /**
Thomas Vachuska4b420772014-10-30 16:46:17 -070056 * Returns the source transponder port.
weibitf32383b2014-10-22 10:17:31 -070057 *
Thomas Vachuska4b420772014-10-30 16:46:17 -070058 * @return source transponder port
weibitf32383b2014-10-22 10:17:31 -070059 */
Jonathan Hartc9d76732014-11-18 10:52:20 -080060 public ConnectPoint getSrc() {
weibitf32383b2014-10-22 10:17:31 -070061 return src;
62 }
63
64 /**
Thomas Vachuska4b420772014-10-30 16:46:17 -070065 * Returns the destination transponder port.
weibitf32383b2014-10-22 10:17:31 -070066 *
Thomas Vachuska4b420772014-10-30 16:46:17 -070067 * @return source transponder port
weibitf32383b2014-10-22 10:17:31 -070068 */
69 public ConnectPoint getDst() {
70 return dst;
71 }
72}