public static EtcdCluster buildCluster(@NonNull String clusterName, int nodes, boolean ssl, boolean restartable) { final Network network = Network.builder().id(clusterName).build(); final CountDownLatch latch = new CountDownLatch(nodes); final EtcdContainer.LifecycleListener listener = new EtcdContainer.LifecycleListener() {
public void beforeAll() { String cookie = Hashing.sha256().hashString("secret cookie here", StandardCharsets.UTF_8).toString(); network = Network.NetworkImpl.builder() .enableIpv6(false) .createNetworkCmdModifiers(ImmutableList.of()) .build(); String clusterIdentity = UUID.randomUUID().toString(); rabbitMQ1 = DockerRabbitMQ.withCookieAndHostName(RABBIT_1, clusterIdentity, cookie, network); rabbitMQ2 = DockerRabbitMQ.withCookieAndHostName(RABBIT_2, clusterIdentity, cookie, network); rabbitMQ3 = DockerRabbitMQ.withCookieAndHostName(RABBIT_3, clusterIdentity, cookie, network); startDockerRabbits(); }
public static EtcdCluster buildCluster(@NonNull String clusterName, int nodes, boolean ssl, boolean restartable) { final Network network = Network.builder().id(clusterName).build(); final CountDownLatch latch = new CountDownLatch(nodes); final EtcdContainer.LifecycleListener listener = new EtcdContainer.LifecycleListener() {
public static EtcdCluster buildCluster(@NonNull String clusterName, int nodes, boolean ssl, boolean restartable) { final Network network = Network.builder().id(clusterName).build(); final CountDownLatch latch = new CountDownLatch(nodes); final EtcdContainer.LifecycleListener listener = new EtcdContainer.LifecycleListener() {
static Network newNetwork() { return builder().build(); }
@java.lang.SuppressWarnings("all") public static NetworkImplBuilder builder() { return new NetworkImplBuilder(); }
@Test public void testModifiers() throws Exception { try ( Network network = Network.builder() .createNetworkCmdModifier(cmd -> cmd.withDriver("macvlan")) .build(); ) { String id = network.getId(); assertEquals( "Flag is set", "macvlan", DockerClientFactory.instance().client().inspectNetworkCmd().withNetworkId(id).exec().getDriver() ); } }
static Network newNetwork() { return builder().build(); }