2 * Copyright (c) 2016 Red Hat, 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
8 package org.opendaylight.netvirt.aclservice;
10 import java.math.BigInteger;
11 import java.util.List;
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.netvirt.aclservice.utils.AclDataUtil;
19 import org.opendaylight.netvirt.aclservice.utils.AclServiceUtils;
20 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.access.list.entries.Ace;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.interfaces._interface.AllowedAddressPairs;
22 import org.slf4j.Logger;
23 import org.slf4j.LoggerFactory;
26 * Provides the transparent implementation for ingress (w.r.t VM) ACL service.
29 * Note: Table names used are w.r.t switch. Hence, switch ingress is VM egress
32 public class TransparentIngressAclServiceImpl extends AbstractIngressAclServiceImpl {
34 private static final Logger LOG = LoggerFactory.getLogger(TransparentIngressAclServiceImpl.class);
36 public TransparentIngressAclServiceImpl(DataBroker dataBroker, IMdsalApiManager mdsalManager,
37 AclDataUtil aclDataUtil, AclServiceUtils aclServiceUtils) {
38 super(dataBroker, mdsalManager, aclDataUtil, aclServiceUtils);
42 protected void bindService(String interfaceName) {
43 LOG.debug("transparent ingress acl service - do nothing");
47 protected void unbindService(String interfaceName) {
48 LOG.debug("transparent ingress acl service - do nothing");
52 protected void programGeneralFixedRules(BigInteger dpid, String dhcpMacAddress,
53 List<AllowedAddressPairs> allowedAddresses, int lportTag, Action action,
55 LOG.debug("transparent ingress acl service - do nothing");
59 protected String syncSpecificAclFlow(BigInteger dpId, int lportTag, int addOrRemove, String aclName, Ace ace,
60 String portId, Map<String, List<MatchInfoBase>> flowMap, String flowName) {
61 // Not in use here. programAceRule function is overridden.
66 protected void programSpecificFixedRules(BigInteger dpid, String dhcpMacAddress,
67 List<AllowedAddressPairs> allowedAddresses, int lportTag, String portId, Action action, int addOrRemove) {
71 protected void programAceRule(BigInteger dpId, int lportTag, int addOrRemove, String aclName, Ace ace,
72 String portId, List<AllowedAddressPairs> syncAllowedAddresses) {
73 LOG.debug("Transparent ingress acl service - do nothing");