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.netvirt.openstack.netvirt.api;
11 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
14 * This interface maintain a mapping between the security group and the ports
15 * have this security group as a remote security group. Whenever a new port is
16 * added with a security group associated with it, a rule will be added to allow
17 * traffic from/to the vm from the vms which has the former as a remote sg in its rule.
19 * @author Aswin Suryanarayanan.
22 public interface SecurityGroupCacheManger {
25 * Notifies that a new port in the security group with securityGroupUuid.
26 * @param securityGroupUuid the uuid of the security group associated with the port.
27 * @param portUuid the uuid of the port.
29 void portAdded(String securityGroupUuid, String portUuid);
31 * Notifies that a port is removed with the securityGroupUuid.
32 * @param securityGroupUuid the uuid of the security group associated with the port.
33 * @param portUuid the uuid of the port.
35 void portRemoved(String securityGroupUuid, String portUuid);
37 * A port with portUuid has a reference remote security group remoteSgUuid will be added
38 * to the cache maintained.
39 * @param remoteSgUuid the remote security group uuid.
40 * @param portUuid the uuid of the port.
41 * @param nodeId the NodeId of the node.
43 void addToCache(String remoteSgUuid, String portUuid, NodeId nodeId);
44 /**A port with portUUID has a reference remote security group remoteSgUuid will be removed
45 * from the cache maintained.
46 * @param remoteSgUuid the remote security group uuid.
47 * @param portUuid portUUID the uuid of the port.
48 * @param nodeId the NodeId of the node.
50 void removeFromCache(String remoteSgUuid, String portUuid, NodeId nodeId);