Merge "Remove ovsdb related in resources"
[netvirt.git] / openstack / net-virt / src / main / java / org / opendaylight / netvirt / openstack / netvirt / api / EgressAclProvider.java
1 /*
2  * Copyright (c) 2014, 2015 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
9 package org.opendaylight.netvirt.openstack.netvirt.api;
10
11 import org.opendaylight.netvirt.openstack.netvirt.translator.NeutronSecurityGroup;
12 import org.opendaylight.netvirt.openstack.netvirt.translator.NeutronSecurityRule;
13 import org.opendaylight.netvirt.openstack.netvirt.translator.Neutron_IPs;
14
15 import java.util.List;
16
17 /**
18  *  This interface allows egress Port Security flows to be written to devices.
19  */
20 public interface EgressAclProvider {
21
22     /**
23      * Program port security Group.
24      *
25      * @param dpid the dpid
26      * @param segmentationId the segmentation id
27      * @param attachedMac the attached mac
28      * @param localPort the local port
29      * @param securityGroup the security group
30      * @param portUuid the uuid of the port.
31      * @param write  is this flow write or delete
32      */
33     void programPortSecurityGroup(Long dpid, String segmentationId, String attachedMac,
34                                        long localPort, NeutronSecurityGroup securityGroup,
35                                        String portUuid, boolean write);
36     /**
37      * Program port security rule.
38      *
39      * @param dpid the dpid
40      * @param segmentationId the segmentation id
41      * @param attachedMac the attached mac
42      * @param localPort the local port
43      * @param portSecurityRule the security rule
44      * @param vmIp the ip of the remote vm if it has a remote security group.
45      * @param write  is this flow write or delete
46      */
47     public void programPortSecurityRule(Long dpid, String segmentationId, String attachedMac,
48                                         long localPort, NeutronSecurityRule portSecurityRule,
49                                         Neutron_IPs vmIp, boolean write) ;
50     /**
51      *  Program fixed egress security group rules that will be associated with the VM port when a vm is spawned.
52      *
53      * @param dpid the dpid
54      * @param segmentationId the segmentation id
55      * @param attachedMac the attached mac
56      * @param localPort the local port
57      * @param srcAddressList the list of source ip address assigned to vm
58      * @param write is this flow writing or deleting
59      */
60     void programFixedSecurityGroup(Long dpid, String segmentationId,String attachedMac, long localPort,
61                                   List<Neutron_IPs> srcAddressList, boolean write);
62 }