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.api.utils.AclInterface;
19 import org.opendaylight.netvirt.aclservice.utils.AclDataUtil;
20 import org.opendaylight.netvirt.aclservice.utils.AclServiceUtils;
21 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.access.list.entries.Ace;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.interfaces._interface.AllowedAddressPairs;
23 import org.slf4j.Logger;
24 import org.slf4j.LoggerFactory;
27 * Provides the transparent implementation for egress (w.r.t VM) ACL service.
30 public class TransparentEgressAclServiceImpl extends AbstractEgressAclServiceImpl {
32 private static final Logger LOG = LoggerFactory.getLogger(TransparentEgressAclServiceImpl.class);
34 public TransparentEgressAclServiceImpl(DataBroker dataBroker, IMdsalApiManager mdsalManager,
35 AclDataUtil aclDataUtil, AclServiceUtils aclServiceUtils) {
36 super(dataBroker, mdsalManager, aclDataUtil, aclServiceUtils);
40 public void bindService(AclInterface aclInterface) {
41 LOG.debug("transparent egress acl service - do nothing");
45 protected void unbindService(AclInterface aclInterface) {
46 LOG.debug("transparent egress acl service - do nothing");
50 protected void programGeneralFixedRules(BigInteger dpid, String dhcpMacAddress,
51 List<AllowedAddressPairs> allowedAddresses, int lportTag, Action action,
53 LOG.debug("transparent egress acl service - do nothing");
57 protected void programSpecificFixedRules(BigInteger dpid, String dhcpMacAddress,
58 List<AllowedAddressPairs> allowedAddresses, int lportTag, String portId, Action action, int addOrRemove) {
62 protected void programAceRule(AclInterface port, int addOrRemove, String aclName, Ace ace,
63 List<AllowedAddressPairs> syncAllowedAddresses) {
64 LOG.debug("transparent egress acl service - do nothing");
68 protected String syncSpecificAclFlow(BigInteger dpId, int lportTag, int addOrRemove, Ace ace, String portId,
69 Map<String, List<MatchInfoBase>> flowMap, String flowName) {
70 // Not in use here. programAceRule function is overridden.