use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.send.experimenter.input.experimenter.message.of.choice.bundle.control.sal.SalControlDataBuilder in project openflowplugin by opendaylight.
the class SalBundleServiceImplTest method testControlBundle.
@Test
public void testControlBundle() {
final ControlBundleInput input = new ControlBundleInputBuilder().setNode(NODE_REF).setBundleId(BUNDLE_ID).setFlags(BUNDLE_FLAGS).setType(BundleControlType.ONFBCTOPENREQUEST).setBundleProperty(properties).build();
final SendExperimenterInputBuilder experimenterBuilder = new SendExperimenterInputBuilder();
experimenterBuilder.setNode(NODE_REF);
experimenterBuilder.setExperimenterMessageOfChoice(new BundleControlSalBuilder().setSalControlData(new SalControlDataBuilder(input).build()).build());
service.controlBundle(input);
Mockito.verify(experimenterMessageService).sendExperimenter(experimenterBuilder.build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.send.experimenter.input.experimenter.message.of.choice.bundle.control.sal.SalControlDataBuilder in project openflowplugin by opendaylight.
the class BundleControlConverterTest method createOFPMessage.
private static BundleControlSal createOFPMessage(final boolean withProperty) {
final SalControlDataBuilder dataBuilder = new SalControlDataBuilder();
dataBuilder.setBundleId(new BundleId(1L));
dataBuilder.setType(BundleControlType.ONFBCTOPENREQUEST);
dataBuilder.setFlags(new BundleFlags(true, false));
List<BundleProperty> properties = new ArrayList<>();
if (withProperty) {
properties.add(BundleTestUtils.createExperimenterProperty(Mockito.mock(BundlePropertyExperimenterData.class)));
}
dataBuilder.setBundleProperty(properties);
return new BundleControlSalBuilder().setSalControlData(dataBuilder.build()).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.send.experimenter.input.experimenter.message.of.choice.bundle.control.sal.SalControlDataBuilder in project openflowplugin by opendaylight.
the class SalBundleServiceImpl method controlBundle.
@Override
public Future<RpcResult<Void>> controlBundle(ControlBundleInput input) {
final SendExperimenterInputBuilder experimenterInputBuilder = new SendExperimenterInputBuilder();
experimenterInputBuilder.setNode(input.getNode());
experimenterInputBuilder.setExperimenterMessageOfChoice(new BundleControlSalBuilder().setSalControlData(new SalControlDataBuilder(input).build()).build());
return experimenterMessageService.sendExperimenter(experimenterInputBuilder.build());
}
Aggregations