You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Andrea Turli <no...@github.com> on 2014/11/03 16:38:27 UTC

[jclouds-labs] this closes JCLOUDS-737 (#109)

cc @adriancole could please review it?
You can merge this Pull Request by running:

  git pull https://github.com/andreaturli/jclouds-labs master

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds-labs/pull/109

-- Commit Summary --

  * this closes JCLOUDS-737

-- File Changes --

    M docker/README.md (10)
    M docker/pom.xml (1)
    M docker/src/main/java/org/jclouds/docker/DockerApi.java (22)
    M docker/src/main/java/org/jclouds/docker/DockerApiMetadata.java (8)
    M docker/src/main/java/org/jclouds/docker/compute/config/DockerComputeServiceContextModule.java (3)
    M docker/src/main/java/org/jclouds/docker/compute/functions/ContainerToNodeMetadata.java (7)
    M docker/src/main/java/org/jclouds/docker/compute/functions/ImageToImage.java (14)
    M docker/src/main/java/org/jclouds/docker/compute/options/DockerTemplateOptions.java (2)
    M docker/src/main/java/org/jclouds/docker/compute/strategy/DockerComputeServiceAdapter.java (47)
    M docker/src/main/java/org/jclouds/docker/config/DockerHttpApiModule.java (20)
    M docker/src/main/java/org/jclouds/docker/domain/Config.java (6)
    A docker/src/main/java/org/jclouds/docker/domain/ContainerSummary.java (117)
    M docker/src/main/java/org/jclouds/docker/domain/HostConfig.java (10)
    M docker/src/main/java/org/jclouds/docker/domain/Image.java (94)
    A docker/src/main/java/org/jclouds/docker/domain/Info.java (180)
    M docker/src/main/java/org/jclouds/docker/domain/Version.java (11)
    R docker/src/main/java/org/jclouds/docker/features/ContainerApi.java (106)
    A docker/src/main/java/org/jclouds/docker/features/ImageApi.java (110)
    A docker/src/main/java/org/jclouds/docker/features/MiscApi.java (73)
    A docker/src/main/java/org/jclouds/docker/suppliers/KeyStoreSupplier.java (130)
    A docker/src/main/java/org/jclouds/docker/suppliers/SSLContextWithKeysSupplier.java (77)
    M docker/src/test/java/org/jclouds/docker/compute/BaseDockerApiLiveTest.java (2)
    M docker/src/test/java/org/jclouds/docker/compute/DockerComputeServiceAdapterLiveTest.java (44)
    M docker/src/test/java/org/jclouds/docker/compute/DockerComputeServiceLiveTest.java (220)
    M docker/src/test/java/org/jclouds/docker/compute/functions/ContainerToNodeMetadataTest.java (10)
    M docker/src/test/java/org/jclouds/docker/compute/functions/ImageToImageTest.java (4)
    R docker/src/test/java/org/jclouds/docker/features/ContainerApiLiveTest.java (78)
    R docker/src/test/java/org/jclouds/docker/features/ContainerApiMockTest.java (221)
    A docker/src/test/java/org/jclouds/docker/features/ImageApiLiveTest.java (59)
    A docker/src/test/java/org/jclouds/docker/features/ImageApiMockTest.java (97)
    A docker/src/test/java/org/jclouds/docker/features/MiscApiLiveTest.java (90)
    A docker/src/test/java/org/jclouds/docker/features/MiscApiMockTest.java (159)
    M docker/src/test/java/org/jclouds/docker/internal/BaseDockerMockTest.java (4)
    M docker/src/test/resources/Dockerfile (17)
    A docker/src/test/resources/SimpleDockerfile (18)
    M docker/src/test/resources/container.json (204)
    A docker/src/test/resources/info.json (28)
    A docker/src/test/resources/version.json (9)

-- Patch Links --

https://github.com/jclouds/jclouds-labs/pull/109.patch
https://github.com/jclouds/jclouds-labs/pull/109.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs #1852](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs/1852/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109#issuecomment-61504057

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs #1854](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs/1854/) FAILURE
Looks like there's a problem with this pull request
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109#issuecomment-61515355

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by Adrian Cole <no...@github.com>.
merged. thx dude!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109#issuecomment-61588957

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-pull-requests #380](https://jclouds.ci.cloudbees.com/job/jclouds-labs-pull-requests/380/) UNSTABLE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109#issuecomment-61528147

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by Adrian Cole <no...@github.com>.
> @@ -69,13 +69,13 @@ protected Builder() {
>                   .identityName("user")
>                   .credentialName("password")
>                   .documentation(URI.create("https://docs.docker.com/reference/api/docker_remote_api/"))
> -                 .version("1.12")
> -                 .defaultEndpoint("http://127.0.0.1:2375")
> +                 .version("1.15")

oo fancy!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109/files#r19740362

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-pull-requests #381](https://jclouds.ci.cloudbees.com/job/jclouds-labs-pull-requests/381/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109#issuecomment-61530448

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs #1853](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs/1853/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109#issuecomment-61511039

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by Adrian Cole <no...@github.com>.
nope should be there

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109#issuecomment-61598373

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by Adrian Cole <no...@github.com>.
>     public static Image create(String id, String parent, String created, String container, String dockerVersion,
>           String architecture, String os, long size, long virtualSize, List<String> repoTags) {
>        return new AutoValue_Image(id, parent, created, container, dockerVersion, architecture, os, size, virtualSize,
>              copyOf(repoTags));
>     }
> +
> +   public static Builder builder() {

Is this an input type? If not, please don't add a builder.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109/files#r19743365

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by Adrian Cole <no...@github.com>.
>  import javax.inject.Named;
>  
>  import static com.google.common.base.Preconditions.checkNotNull;
>  import static com.google.common.collect.Iterables.get;
> +import java.util.Map;

maybe just do a format imports? I think there is some junk in this commit.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109/files#r19740488

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by Adrian Cole <no...@github.com>.
>        this.providerMetadata = checkNotNull(providerMetadata, "providerMetadata");
>        this.toPortableStatus = checkNotNull(toPortableStatus, "toPortableStatus cannot be null");
>        this.nodeNamingConvention = checkNotNull(namingConvention, "namingConvention").createWithoutPrefix();
>        this.images = checkNotNull(images, "images cannot be null");
>        this.locations = checkNotNull(locations, "locations");
> +      this.credentialStore = checkNotNull(credentialStore, "credentialStore cannot be null");

is this a mistake? I see a new field, but I don't see it used.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109/files#r19740439

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-pull-requests #379](https://jclouds.ci.cloudbees.com/job/jclouds-labs-pull-requests/379/) UNSTABLE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109#issuecomment-61515797

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by Adrian Cole <no...@github.com>.
> @@ -37,4 +46,15 @@ protected void bindErrorHandlers() {
>        bind(HttpErrorHandler.class).annotatedWith(ClientError.class).to(DockerErrorHandler.class);
>        bind(HttpErrorHandler.class).annotatedWith(ServerError.class).to(DockerErrorHandler.class);
>     }
> +
> +   @Override
> +   protected void configure() {

still need this to be documented. Not sure why we need custom ssl context otherwise

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109/files#r19747111

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by Adrian Cole <no...@github.com>.
LGTM on green. Make sure the api metadata reflects latest change to use client certificate auth.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109#issuecomment-61522577

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs #1851](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs/1851/) FAILURE
Looks like there's a problem with this pull request
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109#issuecomment-61496775

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs #1857](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs/1857/) UNSTABLE
Looks like there's a problem with this pull request
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109#issuecomment-61532625

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs #1856](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs/1856/) UNSTABLE
Looks like there's a problem with this pull request
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109#issuecomment-61530077

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by Adrian Cole <no...@github.com>.
> @@ -37,4 +46,15 @@ protected void bindErrorHandlers() {
>        bind(HttpErrorHandler.class).annotatedWith(ClientError.class).to(DockerErrorHandler.class);
>        bind(HttpErrorHandler.class).annotatedWith(ServerError.class).to(DockerErrorHandler.class);
>     }
> +
> +   @Override
> +   protected void configure() {

uhh comment on scary things like this, please? :)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109/files#r19743304

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by Andrea Turli <no...@github.com>.
Thx, do I need to backport it to 1.8.x?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109#issuecomment-61598179

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by Adrian Cole <no...@github.com>.
> + *     http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +package org.jclouds.docker.domain;
> +
> +import static com.google.common.base.Preconditions.checkNotNull;
> +
> +import com.google.common.base.Objects;
> +import com.google.gson.annotations.SerializedName;
> +
> +public class Info {

This is an output-only type. please clean this up with auto, this file is unnecessarily cruft-town

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109/files#r19743458

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-pull-requests #377](https://jclouds.ci.cloudbees.com/job/jclouds-labs-pull-requests/377/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109#issuecomment-61508792

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by Adrian Cole <no...@github.com>.
> @@ -17,12 +17,15 @@
>  package org.jclouds.docker.compute.config;
>  
>  import com.google.common.base.Function;
> +import com.google.inject.Scopes;

looks like a mistake?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109/files#r19740393

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by Adrian Cole <no...@github.com>.
nit: maybe a better commit name? :) That way lazy folks don't have to read JCLOUDS-737 to figure out what it is.

ex. "JCLOUDS-737 update docker to do X"

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109#issuecomment-61496892

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-pull-requests #375](https://jclouds.ci.cloudbees.com/job/jclouds-labs-pull-requests/375/) FAILURE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109#issuecomment-61496350

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs #1855](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs/1855/) UNSTABLE
Looks like there's a problem with this pull request
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109#issuecomment-61517890

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by Adrian Cole <no...@github.com>.
> +      return images;
> +   }
> +
> +   public String getDriver() {
> +      return driver;
> +   }
> +
> +   public String getExecutionDriver() {
> +      return executionDriver;
> +   }
> +
> +   public String getKernelVersion() {
> +      return kernelVersion;
> +   }
> +
> +   public int getDebug() {

don't add get prefix to immutable type accessors.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109/files#r19743499

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by Adrian Cole <no...@github.com>.
> +   public abstract String status();
> +
> +   @SerializedNames({"Id", "Names", "Created", "Image", "Command", "Ports", "Status"})
> +   public static ContainerSummary create(String id, List<String> names, String created, String image, String command, List<Port> ports, String status) {
> +      return new AutoValue_ContainerSummary(id, copyOf(names), created, image, command, copyOf(ports), status);
> +   }
> +
> +   public static Builder builder() {
> +      return new Builder();
> +   }
> +
> +   public Builder toBuilder() {
> +      return builder().fromContainerSummary(this);
> +   }
> +
> +   public static final class Builder {

Is this an input type?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109/files#r19743342

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-pull-requests #378](https://jclouds.ci.cloudbees.com/job/jclouds-labs-pull-requests/378/) FAILURE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109#issuecomment-61514817

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by Adrian Cole <no...@github.com>.
> @@ -16,22 +16,34 @@
>   */
>  package org.jclouds.docker;
>  
> -import org.jclouds.docker.features.RemoteApi;
> +import org.jclouds.docker.features.ContainerApi;
> +import org.jclouds.docker.features.ImageApi;
> +import org.jclouds.docker.features.MiscApi;
>  import org.jclouds.rest.annotations.Delegate;
>  
>  import java.io.Closeable;
>  
>  /**

can do this later, but I would delete all these javadoc. they don't add clarity of any kind.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109/files#r19740336

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-pull-requests #376](https://jclouds.ci.cloudbees.com/job/jclouds-labs-pull-requests/376/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109#issuecomment-61502209

Re: [jclouds-labs] this closes JCLOUDS-737 (#109)

Posted by Adrian Cole <no...@github.com>.
> @@ -83,7 +65,7 @@
>     @GET
>     @Path("/containers/json")
>     @Fallback(Fallbacks.EmptySetOnNotFoundOr404.class)
> -   Set<Container> listContainers(ListContainerOptions options);
> +   Set<ContainerSummary> listContainers(ListContainerOptions options);

Please switch this to return a List (ex. s/Set/List/g in this file)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/109/files#r19747156