[jira] [Commented] (JCLOUDS-458) Google Cloud Storage support

2014-03-21 Thread Ignasi Barrera (JIRA)
[ https://issues.apache.org/jira/browse/JCLOUDS-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13942874#comment-13942874 ] Ignasi Barrera commented on JCLOUDS-458: Roney, make sure to submit your proposal

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread psiniemi
Now there is duplicated code in the factories, but I guess they should be totally independent anyways. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38266301

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread CloudBees pull request builder plugin
[jclouds-pull-requests #677](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/677/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38268628

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread CloudBees pull request builder plugin
[jclouds-java-7-pull-requests #1147](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/1147/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38268926

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread Ignasi Barrera
>Now there is duplicated code in the factories, but I guess they should be >totally independent anyways. I personally prefer having that small bit of code duplicated in the different SSH drivers that use the lib than having the compute project coupled to it. @demobox thoughts on this? I'll giv

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread psiniemi
There is a branch psiniemi/ssh-agent where these commits are squashed into one. Would it be better to switch to that? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38269365

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread CloudBees pull request builder plugin
[jclouds-pull-requests #678](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/678/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38269362

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread Ignasi Barrera
Let's wait a bit until I test it again and see if @demobox has something to say about the changes. Just to have all the review comments and context in a single place. Then we can close this PR and open a new one from the new branch and merge from there. Does this work for you? --- Reply to this

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread CloudBees pull request builder plugin
[jclouds-java-7-pull-requests #1148](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/1148/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38269657

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread BuildHive
[jclouds » jclouds #932](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/932/) 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/pull/312#issuecomment

Build failed in Jenkins: jclouds » jclouds-labs-google #751

2014-03-21 Thread BuildHive
See -- Started by upstream project "jclouds/jclouds" build number 932 originally caused by: GitHub pull request #312 to jclouds/jclouds GitHub pull request #312 to jclouds/jclouds B

[jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Andrea Turli
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/57 -- Commit Summary -- * [JCLOUDS-500] Initial commit for docker -- File Changes

[jira] [Commented] (JCLOUDS-500) Create a Docker provider

2014-03-21 Thread Andrea (JIRA)
[ https://issues.apache.org/jira/browse/JCLOUDS-500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13943009#comment-13943009 ] Andrea commented on JCLOUDS-500: Hi, I've issued a PR for Docker at https://github.com/j

Jenkins build is still unstable: jclouds » jclouds-labs-openstack #936

2014-03-21 Thread BuildHive
See

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread CloudBees pull request builder plugin
[jclouds-labs-pull-requests #136](https://jclouds.ci.cloudbees.com/job/jclouds-labs-pull-requests/136/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57#issuecomment-38272933

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread CloudBees pull request builder plugin
[jclouds-pull-requests #679](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/679/) 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/pull/312#issuecomment-38273093

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread BuildHive
[jclouds » jclouds-labs #886](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs/886/) 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/jclo

Build failed in Jenkins: jclouds » jclouds-labs #886

2014-03-21 Thread BuildHive
See -- GitHub pull request #57 to jclouds/jclouds-labs Building remotely on s-299933b5 in workspace Cloning the remote Git

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread CloudBees pull request builder plugin
[jclouds-java-7-pull-requests #1149](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/1149/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38273580

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread Andrew Phillips
> jclouds-pull-requests #679 UNSTABLE Not sure if these are [real test failures](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/org.apache.jclouds.api$s3/679/testReport/junit/org.jclouds.s3.filters/RequestAuthorizeSignatureTest/testIdempotent/) or not...they're certainly not our "usu

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Andrew Phillips
> +limitations under the License. > + > +--> > +http://maven.apache.org/POM/4.0.0"; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/maven-v4_0_0.xsd";> > +4.0.0 > + > +org.apac

Build failed in Jenkins: jclouds » jclouds-labs-google #752

2014-03-21 Thread BuildHive
See -- Started by upstream project "jclouds/jclouds" build number 933 originally caused by: GitHub pull request #312 to jclouds/jclouds Building remotely on s-a39484e9 in workspace

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread BuildHive
[jclouds » jclouds #933](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/933/) 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/pull/312#issuecomment

Build failed in Jenkins: jclouds » jclouds-labs #887

2014-03-21 Thread BuildHive
See -- Started by upstream project "jclouds/jclouds" build number 933 originally caused by: GitHub pull request #312 to jclouds/jclouds Building remotely on s-299933b5 in workspace

Build failed in Jenkins: jclouds » jclouds-chef #847

2014-03-21 Thread BuildHive
See -- Started by upstream project "jclouds/jclouds" build number 933 originally caused by: GitHub pull request #312 to jclouds/jclouds Building remotely on s-299933b5 in workspace

Build failed in Jenkins: jclouds » jclouds-labs-openstack #937

2014-03-21 Thread BuildHive
See -- Started by upstream project "jclouds/jclouds" build number 933 originally caused by: GitHub pull request #312 to jclouds/jclouds Building remotely on s-299933b5 in workspa

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Andrew Phillips
> jclouds » jclouds-labs #886 FAILURE GitHub [timeout](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs/886/console) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/57#issuecomment-38275658

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread psiniemi
Would be nice to get the jenkins conf you run to get these so I could test these myself. Pure mvn clean install gives me no errors. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38277678

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread Andrew Phillips
I suspect it's spurious, since previous builds didn't fail. And you should be able to access the Jenkins logs - this is a public URL: https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/679/consoleFull In any case, I'll close'n'reopen to see if the failures go away. --- Reply to this ema

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread BuildHive
[jclouds » jclouds #934](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/934/) 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/jcloud

Build failed in Jenkins: jclouds » jclouds #934

2014-03-21 Thread BuildHive
See -- GitHub pull request #312 to jclouds/jclouds Building remotely on s-299933b5 in workspace Cloning the remote Git repository Cl

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread Andrew Phillips
> jclouds » jclouds #934 FAILURE Another [GitHub timeout](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/934/console) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38278954

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> +maven-surefire-plugin > + > + > +integration > +integration-test > + > +test > +

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + > +import java.io.Closeable; > + > +/** > + * Provides synchronous access to Docker. > + * > + * @author Andrea Turli > + * @see href="http://docs.docker.io/en/latest/api/docker_remote_api_v1.8/#docker-remote-api-v1-8";> > + */ > +public interface DockerApi extends Closeable { > + > + /** >

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + Properties properties = BaseHttpApiMetadata.defaultProperties(); > + properties.setProperty(Constants.PROPERTY_MAX_RETRIES, "15"); > + properties.setProperty("jclouds.ssh.retry-auth", "true"); > + properties.setProperty(Constants.PROPERTY_CONNECTION_TIMEOUT, > "120"); /

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + checkArgument(checkNotNull(input, "input") instanceof File, "this > binder is only valid for File!"); > + checkNotNull(request, "request"); > + > + File dockerFile = (File) input; > + File tmpDir = Files.createTempDir(); > + final File targetFile = new File(tmpDir + Fi

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + * 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; > + > +import org.jclouds.docker.compute.features.RemoteApi; > +import

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> +import org.jclouds.compute.ComputeServiceAdapter; > +import org.jclouds.compute.config.ComputeServiceAdapterContextModule; > +import org.jclouds.compute.domain.Hardware; > +import org.jclouds.compute.domain.NodeMetadata; > +import org.jclouds.compute.extensions.ImageExtension; > +import org.jclo

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> +import static com.google.common.base.Preconditions.checkNotNull; > +import static com.google.common.base.Preconditions.checkState; > +import static > org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_IMAGE_AVAILABLE; > + > +/** > + * Docker implementation of {@link > org.jclouds.comp

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + this.imageAvailablePredicate = checkNotNull(imageAvailablePredicate, > "imageAvailablePredicate"); > + } > + > + @Override > + public ImageTemplate buildImageTemplateFromNode(String name, final String > id) { > + Container container = api.getRemoteApi().inspectContainer(id); >

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + return userExecutor.submit(new Callable() { > + @Override > + public Image call() throws Exception { > +if (imageAvailablePredicate.apply(image)) > + return image.get(); > +throw new UncheckedTimeoutException("Image was not created > w

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> +import java.util.Set; > + > +/** > + * @author Andrea Turli > + */ > +public interface RemoteApi extends Closeable { > + > + /** > +* Get the information of the current docker version. > +* > +* @return The information of the current docker version. > +*/ > + @Named("version"

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + > + > ${test.docker.api-version} > + > + > ${test.docker.credential} > + > +

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + @QueryParam("limit") String limit, > + @QueryParam("since") String since, > + @QueryParam("before") String before); > + > + /** > +* List containers > +* > +* @return the running containers. > +*/ > + @Named("containers:list") > + @GET > + @

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + @Named("container:inspect") > + @GET > + @Path("/containers/{id}/json") > + @Consumes(MediaType.APPLICATION_JSON) > + @Fallback(Fallbacks.NullOnNotFoundOr404.class) > + Container inspectContainer(@PathParam("id") String containerId); > + > + /** > +* Delete the container. > +

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + @Named("image:delete") > + @DELETE > + @Path("/images/{name}") > + @Consumes(MediaType.APPLICATION_JSON) > + InputStream deleteImage(@PathParam("name") String name); > + > + > + /** > +* Build an image from Dockerfile via stdin > +*/ > + @Named("image:build") > + @POST >

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> +import java.io.File; > +import java.io.FileInputStream; > +import java.io.FileOutputStream; > +import java.io.IOException; > + > +import static com.google.common.collect.Iterables.getLast; > + > +/** > + * @author Andrea Turli > + */ > +public class Archives { > + > + public static File tar(Fi

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> +BufferedInputStream in = new BufferedInputStream(fin); > +while ((len = in.read(buf)) != -1) { > + tos.write(buf, 0, len); > +} > +in.close(); > + } > + tos.closeArchiveEntry(); > + } > + tos.close(); > +

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> +import static com.google.common.collect.Iterables.getOnlyElement; > + > +/** > + * @author Andrea Turli > + */ > +public class ContainerToNodeMetadata implements Function NodeMetadata> { > + > + @Resource > + @Named(ComputeServiceConstants.COMPUTE_LOGGER) > + protected Logger logger = Logg

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> +import org.jclouds.logging.Logger; > +import org.jclouds.rest.ApiContext; > + > +import javax.annotation.Resource; > +import javax.inject.Inject; > +import javax.inject.Named; > +import java.net.URI; > +import java.util.List; > +import java.util.Map; > + > +import static com.google.common.collec

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> +public class ContainerToNodeMetadata implements Function NodeMetadata> { > + > + @Resource > + @Named(ComputeServiceConstants.COMPUTE_LOGGER) > + protected Logger logger = Logger.NULL; > + > + private final ApiContext context; > + > + @Inject > + public ContainerToNodeMetadata(ApiCon

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + NodeMetadataBuilder nodeMetadataBuilder = new NodeMetadataBuilder(); > + nodeMetadataBuilder.id(container.getId()) > + .name(name) > + .group(group); > + // TODO Set up location properly > + LocationBuilder locationBuilder = new LocationBuilder(); >

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + locationBuilder.description(""); > + locationBuilder.id(""); > + locationBuilder.scope(LocationScope.HOST); > + nodeMetadataBuilder.location(locationBuilder.build()); > + // TODO setup hardware and hostname properly > + if (container.getStatus() != null) { > +

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + } > + > + private int getLoginPort(Container container) { > + if (container.getNetworkSettings() != null) { > + Map>> ports = > container.getNetworkSettings().getPorts(); > + if(ports != null) { > +return > Integer.parseInt(getOnlyElement(ports.get("22/t

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + .ids(from.getId()) > + .name(get(Splitter.on(":").split(description), 0)) > + .description(description) > + .operatingSystem(os) > + .status(Image.Status.AVAILABLE) > + .build(); > + } > + > + /** > +* Parses

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + */ > +@Singleton > +public class DockerComputeServiceAdapter implements > +ComputeServiceAdapter { > + > + @Resource > + @Named(ComputeServiceConstants.COMPUTE_LOGGER) > + protected Logger logger = Logger.NULL; > + > + private final DockerApi api; > + private final ApiContext

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + */ > +@Singleton > +public class DockerComputeServiceAdapter implements > +ComputeServiceAdapter { > + > + @Resource > + @Named(ComputeServiceConstants.COMPUTE_LOGGER) > + protected Logger logger = Logger.NULL; > + > + private final DockerApi api; > + private final ApiContext

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread CloudBees pull request builder plugin
[jclouds-pull-requests #680](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/680/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38285366

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + > + @Inject > + public DockerComputeServiceAdapter(DockerApi api, ApiContext > context) { > + this.api = checkNotNull(api, "api"); > + this.context = context; > + } > + > + @Override > + public NodeAndInitialCredentials > createNodeWithGroupEncodedIntoName(String group, St

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + @Consumes(MediaType.APPLICATION_JSON) > + @Headers(keys = "Content-Type", values = "application/tar") > + InputStream build(@QueryParam("t") String tag, Payload inputStream); > + > + /** > +* Build an image from Dockerfile via stdin > +*/ > + @Named("image:build") > + @POST

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread CloudBees pull request builder plugin
[jclouds-java-7-pull-requests #1150](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/1150/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38285959

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + .privileged(true); > + > + // TODO improve volumes management > + if (volumeBindings) { > + for (Volume v : template.getHardware().getVolumes()) { > +hostConfigBuilder.binds(ImmutableList.of(v.getDevice() + > ":/root")); > + } > + } else

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + @SerializedName("StdinOnce") > + private boolean stdinOnce; > + @SerializedName("Env") > + private List env; > + @SerializedName("Cmd") > + private List cmd; > + @SerializedName("Dns") > + private List dns; > + @SerializedName("Image") > + private String image; > + @Serial

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread Andrew Phillips
> jclouds-pull-requests #680 SUCCESS > jclouds-java-7-pull-requests #1150 SUCCESS Bingo ;-) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38286311

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + this.memory = memory; > + this.memorySwap = memorySwap; > + this.attachStdin = attachStdin; > + this.attachStdout = attachStdout; > + this.attachStderr = attachStderr; > + this.exposedPorts = exposedPorts; > + this.tty = tty; > + this.openStdin = openStdi

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + this.openStdin = openStdin; > + return this; > + } > + > + public Builder stdinOnce(boolean stdinOnce) { > + this.stdinOnce = stdinOnce; > + return this; > + } > + > + public Builder env(List env) { > + this.env = env; > + retu

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + this.attachStdin = attachStdin; > + return this; > + } > + > + public Builder attachStdout(boolean attachStdout) { > + this.attachStdout = attachStdout; > + return this; > + } > + > + public Builder attachStderr(boolean attachStderr) { > +

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + @SerializedName("ResolvConfPath") > + private String resolvConfPath; > + @SerializedName("Volumes") > + private Volumes volumes; > + @SerializedName("SizeRw") > + private long sizeRw; > + @SerializedName("SizeRootFs") > + private long sizeRootFs; > + @SerializedName("Command")

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + this.created = created; > + this.path = path; > + this.args = args; > + this.config = config; > + this.state = state; > + this.image = image; > + this.networkSettings = networkSettings; > + this.sysInitPath = sysInitPath; > + this.resolvConfPath = re

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
> + ", path='" + path + '\'' + > + ", args=" + Arrays.toString(args) + > + ", config=" + config + > + ", state=" + state + > + ", image='" + image + '\'' + > + ", networkSettings=" + networkSettings + > + ",

Re: [jclouds] JCLOUDS-486 This will allow booting up nova servers with fixed IPs and p... (#313)

2014-03-21 Thread Zack Shoylev
> -} > + } > + } > + } > + > + @Test > + public void testCreateInWrongAvailabilityZone() { > + String serverId = null; > + for (String zoneId : zones) { > + ServerApi serverApi = api.getServerApiForZone(zoneId); > + try { > +serverId = cr

Re: [jclouds] JCLOUDS-486 This will allow booting up nova servers with fixed IPs and p... (#313)

2014-03-21 Thread Andrew Phillips
> -} > + } > + } > + } > + > + @Test > + public void testCreateInWrongAvailabilityZone() { > + String serverId = null; > + for (String zoneId : zones) { > + ServerApi serverApi = api.getServerApiForZone(zoneId); > + try { > +serverId = cr

Re: [jclouds] JCLOUDS-486 This will allow booting up nova servers with fixed IPs and p... (#313)

2014-03-21 Thread Zack Shoylev
> - } > - } > -} > - > -@Test > -public void testCreateInAvailabilityZone() { > -String serverId = null; > -for (String zoneId : zones) { > -ServerApi serverApi = api.getServerApiForZone(zoneId); > -try { > -serverId

Re: [jclouds] JCLOUDS-486 This will allow booting up nova servers with fixed IPs and p... (#313)

2014-03-21 Thread Zack Shoylev
> +serverId = createServer(zoneId, "nova", > Server.Status.ACTIVE).getId(); > +Server server = serverApi.get(serverId); > +assertEquals(server.getStatus(), Server.Status.ACTIVE); > + } finally { > +serverApi.delete(serverId); > + } >

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Ignasi Barrera
In general, make all domain model classes immutable by setting the fields to final. Also add the proper null and other checks for all parameters in the constructor. There are also no unit tests, and there should be added for: * All custom binders. * The custom json parser. * Mock tests for all

Re: [jclouds] JCLOUDS-486 This will allow booting up nova servers with fixed IPs and p... (#313)

2014-03-21 Thread Zack Shoylev
> + * See the License for the specific language governing permissions and > + * limitations under the License. > + */ > +package org.jclouds.openstack.nova.v2_0.domain; > + > +import java.beans.ConstructorProperties; > + > +import com.google.common.base.Objects; > +import com.google.common.base.Obj

Re: [jclouds] JCLOUDS-486 This will allow booting up nova servers with fixed IPs and p... (#313)

2014-03-21 Thread Andrew Phillips
> + * See the License for the specific language governing permissions and > + * limitations under the License. > + */ > +package org.jclouds.openstack.nova.v2_0.domain; > + > +import java.beans.ConstructorProperties; > + > +import com.google.common.base.Objects; > +import com.google.common.base.Obj

Re: [jclouds] JCLOUDS-486 This will allow booting up nova servers with fixed IPs and p... (#313)

2014-03-21 Thread Zack Shoylev
> -} > + } > + } > + } > + > + @Test > + public void testCreateInWrongAvailabilityZone() { > + String serverId = null; > + for (String zoneId : zones) { > + ServerApi serverApi = api.getServerApiForZone(zoneId); > + try { > +serverId = cr

Re: [jclouds] JCLOUDS-486 This will allow booting up nova servers with fixed IPs and p... (#313)

2014-03-21 Thread Andrew Phillips
> -} > + } > + } > + } > + > + @Test > + public void testCreateInWrongAvailabilityZone() { > + String serverId = null; > + for (String zoneId : zones) { > + ServerApi serverApi = api.getServerApiForZone(zoneId); > + try { > +serverId = cr

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread Ignasi Barrera
I just tested it again and it works great. Thanks @psiniemi ! @demobox Any comments on the dependency thing and where to put the agent detection logic? @psiniemi when everything is OK I'll squash and push the commits myself, so you don't have to open a new PR from your other branch (let's get th

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread psiniemi
Sounds great :) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38292692

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Andrea Turli
> + > +import java.io.Closeable; > + > +/** > + * Provides synchronous access to Docker. > + * > + * @author Andrea Turli > + * @see href="http://docs.docker.io/en/latest/api/docker_remote_api_v1.8/#docker-remote-api-v1-8";> > + */ > +public interface DockerApi extends Closeable { > + > + /** >

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Andrea Turli
> + @QueryParam("limit") String limit, > + @QueryParam("since") String since, > + @QueryParam("before") String before); > + > + /** > +* List containers > +* > +* @return the running containers. > +*/ > + @Named("containers:list") > + @GET > + @

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Andrea Turli
> + locationBuilder.description(""); > + locationBuilder.id(""); > + locationBuilder.scope(LocationScope.HOST); > + nodeMetadataBuilder.location(locationBuilder.build()); > + // TODO setup hardware and hostname properly > + if (container.getStatus() != null) { > +

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Andrea Turli
> + } > + > + private int getLoginPort(Container container) { > + if (container.getNetworkSettings() != null) { > + Map>> ports = > container.getNetworkSettings().getPorts(); > + if(ports != null) { > +return > Integer.parseInt(getOnlyElement(ports.get("22/t

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Andrea Turli
> + > + @Inject > + public DockerComputeServiceAdapter(DockerApi api, ApiContext > context) { > + this.api = checkNotNull(api, "api"); > + this.context = context; > + } > + > + @Override > + public NodeAndInitialCredentials > createNodeWithGroupEncodedIntoName(String group, St

Re: [jclouds-labs] [JCLOUDS-500] Initial commit for docker (#57)

2014-03-21 Thread Andrea Turli
> + */ > +@Singleton > +public class DockerComputeServiceAdapter implements > +ComputeServiceAdapter { > + > + @Resource > + @Named(ComputeServiceConstants.COMPUTE_LOGGER) > + protected Logger logger = Logger.NULL; > + > + private final DockerApi api; > + private final ApiContext

Re: [jclouds] Add ssh-agent support via jsch agentproxy (#312)

2014-03-21 Thread Andrew Phillips
> Any comments on the dependency thing and where to put the agent detection > logic? Will try to make some time to review this later... --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/312#issuecomment-38301606

[jclouds] Fixes potentially deleting a null server id. (#323)

2014-03-21 Thread Zack Shoylev
You can merge this Pull Request by running: git pull https://github.com/rackspace/jclouds delete-null-server-fix Or you can view, comment on it, or merge it online at: https://github.com/jclouds/jclouds/pull/323 -- Commit Summary -- * Fixes potentially deleting a null server id. -- Fil

Re: [jclouds] Fixes potentially deleting a null server id. (#323)

2014-03-21 Thread Andrew Phillips
> @@ -88,7 +88,9 @@ public void testCreateInAvailabilityZone() { > Server server = serverApi.get(serverId); > assertEquals(server.getStatus(), Server.Status.ACTIVE); > } finally { > -serverApi.delete(serverId); > +if (serverId!=null) { [m

Re: [jclouds] Fixes potentially deleting a null server id. (#323)

2014-03-21 Thread Andrew Phillips
Thanks, @zack-shoylev! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/323#issuecomment-38313055

Jenkins build is back to normal : jclouds » jclouds #935

2014-03-21 Thread BuildHive
See

Re: [jclouds] Fixes potentially deleting a null server id. (#323)

2014-03-21 Thread BuildHive
[jclouds » jclouds #935](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/935/) 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/pull/323#issuecomment

Build failed in Jenkins: jclouds » jclouds-labs-google #753

2014-03-21 Thread BuildHive
See -- Started by upstream project "jclouds/jclouds" build number 935 originally caused by: GitHub pull request #323 to jclouds/jclouds Building remotely on s-0a46b808 in workspace

Build failed in Jenkins: jclouds » jclouds-chef #848

2014-03-21 Thread BuildHive
See -- Started by upstream project "jclouds/jclouds" build number 935 originally caused by: GitHub pull request #323 to jclouds/jclouds Building remotely on s-0a46b808 in workspace

Jenkins build is unstable: jclouds » jclouds-labs-openstack #938

2014-03-21 Thread BuildHive
See

Re: [jclouds] Fixes potentially deleting a null server id. (#323)

2014-03-21 Thread Andrew Phillips
+1 - good to go for me! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/323#issuecomment-38316357

Re: [jclouds] Fixes potentially deleting a null server id. (#323)

2014-03-21 Thread CloudBees pull request builder plugin
[jclouds-pull-requests #681](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/681/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/323#issuecomment-38316298

Jenkins build is back to normal : jclouds » jclouds-labs #888

2014-03-21 Thread BuildHive
See

Build failed in Jenkins: jclouds » jclouds-karaf #821

2014-03-21 Thread BuildHive
See -- Started by upstream project "jclouds/jclouds-labs" build number 888 originally caused by: Started by upstream project "jclouds/jclouds" build number 935 originally caused by: Git

  1   2   >