sangho | 6a9ff0d | 2017-03-27 11:23:37 +0900 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2017-present Open Networking Foundation |
sangho | 6a9ff0d | 2017-03-27 11:23:37 +0900 | [diff] [blame] | 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 | */ |
| 16 | package org.onosproject.openstacknetworking.api; |
| 17 | |
| 18 | import org.onosproject.event.ListenerService; |
| 19 | import org.openstack4j.model.network.SecurityGroup; |
Hyunsun Moon | ae51e73 | 2017-04-25 17:46:21 +0900 | [diff] [blame] | 20 | |
| 21 | import java.util.Set; |
sangho | 6a9ff0d | 2017-03-27 11:23:37 +0900 | [diff] [blame] | 22 | |
| 23 | /** |
| 24 | * Service for interfacing OpenStack SecurityGroup events and SecurityGroup store. |
sangho | 6a9ff0d | 2017-03-27 11:23:37 +0900 | [diff] [blame] | 25 | */ |
| 26 | public interface OpenstackSecurityGroupService |
| 27 | extends ListenerService<OpenstackSecurityGroupEvent, OpenstackSecurityGroupListener> { |
| 28 | |
| 29 | /** |
Hyunsun Moon | ae51e73 | 2017-04-25 17:46:21 +0900 | [diff] [blame] | 30 | * Returns all security groups. |
| 31 | * |
| 32 | * @return set of security group |
| 33 | */ |
| 34 | Set<SecurityGroup> securityGroups(); |
| 35 | |
| 36 | /** |
sangho | 6a9ff0d | 2017-03-27 11:23:37 +0900 | [diff] [blame] | 37 | * Returns the security group for the sgId. |
| 38 | * |
| 39 | * @param sgId security group Id |
| 40 | * @return security group |
| 41 | */ |
| 42 | SecurityGroup securityGroup(String sgId); |
sangho | e6457a3 | 2017-08-24 14:31:19 +0900 | [diff] [blame] | 43 | |
| 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); |
sangho | 6a9ff0d | 2017-03-27 11:23:37 +0900 | [diff] [blame] | 57 | } |