Merge "L3: Add eth to br-ex"
[ovsdb.git] / openstack / net-virt / src / main / java / org / opendaylight / ovsdb / openstack / netvirt / api / SecurityGroupCacheManger.java
1 /*
2  * Copyright (c) 2014, 2015 HP, 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
9 package org.opendaylight.ovsdb.openstack.netvirt.api;
10
11 /**
12  *  This interface maintain a mapping between the security group and the ports
13  *  have this security group as a remote security group. Whenever a new port is
14  *  added with a security group associated with it, a rule will be added to allow
15  *  traffic from/to the vm from  the vms which has the former as a remote sg in its rule.
16  *
17  *  @author Aswin Suryanarayanan.
18  */
19
20 public interface SecurityGroupCacheManger {
21
22     /**
23      * Notifies that a new port in the security group with securityGroupUuid.
24      * @param securityGroupUuid the uuid of the security group associated with the port.
25      * @param portUuid the uuid of the port.
26      */
27     void portAdded(String securityGroupUuid, String portUuid);
28     /**
29      * Notifies that a port is removed with the securityGroupUuid.
30      * @param securityGroupUuid the uuid of the security group associated with the port.
31      * @param portUuid the uuid of the port.
32      */
33     void portRemoved(String securityGroupUuid, String portUuid);
34     /**
35      * A port with portUuid has a reference remote security group remoteSgUuid will be added
36      * to the cache maintained.
37      * @param remoteSgUuid the remote security group uuid.
38      * @param portUuid the uuid of the port.
39      */
40     void addToCache(String remoteSgUuid, String portUuid);
41     /**A port with portUUID has a reference remote security group remoteSgUuid will be removed
42      * from the cache maintained.
43      * @param remoteSgUuid the remote security group uuid.
44      * @param portUuid portUUID the uuid of the port.
45      */
46     void removeFromCache(String remoteSgUuid, String portUuid);
47 }