jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Turli <notificati...@github.com>
Subject Re: [jclouds-labs] add docker NetworkAPI (#221)
Date Wed, 11 Nov 2015 09:56:16 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()));

Not sure, maybe when I'll add auto value builders things will be easier?
I think there are a bunch of options:
- multiple Network.create() 
- `NetworkCreate` 
- Network.builder(). ... .build() using AutoValue builders
but maybe we should have some sort of guidelines.
wdyt?

Happy to solve it here or in a subsequent PR.

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