021f930972a54afb1f749b961c38cbeac1ea7b13
[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 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
15
16 /**
17  *  This interface allows ingress Port Security flows to be written to devices.
18  */
19 public interface IngressAclProvider {
20
21     /**
22      * Program port security Group.
23      *
24      * @param dpid the dpid
25      * @param segmentationId the segmentation id
26      * @param attachedMac the attached mac
27      * @param localPort the local port
28      * @param securityGroup the security group
29      * @param portUuid the uuid of the port.
30      * @param nodeId the NodeId of the node.
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, NodeId nodeId, 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 portSecurityRule the security rule
43      * @param securityGroup the security group
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     void programPortSecurityRule(Long dpid, String segmentationId, String attachedMac, NeutronSecurityRule portSecurityRule,
48                                      NeutronSecurityGroup securityGroup, Neutron_IPs vmIp, boolean write);
49     /**
50      * Program fixed ingress ACL rules that will be associated with the VM port when a vm is spawned.
51      * *
52      * @param dpid the dpid
53      * @param segmentationId the segmentation id
54      * @param attachedMac the dhcp mac
55      * @param localPort the local port
56      * @param attachedMac2 the src mac
57      * @param write is this flow writing or deleting
58      */
59     void programFixedSecurityGroup(Long dpid, String segmentationId, String attachedMac, long localPort,
60                                   String attachedMac2, boolean write);
61 }