@Test public void DeleteVhostTest() { ReadWriteTransaction transaction = dataBroker.newReadWriteTransaction(); transaction.put(LogicalDatastoreType.CONFIGURATION, VppIidFactory.getInterfaceIID(BASIC_INTERFACE.getKey()), BASIC_INTERFACE, true); transaction.submit(); Optional<Interface> optional = DataStoreHelper.readFromDs(LogicalDatastoreType.CONFIGURATION, VppIidFactory.getInterfaceIID(BASIC_INTERFACE.getKey()), dataBroker.newReadOnlyTransaction()); Assert.assertTrue("Interface was not written to DS", optional.isPresent()); VhostUserCommand deleteCommand = VhostUserCommand.builder() .setOperation(General.Operations.DELETE) .setName(INTERFACE_NAME) .setSocket(SOCKET_NAME) .build(); ReadWriteTransaction deleteTransaction = dataBroker.newReadWriteTransaction(); deleteCommand.execute(deleteTransaction); deleteTransaction.submit(); Optional<Interface> optionalDeleted = DataStoreHelper.readFromDs(LogicalDatastoreType.CONFIGURATION, VppIidFactory.getInterfaceIID(new InterfaceKey(deleteCommand.getName())), dataBroker.newReadOnlyTransaction()); Assert.assertFalse("Interface was not deleted from DS", optionalDeleted.isPresent()); }
public static VhostUserCommandBuilder builder() { return new VhostUserCommandBuilder(); }
VhostUserCommand extends AbstractInterfaceCommand { public static VhostUserCommandBuilder builder() { return new VhostUserCommandBuilder(); } }
VhostUserCommand extends AbstractInterfaceCommand { public static VhostUserCommandBuilder builder() { return new VhostUserCommandBuilder(); } private  VhostUserCommand(VhostUserCommandBuilder builder); }
VhostUserCommand extends AbstractInterfaceCommand { public static VhostUserCommandBuilder builder() { return new VhostUserCommandBuilder(); } private  VhostUserCommand(VhostUserCommandBuilder builder); static VhostUserCommandBuilder builder(); String getSocket(); VhostUserRole getRole(); @Override InterfaceBuilder getInterfaceBuilder(); @Override String toString(); }
VhostUserCommand extends AbstractInterfaceCommand { public static VhostUserCommandBuilder builder() { return new VhostUserCommandBuilder(); } private  VhostUserCommand(VhostUserCommandBuilder builder); static VhostUserCommandBuilder builder(); String getSocket(); VhostUserRole getRole(); @Override InterfaceBuilder getInterfaceBuilder(); @Override String toString();  }