.put(TunnelTypeVxlanGpe.class, InterfaceInfo.InterfaceType.VXLAN_TRUNK_INTERFACE)
.build();
- public static String getDpnFromNodeConnectorId(NodeConnectorId portId) {
+ public static BigInteger getDpnFromNodeConnectorId(NodeConnectorId portId) {
/*
* NodeConnectorId is of form 'openflow:dpnid:portnum'
*/
String[] split = portId.getValue().split(IfmConstants.OF_URI_SEPARATOR);
- return split[1];
+ return new BigInteger(split[1]);
}
public static BigInteger getDpnFromInterface(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface ifState){
NodeConnectorId ncId = getNodeConnectorIdFromInterface(ifState);
if(ncId != null){
- return new BigInteger(getDpnFromNodeConnectorId(ncId));
+ return getDpnFromNodeConnectorId(ncId);
}
return null;
}
return result;
}
- public static List<Action> getEgressActionsForInterface(String interfaceName, Long tunnelKey,
+ public static List<Action> getEgressActionsForInterface(String interfaceName, Long tunnelKey, Integer actionKey,
DataBroker dataBroker, Boolean isDefaultEgress) {
- List<ActionInfo> listActionInfo = getEgressActionInfosForInterface(interfaceName, tunnelKey, 0, dataBroker, isDefaultEgress);
+ List<ActionInfo> listActionInfo = getEgressActionInfosForInterface(interfaceName, tunnelKey, actionKey==null?0:actionKey, dataBroker, isDefaultEgress);
List<Action> actionsList = new ArrayList<>();
for (ActionInfo actionInfo : listActionInfo) {
actionsList.add(actionInfo.buildAction());
List<Instruction> instructions = new ArrayList<>();
List<Action> actionList = MDSALUtil.buildActions(getEgressActionInfosForInterface(
interfaceName, tunnelKey, 0, dataBroker, isDefaultEgress));
- instructions.add(MDSALUtil.buildWriteActionsInstruction(actionList));
+ instructions.add(MDSALUtil.buildApplyActionsInstruction(actionList));
return instructions;
}
}
public static void unbindService(DataBroker dataBroker, String interfaceName, InstanceIdentifier<BoundServices>
- boundServicesInstanceIdentifier, Class<? extends ServiceModeBase> serviceMode){
+ boundServicesInstanceIdentifier, String parentInterface){
LOG.info("Unbinding Service from : {}", interfaceName);
DataStoreJobCoordinator dataStoreJobCoordinator = DataStoreJobCoordinator.getInstance();
- dataStoreJobCoordinator.enqueueJob(interfaceName,
+ dataStoreJobCoordinator.enqueueJob(parentInterface,
() -> {
WriteTransaction t = dataBroker.newWriteOnlyTransaction();
t.delete(LogicalDatastoreType.CONFIGURATION, boundServicesInstanceIdentifier);