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