blob: 996cbf085a11759ebcf7a3e6d6a443630f11103d [file] [log] [blame]
Daniel Park734b5532022-09-26 15:13:59 +09001/*
2 * Copyright 2022-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.kubevirtnetworking.api;
17
18import org.onosproject.store.Store;
19
20import java.util.Set;
21
22/**
23 * Manages inventory of kubernetes external load balancer states; not intended for direct use.
24 */
25public interface KubernetesExternalLbStore
26 extends Store<KubernetesExternalLbEvent, KubernetesExternalLbStoreDelegate> {
27
28 /**
29 * Creates a new kubernetes external lb.
30 *
31 * @param lb kubernetes external lb
32 */
33 void createLoadBalancer(KubernetesExternalLb lb);
34
35 /**
36 * Updates a new kubernetes external lb.
37 *
38 * @param lb kubernetes external lb
39 */
40 void updateLoadBalancer(KubernetesExternalLb lb);
41
42 /**
43 * Removes the kubernetes external lb with the given lb name.
44 *
45 * @param serviceName service name
46 * @return kubernetes external lb
47 */
48 KubernetesExternalLb removeLoadBalancer(String serviceName);
49
50 /**
51 * Returns the kubernetes external lb with the given lb name.
52 *
53 * @param serviceName service name
54 * @return kubernetes external lb
55 */
56 KubernetesExternalLb loadBalancer(String serviceName);
57
58 /**
59 * Returns all kubernetes external lbs.
60 *
61 * @return set of kubernetes external lbs
62 */
63 Set<KubernetesExternalLb> loadBalancers();
64
65 /**
66 * Removes all kubernetes external lbs.
67 */
68 void clear();
69}