blob: 98ac3b7ac65729e17fc8caba87789fa2b031e12e [file] [log] [blame]
sangho6a9ff0d2017-03-27 11:23:37 +09001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2017-present Open Networking Foundation
sangho6a9ff0d2017-03-27 11:23:37 +09003 *
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.openstacknetworking.api;
17
18import org.onosproject.event.ListenerService;
19import org.openstack4j.model.network.SecurityGroup;
Hyunsun Moonae51e732017-04-25 17:46:21 +090020
21import java.util.Set;
sangho6a9ff0d2017-03-27 11:23:37 +090022
23/**
24 * Service for interfacing OpenStack SecurityGroup events and SecurityGroup store.
sangho6a9ff0d2017-03-27 11:23:37 +090025 */
26public interface OpenstackSecurityGroupService
27 extends ListenerService<OpenstackSecurityGroupEvent, OpenstackSecurityGroupListener> {
28
29 /**
Hyunsun Moonae51e732017-04-25 17:46:21 +090030 * Returns all security groups.
31 *
32 * @return set of security group
33 */
34 Set<SecurityGroup> securityGroups();
35
36 /**
sangho6a9ff0d2017-03-27 11:23:37 +090037 * Returns the security group for the sgId.
38 *
39 * @param sgId security group Id
40 * @return security group
41 */
42 SecurityGroup securityGroup(String sgId);
sanghoe6457a32017-08-24 14:31:19 +090043
44 /**
45 * Returns whether security group is enabled or not.
46 *
47 * @return true security group is enabled, false otherwise
48 */
49 boolean isSecurityGroupEnabled();
50
51 /**
52 * Sets security group enable option.
53 *
54 * @param option security group enable option
55 */
56 void setSecurityGroupEnabled(boolean option);
sangho6a9ff0d2017-03-27 11:23:37 +090057}