e4b064537f62d4e76e9fbd1cf36164318775e4d4
[netvirt.git] / aclservice / api / src / main / java / org / opendaylight / netvirt / aclservice / api / AclServiceManager.java
1 /*
2  * Copyright (c) 2016 Red Hat, Inc. and others. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.netvirt.aclservice.api;
9
10 import java.util.Collection;
11 import javax.annotation.Nullable;
12 import org.opendaylight.netvirt.aclservice.api.utils.AclInterface;
13 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.Acl;
14 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.access.list.entries.Ace;
15
16 public interface AclServiceManager {
17
18     enum Action {
19         ADD,
20         UPDATE,
21         REMOVE,
22         BIND,
23         UNBIND
24     }
25
26     enum MatchCriteria {
27         MATCH_SOURCE,
28         MATCH_DESTINATION
29     }
30
31     void notify(AclInterface port, @Nullable AclInterface oldPort, Action action);
32
33     void notifyAce(AclInterface port, Action action, String aclName, Ace ace);
34
35     void notifyAcl(Acl aclBefore, Acl aclAfter, Collection<AclInterface> portsBefore, Action action);
36 }