Thanks @andreaturli! Let's squash and merge the PR!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/221#issuecomment-156463798
Closed #221.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/221#event-463732998
> + ),
> +
> ImmutableMap.of("39b69226f9d79f5634485fb236a23b2fe4e96a0a94128390a7fbbcc167065867",
> + Network.Details.create(
> +
> "ed2419a97c1d9954d05b46e462e7002ea552f216e9b136b80a7db8d98b442eda",
> //endpointId
> +
Just one missing assertion in the mock test!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/221#issuecomment-156247260
> + assertNotNull(network);
> + assertNotNull(network.id());
> +
> + }
> +
> + @Test(dependsOnMethods = "testCreateNetwork")
> + public void testGetNetwork() {
> + network = api().inspectNetwork(network.id());
> + assertNotNull(network);
> + }
> +
> +
> + container = api.getContainerApi().inspectContainer(container.id());
> + }
> +
> + @AfterClass
> + protected void tearDown() {
> + if (container != null) {
> + api.getContainerApi().stopContainer(container.id());
> +
> +
> + try {
> + api.removeNetwork(networkId);
> + assertSent(server, "DELETE", "/networks/" + networkId);
> +
> + } finally {
> + server.shutdown();
> + }
> + }
> +
> + public void testConnectContainerToNetwork() throws Exception {
> +
>}
>
>public Builder fromNetworkSettings(NetworkSettings in) {
> return
> this.ipAddress(in.ipAddress()).ipPrefixLen(in.ipPrefixLen()).gateway(in.gateway()).bridge(in.bridge())
> - .portMapping(in.portMapping()).ports(in.ports());
> +
>
> +
> + try {
> + api.removeNetwork(networkId);
> + assertSent(server, "DELETE", "/networks/" + networkId);
> +
> + } finally {
> + server.shutdown();
> + }
> + }
> +
> + public void testConnectContainerToNetwork() throws Exception {
> +
> + container = api.getContainerApi().inspectContainer(container.id());
> + }
> +
> + @AfterClass
> + protected void tearDown() {
> + if (container != null) {
> + api.getContainerApi().stopContainer(container.id());
> +
> + public void testGetNetwork() {
> + network = api().inspectNetwork(network.id());
> + assertNotNull(network);
> + }
> +
> + @Test(dependsOnMethods = "testGetNetwork")
> + public void testAttachContainerToNetwork() {
> + api().connectContainerToNetwork(network.id(),
Thanks @nacx I think I'm done now, I hope :)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/221#issuecomment-155814158
unfortunately the failure is not related to this PR but to
https://jclouds.ci.cloudbees.com/job/jclouds-labs-pull-requests/927/org.apache.jclouds.labs$jdbc/
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/221#issuecomment-155475255
Using the following versions
```
$ docker version
Client:
Version: 1.9.0
API version: 1.21
Go version: go1.4.3
Git commit: 76d6bc9
Built:Tue Nov 3 19:20:09 UTC 2015
OS/Arch: darwin/amd64
Server:
Version: 1.9.0
API version: 1.21
Go version: go1.4.3
Git
> +package org.jclouds.docker.domain;
> +
> +import static org.jclouds.docker.internal.NullSafeCopies.copyOf;
> +import java.util.List;
> +import java.util.Map;
> +
> +import org.jclouds.javax.annotation.Nullable;
> +import org.jclouds.json.SerializedNames;
> +
> +import
> + CreateImageOptions options =
> CreateImageOptions.Builder.fromImage(ALPINE_IMAGE_TAG);
> + InputStream createImageStream =
> api.getImageApi().createImage(options);
> + consumeStream(createImageStream);
> + }
> + image =
> + container = api.getContainerApi().inspectContainer(container.id());
> + }
> +
> + @AfterClass
> + protected void tearDown() {
> + if (container != null) {
> + api.getContainerApi().stopContainer(container.id());
> +
Nice job updating the model to the latest version @andreaturli. Thanks!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/221#issuecomment-155574738
> + public void testGetNetwork() {
> + network = api().inspectNetwork(network.id());
> + assertNotNull(network);
> + }
> +
> + @Test(dependsOnMethods = "testGetNetwork")
> + public void testAttachContainerToNetwork() {
> + api().connectContainerToNetwork(network.id(),
> + @Named("networks:list")
> + @GET
> + @Fallback(EmptyListOnNotFoundOr404.class)
> + List listNetworks();
> +
> + /**
> +* @param network the network’s configuration (@see BindToJsonPayload)
> +* @return a new network
> +*/
> + @Named("network:create")
> + @POST
> +
>}
>
>public Builder fromNetworkSettings(NetworkSettings in) {
> return
> this.ipAddress(in.ipAddress()).ipPrefixLen(in.ipPrefixLen()).gateway(in.gateway()).bridge(in.bridge())
> - .portMapping(in.portMapping()).ports(in.ports());
> +
>
> + }
> +
> + @Test(dependsOnMethods = "testGetNetwork")
> + public void testAttachContainerToNetwork() {
> + api().connectContainerToNetwork(network.id(), container.id());
> + Container foundContainer =
> api.getContainerApi().inspectContainer(container.id());
> +
>
> +
> + try {
> + api.removeNetwork(networkId);
> + assertSent(server, "DELETE", "/networks/" + networkId);
> +
> + } finally {
> + server.shutdown();
> + }
> + }
> +
> + public void testConnectContainerToNetwork() throws Exception {
> +
23 matches
Mail list logo