blob: eed7b580abe4838c008b8215af992dd852cae019 [file] [log] [blame]
Sean Condonfae8e662016-12-15 10:25:13 +00001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2017-present Open Networking Foundation
Sean Condonfae8e662016-12-15 10:25:13 +00003 *
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.drivers.netconf;
17
18import java.util.Set;
19import java.util.concurrent.CompletableFuture;
20
21import org.onosproject.cluster.NodeId;
22import org.onosproject.cluster.RoleInfo;
23import org.onosproject.mastership.MastershipListener;
24import org.onosproject.mastership.MastershipService;
25import org.onosproject.net.DeviceId;
26import org.onosproject.net.MastershipRole;
27
28public class MockMastershipService implements MastershipService {
29
30 public MockMastershipService() {
31 }
32
33 @Override
34 public boolean isLocalMaster(DeviceId deviceId) {
35 if (deviceId != null && deviceId.uri().toString().equalsIgnoreCase("netconf:1.2.3.4:830")) {
36 return true;
37 }
38 return false;
39 }
40
41 @Override
42 public void addListener(MastershipListener listener) {
43 // TODO Auto-generated method stub
44
45 }
46
47 @Override
48 public void removeListener(MastershipListener listener) {
49 // TODO Auto-generated method stub
50
51 }
52
53 @Override
54 public MastershipRole getLocalRole(DeviceId deviceId) {
55 // TODO Auto-generated method stub
56 return null;
57 }
58
59 @Override
60 public CompletableFuture<MastershipRole> requestRoleFor(DeviceId deviceId) {
61 // TODO Auto-generated method stub
62 return null;
63 }
64
65 @Override
66 public CompletableFuture<Void> relinquishMastership(DeviceId deviceId) {
67 // TODO Auto-generated method stub
68 return null;
69 }
70
71 @Override
72 public NodeId getMasterFor(DeviceId deviceId) {
73 // TODO Auto-generated method stub
74 return null;
75 }
76
77 @Override
78 public RoleInfo getNodesFor(DeviceId deviceId) {
79 // TODO Auto-generated method stub
80 return null;
81 }
82
83 @Override
84 public Set<DeviceId> getDevicesOf(NodeId nodeId) {
85 // TODO Auto-generated method stub
86 return null;
87 }
88}