use of org.eclipse.linuxtools.docker.core.IDockerNetwork in project linuxtools by eclipse.
the class DockerConnection method listNetworks.
@Override
public List<IDockerNetwork> listNetworks() throws DockerException, InterruptedException {
try {
List<Network> networkList = client.listNetworks();
ArrayList<IDockerNetwork> networks = new ArrayList<>();
for (Network n : networkList) {
networks.add(new DockerNetwork(n));
}
return networks;
} catch (com.spotify.docker.client.exceptions.DockerException e) {
throw new DockerException(e.getMessage(), e.getCause());
}
}
Aggregations