All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.arquillian.cube.docker.junit5.NetworkDsl Maven / Gradle / Ivy

There is a newer version: 1.18.2
Show newest version
package org.arquillian.cube.docker.junit5;

import org.arquillian.cube.docker.impl.client.containerobject.dsl.Network;
import org.arquillian.cube.docker.impl.client.containerobject.dsl.NetworkBuilder;

public class NetworkDsl {

    private final NetworkBuilder networkBuilder;
    private Network network;

    public NetworkDsl(String networkId) {
        this.networkBuilder = Network.withDefaultDriver(networkId);
    }

    public NetworkDsl(String networkName, String driver) {
        this.networkBuilder = Network.withDriver(networkName, driver);
    }

    public String getNetworkName() {
        return this.network.getId();
    }

    public Network buildNetwork() {
        this.network = this.networkBuilder.build();
        return this.network;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy