use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ExperimenterId in project openflowplugin by opendaylight.
the class FinTimeoutCodecTest method createAction.
private Action createAction(Short idleTimeout, Short hardTimeout) {
ExperimenterId experimenterId = new ExperimenterId(NiciraConstants.NX_VENDOR_ID);
ActionBuilder actionBuilder = new ActionBuilder();
actionBuilder.setExperimenterId(experimenterId);
ActionFinTimeoutBuilder actionFinTimeoutBuilder = new ActionFinTimeoutBuilder();
NxActionFinTimeoutBuilder nxActionFinTimeoutBuilder = new NxActionFinTimeoutBuilder();
if (idleTimeout != null) {
nxActionFinTimeoutBuilder.setFinIdleTimeout(idleTimeout.intValue());
}
if (hardTimeout != null) {
nxActionFinTimeoutBuilder.setFinHardTimeout(hardTimeout.intValue());
}
actionFinTimeoutBuilder.setNxActionFinTimeout(nxActionFinTimeoutBuilder.build());
actionBuilder.setActionChoice(actionFinTimeoutBuilder.build());
return actionBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ExperimenterId in project openflowplugin by opendaylight.
the class MultipathCodecTest method createAction.
private Action createAction() {
ExperimenterId experimenterId = new ExperimenterId(NiciraConstants.NX_VENDOR_ID);
ActionBuilder actionBuilder = new ActionBuilder();
actionBuilder.setExperimenterId(experimenterId);
final ActionMultipathBuilder actionMultipathBuilder = new ActionMultipathBuilder();
NxActionMultipathBuilder nxActionMultipathBuilder = new NxActionMultipathBuilder();
nxActionMultipathBuilder.setFields(OfjNxHashFields.NXHASHFIELDSETHSRC);
nxActionMultipathBuilder.setBasis(2);
nxActionMultipathBuilder.setAlgorithm(OfjNxMpAlgorithm.NXMPALGMODULON);
nxActionMultipathBuilder.setMaxLink(4);
nxActionMultipathBuilder.setArg((long) 5);
nxActionMultipathBuilder.setOfsNbits(6);
nxActionMultipathBuilder.setDst((long) 7);
actionMultipathBuilder.setNxActionMultipath(nxActionMultipathBuilder.build());
actionBuilder.setActionChoice(actionMultipathBuilder.build());
return actionBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ExperimenterId in project openflowplugin by opendaylight.
the class RegLoadCodecTest method createAction.
private Action createAction() {
ExperimenterId experimenterId = new ExperimenterId(NiciraConstants.NX_VENDOR_ID);
ActionBuilder actionBuilder = new ActionBuilder();
actionBuilder.setExperimenterId(experimenterId);
final ActionRegLoadBuilder actionRegLoadBuilder = new ActionRegLoadBuilder();
NxActionRegLoadBuilder nxActionRegLoadBuilder = new NxActionRegLoadBuilder();
nxActionRegLoadBuilder.setOfsNbits(1);
nxActionRegLoadBuilder.setDst((long) 2);
nxActionRegLoadBuilder.setValue(BigInteger.valueOf(3));
actionRegLoadBuilder.setNxActionRegLoad(nxActionRegLoadBuilder.build());
actionBuilder.setActionChoice(actionRegLoadBuilder.build());
return actionBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ExperimenterId in project openflowplugin by opendaylight.
the class RegMoveCodecTest method createAction.
private Action createAction() {
ExperimenterId experimenterId = new ExperimenterId(NiciraConstants.NX_VENDOR_ID);
ActionBuilder actionBuilder = new ActionBuilder();
actionBuilder.setExperimenterId(experimenterId);
final ActionRegMoveBuilder actionRegMoveBuilder = new ActionRegMoveBuilder();
NxActionRegMoveBuilder nxActionRegMoveBuilder = new NxActionRegMoveBuilder();
nxActionRegMoveBuilder.setNBits(1);
nxActionRegMoveBuilder.setSrcOfs(2);
nxActionRegMoveBuilder.setDstOfs(3);
nxActionRegMoveBuilder.setSrc((long) 4);
nxActionRegMoveBuilder.setDst((long) 5);
actionRegMoveBuilder.setNxActionRegMove(nxActionRegMoveBuilder.build());
actionBuilder.setActionChoice(actionRegMoveBuilder.build());
return actionBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ExperimenterId in project openflowplugin by opendaylight.
the class ConntrackCodecTest method createActionWithoutCtAction.
private Action createActionWithoutCtAction() {
NxActionConntrackBuilder nxActionConntrackBuilder = new NxActionConntrackBuilder();
nxActionConntrackBuilder.setFlags(1);
nxActionConntrackBuilder.setZoneSrc((long) 2);
nxActionConntrackBuilder.setConntrackZone(3);
nxActionConntrackBuilder.setRecircTable((short) 4);
ExperimenterId experimenterId = new ExperimenterId(NiciraConstants.NX_VENDOR_ID);
ActionBuilder actionBuilder = new ActionBuilder();
actionBuilder.setExperimenterId(experimenterId);
ActionConntrackBuilder actionConntrackBuilder = new ActionConntrackBuilder();
actionConntrackBuilder.setNxActionConntrack(nxActionConntrackBuilder.build());
actionBuilder.setActionChoice(actionConntrackBuilder.build());
return actionBuilder.build();
}
Aggregations