blob: ffa10cfc2d9ad70af569d7ce5409798b9ab46cf0 [file] [log] [blame]
Jian Li1c10cf22021-03-05 01:32:04 +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 security group states; not intended for direct use.
24 */
25public interface KubevirtSecurityGroupStore
26 extends Store<KubevirtSecurityGroupEvent, KubevirtSecurityGroupStoreDelegate> {
27
28 /**
29 * Creates a security group.
30 *
31 * @param sg security group
32 */
33 void createSecurityGroup(KubevirtSecurityGroup sg);
34
35 /**
36 * Updates the security group with the security group ID with the security group object.
37 *
38 * @param sg new SecurityGroup object
39 */
40 void updateSecurityGroup(KubevirtSecurityGroup sg);
41
42 /**
43 * Removes the security group with the security group ID.
44 *
45 * @param sgId security group Id
46 * @return SecurityGroup object removed
47 */
48 KubevirtSecurityGroup removeSecurityGroup(String sgId);
49
50 /**
51 * Returns the security group with the security group ID.
52 *
53 * @param sgId security group ID
54 * @return Security Group
55 */
56 KubevirtSecurityGroup securityGroup(String sgId);
57
58 /**
59 * Returns all security groups.
60 *
61 * @return set of security groups
62 */
63 Set<KubevirtSecurityGroup> securityGroups();
64
65 /**
66 * Clears the security group store.
67 */
68 void clear();
69}