blob: 4f96f788bc8857caf0d2d92cf36a9affb535eff6 [file] [log] [blame]
Jian Li3defa842019-02-12 00:31:35 +09001/*
2 * Copyright 2019-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 */
16package org.onosproject.k8snode.api;
17
18import org.onlab.packet.IpAddress;
19
20/**
21 * Service for administering inventory of kubernetes API configs.
22 */
23public interface K8sApiConfigAdminService extends K8sApiConfigService {
24
25 /**
26 * Creates an API config.
27 *
28 * @param config kubernetes API server config
29 */
30 void createApiConfig(K8sApiConfig config);
31
32 /**
33 * Updates the API config.
34 *
35 * @param config kubernetes API server config
36 */
37 void updateApiConfig(K8sApiConfig config);
38
39 /**
40 * Removes the API config.
41 *
42 * @param endpoint kubernetes API endpoint
43 * @return removed kubernetes API server config; null if no config
44 * associated with the endpoint
45 */
46 K8sApiConfig removeApiConfig(String endpoint);
47
48 /**
49 * Removes the kubernetes API config with the given scheme, IP and port.
50 *
51 * @param scheme scheme (HTTP/HTTPS)
52 * @param ipAddress IP address of API server
53 * @param port port number of API server
54 * @return removed kubernetes API server config; null if no config
55 * associated with the scheme, IP and port
56 */
57 K8sApiConfig removeApiConfig(K8sApiConfig.Scheme scheme, IpAddress ipAddress, int port);
58}