Search in sources :

Example 1 with ActionRegMove

use of org.opendaylight.genius.mdsalutil.actions.ActionRegMove in project netvirt by opendaylight.

the class NexthopManager method buildBucketForDcGwLbGroup.

private Bucket buildBucketForDcGwLbGroup(String ipAddress, BigInteger dpnId, int index) {
    List<Action> listAction = new ArrayList<>();
    // ActionKey 0 goes to mpls label.
    int actionKey = 1;
    listAction.add(new ActionPushMpls().buildAction());
    listAction.add(new ActionRegMove(actionKey++, FibConstants.NXM_REG_MAPPING.get(index), 0, 19).buildAction());
    String tunnelInterfaceName = getTunnelInterfaceName(dpnId, new IpAddress(ipAddress.toCharArray()));
    List<Action> egressActions = getEgressActions(tunnelInterfaceName, actionKey++);
    if (!egressActions.isEmpty()) {
        listAction.addAll(getEgressActions(tunnelInterfaceName, actionKey++));
    } else {
        // clear off actions if there is no egress actions.
        listAction = Collections.emptyList();
    }
    return MDSALUtil.buildBucket(listAction, MDSALUtil.GROUP_WEIGHT, index, MDSALUtil.WATCH_PORT, MDSALUtil.WATCH_GROUP);
}
Also used : ActionPushMpls(org.opendaylight.genius.mdsalutil.actions.ActionPushMpls) Action(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action) ActionRegMove(org.opendaylight.genius.mdsalutil.actions.ActionRegMove) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) ArrayList(java.util.ArrayList) IpAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress)

Aggregations

ArrayList (java.util.ArrayList)1 CopyOnWriteArrayList (java.util.concurrent.CopyOnWriteArrayList)1 ActionPushMpls (org.opendaylight.genius.mdsalutil.actions.ActionPushMpls)1 ActionRegMove (org.opendaylight.genius.mdsalutil.actions.ActionRegMove)1 IpAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress)1 Action (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action)1