public abstract class AbstractAclServiceImpl extends Object implements AclServiceListener
Modifier and Type | Field and Description |
---|---|
protected AclDataUtil |
aclDataUtil |
protected AclServiceUtils |
aclServiceUtils |
protected org.opendaylight.controller.md.sal.binding.api.DataBroker |
dataBroker |
protected org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager |
mdsalManager |
protected Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.ServiceModeBase> |
serviceMode |
Constructor and Description |
---|
AbstractAclServiceImpl(Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.ServiceModeBase> serviceMode,
org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker,
org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager,
AclDataUtil aclDataUtil,
AclServiceUtils aclServiceUtils)
Initialize the member variables.
|
Modifier and Type | Method and Description |
---|---|
boolean |
applyAce(AclInterface port,
String aclName,
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.access.list.entries.Ace ace) |
boolean |
applyAcl(AclInterface port) |
boolean |
bindAcl(AclInterface port) |
abstract void |
bindService(AclInterface aclInterface)
Bind service.
|
protected Set<BigInteger> |
collectDpns(Map<String,Set<AclInterface>> mapAclWithPortSet) |
protected int |
getAclFlowPriority(String poolName,
String flowName,
int addOrRemove)
Gets the priority of acl flow which is to be either removed or added.
|
protected List<org.opendaylight.genius.mdsalutil.InstructionInfo> |
getDispatcherTableResubmitInstructions(List<org.opendaylight.genius.mdsalutil.ActionInfo> actionsInfos)
Gets the dispatcher table resubmit instructions based on ingress/egress service mode w.r.t switch.
|
protected char[] |
getIpPrefixOrAddress(AllowedAddressPairs ip) |
protected String |
getOperAsString(int flowOper) |
protected abstract void |
programAceRule(AclInterface port,
int addOrRemove,
String aclName,
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.access.list.entries.Ace ace,
List<AllowedAddressPairs> syncAllowedAddresses)
Programs the ace custom rule.
|
protected abstract boolean |
programAclRules(AclInterface port,
List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid> aclUuidList,
int addOrRemove)
Programs the acl custom rules.
|
protected abstract void |
programBroadcastRules(AclInterface port,
int addOrRemove)
Programs broadcast rules.
|
protected abstract void |
programGeneralFixedRules(AclInterface port,
String dhcpMacAddress,
List<AllowedAddressPairs> allowedAddresses,
AclServiceManager.Action action,
int addOrRemove)
Program the default anti-spoofing rules.
|
protected abstract void |
programSpecificFixedRules(BigInteger dpid,
String dhcpMacAddress,
List<AllowedAddressPairs> allowedAddresses,
int lportTag,
String portId,
AclServiceManager.Action action,
int addOrRemove)
Program the default specific rules.
|
boolean |
rebindAcl(AclInterface portBefore,
AclInterface portAfter) |
boolean |
removeAce(AclInterface port,
String aclName,
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.access.list.entries.Ace ace) |
boolean |
removeAcl(AclInterface port) |
protected void |
syncFlow(BigInteger dpId,
short tableId,
String flowId,
int priority,
String flowName,
int idleTimeOut,
int hardTimeOut,
BigInteger cookie,
List<? extends org.opendaylight.genius.mdsalutil.MatchInfoBase> matches,
List<org.opendaylight.genius.mdsalutil.InstructionInfo> instructions,
int addOrRemove)
Writes/remove the flow to/from the datastore.
|
boolean |
unbindAcl(AclInterface port) |
protected abstract void |
unbindService(AclInterface aclInterface)
Unbind service.
|
boolean |
updateAcl(AclInterface portBefore,
AclInterface portAfter) |
protected abstract void |
updateArpForAllowedAddressPairs(BigInteger dpId,
int lportTag,
List<AllowedAddressPairs> deletedAAP,
List<AllowedAddressPairs> addedAAP)
Update arp for allowed address pairs.
|
protected abstract void |
updateRemoteAclTableForPort(AclInterface port,
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid acl,
int addOrRemove,
AllowedAddressPairs ip,
BigInteger aclId,
BigInteger dpId) |
protected final org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager
protected final org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker
protected final Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.ServiceModeBase> serviceMode
protected final AclDataUtil aclDataUtil
protected final AclServiceUtils aclServiceUtils
public AbstractAclServiceImpl(Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.ServiceModeBase> serviceMode, org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker, org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager, AclDataUtil aclDataUtil, AclServiceUtils aclServiceUtils)
serviceMode
- the service modedataBroker
- the data broker instance.mdsalManager
- the mdsal manager instance.aclDataUtil
- the acl data util.aclServiceUtils
- the acl service util.public boolean applyAcl(AclInterface port)
applyAcl
in interface AclServiceListener
public boolean bindAcl(AclInterface port)
bindAcl
in interface AclServiceListener
public boolean rebindAcl(AclInterface portBefore, AclInterface portAfter)
rebindAcl
in interface AclServiceListener
public boolean unbindAcl(AclInterface port)
unbindAcl
in interface AclServiceListener
public boolean updateAcl(AclInterface portBefore, AclInterface portAfter)
updateAcl
in interface AclServiceListener
public boolean removeAcl(AclInterface port)
removeAcl
in interface AclServiceListener
public boolean applyAce(AclInterface port, String aclName, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.access.list.entries.Ace ace)
applyAce
in interface AclServiceListener
public boolean removeAce(AclInterface port, String aclName, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.access.list.entries.Ace ace)
removeAce
in interface AclServiceListener
public abstract void bindService(AclInterface aclInterface)
aclInterface
- the acl interfaceprotected abstract void unbindService(AclInterface aclInterface)
aclInterface
- the acl interfaceprotected abstract void programGeneralFixedRules(AclInterface port, String dhcpMacAddress, List<AllowedAddressPairs> allowedAddresses, AclServiceManager.Action action, int addOrRemove)
port
- the acl interfacedhcpMacAddress
- the dhcp mac address.allowedAddresses
- the allowed addressesaction
- add/modify/remove actionaddOrRemove
- addorRemoveprotected abstract void updateArpForAllowedAddressPairs(BigInteger dpId, int lportTag, List<AllowedAddressPairs> deletedAAP, List<AllowedAddressPairs> addedAAP)
dpId
- the dp idlportTag
- the lport tagdeletedAAP
- the deleted allowed address pairsaddedAAP
- the added allowed address pairsprotected abstract void programSpecificFixedRules(BigInteger dpid, String dhcpMacAddress, List<AllowedAddressPairs> allowedAddresses, int lportTag, String portId, AclServiceManager.Action action, int addOrRemove)
dpid
- the dpiddhcpMacAddress
- the dhcp mac address.allowedAddresses
- the allowed addresseslportTag
- the lport tagportId
- the port idaction
- add/modify/remove actionaddOrRemove
- addorRemoveprotected abstract boolean programAclRules(AclInterface port, List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid> aclUuidList, int addOrRemove)
port
- acl interfaceaclUuidList
- the list of acl uuid to be appliedaddOrRemove
- whether to delete or add flowprotected abstract void programAceRule(AclInterface port, int addOrRemove, String aclName, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.access.list.entries.Ace ace, List<AllowedAddressPairs> syncAllowedAddresses)
port
- acl interfaceaddOrRemove
- whether to delete or add flowaclName
- the acl nameace
- rule to be programsyncAllowedAddresses
- the allowed addressesprotected abstract void programBroadcastRules(AclInterface port, int addOrRemove)
port
- the Acl Interface portaddOrRemove
- whether to delete or add flowprotected void syncFlow(BigInteger dpId, short tableId, String flowId, int priority, String flowName, int idleTimeOut, int hardTimeOut, BigInteger cookie, List<? extends org.opendaylight.genius.mdsalutil.MatchInfoBase> matches, List<org.opendaylight.genius.mdsalutil.InstructionInfo> instructions, int addOrRemove)
dpId
- the dpIdtableId
- the tableIdflowId
- the flowIdpriority
- the priorityflowName
- the flow nameidleTimeOut
- the idle timeouthardTimeOut
- the hard timeoutcookie
- the cookiematches
- the list of matches to be writtedinstructions
- the list of instruction to be written.addOrRemove
- add or remove the entries.protected List<org.opendaylight.genius.mdsalutil.InstructionInfo> getDispatcherTableResubmitInstructions(List<org.opendaylight.genius.mdsalutil.ActionInfo> actionsInfos)
actionsInfos
- the actions infosprotected abstract void updateRemoteAclTableForPort(AclInterface port, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid acl, int addOrRemove, AllowedAddressPairs ip, BigInteger aclId, BigInteger dpId)
protected String getOperAsString(int flowOper)
protected Set<BigInteger> collectDpns(Map<String,Set<AclInterface>> mapAclWithPortSet)
protected char[] getIpPrefixOrAddress(AllowedAddressPairs ip)
protected int getAclFlowPriority(String poolName, String flowName, int addOrRemove)
poolName
- the acl pool nameflowName
- the flow nameaddOrRemove
- add or remove the entries.Copyright © 2018 OpenDaylight. All rights reserved.