@Test public void testDeleteTapPort() throws ExecutionException, InterruptedException { ReadWriteTransaction rwTx = dataBroker.newReadWriteTransaction(); rwTx.put(LogicalDatastoreType.CONFIGURATION, VppIidFactory.getInterfaceIID(BASIC_INTERFACE.getKey()), BASIC_INTERFACE, true); rwTx.submit().get(); Optional<Interface> optional = DataStoreHelper.readFromDs(LogicalDatastoreType.CONFIGURATION, VppIidFactory.getInterfaceIID(BASIC_INTERFACE.getKey()), dataBroker.newReadOnlyTransaction()); Assert.assertTrue(optional.isPresent()); TapPortCommand deleteCommand = TapPortCommand.builder() .setOperation(General.Operations.DELETE) .setInterfaceName(INTERFACE_NAME) .setTapName(TAP_NAME) .build(); ReadWriteTransaction rwTxDel = dataBroker.newReadWriteTransaction(); deleteCommand.execute(rwTxDel); rwTxDel.submit(); Optional<Interface> optionalDeleted = DataStoreHelper.readFromDs(LogicalDatastoreType.CONFIGURATION, VppIidFactory.getInterfaceIID(new InterfaceKey(deleteCommand.getName())), dataBroker.newReadOnlyTransaction()); Assert.assertFalse(optionalDeleted.isPresent()); }
public static TapPortCommandBuilder builder() { return new TapPortCommandBuilder(); }
TapPortCommand extends AbstractInterfaceCommand { public static TapPortCommandBuilder builder() { return new TapPortCommandBuilder(); } }
TapPortCommand extends AbstractInterfaceCommand { public static TapPortCommandBuilder builder() { return new TapPortCommandBuilder(); } private  TapPortCommand(TapPortCommandBuilder builder); }
TapPortCommand extends AbstractInterfaceCommand { public static TapPortCommandBuilder builder() { return new TapPortCommandBuilder(); } private  TapPortCommand(TapPortCommandBuilder builder); static TapPortCommandBuilder builder(); PhysAddress getPhysAddress(); Long getDeviceInstance(); String getTapName(); @Override InterfaceBuilder getInterfaceBuilder(); @Override String toString(); }
TapPortCommand extends AbstractInterfaceCommand { public static TapPortCommandBuilder builder() { return new TapPortCommandBuilder(); } private  TapPortCommand(TapPortCommandBuilder builder); static TapPortCommandBuilder builder(); PhysAddress getPhysAddress(); Long getDeviceInstance(); String getTapName(); @Override InterfaceBuilder getInterfaceBuilder(); @Override String toString();  }