Jian Li | b9fe349 | 2018-06-07 17:19:07 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018-present Open Networking Foundation |
| 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.openstacktelemetry.api; |
| 17 | |
Jian Li | b9fe349 | 2018-06-07 17:19:07 +0900 | [diff] [blame] | 18 | /** |
| 19 | * Admin service API for publishing openstack telemetry. |
| 20 | */ |
Jian Li | d1ce10a | 2018-06-12 13:47:23 +0900 | [diff] [blame] | 21 | public interface TelemetryAdminService extends TelemetryService { |
Jian Li | b9fe349 | 2018-06-07 17:19:07 +0900 | [diff] [blame] | 22 | |
| 23 | /** |
| 24 | * Prepares and launches the telemetry producer. |
Jian Li | a61e0b6 | 2018-12-28 19:10:10 +0900 | [diff] [blame] | 25 | * |
| 26 | * @param name telemetry service name |
Jian Li | 667c6eb | 2019-01-07 23:01:12 +0900 | [diff] [blame^] | 27 | * @return true if the service is successfully started, false otherwise |
Jian Li | b9fe349 | 2018-06-07 17:19:07 +0900 | [diff] [blame] | 28 | */ |
Jian Li | 667c6eb | 2019-01-07 23:01:12 +0900 | [diff] [blame^] | 29 | boolean start(String name); |
Jian Li | b9fe349 | 2018-06-07 17:19:07 +0900 | [diff] [blame] | 30 | |
| 31 | /** |
| 32 | * Terminates the telemetry producer. |
Jian Li | a61e0b6 | 2018-12-28 19:10:10 +0900 | [diff] [blame] | 33 | * |
| 34 | * @param name telemetry service name |
Jian Li | b9fe349 | 2018-06-07 17:19:07 +0900 | [diff] [blame] | 35 | */ |
Jian Li | a61e0b6 | 2018-12-28 19:10:10 +0900 | [diff] [blame] | 36 | void stop(String name); |
Jian Li | b9fe349 | 2018-06-07 17:19:07 +0900 | [diff] [blame] | 37 | |
| 38 | /** |
| 39 | * Restarts the telemetry producer. |
Jian Li | a61e0b6 | 2018-12-28 19:10:10 +0900 | [diff] [blame] | 40 | * |
| 41 | * @param name telemetry service name |
Jian Li | 667c6eb | 2019-01-07 23:01:12 +0900 | [diff] [blame^] | 42 | * @return true if the service is successfully restarted, false otherwise |
Jian Li | b9fe349 | 2018-06-07 17:19:07 +0900 | [diff] [blame] | 43 | */ |
Jian Li | 667c6eb | 2019-01-07 23:01:12 +0900 | [diff] [blame^] | 44 | boolean restart(String name); |
Jian Li | a61e0b6 | 2018-12-28 19:10:10 +0900 | [diff] [blame] | 45 | |
| 46 | /** |
| 47 | * Launches all telemetry services. |
| 48 | */ |
| 49 | void startAll(); |
| 50 | |
| 51 | /** |
| 52 | * Terminates all telemetry services. |
| 53 | */ |
| 54 | void stopAll(); |
| 55 | |
| 56 | /** |
| 57 | * Restarts all telemetry services. |
| 58 | */ |
| 59 | void restartAll(); |
Jian Li | b9fe349 | 2018-06-07 17:19:07 +0900 | [diff] [blame] | 60 | } |