blob: d3f28610ec454700a02002344bacea4b710b6d1b [file] [log] [blame]
Jian Lie2a04ce2020-07-01 19:07:02 +09001/*
2 * Copyright 2020-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 hosts.
22 */
23public interface K8sHostAdminService extends K8sHostService {
24
25 /**
26 * Creates a new host.
27 *
28 * @param host kubernetes host
29 */
30 void createHost(K8sHost host);
31
32 /**
33 * Updates the host.
34 *
35 * @param host kubernetes host
36 */
37 void updateHost(K8sHost host);
38
39 /**
40 * Removes the host.
41 *
42 * @param hostIp kubernetes host IP address
43 * @return removed host; null if the host does not exist
44 */
45 K8sHost removeHost(IpAddress hostIp);
46}