blob: 7452de8dba0d6905119477dcf226176683a2f13c [file] [log] [blame]
Jian Li3e81b182021-01-11 02:35:06 +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 org.onosproject.store.Store;
19
20import java.util.Set;
21
22/**
23 * Manages inventory of kubevirt network states; not intended for direct use.
24 */
25public interface KubevirtNetworkStore
26 extends Store<KubevirtNetworkEvent, KubevirtNetworkStoreDelegate> {
27
28 /**
29 * Creates the new kubevirt network.
30 *
31 * @param network kubevirt network
32 */
33 void createNetwork(KubevirtNetwork network);
34
35 /**
36 * Update the kubevirt network.
37 *
38 * @param network kubevirt network
39 */
40 void updateNetwork(KubevirtNetwork network);
41
42 /**
43 * Removes the kubevirt network with the given network identifier.
44 *
45 * @param networkId network identifier
46 * @return removed kubevirt network; null if failed
47 */
48 KubevirtNetwork removeNetwork(String networkId);
49
50 /**
51 * Returns the kubevirt network with the given network identifier.
52 *
53 * @param networkId network identifier
54 * @return network; null if not found
55 */
56 KubevirtNetwork network(String networkId);
57
58 /**
59 * Returns all kubevirt networks.
60 *
61 * @return set of kubevirt networks
62 */
63 Set<KubevirtNetwork> networks();
64
65 /**
66 * Removes all kubevirt networks.
67 */
68 void clear();
69}