Merge "Fixed the vpninstance creation"
[netvirt.git] / vpnservice / aclservice / impl / src / main / java / org / opendaylight / netvirt / aclservice / TransparentIngressAclServiceImpl.java
1 /*
2  * Copyright (c) 2016 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 package org.opendaylight.netvirt.aclservice;
9
10 import java.math.BigInteger;
11 import java.util.List;
12 import java.util.Map;
13
14 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
15 import org.opendaylight.genius.mdsalutil.MatchInfoBase;
16 import org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager;
17 import org.opendaylight.netvirt.aclservice.api.AclServiceManager.Action;
18 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.access.list.entries.Ace;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.interfaces._interface.AllowedAddressPairs;
20 import org.slf4j.Logger;
21 import org.slf4j.LoggerFactory;
22
23 /**
24  * Provides the transparent implementation for ingress (w.r.t VM) ACL service.
25  *
26  * <p>
27  * Note: Table names used are w.r.t switch. Hence, switch ingress is VM egress
28  * and vice versa.
29  */
30 public class TransparentIngressAclServiceImpl extends AbstractIngressAclServiceImpl {
31
32     private static final Logger LOG = LoggerFactory.getLogger(TransparentIngressAclServiceImpl.class);
33
34     public TransparentIngressAclServiceImpl(DataBroker dataBroker, IMdsalApiManager mdsalManager) {
35         super(dataBroker, mdsalManager);
36     }
37
38     @Override
39     protected String syncSpecificAclFlow(BigInteger dpId, int lportTag, int addOrRemove, Ace ace, String portId,
40             Map<String, List<MatchInfoBase>> flowMap, String flowName) {
41         // Not in use here. programAceRule function is overridden.
42         return null;
43     }
44
45     @Override
46     protected void programSpecificFixedRules(BigInteger dpid, String dhcpMacAddress,
47             List<AllowedAddressPairs> allowedAddresses, int lportTag, String portId, Action action, int addOrRemove) {
48     }
49
50     @Override
51     protected void programAceRule(BigInteger dpId, int lportTag, int addOrRemove, Ace ace, String portId,
52             List<AllowedAddressPairs> syncAllowedAddresses) {
53         LOG.debug("Transparent ingress acl service - do nothing");
54     }
55 }