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.openstack4j.model.network.SecurityGroup; |
| 19 | import org.openstack4j.model.network.SecurityGroupRule; |
| 20 | |
| 21 | /** |
| 22 | * Service for administering the inventory of Openstack security group. |
| 23 | */ |
Jian Li | 5ecfd1a | 2018-12-10 11:41:03 +0900 | [diff] [blame^] | 24 | public interface OpenstackSecurityGroupAdminService |
| 25 | extends OpenstackSecurityGroupService { |
sangho | 6a9ff0d | 2017-03-27 11:23:37 +0900 | [diff] [blame] | 26 | /** |
| 27 | * Creates a security group. |
| 28 | * |
| 29 | * @param sg security group |
| 30 | */ |
| 31 | void createSecurityGroup(SecurityGroup sg); |
| 32 | |
| 33 | /** |
Hyunsun Moon | ae51e73 | 2017-04-25 17:46:21 +0900 | [diff] [blame] | 34 | * Updates the security group. |
| 35 | * |
| 36 | * @param sg security group |
| 37 | */ |
| 38 | void updateSecurityGroup(SecurityGroup sg); |
| 39 | |
| 40 | /** |
sangho | 6a9ff0d | 2017-03-27 11:23:37 +0900 | [diff] [blame] | 41 | * Removes the security group. |
| 42 | * |
| 43 | * @param sgId security group ID |
| 44 | */ |
| 45 | void removeSecurityGroup(String sgId); |
| 46 | |
| 47 | /** |
| 48 | * Creates a security group rule. |
| 49 | * |
| 50 | * @param sgRule security group rule |
| 51 | */ |
| 52 | void createSecurityGroupRule(SecurityGroupRule sgRule); |
| 53 | |
| 54 | /** |
| 55 | * Removes the security group rule. |
| 56 | * |
| 57 | * @param sgRuleId security group rule ID |
| 58 | */ |
| 59 | void removeSecurityGroupRule(String sgRuleId); |
Hyunsun Moon | ae51e73 | 2017-04-25 17:46:21 +0900 | [diff] [blame] | 60 | |
| 61 | /** |
| 62 | * Removes the existing security groups. |
| 63 | */ |
| 64 | void clear(); |
sangho | 6a9ff0d | 2017-03-27 11:23:37 +0900 | [diff] [blame] | 65 | } |