blob: 6376f3e68611f989f2cd3c8d1416046448f65fba [file] [log] [blame]
Jian Li105770e2021-01-17 02:18:30 +09001/*
2 * Copyright 2021-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 io.fabric8.kubernetes.api.model.Pod;
19import org.onosproject.store.Store;
20
21import java.util.Set;
22
23/**
24 * Manages inventory of kubevirt pod; not intended for direct use.
25 */
26public interface KubevirtPodStore extends Store<KubevirtPodEvent, KubevirtPodStoreDelegate> {
27
28 /**
29 * Creates the new kubevirt pod.
30 *
31 * @param pod kubevirt pod
32 */
33 void createPod(Pod pod);
34
35 /**
36 * Updates the kubevirt pod.
37 *
38 * @param pod kubevirt pod
39 */
40 void updatePod(Pod pod);
41
42 /**
43 * Removes the kubevirt pod with the given pod UID.
44 *
45 * @param uid kubevirt pod UID
46 * @return removed kubevirt pod; null if failed
47 */
48 Pod removePod(String uid);
49
50 /**
51 * Returns the kubevirt pod with the given pod UID.
52 *
53 * @param uid kubevirt pod UID
54 * @return kubevirt pod; null if not found
55 */
56 Pod pod(String uid);
57
58 /**
59 * Returns all kubevirt pods.
60 *
61 * @return set of kubevirt pods
62 */
63 Set<Pod> pods();
64
65 /**
66 * Removes all kubevirt pods.
67 */
68 void clear();
69}