Search in sources :

Example 1 with NxActionLearn

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.learn.grouping.NxActionLearn in project openflowplugin by opendaylight.

the class LearnConvertor method convert.

@Override
public org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action convert(final Action input, final ActionPath path) {
    NxActionLearn action = ((ActionLearn) input.getActionChoice()).getNxActionLearn();
    NxLearnBuilder builder = new NxLearnBuilder();
    LearnConvertorUtil.convertUp(action, builder);
    return resolveAction(builder.build(), path);
}
Also used : NxLearnBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.learn.grouping.NxLearnBuilder) ActionLearn(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionLearn) NxActionLearn(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.learn.grouping.NxActionLearn) NxActionLearn(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.learn.grouping.NxActionLearn)

Example 2 with NxActionLearn

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.learn.grouping.NxActionLearn in project openflowplugin by opendaylight.

the class LearnConvertorUtil method getFlowMods.

private static List<FlowMods> getFlowMods(NxActionLearn action) {
    if (action.getFlowMods() == null) {
        return null;
    }
    List<FlowMods> flowMods = new ArrayList<>();
    for (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.learn.grouping.nx.action.learn.FlowMods flowMod : action.getFlowMods()) {
        FlowModsBuilder flowModBuilder = new FlowModsBuilder();
        FlowModSpec flowModSpec = buildExtFlowModSpec(flowMod.getFlowModSpec());
        flowModBuilder.setFlowModSpec(flowModSpec);
        flowMods.add(flowModBuilder.build());
    }
    return flowMods;
}
Also used : FlowModSpec(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.flow.mod.spec.FlowModSpec) ArrayList(java.util.ArrayList) FlowModsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.learn.grouping.nx.learn.FlowModsBuilder) FlowMods(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.learn.grouping.nx.learn.FlowMods)

Aggregations

ArrayList (java.util.ArrayList)1 ActionLearn (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionLearn)1 NxActionLearn (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.learn.grouping.NxActionLearn)1 FlowModSpec (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.flow.mod.spec.FlowModSpec)1 NxLearnBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.learn.grouping.NxLearnBuilder)1 FlowMods (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.learn.grouping.nx.learn.FlowMods)1 FlowModsBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.learn.grouping.nx.learn.FlowModsBuilder)1