2 * Copyright (c) 2014, 2015 HP, Inc. and others. All rights reserved.
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
9 package org.opendaylight.ovsdb.openstack.netvirt.api;
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.
17 * @author Aswin Suryanarayanan.
20 public interface SecurityGroupCacheManger {
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.
27 void portAdded(String securityGroupUuid, String portUuid);
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.
33 void portRemoved(String securityGroupUuid, String portUuid);
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.
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.
46 void removeFromCache(String remoteSgUuid, String portUuid);