Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-28 Thread Christopher Dancy
Aaa ... issued a force push and I believe it closed this PR. @nacx created another PR which references this but is more direct and to the point: https://github.com/jclouds/jclouds-labs/pull/195 --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pul

Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-28 Thread Christopher Dancy
Closed #194. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/194#event-367539973

Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-28 Thread Christopher Dancy
Failure not related to my changes. Code formatting issues are now solved. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/194#issuecomment-125702730

Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-28 Thread Christopher Dancy
Hmmm ... not exactly sure why the whitespace changes are not getting propagated to github when I commit --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/194#issuecomment-125622198

Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-28 Thread Christopher Dancy
@nacx I've removed the ErrorHandler as it's not used with this PR and will make things less confusing and easier to digest. I've addressed the style issues (forgot to use the jclouds eclipse formatter) and added live tests. Live tests are not doing anything special as they are just GET requests

Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-28 Thread Christopher Dancy
> + * Handle errors and propagate exception > + */ > +public class EtcdErrorHandler implements HttpErrorHandler { > + @Resource > + protected Logger logger = Logger.NULL; > + > + public void handleError(HttpCommand command, HttpResponse response) { > + > + String message = parseMessage(r

Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-28 Thread Christopher Dancy
> + > + > + > +org.apache.jclouds > +jclouds-core > +${jclouds.version} > +test-jar > +test > + > + > +org.apache.jclouds > +jclouds-compute > +${jclouds.version}

Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-28 Thread Christopher Dancy
> + @Resource > + protected Logger logger = Logger.NULL; > + > + public void handleError(HttpCommand command, HttpResponse response) { > + > + String message = parseMessage(response); > + Exception exception = null; > + try { > + > + message = message != null ?

Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-28 Thread Christopher Dancy
@nacx that sounds fair enough and will do. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/194#issuecomment-125570575

Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-28 Thread Christopher Dancy
> +org.jclouds*;version="${jclouds.version}", > +* > + > + > + > + > + > +org.apache.jclouds > +jclouds-core > +${jclouds.version} > + > + > +org.apache.jclouds.driver > +jc

Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-28 Thread Ignasi Barrera
Thanks @cdancy! Apart from the comments, the code has to be formatted according to the jclouds style guide. >Not sure how you want to go about breaking this into chunks. I'd say submit one *complete* API at a time, being complete: API + mock tests + live tests. --- Reply to this email directl

Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-28 Thread Ignasi Barrera
> + * Handle errors and propagate exception > + */ > +public class EtcdErrorHandler implements HttpErrorHandler { > + @Resource > + protected Logger logger = Logger.NULL; > + > + public void handleError(HttpCommand command, HttpResponse response) { > + > + String message = parseMessage(r

Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-28 Thread Ignasi Barrera
> + @Resource > + protected Logger logger = Logger.NULL; > + > + public void handleError(HttpCommand command, HttpResponse response) { > + > + String message = parseMessage(response); > + Exception exception = null; > + try { > + > + message = message != null ?

Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-28 Thread Ignasi Barrera
> + > +import com.google.auto.value.AutoValue; > + > +@AutoValue > +public abstract class Leader { > + > + public abstract String leader(); > + > + public abstract Map followers(); > + > + Leader() { > + } > + > + @SerializedNames({"leader", "followers"}) > +

Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-28 Thread Ignasi Barrera
> + > +package org.jclouds.etcd.config; > + > +import org.jclouds.etcd.EtcdApi; > +import org.jclouds.etcd.handlers.EtcdErrorHandler; > +import org.jclouds.http.HttpErrorHandler; > +import org.jclouds.http.annotation.ClientError; > +import org.jclouds.http.annotation.Redirection; > +import org.jclo

Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-28 Thread Ignasi Barrera
> + > +@ConfiguresHttpApi > +@ConfiguresHttpCommandExecutorService > +public class EtcdHttpApiModule extends HttpApiModule { > + > + @Override > + protected void bindErrorHandlers() { > + > bind(HttpErrorHandler.class).annotatedWith(Redirection.class).to(EtcdErrorHandler.class)

Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-28 Thread Ignasi Barrera
> +org.jclouds*;version="${jclouds.version}", > +* > + > + > + > + > + > +org.apache.jclouds > +jclouds-core > +${jclouds.version} > + > + > +org.apache.jclouds.driver > +jc

Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-27 Thread Ignasi Barrera
> + > + > + > +org.apache.jclouds > +jclouds-core > +${jclouds.version} > +test-jar > +test > + > + > +org.apache.jclouds > +jclouds-compute > +${jclouds.version}

Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-27 Thread Ignasi Barrera
> + > + > + > +etcd > +jclouds etcd api > +jclouds components to access an implementation of > etcd > +bundle > + > + > +http://127.0.0.1:2379 > +FIXME > +FIXME > +v2 > + > org.jclouds.etcd*;version="${project.version}" > +

Re: [jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-27 Thread Christopher Dancy
Not sure how you want to go about breaking this into chunks but the API as a whole can be broken down into these features (ordered from smallest to biggest): VersionApi, StatisticsApi, MembersApi, and KeysApi. This PR covers the first 2 (Version and Statistics) as both are very small and not co

[jclouds-labs] JCLOUDS-971: init for etcd provider. (#194)

2015-07-27 Thread Christopher Dancy
ADDED: version and statistics API as well as mock tests for each. Both APIS are very simple as they are all GET requests and do not require any parameters. 5 methods total between the 2. This should be a good starting point for us to break apart the API into smaller chunks for others/reviewers t