Jian Li | 72b9b12 | 2016-02-11 15:58:51 -0800 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame^] | 2 | * Copyright 2016-present Open Networking Foundation |
Jian Li | 72b9b12 | 2016-02-11 15:58:51 -0800 | [diff] [blame] | 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 | */ |
| 16 | package org.onosproject.cpman.impl.message; |
| 17 | |
| 18 | import org.onosproject.cluster.NodeId; |
Jian Li | 67e1e15 | 2016-04-18 17:52:58 -0700 | [diff] [blame] | 19 | import org.onosproject.cpman.ControlLoadSnapshot; |
Jian Li | 72b9b12 | 2016-02-11 15:58:51 -0800 | [diff] [blame] | 20 | import org.onosproject.cpman.ControlMetric; |
| 21 | import org.onosproject.cpman.ControlMetricType; |
| 22 | import org.onosproject.cpman.ControlPlaneMonitorService; |
| 23 | import org.onosproject.cpman.ControlResource; |
| 24 | import org.onosproject.net.DeviceId; |
| 25 | |
| 26 | import java.util.Optional; |
| 27 | import java.util.Set; |
Jian Li | 23906cc | 2016-03-31 11:16:44 -0700 | [diff] [blame] | 28 | import java.util.concurrent.CompletableFuture; |
Jian Li | 67e1e15 | 2016-04-18 17:52:58 -0700 | [diff] [blame] | 29 | import java.util.concurrent.TimeUnit; |
Jian Li | 72b9b12 | 2016-02-11 15:58:51 -0800 | [diff] [blame] | 30 | |
| 31 | /** |
| 32 | * Test adapter control plane monitoring service. |
| 33 | */ |
| 34 | public class ControlPlaneMonitorServiceAdaptor implements ControlPlaneMonitorService { |
| 35 | @Override |
| 36 | public void updateMetric(ControlMetric controlMetric, |
Jian Li | 23906cc | 2016-03-31 11:16:44 -0700 | [diff] [blame] | 37 | int updateIntervalInMinutes, |
| 38 | Optional<DeviceId> deviceId) { |
Jian Li | 72b9b12 | 2016-02-11 15:58:51 -0800 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | @Override |
| 42 | public void updateMetric(ControlMetric controlMetric, |
Jian Li | 23906cc | 2016-03-31 11:16:44 -0700 | [diff] [blame] | 43 | int updateIntervalInMinutes, |
| 44 | String resourceName) { |
Jian Li | 72b9b12 | 2016-02-11 15:58:51 -0800 | [diff] [blame] | 45 | } |
| 46 | |
| 47 | @Override |
Jian Li | 67e1e15 | 2016-04-18 17:52:58 -0700 | [diff] [blame] | 48 | public CompletableFuture<ControlLoadSnapshot> getLoad(NodeId nodeId, |
| 49 | ControlMetricType type, |
| 50 | Optional<DeviceId> deviceId) { |
Jian Li | 72b9b12 | 2016-02-11 15:58:51 -0800 | [diff] [blame] | 51 | return null; |
| 52 | } |
| 53 | |
| 54 | @Override |
Jian Li | 67e1e15 | 2016-04-18 17:52:58 -0700 | [diff] [blame] | 55 | public CompletableFuture<ControlLoadSnapshot> getLoad(NodeId nodeId, |
| 56 | ControlMetricType type, |
| 57 | String resourceName) { |
Jian Li | 23906cc | 2016-03-31 11:16:44 -0700 | [diff] [blame] | 58 | return null; |
| 59 | } |
| 60 | |
| 61 | @Override |
Jian Li | 67e1e15 | 2016-04-18 17:52:58 -0700 | [diff] [blame] | 62 | public CompletableFuture<ControlLoadSnapshot> getLoad(NodeId nodeId, |
| 63 | ControlMetricType type, |
| 64 | int duration, TimeUnit unit, |
| 65 | Optional<DeviceId> deviceId) { |
Jian Li | 23906cc | 2016-03-31 11:16:44 -0700 | [diff] [blame] | 66 | return null; |
| 67 | } |
| 68 | |
| 69 | @Override |
Jian Li | 67e1e15 | 2016-04-18 17:52:58 -0700 | [diff] [blame] | 70 | public CompletableFuture<ControlLoadSnapshot> getLoad(NodeId nodeId, |
| 71 | ControlMetricType type, |
| 72 | int duration, TimeUnit unit, |
| 73 | String resourceName) { |
Jian Li | 72b9b12 | 2016-02-11 15:58:51 -0800 | [diff] [blame] | 74 | return null; |
| 75 | } |
| 76 | |
| 77 | @Override |
Jian Li | 89eeccd | 2016-05-06 02:10:33 -0700 | [diff] [blame] | 78 | public CompletableFuture<Set<String>> availableResources(NodeId nodeId, |
| 79 | ControlResource.Type resourceType) { |
Jian Li | 72b9b12 | 2016-02-11 15:58:51 -0800 | [diff] [blame] | 80 | return null; |
| 81 | } |
| 82 | } |