use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.Acl in project netvirt by opendaylight.
the class NeutronFlowClassifierListener method remove.
/**
* Method removes Acl respective to SfcFlowClassifier which is identified by InstanceIdentifier.
*
* @param deletedSfcFlowClassifier - SfcFlowClassifier for removing
*/
@Override
public void remove(SfcFlowClassifier deletedSfcFlowClassifier) {
Acl aclFlowClassifier = FlowClassifierTranslator.buildAcl(deletedSfcFlowClassifier);
sfcMdsalHelper.removeAclFlowClassifier(aclFlowClassifier);
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.Acl in project netvirt by opendaylight.
the class NeutronFlowClassifierListener method update.
/**
* Method updates the original SfcFlowClassifier to the update SfcFlowClassifier.
* Both are identified by same InstanceIdentifier.
*
* @param updatedSfcFlowClassifier - changed SfcFlowClassifier (contain updates)
*/
@Override
public void update(SfcFlowClassifier updatedSfcFlowClassifier) {
Acl aclFlowClassifier = FlowClassifierTranslator.buildAcl(updatedSfcFlowClassifier);
sfcMdsalHelper.updateAclFlowClassifier(aclFlowClassifier);
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.Acl in project netvirt by opendaylight.
the class OpenFlow13Provider method createIngressClassifierAclFlow.
/*
* Ingress Classifier ACL flow:
* Performs the ACL classification, and sends packets to Ingress Dispatcher
* Match on inport (corresponds to Neutron NW/tenant), Push NSH, init(nsp, nsi, C1, C2),
* and resubmit to Ingress Dispatcher to be sent down the rest of
* the pipeline
*/
public Flow createIngressClassifierAclFlow(NodeId nodeId, MatchBuilder match, Long port, long nsp, short nsi) {
OpenFlow13Utils.addMatchInPort(match, nodeId, port);
List<Action> actionList = new ArrayList<>();
actionList.add(OpenFlow13Utils.createActionNxPushNsh(actionList.size()));
actionList.add(OpenFlow13Utils.createActionNxLoadNshMdtype(NSH_MDTYPE_ONE, actionList.size()));
actionList.add(OpenFlow13Utils.createActionNxLoadNp(NSH_NP_ETH, actionList.size()));
actionList.add(OpenFlow13Utils.createActionNxLoadNsp((int) nsp, actionList.size()));
actionList.add(OpenFlow13Utils.createActionNxLoadNsi(nsi, actionList.size()));
actionList.add(OpenFlow13Utils.createActionNxLoadNshc1(ACL_FLAG_CONTEXT_VALUE, actionList.size()));
actionList.add(OpenFlow13Utils.createActionNxLoadNshc2(DEFAULT_NSH_CONTEXT_VALUE, actionList.size()));
actionList.add(OpenFlow13Utils.createActionResubmitTable(NwConstants.LPORT_DISPATCHER_TABLE, actionList.size()));
InstructionsBuilder isb = OpenFlow13Utils.wrapActionsIntoApplyActionsInstruction(actionList);
// The flowIdStr needs to be unique, so the best way to make it unique is to use the match
String flowIdStr = INGRESS_CLASSIFIER_ACL_FLOW_NAME + "_" + nodeId.getValue() + match.build().toString();
return OpenFlow13Utils.createFlowBuilder(NwConstants.INGRESS_SFC_CLASSIFIER_ACL_TABLE, INGRESS_CLASSIFIER_ACL_PRIORITY, INGRESS_CLASSIFIER_ACL_COOKIE, INGRESS_CLASSIFIER_ACL_FLOW_NAME, flowIdStr, match, isb).build();
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.Acl in project netvirt by opendaylight.
the class OpenFlow13Provider method createIngressClassifierFilterNoNshFlow.
/*
* Ingress Classifier Filter No NSH flow:
* Only allows Non-NSH packets to proceed in the classifier
* Match Any (NSH not present), Goto Classifier ACL table
*/
public Flow createIngressClassifierFilterNoNshFlow(NodeId nodeId) {
// MatchAny
MatchBuilder match = new MatchBuilder();
InstructionsBuilder isb = OpenFlow13Utils.appendGotoTableInstruction(new InstructionsBuilder(), NwConstants.INGRESS_SFC_CLASSIFIER_ACL_TABLE);
String flowIdStr = INGRESS_CLASSIFIER_FILTER_NONSH_FLOW_NAME + nodeId.getValue();
return OpenFlow13Utils.createFlowBuilder(NwConstants.INGRESS_SFC_CLASSIFIER_FILTER_TABLE, INGRESS_CLASSIFIER_FILTER_NONSH_PRIORITY, INGRESS_CLASSIFIER_FILTER_COOKIE, INGRESS_CLASSIFIER_FILTER_NONSH_FLOW_NAME, flowIdStr, match, isb).build();
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.Acl in project netvirt by opendaylight.
the class OpenFlow13Provider method createIngressClassifierAclNoMatchFlow.
/*
* Ingress Classifier ACL NoMatch flow:
* If there are no ACL classification matches, then resubmit back to
* the Ingress Dispatcher to let other services handle the packet.
*/
public Flow createIngressClassifierAclNoMatchFlow(NodeId nodeId) {
// This is a MatchAny flow
MatchBuilder match = new MatchBuilder();
List<Action> actionList = new ArrayList<>();
actionList.add(OpenFlow13Utils.createActionResubmitTable(NwConstants.LPORT_DISPATCHER_TABLE, actionList.size()));
InstructionsBuilder isb = OpenFlow13Utils.wrapActionsIntoApplyActionsInstruction(actionList);
String flowIdStr = INGRESS_CLASSIFIER_ACL_FLOW_NAME + "_" + nodeId.getValue();
return OpenFlow13Utils.createFlowBuilder(NwConstants.INGRESS_SFC_CLASSIFIER_ACL_TABLE, INGRESS_CLASSIFIER_ACL_NOMATCH_PRIORITY, INGRESS_CLASSIFIER_ACL_COOKIE, INGRESS_CLASSIFIER_ACL_FLOW_NAME, flowIdStr, match, isb).build();
}
Aggregations