Re: [jclouds-labs-google] [JCLOUDS-550] fix for obsolete machineTypes (#24)

2014-04-25 Thread Ignasi Barrera
Thx for the quick patch, btw! :) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-google/pull/24#issuecomment-41394507

Re: [jclouds-labs-google] [JCLOUDS-550] fix for obsolete machineTypes (#24)

2014-04-25 Thread Ignasi Barrera
>your first comment is a very good spot: maybe better to remove the >checkNotNull, ok? I'm not sure. I'd prefer to wait for some more feedback in the [discussion in mailing list](http://markmail.org/message/2mt3ijd4u7lbkwpz). >For you second comment: would it make sense to add a tag to the hard

Re: [jclouds-site] Always display the latest release on the home page (#89)

2014-04-25 Thread Ignasi Barrera
> @@ -36,6 +36,11 @@ > > > > + How will this look like if there are quick news? If they show as two separate boxes, will that be good-looking? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/89/file

Re: [jclouds-site] Always display the latest release on the home page (#89)

2014-04-25 Thread Ignasi Barrera
> @@ -36,6 +36,11 @@ > > > > + > +The latest version is {{ site.latest_version }} released > on {{ site.latest_version_date }}! Read the release notes. Make the "latest version" a link to the install page? When looking at the staging

Re: [jclouds-site] Always display the latest release on the home page (#89)

2014-04-25 Thread Ignasi Barrera
Thx @everett-toews ! Looks great to have the latest release in the main page! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/89#issuecomment-41415813

Re: [jclouds] openstack console (#339)

2014-04-27 Thread Ignasi Barrera
I think the cleanest way will be to create your own [MapBinder](https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org/jclouds/rest/MapBinder.java): You'll have to create a class that implements that interface (usually also subclassing the [BindToJsonPayload](https://github.com/j

Re: [jclouds-examples] Add an example of using jclouds to create a GCE instance (based on a (#44)

2014-04-27 Thread Ignasi Barrera
Closed #44. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-examples/pull/44

Re: [jclouds-examples] Add an example of using jclouds to create a GCE instance (based on a (#44)

2014-04-27 Thread Ignasi Barrera
[Merged](https://git-wip-us.apache.org/repos/asf?p=jclouds-examples.git;a=commit;h=82f3903e089ca081c74e4288da4d4a7f38ba9abf). Thanks @mikolajz! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-examples/pull/44#issuecomment-41508715

Re: [jclouds-site] Fix This Page links directy to GitHub file (#90)

2014-04-28 Thread Ignasi Barrera
> @@ -13,7 +13,7 @@ > > > > - href="https://wiki.apache.org/jclouds/How%20to%20Contribute%20Documentation";>Fix > This Page > + href="https://github.com/jclouds/jclouds-site/edit/master/{{ page.path > }}">Fix This Page href="https:

Re: [jclouds-site] Always display the latest release on the home page (#89)

2014-04-28 Thread Ignasi Barrera
Looks nice! Thx! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/89#issuecomment-41646430

Re: [jclouds-karaf] Using ServiceMix bundles for JSch and sshj agentproxy deps (#43)

2014-05-04 Thread Ignasi Barrera
Sorry for the delay; it's been a crazy week! Finally I've had some time to test this and it works :) I've compiled your pull request and then the CLI, and I've run the following test with it: * Created a new node in DigitalOcean with a newly generated (and password-protected) key. I created it

Re: [jclouds-karaf] Using ServiceMix bundles for JSch and sshj agentproxy deps (#43)

2014-05-04 Thread Ignasi Barrera
+1! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-karaf/pull/43#issuecomment-42159397

Re: [jclouds-karaf] Removing the JSch agentproxy binding and unneeded deps (#45)

2014-05-06 Thread Ignasi Barrera
The artifact [exists in the Apache snapshot repo](http://repository.apache.org/content/groups/snapshots/org/apache/jclouds/labs/management/management-core/1.7.3-SNAPSHOT/). Can it be something about the build config? --- Reply to this email directly or view it on GitHub: https://github.com/jclou

Re: [jclouds-site] Specify version of HP Cloud Compute API (#96)

2014-05-06 Thread Ignasi Barrera
Thanks for the update @Phanatic! Is the v2 the only version available for **new accounts**, or have existing v1 accounts already been upgraded to v2? If existing accounts still can use the v1 version, then changing the provider metadata might break existing code. If the v1 offering does no long

Re: [jclouds-karaf] Removing the JSch agentproxy binding and unneeded deps (#45)

2014-05-06 Thread Ignasi Barrera
Yep, LGTM! Thx! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-karaf/pull/45#issuecomment-42314102

Re: [jclouds-site] Specify version of HP Cloud Compute API (#96)

2014-05-06 Thread Ignasi Barrera
In that case I think we should better change now the default in the metadata. Thanks for the feedback @Phanatic! All contributions are assumed to be under the Apache ICLA (see the [how to contribute wiki page](https://wiki.apache.org/jclouds/How%20to%20Contribute)), so you don't need to explici

Re: [jclouds-labs-aws] Created the skeleton of the Glacier API. (#3)

2014-05-10 Thread Ignasi Barrera
> + for (Entry header : canonicalizedHeadersMap.entries()) > { > + String key = header.getKey(); > + canonicalizedHeadersBuffer.append(String.format("%s:%s\n", > key.toLowerCase(), header.getValue())); > + } > + return canonicalizedHeadersBuffer.toString(); > + }

Re: [jclouds-labs] JCLOUDS-544: Add missing ERROR value to teh Event.Status enum (#59)

2014-05-10 Thread Ignasi Barrera
Reopened #59. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/59#event-118688656

Re: [jclouds-labs-aws] Created the skeleton of the Glacier API. (#3)

2014-05-11 Thread Ignasi Barrera
It's good to see progress on this and that you're getting familiar with the jclouds internals. Don't get intimidated by the reviews! Nice job @rcoedo! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-aws/pull/3#issuecomment-42649933

Re: [jclouds-labs] JCLOUDS-544: Add missing ERROR value to teh Event.Status enum (#59)

2014-05-11 Thread Ignasi Barrera
Addressed the comments and added a unit test. Will amend the typo in the commit message when squashing the commits before merging. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/59#issuecomment-42521849

Re: [jclouds] JCLOUDS-561: Properly populate the ssh agent connection in the builder methods (#358)

2014-05-11 Thread Ignasi Barrera
> @@ -107,7 +107,7 @@ public SSHClientConnection build() { > >protected Builder fromSSHClientConnection(SSHClientConnection in) { > return > hostAndPort(in.getHostAndPort()).connectTimeout(in.getConnectTimeout()).loginCredentials( > - in.getLoginCredentials());

Re: [jclouds-labs-aws] Created the skeleton of the Glacier API. (#3)

2014-05-11 Thread Ignasi Barrera
> +import java.io.IOException; > +import java.net.URL; > +import java.util.Properties; > +import java.util.Set; > + > +import org.jclouds.ContextBuilder; > +import org.jclouds.concurrent.config.ExecutorServiceModule; > +import org.testng.annotations.Test; > + > +import com.google.common.collect.Imm

Re: [jclouds-labs-aws] Created the skeleton of the Glacier API. (#3)

2014-05-11 Thread Ignasi Barrera
> + } catch (IOException e) { > + throw new HttpException("Error signing request", e); > + } > + return hashedPayload; > + } > + > + private byte[] hmacSha256(byte[] key, String s) { > + try { > + Mac hmacSHA256 = crypto.hmacSHA256(key); > + return hm

Re: [jclouds-labs] JCLOUDS-544: Add missing ERROR value to teh Event.Status enum (#59)

2014-05-11 Thread Ignasi Barrera
Closed #59. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/59#event-118663905

Re: [jclouds-labs] JCLOUDS-544: Add missing ERROR value to teh Event.Status enum (#59)

2014-05-11 Thread Ignasi Barrera
Just removed the unnecessary calls to `verify`. If someone changes the predicate in such a way, we can discuss the details and the proper tests in the review :) Let's keep this test just testing the expected functionality. --- Reply to this email directly or view it on GitHub: https://github.com

Re: [jclouds-labs-openstack] Adds paging fail tests for Queues. (#96)

2014-05-11 Thread Ignasi Barrera
Yep. You can't have parameterized classes in the annotations, as the type of the generic parameter belongs to the instance of the object and not the definition of the class, which is what you need in the annotations. I don't like the idea of returning `null`, as the api will behave different th

Re: [jclouds] JCLOUDS-561: Properly populate the ssh agent connection in the builder methods (#358)

2014-05-11 Thread Ignasi Barrera
Pushed to [master](https://git-wip-us.apache.org/repos/asf?p=jclouds.git;a=commit;h=aef9fc8d8399483cca9a874bc60327c70cca74c4) and [1.7.x](https://git-wip-us.apache.org/repos/asf?p=jclouds.git;a=commit;h=9398373f94c1e31eb49ef056e07f877b85ce9854). --- Reply to this email directly or view it on Gi

[jclouds] Update to the latest ASF parent pom (#361)

2014-05-12 Thread Ignasi Barrera
This implicitly updates the RAT plugin from 0.8 to 0.10, which is not throwing the thread-safe warnings when building modules concurrently. You can merge this Pull Request by running: git pull https://github.com/nacx/jclouds parent-pom Or you can view, comment on it, or merge it online at:

Re: [jclouds] Update to the latest ASF parent pom (#361)

2014-05-12 Thread Ignasi Barrera
jclouds-karaf and jclouds-chef will also need to be updated. ```bash $ find . -name pom.xml | grep -v target | xargs grep -nH '13' -B2 jclouds-chef/project/pom.xml-23-org.apache jclouds-chef/project/pom.xml-24-apache jclouds-chef/project/pom.xml:25:13 -- jclouds-karaf/pom.xml-22-or

[jclouds-karaf] JCLOUDS-563: Upgrade parent pom to version 14 (#46)

2014-05-12 Thread Ignasi Barrera
You can merge this Pull Request by running: git pull https://github.com/nacx/jclouds-karaf parent-pom Or you can view, comment on it, or merge it online at: https://github.com/jclouds/jclouds-karaf/pull/46 -- Commit Summary -- * JCLOUDS-563: Upgrade parent pom to version 14 -- File Cha

Re: [jclouds] Update to the latest ASF parent pom (#361)

2014-05-12 Thread Ignasi Barrera
Here are the related PRs: https://github.com/jclouds/jclouds-chef/pull/44 https://github.com/jclouds/jclouds-karaf/pull/46 Will merge all them together once all builds have passed. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/361#issuecomment-4283

Re: [jclouds] Update ElasticHosts pre-installed images and added new regions (#331)

2014-05-12 Thread Ignasi Barrera
Closed #331. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/331#event-120162125

Re: [jclouds] Update ElasticHosts pre-installed images and added new regions (#331)

2014-05-12 Thread Ignasi Barrera
GitHub does not seem to properly detect the rebased commits after reopening. Will open a new pull request. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/331#issuecomment-42845738

[jclouds-chef] JCLOUDS-563: Upgrade parent pom to version 14 (#44)

2014-05-12 Thread Ignasi Barrera
You can merge this Pull Request by running: git pull https://github.com/nacx/jclouds-chef parent-pom Or you can view, comment on it, or merge it online at: https://github.com/jclouds/jclouds-chef/pull/44 -- Commit Summary -- * JCLOUDS-563: Upgrade parent pom to version 14 -- File Chang

Re: [jclouds-karaf] JCLOUDS-563: Upgrade parent pom to version 14 (#46)

2014-05-12 Thread Ignasi Barrera
Pushed to [master](https://git-wip-us.apache.org/repos/asf?p=jclouds-karaf.git;a=commit;h=53cde3c2c680142a93f8637aef263165c631d704). --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-karaf/pull/46#issuecomment-42850522

Re: [jclouds-karaf] JCLOUDS-563: Upgrade parent pom to version 14 (#46)

2014-05-12 Thread Ignasi Barrera
Closed #46. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-karaf/pull/46#event-120178935

Re: [jclouds-karaf] JCLOUDS-563: Upgrade parent pom to version 14 (#46)

2014-05-12 Thread Ignasi Barrera
Just checkstyle. Will merge in a while. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-karaf/pull/46#issuecomment-42849687

Re: [jclouds] Update to the latest ASF parent pom (#361)

2014-05-12 Thread Ignasi Barrera
Amended the commit message and [merged](https://git-wip-us.apache.org/repos/asf?p=jclouds.git;a=commit;h=2bbbe1d5fdf7849bcb9ff5c4cf1868c0afd5ec8f). --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/361#issuecomment-42850376

[jclouds] JCLOUDS-517: New ElasticHosts images and regions (#362)

2014-05-12 Thread Ignasi Barrera
This PR is a follow-up for https://github.com/jclouds/jclouds/pull/331 and adds all fixed and suggested improvements. /cc @demobox @AudriusButkevicius TL;DR: ElasticHosts providers use an API call to get the list of images except ServerLove, which runs an old api, that still hardcodes it. Also a

Re: [jclouds] Update to the latest ASF parent pom (#361)

2014-05-12 Thread Ignasi Barrera
I'm not sure. It won't affect the code but could affect the release process, although I'm sure nothing will break. I'm OK to backport it, do you think it is worth it? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/361#issuecomment-42855965

Re: [jclouds-chef] JCLOUDS-563: Upgrade parent pom to version 14 (#44)

2014-05-12 Thread Ignasi Barrera
Pushed to [master](https://git-wip-us.apache.org/repos/asf?p=jclouds-chef.git;a=commit;h=aed1c5371c199d5ddf448c50c4cdcf494e1310e8). --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-chef/pull/44#issuecomment-42850438

Re: [jclouds-chef] JCLOUDS-563: Upgrade parent pom to version 14 (#44)

2014-05-12 Thread Ignasi Barrera
Closed #44. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-chef/pull/44#event-120178652

Re: [jclouds-site] First part of a user guide for GCE in jclouds (#98)

2014-05-12 Thread Ignasi Barrera
> + > +1. [Introduction](#intro) > +2. [Authentification](#auth) > +2. [Running examples](#examples) > + > + > +## Introduction > +This guide helps you to get started with [Google Cloud > Platform](https://cloud.google.com/) development using jclouds. > + > +Currently, [Google Compute Engine](http

Re: [jclouds-site] First part of a user guide for GCE in jclouds (#98)

2014-05-12 Thread Ignasi Barrera
> @@ -0,0 +1,40 @@ > +--- > +layout: page There is a `toc` layout that will automatically add the TOC at the top of the page. The TOC list uses bullets instead of a numbered list (and the TOC system is still in progress). There's no need to change to change the layout, it is just FYI :) Use it i

Re: [jclouds-site] First part of a user guide for GCE in jclouds (#98)

2014-05-12 Thread Ignasi Barrera
> +This guide helps you to get started with [Google Cloud > Platform](https://cloud.google.com/) development using jclouds. > + > +Currently, [Google Compute Engine](https://developers.google.com/compute/) > is covered. This is a service that allows you to run vitual machines on > Google's infra

Re: [jclouds-site] First part of a user guide for GCE in jclouds (#98)

2014-05-12 Thread Ignasi Barrera
It's great to have documentation contributions. Thanks @mikolajz! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/98#issuecomment-42882030

Re: [jclouds] JCLOUDS-561: Properly populate the ssh agent connection in the builder methods (#358)

2014-05-12 Thread Ignasi Barrera
> @@ -107,7 +107,7 @@ public SSHClientConnection build() { > >protected Builder fromSSHClientConnection(SSHClientConnection in) { > return > hostAndPort(in.getHostAndPort()).connectTimeout(in.getConnectTimeout()).loginCredentials( > - in.getLoginCredentials());

Re: [jclouds-labs-openstack] Fixes a bug with swift metadata (#97)

2014-05-13 Thread Ignasi Barrera
> @@ -176,6 +177,7 @@ String replace(@PathParam("objectName") String > objectName, @BinderParam(SetPaylo > @POST > @Fallback(FalseOnNotFoundOr404.class) > @Path("/{objectName}") > + @RequestFilters(FixContentTypeHeader.class) Out of curiosity. **Must** the Content-Type header be an

Re: [jclouds-labs-openstack] Fixes a bug with swift metadata (#97)

2014-05-13 Thread Ignasi Barrera
>I am unsure if a live test makes sense though. I think the mock test is enough to verify the change. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/97#issuecomment-42925880

Re: [jclouds-labs] JCLOUDS-544: Add missing ERROR value to teh Event.Status enum (#59)

2014-05-13 Thread Ignasi Barrera
>There are eight Checkstyle warnings in DO, by the way, but none related to >this PR, I think. Will address them in a new PR. Thanks @demobox ! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/59#issuecomment-42928272

Re: [jclouds-labs] JCLOUDS-544: Add missing ERROR value to teh Event.Status enum (#59)

2014-05-13 Thread Ignasi Barrera
Pushed to [master](https://git-wip-us.apache.org/repos/asf?p=jclouds-labs.git;a=commit;h=e255b82ce80f1abb0cf5440498b70692982e2612). --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/59#issuecomment-42928966

Re: [jclouds-labs] JCLOUDS-544: Add missing ERROR value to teh Event.Status enum (#59)

2014-05-13 Thread Ignasi Barrera
Merge to 1.7.x didn't present conflicts and build passed. Pushed [there](https://git-wip-us.apache.org/repos/asf?p=jclouds-labs.git;a=commit;h=1b04f7076213a457a6ca2d671e6106559c907865) too. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/59#iss

[jclouds-labs] Address checkstyle violations (#60)

2014-05-13 Thread Ignasi Barrera
Addressed checkstyle violations (most caused by imports for class references in javadocs) and removed deprecated methods usage. /cc @demobox You can merge this Pull Request by running: git pull https://github.com/nacx/jclouds-labs checkstyle Or you can view, comment on it, or merge it online

Re: [jclouds-labs-openstack] Fixes a bug with swift metadata (#97)

2014-05-13 Thread Ignasi Barrera
> @@ -176,6 +177,7 @@ String replace(@PathParam("objectName") String > objectName, @BinderParam(SetPaylo > @POST > @Fallback(FalseOnNotFoundOr404.class) > @Path("/{objectName}") > + @Produces("") This is how all jclouds apis work. They're widely used so I don't think a comment here

Re: [jclouds-labs] JCLOUDS-543: hack to not barf on old images that are no longer listed in the api (#58)

2014-05-13 Thread Ignasi Barrera
Thanks for thw ping @demobox! I started this but completely forgot! :) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/58#issuecomment-43013772

Re: [jclouds-labs-google] [JCLOUDS-550] fix for obsolete machineTypes (#24)

2014-05-13 Thread Ignasi Barrera
The changes LGTM now. Just one minor thing @andreaturli. Can you remove the wild card import, please? @demobox @mikolajz If you don't have any other comments, I'll merge this as soon as the wildcard imports are removed. --- Reply to this email directly or view it on GitHub: https://github.com/j

Re: [jclouds-labs] JCLOUDS-543: hack to not barf on old images that are no longer listed in the api (#58)

2014-05-13 Thread Ignasi Barrera
I plan to merge the checkstyle PR tomorrow and then open a new one adding the test classes. So in a day or two everything should be in place to make it trivial to add the missing tests! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/58#issueco

Re: [jclouds-labs-aws] Created the skeleton of the Glacier API. (#3)

2014-05-13 Thread Ignasi Barrera
> + > + public static final String AUTH_TAG = "AWS4"; > + public static final String HEADER_TAG = "x-amz-"; > + public static final String ALGORITHM = AUTH_TAG + "-HMAC-SHA256"; > + public static final String TERMINATION_STRING = "aws4_request"; > + public static final String REGION = "us

Re: [jclouds] JCLOUDS-561: Properly populate the ssh agent connection in the builder methods (#358)

2014-05-13 Thread Ignasi Barrera
>Do we need any (unit) tests for this? I'm not sure if they will provide any value or just make them difficult to maintain. Tests won't detect this case, where a new property added to the builder is missing when copying it. I thought about adding the test, but thinking about it, testing the "fr

Re: [jclouds] JCLOUDS-561: Properly populate the ssh agent connection in the builder methods (#358)

2014-05-14 Thread Ignasi Barrera
Closed #358. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/358#event-119025508

Re: [jclouds-labs-aws] Created the skeleton of the Glacier API. (#3)

2014-05-14 Thread Ignasi Barrera
> + Properties overrides = new Properties(); > + // prevent expect-100 bug > http://code.google.com/p/mockwebserver/issues/detail?id=6 > + overrides.setProperty(PROPERTY_SO_TIMEOUT, "0"); > + overrides.setProperty(PROPERTY_MAX_RETRIES, "1"); > + return ContextBuilder.newBu

Re: [jclouds-labs] JCLOUDS-544: Add missing ERROR value to teh Event.Status enum (#59)

2014-05-14 Thread Ignasi Barrera
> + > + public EventDonePredicate(DigitalOceanApi api) { > + this.api = checkNotNull(api, "api must not be null"); > + } > + > + @Override > + public boolean apply(Integer input) { > + Event event = api.getEventApi().get(input); > + switch (event.getStatu

Re: [jclouds-labs] JCLOUDS-544: Add missing ERROR value to teh Event.Status enum (#59)

2014-05-14 Thread Ignasi Barrera
> @@ -148,12 +134,31 @@ public boolean apply(Integer input) { > @Named(TIMEOUT_IMAGE_AVAILABLE) > protected Predicate provideImageAvailablePredicate(final > DigitalOceanApi api, Timeouts timeouts, > PollPeriod pollPeriod) { > - return Predicates2.retry(new Predicate() { > -

Re: [jclouds-labs] JCLOUDS-544: Add missing ERROR value to teh Event.Status enum (#59)

2014-05-14 Thread Ignasi Barrera
Refactored the event status predicates to reuse the code. Also made them abort the polling if the error state is reached, in the same way the default Atomic* predicates of the ComputeService do it, to keep the behavior consistent. Also updated the default image, as DigitalOcean recently changed

Re: [jclouds-labs-aws] Created the skeleton of the Glacier API. (#3)

2014-05-14 Thread Ignasi Barrera
> +${test.aws.identity} > +${test.aws.credential} > + > + > org.jclouds.glacier*;version="${project.version}" > + > +org.jclouds.labs*;version="${project.version}", > +org.jclouds*;version="${project.version}", > +* > + > + > + > + > + > + co

Re: [jclouds-labs-aws] Created the skeleton of the Glacier API. (#3)

2014-05-15 Thread Ignasi Barrera
> + .buildApi(GlacierClient.class); > + } > + > + public void experiments() throws IOException, InterruptedException { > + MockWebServer server = new MockWebServer(); > + server.enqueue(new MockResponse().addHeader(ETAG, "Testing")); > + // hangs on Java

Re: [jclouds-labs] JCLOUDS-544: Add missing ERROR value to teh Event.Status enum (#59)

2014-05-15 Thread Ignasi Barrera
> +public class EventDonePredicateTest { > + > + public void testEventProgress() { > + EventApi eventApi = EasyMock.createMock(EventApi.class); > + DigitalOceanApi api = EasyMock.createMock(DigitalOceanApi.class); > + > + expect(eventApi.get(1)).andReturn(event(Status.DONE)); > +

Re: [jclouds-labs-aws] Created the skeleton of the Glacier API. (#3)

2014-05-15 Thread Ignasi Barrera
> + > + @Resource > + @Named(Constants.LOGGER_SIGNATURE) > + Logger signatureLog = Logger.NULL; > + > + private final Provider timeStampProvider; > + private final HttpUtils utils; > + > + @Inject > + public RequestAuthorizeSignature( > + @TimeStamp Provider timeStampProvider,

Re: [jclouds-labs-aws] Created the skeleton of the Glacier API. (#3)

2014-05-15 Thread Ignasi Barrera
> + utils.logRequest(signatureLog, request, ">>"); > + request = this.signer.sign(request); > + utils.logRequest(signatureLog, request, "<<"); > + return request; > + } > + > + HttpRequest replaceDateHeader(HttpRequest request) { > + request = request.toBuilder().remove

[jclouds-labs] JCLOUDS-544: Add missing ERROR value to teh Event.Status enum (#59)

2014-05-15 Thread Ignasi Barrera
Fix for: https://issues.apache.org/jira/browse/JCLOUDS-544 A backport to 1.7.x would be appreciated You can merge this Pull Request by running: git pull https://github.com/nacx/jclouds-labs error-enum Or you can view, comment on it, or merge it online at: https://github.com/jclouds/jclouds-l

[jclouds] JCLOUDS-561: Properly populate the ssh agent connection in the builder methods (#358)

2014-05-15 Thread Ignasi Barrera
Fix for https://issues.apache.org/jira/browse/JCLOUDS-561 Will need to be backported to 1.7.x You can merge this Pull Request by running: git pull https://github.com/nacx/jclouds sshagent-npe Or you can view, comment on it, or merge it online at: https://github.com/jclouds/jclouds/pull/358

Re: [jclouds-labs] JCLOUDS-543: hack to not barf on old images that are no longer listed in the api (#58)

2014-05-16 Thread Ignasi Barrera
@demobox @cobbzilla I've just opened https://github.com/jclouds/jclouds-labs/pull/62 adding the missing tests. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/58#issuecomment-43331423

[jclouds-labs] Added unit tests for compute functions (#62)

2014-05-16 Thread Ignasi Barrera
You can merge this Pull Request by running: git pull https://github.com/nacx/jclouds-labs unittests Or you can view, comment on it, or merge it online at: https://github.com/jclouds/jclouds-labs/pull/62 -- Commit Summary -- * Added unit tests for compute functions -- File Changes --

Re: [jclouds] JCLOUDS-571 - Fix build to suppress maven parent.relativePath warnings (#376)

2014-05-18 Thread Ignasi Barrera
Neat! Pushed to [master](https://git-wip-us.apache.org/repos/asf?p=jclouds.git;a=commit;h=a623e68d08b89bb2af952153912ba669108ffb77). Thanks @ccustine! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/376#issuecomment-43454841

Re: [jclouds] JCLOUDS-571 - Fix build to suppress maven parent.relativePath warnings (#376)

2014-05-18 Thread Ignasi Barrera
>Needs a single space before the end tag You commented while I was running the build locally. I've already added the space and removed the trailing ones. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/376#issuecomment-43454919

Re: [jclouds-site] First part of a user guide for GCE in jclouds (#98)

2014-05-18 Thread Ignasi Barrera
@demobox good to go? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/98#issuecomment-43455111

Re: [jclouds] JCLOUDS-549: Fix NPE in LoginCredentials.toString (#374)

2014-05-18 Thread Ignasi Barrera
Thanks @aledsage! The change LGTM. Reading the code, I don't think it makes sense to have two getters for the credentials, one returning an object and another one returning the object itself. I think it would make sense to remove the `@Nullable` annotation from the "optional" method, because ev

Re: [jclouds-labs] JCLOUDS-543: hack to not barf on old images that are no longer listed in the api (#58)

2014-05-18 Thread Ignasi Barrera
This is also affecting the Jenkins plugin: https://issues.jenkins-ci.org/browse/JENKINS-22963 As commented in the issue there, now that thay've addwd support for slugs everywhere I think the right fix would be to use them everywhere instead of the ids. I'll try to have a PR for that soon if you

Re: [jclouds-labs] Added unit tests for compute functions (#62)

2014-05-19 Thread Ignasi Barrera
> + @Override > + public String apply(Image input) { > + return input.getId(); > + } > +}); > + } > + }; > + > + GroupNamingConvention.Factory namingConvention = > Guice.createInjector(new AbstractModule() { >

Re: [jclouds-labs] Added unit tests for compute functions (#62)

2014-05-19 Thread Ignasi Barrera
> + public void testPublicKeyDoesNotGenerateStatement() { > + Map keys = SshKeys.generate(); > + TemplateOptions options = > TemplateOptions.Builder.authorizePublicKey(keys.get("public")); > + > + TemplateOptionsToStatementWithoutPublicKey function = new > TemplateOptionsToStatem

Re: [jclouds-labs] Added unit tests for compute functions (#62)

2014-05-19 Thread Ignasi Barrera
I think there are not unhappy paths here. The mocks contain what the DO API returns, and it is always the same. The API always returns the expected fields, so I think we just have to test the conversion itself. The only unhappy path I can come up with is the `null` image id, but that case shoul

Re: [jclouds-labs] Added unit tests for compute functions (#62)

2014-05-19 Thread Ignasi Barrera
> +.volume(new > VolumeBuilder().size(20f).type(Type.LOCAL).build()).build()); > + > + locations = ImmutableSet.of(new LocationBuilder() > +.id("1") > +.description("1/mock location") > +.scope(LocationScope.REGION) > +.parent( > +

Re: [jclouds-labs] Added unit tests for compute functions (#62)

2014-05-19 Thread Ignasi Barrera
> +import com.google.common.base.Suppliers; > +import com.google.common.collect.ImmutableSet; > + > +/** > + * Unit tests for the {@link RegionToLocation} class. > + * > + * @author Ignasi Barrera > + */ > +@Test(groups = "unit", testName = &q

Re: [jclouds-labs] Added unit tests for compute functions (#62)

2014-05-19 Thread Ignasi Barrera
> + * Unit tests for the {@link TemplateOptionsToStatementWithoutPublicKey} > class. > + * > + * @author Ignasi Barrera > + */ > +@Test(groups = "unit", testName = > "TemplateOptionsToStatementWithoutPublicKeyTest") > +public class Te

Re: [jclouds-labs] Added unit tests for compute functions (#62)

2014-05-19 Thread Ignasi Barrera
@demobox could have a quick look at this? I've already created https://github.com/nacx/jclouds-labs/commit/da9c8a2a50941845d0548f81cd7a43663dca1e37 to fix [JCLOUDS-543](https://issues.apache.org/jira/browse/JCLOUDS-543) and [JCLOUDS-572](https://issues.apache.org/jira/browse/JCLOUDS-572), but it

Re: [jclouds-labs] Added unit tests for compute functions (#62)

2014-05-19 Thread Ignasi Barrera
> + public void testPublicKeyDoesNotGenerateStatement() { > + Map keys = SshKeys.generate(); > + TemplateOptions options = > TemplateOptions.Builder.authorizePublicKey(keys.get("public")); > + > + TemplateOptionsToStatementWithoutPublicKey function = new > TemplateOptionsToStatem

Re: [jclouds-labs] Added unit tests for compute functions (#62)

2014-05-19 Thread Ignasi Barrera
> + assertEquals(statement.render(OsFamily.UNIX), "uptime\n"); > + } > + > + @Test > + public void > testPublicAndPrivateKeyAndRunScriptDoesNotGenerateAuthorizationStatement() { > + Map keys = SshKeys.generate(); > + TemplateOptions options = > TemplateOptions.Builder.authori

Re: [jclouds-labs] Added unit tests for compute functions (#62)

2014-05-19 Thread Ignasi Barrera
> + public void testPublicKeyDoesNotGenerateStatement() { > + Map keys = SshKeys.generate(); > + TemplateOptions options = > TemplateOptions.Builder.authorizePublicKey(keys.get("public")); > + > + TemplateOptionsToStatementWithoutPublicKey function = new > TemplateOptionsToStatem

Re: [jclouds-labs] Added unit tests for compute functions (#62)

2014-05-19 Thread Ignasi Barrera
Thanks for the quick review! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/62#issuecomment-43521164

Re: [jclouds-labs] Added unit tests for compute functions (#62)

2014-05-19 Thread Ignasi Barrera
Pushed to [master](c6ec944901d449ff7ca626d721902577f5756fb1) and [1.7.x](https://git-wip-us.apache.org/repos/asf?p=jclouds-labs.git;a=commit;h=3bb5e5cae65fb6673f84041ce57d4ff090fb1abf). --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/62#issuecom

[jclouds-labs] JCLOUDS-543/JCLOUDS-572: Add support to use slugs as IDs (#63)

2014-05-19 Thread Ignasi Barrera
Use slugs as IDs and assume a node can have a `null` image if it used an imageId that has been removed. With this change the objects in the portable model will have the "slug" in the ID field and the real ID in the "providerId" field. Private images, which don't have a slug, will also have the

Re: [jclouds-labs] JCLOUDS-543: hack to not barf on old images that are no longer listed in the api (#58)

2014-05-19 Thread Ignasi Barrera
I've just opened https://github.com/jclouds/jclouds-labs/pull/63 adding support for using the "slug" values as IDs to properly fix the entire thing, now that we know more a bit more about the DO api. It was not as straightforward as I had initially supposed (now methods have been added to the ap

Re: [jclouds-labs] JCLOUDS-543/JCLOUDS-572: Add support to use slugs as IDs (#63)

2014-05-20 Thread Ignasi Barrera
> @@ -116,7 +117,14 @@ public boolean > apply(org.jclouds.digitalocean.domain.Image input) { > @Override > public boolean deleteImage(String id) { >try { > - api.getImageApi().delete(Integer.parseInt(id)); > + // The id of the image can be an id or a slug. Use the

Re: [jclouds-labs] JCLOUDS-543/JCLOUDS-572: Add support to use slugs as IDs (#63)

2014-05-20 Thread Ignasi Barrera
> @@ -116,7 +117,14 @@ public boolean > apply(org.jclouds.digitalocean.domain.Image input) { > @Override > public boolean deleteImage(String id) { >try { > - api.getImageApi().delete(Integer.parseInt(id)); > + // The id of the image can be an id or a slug. Use the

Re: [jclouds-labs] JCLOUDS-543/JCLOUDS-572: Add support to use slugs as IDs (#63)

2014-05-20 Thread Ignasi Barrera
> @@ -113,4 +111,43 @@ public boolean apply(Location location) { > >return builder.build(); > } > + > + private Optional findImage(Integer id) { > + // Try to find the image by ID in the cache. The cache is indexed by > slug (for public images) and by id (for > + // priva

Re: [jclouds-labs] JCLOUDS-543/JCLOUDS-572: Add support to use slugs as IDs (#63)

2014-05-20 Thread Ignasi Barrera
> @@ -169,7 +170,10 @@ public boolean apply(Droplet droplet) { > > @Override > public Image getImage(String id) { > - return api.getImageApi().get(Integer.parseInt(id)); > + // The id of the image can be an id or a slug. Use the corresponding > method of the API depending on wh

Re: [jclouds-labs] JCLOUDS-543/JCLOUDS-572: Add support to use slugs as IDs (#63)

2014-05-20 Thread Ignasi Barrera
I've addressed the comments and added a couple improvements: * Extracted the region id+name encoding logic into a `LocationNamingUtils` class, to avoid exposing it in many places. * Removed an unnecessary call to the provider in the `ComputeServiceAdapter` to get the details of the location, and

[jclouds] JCLOUDS-573: Make sure to destroy all nodes created in the tests (#377)

2014-05-20 Thread Ignasi Barrera
You can merge this Pull Request by running: git pull https://github.com/nacx/jclouds compute-teardown Or you can view, comment on it, or merge it online at: https://github.com/jclouds/jclouds/pull/377 -- Commit Summary -- * JCLOUDS-573: Make sure to destroy all nodes created in the test

Re: [jclouds] JCLOUDS-573: Make sure to destroy all nodes created in the tests (#377)

2014-05-20 Thread Ignasi Barrera
>jclouds-pull-requests #816 FAILURE It seems a Java 6 compilation error. The Java 7 build seems to be fine. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/377#issuecomment-43613520

Re: [jclouds] JCLOUDS-573: Make sure to destroy all nodes created in the tests (#377)

2014-05-20 Thread Ignasi Barrera
I'll let the Java 7 build finish and then submit a fix to make it work in both versions. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/377#issuecomment-43613812

<    5   6   7   8   9   10   11   12   13   14   >