blob: e89a6357159effcd1b8729485950d99572534e12 [file] [log] [blame]
Jian Li8fe714d2021-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.event.ListenerService;
19import org.onosproject.kubevirtnetworking.api.KubevirtNetwork.Type;
20
21import java.util.Set;
22
23/**
24 * Service for interacting with the inventory of kubevirt network.
25 */
26public interface KubevirtNetworkService
27 extends ListenerService<KubevirtNetworkEvent, KubevirtNetworkListener> {
28
29 /**
30 * Returns the kubevirt network with the supplied network identifier.
31 *
32 * @param networkId network identifier
33 * @return kubevirt network
34 */
35 KubevirtNetwork network(String networkId);
36
37 /**
38 * Returns all kubevirt networks registered in the service.
39 *
40 * @return set of kubevirt networks
41 */
42 Set<KubevirtNetwork> networks();
43
44 /**
45 * Returns the kubevirt networks with the given network type.
46 *
47 * @param type virtual network type
48 * @return set of kubevirt networks
49 */
50 Set<KubevirtNetwork> networks(Type type);
Jian Li8f944d42021-03-23 00:43:29 +090051
52 /**
53 * Returns all kubevirt tenant networks.
54 *
55 * @return set of kubevirt tenant networks
56 */
57 Set<KubevirtNetwork> tenantNetworks();
Jian Li8fe714d2021-01-11 02:35:06 +090058}