@Test public void DeleteUnnumberedInterfaceTest() { ReadWriteTransaction rwTx = dataBroker.newReadWriteTransaction(); rwTx.put(LogicalDatastoreType.CONFIGURATION, VppIidFactory.getInterfaceIID(BASIC_INTERFACE_UNNUMBERED.getKey()), BASIC_INTERFACE_UNNUMBERED, true); rwTx.submit(); Optional<Interface> optional = DataStoreHelper.readFromDs(LogicalDatastoreType.CONFIGURATION, VppIidFactory.getInterfaceIID(BASIC_INTERFACE_UNNUMBERED.getKey()), dataBroker.newReadOnlyTransaction()); Assert.assertTrue(optional.isPresent()); Assert.assertEquals(BASIC_INTERFACE_UNNUMBERED, optional.get()); UnnumberedInterfaceCommand unnumberedCommand = getUnnumberedInterfaceCommand(General.Operations.DELETE).build(); rwTx = dataBroker.newReadWriteTransaction(); unnumberedCommand.execute(rwTx); rwTx.submit(); optional = DataStoreHelper.readFromDs(LogicalDatastoreType.CONFIGURATION, VppIidFactory.getInterfaceIID(BASIC_INTERFACE_UNNUMBERED.getKey()), dataBroker.newReadOnlyTransaction()); Assert.assertTrue(optional.isPresent()); InterfaceUnnumberedAugmentation unnumberedAugmentation = optional.get().getAugmentation(InterfaceUnnumberedAugmentation.class); Assert.assertNull(unnumberedAugmentation.getUnnumbered()); }
@Override void put(ReadWriteTransaction rwTx) { rwTx.put(LogicalDatastoreType.CONFIGURATION, getIid(), getUnnumberedBuilder().build(), true); }
UnnumberedInterfaceCommand extends AbstractConfigCommand { @Override void put(ReadWriteTransaction rwTx) { rwTx.put(LogicalDatastoreType.CONFIGURATION, getIid(), getUnnumberedBuilder().build(), true); } }
UnnumberedInterfaceCommand extends AbstractConfigCommand { @Override void put(ReadWriteTransaction rwTx) { rwTx.put(LogicalDatastoreType.CONFIGURATION, getIid(), getUnnumberedBuilder().build(), true); } UnnumberedInterfaceCommand(UnnumberedInterfaceCommandBuilder builder); }
UnnumberedInterfaceCommand extends AbstractConfigCommand { @Override void put(ReadWriteTransaction rwTx) { rwTx.put(LogicalDatastoreType.CONFIGURATION, getIid(), getUnnumberedBuilder().build(), true); } UnnumberedInterfaceCommand(UnnumberedInterfaceCommandBuilder builder); static UnnumberedInterfaceCommandBuilder builder(); @Override InstanceIdentifier<Unnumbered> getIid(); String getUseInterface(); String getInterfaceName(); @Override String toString(); }
UnnumberedInterfaceCommand extends AbstractConfigCommand { @Override void put(ReadWriteTransaction rwTx) { rwTx.put(LogicalDatastoreType.CONFIGURATION, getIid(), getUnnumberedBuilder().build(), true); } UnnumberedInterfaceCommand(UnnumberedInterfaceCommandBuilder builder); static UnnumberedInterfaceCommandBuilder builder(); @Override InstanceIdentifier<Unnumbered> getIid(); String getUseInterface(); String getInterfaceName(); @Override String toString();  }