Class EgressAclServiceImpl
- java.lang.Object
-
- org.opendaylight.netvirt.aclservice.AbstractAclServiceImpl
-
- org.opendaylight.netvirt.aclservice.EgressAclServiceImpl
-
- All Implemented Interfaces:
AclServiceListener
public class EgressAclServiceImpl extends AbstractAclServiceImpl
Provides the implementation for egress (w.r.t VM) ACL service.Note: Table names used are w.r.t switch. Hence, switch ingress is VM egress and vice versa.
-
-
Field Summary
-
Fields inherited from class org.opendaylight.netvirt.aclservice.AbstractAclServiceImpl
aclDataUtil, aclInterfaceCache, aclServiceUtils, direction, directionString, jobCoordinator, mdsalManager, serviceMode, txRunner
-
-
Constructor Summary
Constructors Constructor Description EgressAclServiceImpl(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager, AclDataUtil aclDataUtil, AclServiceUtils aclServiceUtils, org.opendaylight.infrautils.jobcoordinator.JobCoordinator jobCoordinator, AclInterfaceCache aclInterfaceCache)
Initialize the member variables.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bindService(AclInterface aclInterface)
Bind service.protected short
getAclCommitterTable()
protected short
getAclConntrackSenderTable()
protected short
getAclFilterCumDispatcherTable()
protected short
getAclForExistingTrafficTable()
protected short
getAclRemoteAclTable()
protected short
getAclRuleBasedFilterTable()
protected boolean
isValidDirection(java.lang.Class<? extends DirectionBase> direction)
protected void
processDhcpServiceUpdate(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, java.util.List<AllowedAddressPairs> allowedAddresses, int addOrRemove)
Programs DHCP service flows.protected void
programAntiSpoofingRules(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, java.util.List<AllowedAddressPairs> allowedAddresses, AclServiceManager.Action action, int addOrRemove)
Programs the anti-spoofing rules.protected void
programArpRule(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, java.util.List<AllowedAddressPairs> allowedAddresses, int lportTag, int addOrRemove)
Adds the rule to allow arp packets.protected void
programBroadcastRules(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, AclServiceManager.Action action, int addOrRemove)
Programs broadcast rules.protected void
programDhcpService(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, AclServiceManager.Action action, int addOrRemove)
Programs DHCP Service flows.protected void
programGotoClassifierTableRules(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, java.util.List<AllowedAddressPairs> aaps, int lportTag, int addOrRemove)
protected void
programIcmpv6RARule(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, java.util.List<SubnetInfo> subnets, int addOrRemove)
protected void
programRemoteAclTableFlow(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, java.lang.Integer aclTag, AllowedAddressPairs aap, int addOrRemove)
protected void
programSubnetBroadcastRules(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, java.util.List<SubnetInfo> subnetInfoList, int addOrRemove)
Programs broadcast rules.protected void
unbindService(AclInterface aclInterface)
Unbind service.-
Methods inherited from class org.opendaylight.netvirt.aclservice.AbstractAclServiceImpl
addFlowEntryToList, applyAce, applyAcl, bindAcl, collectDpns, getDispatcherTableResubmitInstructions, getDispatcherTableResubmitInstructions, getElanIdFromAclInterface, getRemoteAclTags, handleRemoteAclUpdate, programAceRule, programAceSpecificFlows, programAclCommitRuleForConntrack, programAclCommitRuleForNonConntrack, programAclCommitRules, programAclDispatcherTable, programAclPortSpecificFixedRules, programAclRuleMissDropRule, programAclRules, programConntrackInvalidDropRule, programConntrackRecircRule, programConntrackRecircRules, programFirstRemoteAclEntryInDispatcherTable, programFlows, programForAceNotHavingRemoteAclId, programLastRemoteAclEntryInDispatcherTable, programPortSpecificDropRules, removeAce, removeAcl, unbindAcl, updateAcl, updateRemoteAcl
-
-
-
-
Constructor Detail
-
EgressAclServiceImpl
public EgressAclServiceImpl(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager, AclDataUtil aclDataUtil, AclServiceUtils aclServiceUtils, org.opendaylight.infrautils.jobcoordinator.JobCoordinator jobCoordinator, AclInterfaceCache aclInterfaceCache)
Initialize the member variables.
-
-
Method Detail
-
bindService
public void bindService(AclInterface aclInterface)
Bind service.- Specified by:
bindService
in classAbstractAclServiceImpl
- Parameters:
aclInterface
- the acl interface
-
unbindService
protected void unbindService(AclInterface aclInterface)
Unbind service.- Specified by:
unbindService
in classAbstractAclServiceImpl
- Parameters:
aclInterface
- the acl interface
-
programDhcpService
protected void programDhcpService(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, AclServiceManager.Action action, int addOrRemove)
Programs DHCP Service flows.- Specified by:
programDhcpService
in classAbstractAclServiceImpl
- Parameters:
flowEntries
- the flow entriesport
- the acl interfaceaction
- add/modify/remove actionaddOrRemove
- addorRemove
-
processDhcpServiceUpdate
protected void processDhcpServiceUpdate(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, java.util.List<AllowedAddressPairs> allowedAddresses, int addOrRemove)
Programs DHCP service flows.- Specified by:
processDhcpServiceUpdate
in classAbstractAclServiceImpl
- Parameters:
flowEntries
- the flow entriesport
- the acl interfaceallowedAddresses
- the allowed addressesaddOrRemove
- addorRemove
-
programAntiSpoofingRules
protected void programAntiSpoofingRules(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, java.util.List<AllowedAddressPairs> allowedAddresses, AclServiceManager.Action action, int addOrRemove)
Description copied from class:AbstractAclServiceImpl
Programs the anti-spoofing rules.- Specified by:
programAntiSpoofingRules
in classAbstractAclServiceImpl
- Parameters:
flowEntries
- the flow entriesport
- the acl interfaceallowedAddresses
- the allowed addressesaction
- add/modify/remove actionaddOrRemove
- addorRemove
-
programRemoteAclTableFlow
protected void programRemoteAclTableFlow(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, java.lang.Integer aclTag, AllowedAddressPairs aap, int addOrRemove)
- Specified by:
programRemoteAclTableFlow
in classAbstractAclServiceImpl
-
programGotoClassifierTableRules
protected void programGotoClassifierTableRules(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, java.util.List<AllowedAddressPairs> aaps, int lportTag, int addOrRemove)
- Specified by:
programGotoClassifierTableRules
in classAbstractAclServiceImpl
-
programArpRule
protected void programArpRule(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, java.util.List<AllowedAddressPairs> allowedAddresses, int lportTag, int addOrRemove)
Adds the rule to allow arp packets.- Parameters:
flowEntries
- the flow entriesdpId
- the dpIdallowedAddresses
- the allowed addresseslportTag
- the lport tagaddOrRemove
- whether to add or remove the flow
-
programIcmpv6RARule
protected void programIcmpv6RARule(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, java.util.List<SubnetInfo> subnets, int addOrRemove)
- Specified by:
programIcmpv6RARule
in classAbstractAclServiceImpl
-
programBroadcastRules
protected void programBroadcastRules(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, AclServiceManager.Action action, int addOrRemove)
Programs broadcast rules.- Specified by:
programBroadcastRules
in classAbstractAclServiceImpl
- Parameters:
flowEntries
- the flow entriesport
- the Acl Interface portaddOrRemove
- whether to delete or add flow
-
programSubnetBroadcastRules
protected void programSubnetBroadcastRules(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, java.util.List<SubnetInfo> subnetInfoList, int addOrRemove)
Programs broadcast rules.- Specified by:
programSubnetBroadcastRules
in classAbstractAclServiceImpl
- Parameters:
flowEntries
- the flow entriesport
- the Acl Interface portsubnetInfoList
- the port subnet info listaddOrRemove
- whether to delete or add flow
-
isValidDirection
protected boolean isValidDirection(java.lang.Class<? extends DirectionBase> direction)
- Specified by:
isValidDirection
in classAbstractAclServiceImpl
-
getAclConntrackSenderTable
protected short getAclConntrackSenderTable()
- Specified by:
getAclConntrackSenderTable
in classAbstractAclServiceImpl
-
getAclForExistingTrafficTable
protected short getAclForExistingTrafficTable()
- Specified by:
getAclForExistingTrafficTable
in classAbstractAclServiceImpl
-
getAclFilterCumDispatcherTable
protected short getAclFilterCumDispatcherTable()
- Specified by:
getAclFilterCumDispatcherTable
in classAbstractAclServiceImpl
-
getAclRuleBasedFilterTable
protected short getAclRuleBasedFilterTable()
- Specified by:
getAclRuleBasedFilterTable
in classAbstractAclServiceImpl
-
getAclRemoteAclTable
protected short getAclRemoteAclTable()
- Specified by:
getAclRemoteAclTable
in classAbstractAclServiceImpl
-
getAclCommitterTable
protected short getAclCommitterTable()
- Specified by:
getAclCommitterTable
in classAbstractAclServiceImpl
-
-