blob: a2398191c9714a11798da9732faefd8e254aab93 [file] [log] [blame]
Mahesh Poojary Huawei1d17cad2016-06-02 12:53:41 +05301/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
Mahesh Poojary Huawei1d17cad2016-06-02 12:53:41 +05303 *
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 */
16package org.onosproject.pce.util;
17
18import java.util.Set;
19
20import org.onosproject.net.ConnectPoint;
21import org.onosproject.net.DeviceId;
22import org.onosproject.net.Link;
23import org.onosproject.net.link.LinkListener;
24import org.onosproject.net.link.LinkService;
25import org.onosproject.net.Link.State;
26
27import com.google.common.collect.FluentIterable;
28
29/**
30 * Test adapter for link service.
31 */
32public class LinkServiceAdapter implements LinkService {
33 @Override
34 public int getLinkCount() {
35 return 0;
36 }
37
38 @Override
39 public Iterable<Link> getLinks() {
40 return null;
41 }
42
43 @Override
44 public Iterable<Link> getActiveLinks() {
45 return FluentIterable.from(getLinks())
46 .filter(input -> input.state() == State.ACTIVE);
47 }
48
49 @Override
50 public Set<Link> getDeviceLinks(DeviceId deviceId) {
51 return null;
52 }
53
54 @Override
55 public Set<Link> getDeviceEgressLinks(DeviceId deviceId) {
56 return null;
57 }
58
59 @Override
60 public Set<Link> getDeviceIngressLinks(DeviceId deviceId) {
61 return null;
62 }
63
64 @Override
65 public Set<Link> getLinks(ConnectPoint connectPoint) {
66 return null;
67 }
68
69 @Override
70 public Set<Link> getEgressLinks(ConnectPoint connectPoint) {
71 return null;
72 }
73
74 @Override
75 public Set<Link> getIngressLinks(ConnectPoint connectPoint) {
76 return null;
77 }
78
79 @Override
80 public Link getLink(ConnectPoint src, ConnectPoint dst) {
81 return null;
82 }
83
84 @Override
85 public void addListener(LinkListener listener) {
86 }
87
88 @Override
89 public void removeListener(LinkListener listener) {
90 }
91}