@Test public void AddVhostTest() { ReadWriteTransaction transaction = dataBroker.newReadWriteTransaction(); VhostUserCommand addCommand = VhostUserCommand.builder() .setOperation(General.Operations.PUT) .setName(INTERFACE_NAME) .setDescription(DESCRIPTION) .setRole(VhostUserRole.Server) .setSocket(SOCKET_NAME) .setBridgeDomain(BRIDGE_DOMAIN) .setEnabled(true) .build(); addCommand.execute(transaction); transaction.submit(); ReadOnlyTransaction readOnlyTransaction = dataBroker.newReadOnlyTransaction(); Optional<Interface> optional = DataStoreHelper.readFromDs(LogicalDatastoreType.CONFIGURATION, VppIidFactory.getInterfaceIID(new InterfaceKey(INTERFACE_NAME)), readOnlyTransaction); Assert.assertTrue("Interface was not written to DS", optional.isPresent()); Interface anInterface = optional.get(); Assert.assertEquals(BASIC_INTERFACE, anInterface); }
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();  }