[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-tabpanelfocusedCommentId=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 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 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:

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

2014-03-21 Thread BuildHive
See https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/751/ -- 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

[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-tabpanelfocusedCommentId=13943009#comment-13943009 ] Andrea commented on JCLOUDS-500: Hi, I've issued a PR for Docker at

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

2014-03-21 Thread BuildHive
See https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/936/

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:

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

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

2014-03-21 Thread Andrew Phillips
+limitations under the License. + +-- +project xmlns=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; +modelVersion4.0.0/modelVersion +

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

2014-03-21 Thread BuildHive
See https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/752/ -- 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:

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

2014-03-21 Thread BuildHive
See https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs/887/ -- 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 https://buildhive.cloudbees.com/job/jclouds/job/jclouds-chef/847/ -- 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 https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/937/ -- 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

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

Build failed in Jenkins: jclouds » jclouds #934

2014-03-21 Thread BuildHive
See https://buildhive.cloudbees.com/job/jclouds/job/jclouds/934/ -- GitHub pull request #312 to jclouds/jclouds Building remotely on s-299933b5 in workspace https://buildhive.cloudbees.com/job/jclouds/job/jclouds/ws/ Cloning the remote Git repository

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
+artifactIdmaven-surefire-plugin/artifactId +executions +execution +idintegration/id +phaseintegration-test/phase +goals

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 a href=http://docs.docker.io/en/latest/api/docker_remote_api_v1.8/#docker-remote-api-v1-8;/a + */ +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); // 15 minutes

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

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

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); + if

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

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

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

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

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 + @Path(/build)

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(File baseDir,

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(); + return

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 FunctionContainer, NodeMetadata { + + @Resource + @Named(ComputeServiceConstants.COMPUTE_LOGGER) + protected Logger logger =

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

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

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) { + MapString, ListMapString,String ports = container.getNetworkSettings().getPorts(); + if(ports != null) { +return

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 the item

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

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

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

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

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, ApiContextDockerApi context) { + this.api = checkNotNull(api, api); + this.context = context; + } + + @Override + public NodeAndInitialCredentialsContainer createNodeWithGroupEncodedIntoName(String

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 ListString env; + @SerializedName(Cmd) + private ListString cmd; + @SerializedName(Dns) + private ListString dns; + @SerializedName(Image) + private String image; +

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 = openStdin; +

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) + private

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: [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 =

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 =

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
+ * 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

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 =

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
+ @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) { + MapString, ListMapString,String ports = container.getNetworkSettings().getPorts(); + if(ports != null) { +return

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

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

[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. --

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) { [minor]

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:

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

2014-03-21 Thread BuildHive
See https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/753/ -- 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

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 https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs/888/

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

2014-03-21 Thread BuildHive
See https://buildhive.cloudbees.com/job/jclouds/job/jclouds-karaf/821/ -- 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: GitHub

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

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

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

2014-03-21 Thread Zack Shoylev
About to merge then --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/323#issuecomment-38318532

Re: [jclouds] Delete objects in a container efficiently. (#214)

2014-03-21 Thread Andrew Gaul
import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.inject.Inject; /** * Deletes all keys in the container - * + * * @author Adrian Cole Add your name to since this is a large body of

Re: [jclouds] Delete objects in a container efficiently. (#214)

2014-03-21 Thread Andrew Gaul
Can you open a JIRA issue and reference it in the commit message? This will allow us to communicate this improvement in the release notes. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/214#issuecomment-38321551

Re: [jclouds] Delete objects in a container efficiently. (#214)

2014-03-21 Thread Andrew Gaul
+ * acquired in 'maxTime', a TimeoutException is thrown. Any outstanding + * futures at that time are cancelled. + */ + final Semaphore semaphore = new Semaphore(numOutStandingRequests); + /* + * When a future is created, a reference for that is added to the

Re: [jclouds] Delete objects in a container efficiently. (#214)

2014-03-21 Thread Andrew Gaul
+ * a timeout. Also, when the reference is removed from this list and when + * the executorService removes the reference that it has maintained, the + * future will be marked for GC since there should be no other references + * to it. This is important because

Re: [jclouds] Delete objects in a container efficiently. (#214)

2014-03-21 Thread Andrew Gaul
@shrinandj This commit represents a big improvement and I apologize for my delayed comments. Can you address some of these and add TODOs for the rest so we can commit this as soon as possible? Specifically we must address the O(n) behavior and I do not understand some of the synchronization.

Re: [jclouds] Add BlobStoreBench to jclouds. (#239)

2014-03-21 Thread Andrew Gaul
I will investigate creating a jclouds-tools repository to host this commit and future tools. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/239#issuecomment-38323342

Re: [jclouds] Delete objects in a container efficiently. (#214)

2014-03-21 Thread Andrew Gaul
+ listing = blobStore.list(containerName, options); + } catch (ContainerNotFoundException ce) { + return listing; + } + + // recurse on subdirectories + if (options.isRecursive()) { + for (StorageMetadata md : listing) { +String

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

2014-03-21 Thread Andrew Phillips
@@ -31,7 +31,7 @@ interface Factory { SshClient create(HostAndPort socket, LoginCredentials credentials); - + boolean existsSshAgent(); `hasSshAgent`? Or is the SSH agent not really something the client _has_, rather something it _talks to_? --- Reply to this email

[jira] [Resolved] (JCLOUDS-506) Retry on S3 HTTP 504 Gateway Timeout status codes

2014-03-21 Thread Andrew Gaul (JIRA)
[ https://issues.apache.org/jira/browse/JCLOUDS-506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Gaul resolved JCLOUDS-506. - Resolution: Fixed Fixed in a7fa3b9c620fe80eae1741078905a1d5416b88ad. Retry on S3 HTTP 504

[jira] [Created] (JCLOUDS-506) Retry on S3 HTTP 504 Gateway Timeout status codes

2014-03-21 Thread Andrew Gaul (JIRA)
Andrew Gaul created JCLOUDS-506: --- Summary: Retry on S3 HTTP 504 Gateway Timeout status codes Key: JCLOUDS-506 URL: https://issues.apache.org/jira/browse/JCLOUDS-506 Project: jclouds Issue

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

2014-03-21 Thread Andrew Phillips
} sessionConnection = SessionConnection.builder().hostAndPort(HostAndPort.fromParts(host, socket.getPort())).loginCredentials( loginCredentials).proxy(checkNotNull(proxyConfig, proxyConfig)).connectTimeout(timeout).sessionTimeout(timeout).build(); }

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

2014-03-21 Thread Andrew Phillips
} sessionConnection = SessionConnection.builder().hostAndPort(HostAndPort.fromParts(host, socket.getPort())).loginCredentials( loginCredentials).proxy(checkNotNull(proxyConfig, proxyConfig)).connectTimeout(timeout).sessionTimeout(timeout).build(); }

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

2014-03-21 Thread Andrew Phillips
@@ -128,23 +132,44 @@ public JschSshClient(ProxyConfig proxyConfig, BackoffLimitedRetryHandler backoff this.user = checkNotNull(loginCredentials, loginCredentials).getUser(); this.host = checkNotNull(socket, socket).getHostText(); checkArgument(socket.getPort() 0, ssh

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

2014-03-21 Thread Andrew Phillips
} sessionConnection = SessionConnection.builder().hostAndPort(HostAndPort.fromParts(host, socket.getPort())).loginCredentials( loginCredentials).proxy(checkNotNull(proxyConfig, proxyConfig)).connectTimeout(timeout).sessionTimeout(timeout).build(); }

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

2014-03-21 Thread Andrew Phillips
} sessionConnection = SessionConnection.builder().hostAndPort(HostAndPort.fromParts(host, socket.getPort())).loginCredentials( loginCredentials).proxy(checkNotNull(proxyConfig, proxyConfig)).connectTimeout(timeout).sessionTimeout(timeout).build(); }

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

2014-03-21 Thread Andrew Phillips
+ !loginCredentials.getPrivateKey().isEmpty() + !loginCredentials.getPrivateKey().contains(Proc-Type: 4,ENCRYPTED); + } + + static Connector getSSHAgentConnector() { + JSch.setConfig(PreferredAuthentications, publickey); + ConnectorFactory cf =

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

2014-03-21 Thread Andrew Phillips
byte[] privateKey = loginCredentials.getPrivateKey().getBytes(); jsch.addIdentity(loginCredentials.getUser(), privateKey, null, emptyPassPhrase); + } else { + Connector con = JschSshClient.getSSHAgentConnector(); If we go for an injectable factory/supplier

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

2014-03-21 Thread Andrew Phillips
byte[] privateKey = loginCredentials.getPrivateKey().getBytes(); jsch.addIdentity(loginCredentials.getUser(), privateKey, null, emptyPassPhrase); + } else { + Connector con = JschSshClient.getSSHAgentConnector(); + if(con != null ){ [minor]

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

2014-03-21 Thread Andrew Phillips
byte[] privateKey = loginCredentials.getPrivateKey().getBytes(); jsch.addIdentity(loginCredentials.getUser(), privateKey, null, emptyPassPhrase); + } else { + Connector con = JschSshClient.getSSHAgentConnector(); + if(con != null ){ +

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

2014-03-21 Thread Andrew Phillips
@@ -67,5 +70,19 @@ public SshClient create(HostAndPort socket, LoginCredentials credentials) { injector.injectMembers(client);// add logger return client; } + + @Override + public boolean existsSshAgent() { + try { +

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

2014-03-21 Thread Andrew Phillips
@@ -67,5 +70,19 @@ public SshClient create(HostAndPort socket, LoginCredentials credentials) { injector.injectMembers(client);// add logger return client; } + + @Override + public boolean existsSshAgent() { + try { Reuse

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

2014-03-21 Thread Andrew Phillips
@@ -206,4 +217,13 @@ public String toString() { sessionTimeout, sessionTimeout).toString(); } + private static ListAuthMethod getAuthMethods(AgentProxy agent) throws Exception { Narrow the list of exception types thrown here? --- Reply to this email

  1   2   >