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
Closed #194.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/194#event-367539973
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
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
@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
> + * 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
> +
> +
> +
> +org.apache.jclouds
> +jclouds-core
> +${jclouds.version}
> +test-jar
> +test
> +
> +
> +org.apache.jclouds
> +jclouds-compute
> +${jclouds.version}
> + @Resource
> + protected Logger logger = Logger.NULL;
> +
> + public void handleError(HttpCommand command, HttpResponse response) {
> +
> + String message = parseMessage(response);
> + Exception exception = null;
> + try {
> +
> + message = message != null ?
@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
> +org.jclouds*;version="${jclouds.version}",
> +*
> +
> +
> +
> +
> +
> +org.apache.jclouds
> +jclouds-core
> +${jclouds.version}
> +
> +
> +org.apache.jclouds.driver
> +jc
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
> + * 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
> + @Resource
> + protected Logger logger = Logger.NULL;
> +
> + public void handleError(HttpCommand command, HttpResponse response) {
> +
> + String message = parseMessage(response);
> + Exception exception = null;
> + try {
> +
> + message = message != null ?
> +
> +import com.google.auto.value.AutoValue;
> +
> +@AutoValue
> +public abstract class Leader {
> +
> + public abstract String leader();
> +
> + public abstract Map followers();
> +
> + Leader() {
> + }
> +
> + @SerializedNames({"leader", "followers"})
> +
> +
> +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
> +
> +@ConfiguresHttpApi
> +@ConfiguresHttpCommandExecutorService
> +public class EtcdHttpApiModule extends HttpApiModule {
> +
> + @Override
> + protected void bindErrorHandlers() {
> +
> bind(HttpErrorHandler.class).annotatedWith(Redirection.class).to(EtcdErrorHandler.class)
> +org.jclouds*;version="${jclouds.version}",
> +*
> +
> +
> +
> +
> +
> +org.apache.jclouds
> +jclouds-core
> +${jclouds.version}
> +
> +
> +org.apache.jclouds.driver
> +jc
> +
> +
> +
> +org.apache.jclouds
> +jclouds-core
> +${jclouds.version}
> +test-jar
> +test
> +
> +
> +org.apache.jclouds
> +jclouds-compute
> +${jclouds.version}
> +
> +
> +
> +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}"
> +
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
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
21 matches
Mail list logo