@Test public void testDeleteLoopbackPort() 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()); LoopbackCommand deleteCommand = LoopbackCommand.builder() .setOperation(General.Operations.DELETE) .setInterfaceName(INTERFACE_NAME) .setIpPrefix(IP_PREFIX) .setIpAddress(IP_ADDRESS) .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 LoopbackCommandBuilder builder() { return new LoopbackCommandBuilder(); }
LoopbackCommand extends AbstractInterfaceCommand { public static LoopbackCommandBuilder builder() { return new LoopbackCommandBuilder(); } }
LoopbackCommand extends AbstractInterfaceCommand { public static LoopbackCommandBuilder builder() { return new LoopbackCommandBuilder(); } private  LoopbackCommand(LoopbackCommandBuilder builder); }
LoopbackCommand extends AbstractInterfaceCommand { public static LoopbackCommandBuilder builder() { return new LoopbackCommandBuilder(); } private  LoopbackCommand(LoopbackCommandBuilder builder); static LoopbackCommandBuilder builder(); boolean getBvi(); @Override InterfaceBuilder getInterfaceBuilder(); @Override String toString(); }
LoopbackCommand extends AbstractInterfaceCommand { public static LoopbackCommandBuilder builder() { return new LoopbackCommandBuilder(); } private  LoopbackCommand(LoopbackCommandBuilder builder); static LoopbackCommandBuilder builder(); boolean getBvi(); @Override InterfaceBuilder getInterfaceBuilder(); @Override String toString();  }