blob: 749a5127c888eb8202bef79257300c85a79a106b [file] [log] [blame]
Pengfei Lue0c02e22015-07-07 15:41:31 +08001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
Pengfei Lue0c02e22015-07-07 15:41:31 +08003 *
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.
Ray Milkey85267002016-11-16 11:06:35 -080015 *
16 * Originally created by Pengfei Lu, Network and Cloud Computing Laboratory, Dalian University of Technology, China
17 * Advisers: Keqiu Li, Heng Qi and Haisheng Yu
18 * This work is supported by the State Key Program of National Natural Science of China(Grant No. 61432002)
19 * and Prospective Research Project on Future Networks in Jiangsu Future Networks Innovation Institute.
Pengfei Lue0c02e22015-07-07 15:41:31 +080020 */
Thomas Vachuska9bb32352015-09-25 11:31:22 -070021package org.onosproject.acl;
Pengfei Lue0c02e22015-07-07 15:41:31 +080022
23import java.util.List;
24
25/**
26 * Service interface exported by ACL application.
27 */
28public interface AclService {
29
30 /**
31 * Gets a list containing all ACL rules.
Thomas Vachuska9bb32352015-09-25 11:31:22 -070032 *
Pengfei Lue0c02e22015-07-07 15:41:31 +080033 * @return a list containing all ACL rules
34 */
35 List<AclRule> getAclRules();
36
37 /**
38 * Adds a new ACL rule.
Thomas Vachuska9bb32352015-09-25 11:31:22 -070039 *
Pengfei Lue0c02e22015-07-07 15:41:31 +080040 * @param rule ACL rule
41 * @return true if successfully added, otherwise false
42 */
43 boolean addAclRule(AclRule rule);
44
45 /**
46 * Removes an exsiting ACL rule by rule id.
Thomas Vachuska9bb32352015-09-25 11:31:22 -070047 *
Pengfei Lue0c02e22015-07-07 15:41:31 +080048 * @param ruleId ACL rule identifier
49 */
50 void removeAclRule(RuleId ruleId);
51
52 /**
53 * Clears ACL and resets all.
54 */
55 void clearAcl();
56
Ray Milkey85267002016-11-16 11:06:35 -080057}