jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds-labs] add docker NetworkAPI (#221)
Date Tue, 10 Nov 2015 21:29:49 GMT
> +      container = api.getContainerApi().inspectContainer(container.id());
> +   }
> +
> +   @AfterClass
> +   protected void tearDown() {
> +      if (container != null) {
> +         api.getContainerApi().stopContainer(container.id());
> +         api.getContainerApi().removeContainer(container.id());
> +      }
> +      if (network != null) {
> +         api().removeNetwork(network.id());
> +      }
> +   }
> +
> +   public void testCreateNetwork() throws IOException, InterruptedException {
> +      network = api().createNetwork(Network.create(NETWORK_NAME, null, null, null, null,
ImmutableMap.<String, Network.Details> of(), ImmutableMap.<String, String> of()));

It seems convenient to add a NetworkCreate object to simplify network creation, allowing users
to only pass the relevant parameters. WDYT?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/221/files#r44467867
Mime
View raw message