You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by na...@apache.org on 2014/10/10 15:13:27 UTC

[01/50] [abbrv] git commit: Cleaned up ChefApi and ChefService interfaces

Repository: jclouds
Updated Branches:
  refs/heads/master 34663f3c2 -> 2caf6ea86


Cleaned up ChefApi and ChefService interfaces

Cleaned up and renamed some methods to have a more consistent naming,
and improved the javadocs.


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/ef7b7f7c
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/ef7b7f7c
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/ef7b7f7c

Branch: refs/heads/master
Commit: ef7b7f7c527ee792a7d6859e3c0591c8c8477f5e
Parents: 063dcc4
Author: Ignasi Barrera <na...@apache.org>
Authored: Thu Sep 12 21:40:01 2013 +0200
Committer: Ignasi Barrera <na...@apache.org>
Committed: Fri Sep 13 17:55:02 2013 +0200

----------------------------------------------------------------------
 .../EnterpriseChefApiMetadata.java              |  3 +--
 .../EnterpriseChefApiExpectTest.java            | 22 ++++++++++----------
 .../EnterpriseChefProviderMetadataTest.java     |  2 --
 ...BindGroupToUpdateRequestJsonPayloadTest.java |  4 ++--
 .../enterprisechef/binders/GroupNameTest.java   |  1 -
 5 files changed, 14 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/ef7b7f7c/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java
index 5251209..c2867a2 100644
--- a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java
+++ b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java
@@ -20,7 +20,6 @@ import java.net.URI;
 import java.util.Properties;
 
 import org.jclouds.apis.ApiMetadata;
-import org.jclouds.chef.ChefApi;
 import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.ChefContext;
 import org.jclouds.chef.config.ChefBootstrapModule;
@@ -63,7 +62,7 @@ public class EnterpriseChefApiMetadata extends BaseHttpApiMetadata<EnterpriseChe
                .name("Enterprise Chef Api")
                .identityName("User")
                .credentialName("Certificate")
-               .version(ChefApi.VERSION)
+               .version(ChefApiMetadata.DEFAULT_VERSION)
                .documentation(URI.create("http://www.opscode.com/support"))
                .defaultEndpoint("https://api.opscode.com")
                .view(ChefContext.class)

http://git-wip-us.apache.org/repos/asf/jclouds/blob/ef7b7f7c/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java
index 1ee2bdf..98528c7 100644
--- a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java
+++ b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java
@@ -25,7 +25,7 @@ import java.util.Set;
 import javax.ws.rs.core.MediaType;
 
 import org.jclouds.chef.BaseChefApiExpectTest;
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.date.TimeStamp;
 import org.jclouds.enterprisechef.config.EnterpriseChefHttpApiModule;
 import org.jclouds.enterprisechef.domain.Group;
@@ -56,7 +56,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
             signed(HttpRequest.builder() //
                   .method("GET") //
                   .endpoint("https://api.opscode.com/users/nacx") //
-                  .addHeader("X-Chef-Version", ChefApi.VERSION) //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
                   .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
             HttpResponse.builder().statusCode(200)
                   .payload(payloadFromResourceWithContentType("/user.json", MediaType.APPLICATION_JSON)) //
@@ -71,7 +71,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
       EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
             .method("GET") //
             .endpoint("https://api.opscode.com/users/foo") //
-            .addHeader("X-Chef-Version", ChefApi.VERSION) //
+            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
             .addHeader("Accept", MediaType.APPLICATION_JSON) //
             .build()), //
             HttpResponse.builder().statusCode(404).build());
@@ -84,7 +84,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
             signed(HttpRequest.builder() //
                   .method("GET") //
                   .endpoint("https://api.opscode.com/groups") //
-                  .addHeader("X-Chef-Version", ChefApi.VERSION) //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
                   .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
             HttpResponse.builder().statusCode(200)
                   .payload(payloadFromResourceWithContentType("/groups.json", MediaType.APPLICATION_JSON)) //
@@ -100,7 +100,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
             signed(HttpRequest.builder() //
                   .method("GET") //
                   .endpoint("https://api.opscode.com/groups/admins") //
-                  .addHeader("X-Chef-Version", ChefApi.VERSION) //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
                   .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
             HttpResponse.builder().statusCode(200)
                   .payload(payloadFromResourceWithContentType("/group.json", MediaType.APPLICATION_JSON)) //
@@ -115,7 +115,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
       EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
             .method("GET") //
             .endpoint("https://api.opscode.com/groups/foo") //
-            .addHeader("X-Chef-Version", ChefApi.VERSION) //
+            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
             .addHeader("Accept", MediaType.APPLICATION_JSON) //
             .build()), //
             HttpResponse.builder().statusCode(404).build());
@@ -127,7 +127,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
       EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
             .method("POST") //
             .endpoint("https://api.opscode.com/groups") //
-            .addHeader("X-Chef-Version", ChefApi.VERSION) //
+            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
             .addHeader("Accept", MediaType.APPLICATION_JSON) //
             .payload(payloadFromStringWithContentType("{\"groupname\":\"foo\"}", MediaType.APPLICATION_JSON)) //
             .build()), //
@@ -140,7 +140,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
       EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
             .method("DELETE") //
             .endpoint("https://api.opscode.com/groups/foo") //
-            .addHeader("X-Chef-Version", ChefApi.VERSION) //
+            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
             .addHeader("Accept", MediaType.APPLICATION_JSON) //
             .build()), //
             HttpResponse.builder().statusCode(200).build());
@@ -153,7 +153,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
       EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
             .method("DELETE") //
             .endpoint("https://api.opscode.com/groups/foo") //
-            .addHeader("X-Chef-Version", ChefApi.VERSION) //
+            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
             .addHeader("Accept", MediaType.APPLICATION_JSON) //
             .build()), //
             HttpResponse.builder().statusCode(404).build());
@@ -165,7 +165,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
       EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
             .method("PUT") //
             .endpoint("https://api.opscode.com/groups/admins") //
-            .addHeader("X-Chef-Version", ChefApi.VERSION) //
+            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
             .addHeader("Accept", MediaType.APPLICATION_JSON) //
             .payload(payloadFromResourceWithContentType("/group-update.json", MediaType.APPLICATION_JSON)) //
             .build()), //
@@ -180,7 +180,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
       EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
             .method("PUT") //
             .endpoint("https://api.opscode.com/groups/admins") //
-            .addHeader("X-Chef-Version", ChefApi.VERSION) //
+            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
             .addHeader("Accept", MediaType.APPLICATION_JSON) //
             .payload(payloadFromResourceWithContentType("/group-update.json", MediaType.APPLICATION_JSON)) //
             .build()), //

http://git-wip-us.apache.org/repos/asf/jclouds/blob/ef7b7f7c/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadataTest.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadataTest.java b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadataTest.java
index 0b7ddc3..f6784a0 100644
--- a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadataTest.java
+++ b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadataTest.java
@@ -16,8 +16,6 @@
  */
 package org.jclouds.enterprisechef;
 
-import org.jclouds.enterprisechef.EnterpriseChefApiMetadata;
-import org.jclouds.enterprisechef.EnterpriseChefProviderMetadata;
 import org.jclouds.providers.internal.BaseProviderMetadataTest;
 import org.testng.annotations.Test;
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/ef7b7f7c/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayloadTest.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayloadTest.java b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayloadTest.java
index 29e120e..478235b 100644
--- a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayloadTest.java
+++ b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayloadTest.java
@@ -21,7 +21,7 @@ import static org.testng.Assert.assertEquals;
 import java.io.IOException;
 import java.net.URI;
 
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.enterprisechef.domain.Group;
 import org.jclouds.http.HttpRequest;
@@ -45,7 +45,7 @@ public class BindGroupToUpdateRequestJsonPayloadTest {
    private Injector injector = Guice.createInjector(new AbstractModule() {
       @Override
       protected void configure() {
-         bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+         bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
       }
    }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/ef7b7f7c/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/GroupNameTest.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/GroupNameTest.java b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/GroupNameTest.java
index ee8ff46..cbe6642 100644
--- a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/GroupNameTest.java
+++ b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/GroupNameTest.java
@@ -20,7 +20,6 @@ import static org.testng.Assert.assertEquals;
 
 import java.io.IOException;
 
-import org.jclouds.enterprisechef.binders.GroupName;
 import org.jclouds.enterprisechef.domain.Group;
 import org.testng.annotations.Test;
 


[37/50] [abbrv] git commit: Prefer ByteStreams2 over ByteSources.asByteSource

Posted by na...@apache.org.
Prefer ByteStreams2 over ByteSources.asByteSource

The latter breaks the contract of ByteSource which specifies that
openStream can produce multiple independent streams.


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/011aed71
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/011aed71
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/011aed71

Branch: refs/heads/master
Commit: 011aed71ed9143be8f59973cacf23df98a9d49a8
Parents: 18467a1
Author: Andrew Gaul <ga...@apache.org>
Authored: Tue Jul 22 16:50:46 2014 -0700
Committer: Andrew Gaul <ga...@apache.org>
Committed: Tue Jul 22 16:56:00 2014 -0700

----------------------------------------------------------------------
 .../src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java | 4 ++--
 .../test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/011aed71/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java b/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
index 7d789bb..cabe579 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
@@ -42,7 +42,7 @@ import org.jclouds.http.HttpRequest;
 import org.jclouds.http.HttpRequestFilter;
 import org.jclouds.http.HttpUtils;
 import org.jclouds.http.internal.SignatureWire;
-import org.jclouds.io.ByteSources;
+import org.jclouds.io.ByteStreams2;
 import org.jclouds.io.Payload;
 import org.jclouds.io.Payloads;
 import org.jclouds.io.payloads.MultipartForm;
@@ -162,7 +162,7 @@ public class SignedHeaderAuth implements HttpRequestFilter {
       checkArgument(payload != null, "payload was null");
       checkArgument(payload.isRepeatable(), "payload must be repeatable: " + payload);
       try {
-         return base64().encode(ByteSources.asByteSource(payload.getInput()).hash(sha1()).asBytes());
+         return base64().encode(ByteStreams2.hashAndClose(payload.getInput(), sha1()).asBytes());
       } catch (Exception e) {
          Throwables.propagateIfPossible(e);
          throw new HttpException("error creating sigature for payload: " + payload, e);

http://git-wip-us.apache.org/repos/asf/jclouds/blob/011aed71/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
index 2d04dcd..b57499c 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
@@ -21,7 +21,6 @@ import static com.google.common.collect.Iterables.any;
 import static com.google.common.collect.Iterables.isEmpty;
 import static com.google.common.hash.Hashing.md5;
 import static java.util.concurrent.TimeUnit.MILLISECONDS;
-import static org.jclouds.io.ByteSources.asByteSource;
 import static org.jclouds.util.Predicates2.retry;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertFalse;
@@ -55,6 +54,7 @@ import org.jclouds.chef.domain.UploadSandbox;
 import org.jclouds.chef.options.CreateClientOptions;
 import org.jclouds.chef.options.SearchOptions;
 import org.jclouds.crypto.Pems;
+import org.jclouds.io.ByteStream2;
 import org.jclouds.io.Payloads;
 import org.jclouds.io.payloads.FilePayload;
 import org.jclouds.rest.ResourceNotFoundException;
@@ -167,7 +167,7 @@ public abstract class BaseChefApiLiveTest<A extends ChefApi> extends BaseChefLiv
             InputStream stream = api.getResourceContents(resource);
             assertNotNull(stream, "Resource contents are null for resource: " + resource.getName());
 
-            byte[] md5 = asByteSource(stream).hash(md5()).asBytes();
+            byte[] md5 = ByteStream2.hashAndClose(stream, md5()).asBytes();
             assertEquals(md5, resource.getChecksum());
          }
       }


[03/50] [abbrv] git commit: Cleaned up ChefApi and ChefService interfaces

Posted by na...@apache.org.
Cleaned up ChefApi and ChefService interfaces

Cleaned up and renamed some methods to have a more consistent naming,
and improved the javadocs.


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/353651d3
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/353651d3
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/353651d3

Branch: refs/heads/master
Commit: 353651d31a193657d850eec87ab056cd166b1f80
Parents: 285b653
Author: Ignasi Barrera <na...@apache.org>
Authored: Thu Sep 12 21:40:01 2013 +0200
Committer: Ignasi Barrera <na...@apache.org>
Committed: Fri Sep 13 17:55:02 2013 +0200

----------------------------------------------------------------------
 .../src/main/java/org/jclouds/chef/ChefApi.java | 1078 ++++++++----------
 .../java/org/jclouds/chef/ChefApiMetadata.java  |    7 +-
 .../main/java/org/jclouds/chef/ChefService.java |  194 ++--
 .../jclouds/chef/filters/SignedHeaderAuth.java  |    4 +-
 .../jclouds/chef/internal/BaseChefService.java  |  153 +--
 .../internal/ListCookbookVersionsImpl.java      |    2 +-
 .../internal/ListEnvironmentNodesImpl.java      |    4 +-
 .../org/jclouds/chef/test/TransientChefApi.java |   20 +-
 .../org/jclouds/chef/ChefApiExpectTest.java     |   20 +-
 .../test/java/org/jclouds/chef/ChefApiTest.java |  100 +-
 .../BindHexEncodedMD5sToJsonPayloadTest.java    |    4 +-
 .../chef/functions/GroupToBootScriptTest.java   |    4 +-
 .../chef/functions/ParseClientFromJsonTest.java |    4 +-
 .../ParseCookbookDefinitionFromJsonTest.java    |    4 +-
 .../ParseCookbookDefinitionFromJsonv10Test.java |    4 +-
 ...seCookbookDefinitionListFromJsonv10Test.java |    4 +-
 .../ParseCookbookVersionFromJsonTest.java       |    4 +-
 .../ParseCookbookVersionsV09FromJsonTest.java   |    4 +-
 .../ParseCookbookVersionsV10FromJsonTest.java   |    4 +-
 .../functions/ParseDataBagItemFromJsonTest.java |    4 +-
 .../chef/functions/ParseKeySetFromJsonTest.java |    4 +-
 .../chef/functions/ParseNodeFromJsonTest.java   |    4 +-
 .../functions/ParseSandboxFromJsonTest.java     |    4 +-
 .../ParseSearchDataBagItemFromJsonTest.java     |    4 +-
 .../ParseUploadSandboxFromJsonTest.java         |    4 +-
 .../chef/functions/RunListForGroupTest.java     |    3 +-
 .../chef/internal/BaseChefApiLiveTest.java      |   18 +-
 .../chef/internal/BaseStubbedOhaiLiveTest.java  |    2 +-
 .../java/org/jclouds/ohai/config/JMXTest.java   |    4 +-
 .../org/jclouds/ohai/config/OhaiModuleTest.java |    6 +-
 .../ohai/functions/NestSlashKeysTest.java       |    4 +-
 31 files changed, 770 insertions(+), 909 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java b/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
index fb5366f..877deb6 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
@@ -69,9 +69,7 @@ import org.jclouds.chef.functions.ParseSearchRolesFromJson;
 import org.jclouds.chef.functions.UriForResource;
 import org.jclouds.chef.options.CreateClientOptions;
 import org.jclouds.chef.options.SearchOptions;
-import org.jclouds.http.HttpResponseException;
 import org.jclouds.io.Payload;
-import org.jclouds.rest.AuthorizationException;
 import org.jclouds.rest.annotations.BinderParam;
 import org.jclouds.rest.annotations.EndpointParam;
 import org.jclouds.rest.annotations.Fallback;
@@ -96,141 +94,39 @@ import org.jclouds.rest.binders.BindToJsonPayload;
 @Headers(keys = "X-Chef-Version", values = "{" + Constants.PROPERTY_API_VERSION + "}")
 @Consumes(MediaType.APPLICATION_JSON)
 public interface ChefApi extends Closeable {
-   /**
-    * The target Chef Server version.
-    */
-   public static final String VERSION = "0.10.8";
-
-   /**
-    * Creates a new sandbox. It accepts a list of checksums as input and returns
-    * the URLs against which to PUT files that need to be uploaded.
-    * 
-    * @param md5s
-    *           raw md5s; uses {@code Bytes.asList()} and
-    *           {@code Bytes.toByteArray()} as necessary
-    * @return The URLs against which to PUT files that need to be uploaded.
-    */
-   @Named("sandbox:upload")
-   @POST
-   @Path("/sandboxes")
-   UploadSandbox getUploadSandboxForChecksums(@BinderParam(BindChecksumsToJsonPayload.class) Set<List<Byte>> md5s);
-
-   /**
-    * Uploads the given content to the sandbox at the given URI.
-    * <p/>
-    * The URI must be obtained, after uploading a sandbox, from the
-    * {@link UploadSandbox#getUri()}.
-    */
-   @Named("content:upload")
-   @PUT
-   @Produces("application/x-binary")
-   void uploadContent(@EndpointParam URI location, Payload content);
-
-   /**
-    * Confirms if the sandbox is completed or not.
-    * <p/>
-    * This method should be used after uploading contents to the sandbox.
-    * 
-    * @return The sandbox
-    */
-   @Named("sandbox:commit")
-   @PUT
-   @Path("/sandboxes/{id}")
-   Sandbox commitSandbox(@PathParam("id") String id, @WrapWith("is_completed") boolean isCompleted);
-
-   /**
-    * @return a list of all the cookbook names
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if the caller is not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have permission to see the
-    *            cookbook list.
-    */
-   @Named("cookbook:list")
-   @GET
-   @Path("/cookbooks")
-   @ResponseParser(ParseCookbookDefinitionCheckingChefVersion.class)
-   @Fallback(EmptySetOnNotFoundOr404.class)
-   Set<String> listCookbooks();
 
-   /**
-    * Creates or updates (uploads) a cookbook
-    * 
-    * @param cookbookName
-    * @throws HttpResponseException
-    *            "409 Conflict" if the cookbook already exists
-    */
-   @Named("cookbook:update")
-   @PUT
-   @Path("/cookbooks/{cookbookname}/{version}")
-   CookbookVersion updateCookbook(@PathParam("cookbookname") String cookbookName, @PathParam("version") String version,
-         @BinderParam(BindToJsonPayload.class) CookbookVersion cookbook);
+   // Clients
 
    /**
-    * deletes an existing cookbook.
+    * List the names of the existing clients.
     * 
-    * @return last state of the api you deleted or null, if not found
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have Delete rights on the
-    *            cookbook.
-    */
-   @Named("cookbook:delete")
-   @DELETE
-   @Path("/cookbooks/{cookbookname}/{version}")
-   @Fallback(NullOnNotFoundOr404.class)
-   CookbookVersion deleteCookbook(@PathParam("cookbookname") String cookbookName, @PathParam("version") String version);
-
-   /**
-    * @return the versions of a cookbook or null, if not found
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if the caller is not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if the caller is not authorized to view the
-    *            cookbook.
+    * @return The names of the existing clients.
     */
-   @Named("cookbook:versions")
+   @Named("client:list")
    @GET
-   @Path("/cookbooks/{cookbookname}")
-   @ResponseParser(ParseCookbookVersionsCheckingChefVersion.class)
+   @Path("/clients")
+   @ResponseParser(ParseKeySetFromJson.class)
    @Fallback(EmptySetOnNotFoundOr404.class)
-   Set<String> getVersionsOfCookbook(@PathParam("cookbookname") String cookbookName);
+   Set<String> listClients();
 
    /**
-    * Returns a description of the cookbook, with links to all of its component
-    * parts, and the metadata.
+    * Get the details of existing client.
     * 
-    * @return the cookbook or null, if not found
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if the caller is not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if the caller is not authorized to view the
-    *            cookbook.
+    * @param clientname The name of the client to get.
+    * @return The details of the given client.
     */
-   @Named("cookbook:get")
+   @Named("client:get")
    @GET
-   @Path("/cookbooks/{cookbookname}/{version}")
+   @Path("/clients/{clientname}")
    @Fallback(NullOnNotFoundOr404.class)
-   CookbookVersion getCookbook(@PathParam("cookbookname") String cookbookName, @PathParam("version") String version);
+   Client getClient(@PathParam("clientname") String clientname);
 
    /**
-    * creates a new client
+    * Creates a new client.
     * 
-    * @return the private key of the client. You can then use this client name
-    *         and private key to access the Opscode API.
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if the caller is not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if the caller is not authorized to create a
-    *            client.
-    * @throws HttpResponseException
-    *            "409 Conflict" if the client already exists
+    * @param clientname The name of the new client
+    * @return The client with the generated private key. This key should be
+    *         stored so client can be properly authenticated .
     */
    @Named("client:create")
    @POST
@@ -239,18 +135,12 @@ public interface ChefApi extends Closeable {
    Client createClient(@PayloadParam("name") String clientname);
 
    /**
-    * creates a new administrator client
+    * Creates a new client with custom options.
     * 
-    * @return the private key of the client. You can then use this client name
-    *         and private key to access the Opscode API.
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if the caller is not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if the caller is not authorized to create a
-    *            client.
-    * @throws HttpResponseException
-    *            "409 Conflict" if the client already exists
+    * @param clientname The name of the new client
+    * @param options The options to customize the client creation.
+    * @return The client with the generated private key. This key should be
+    *         stored so client can be properly authenticated .
     */
    @Named("client:create")
    @POST
@@ -259,16 +149,11 @@ public interface ChefApi extends Closeable {
    Client createClient(@PayloadParam("name") String clientname, CreateClientOptions options);
 
    /**
-    * generate a new key-pair for this client, and return the new private key in
+    * Generate a new key-pair for this client, and return the new private key in
     * the response body.
     * 
-    * @return the new private key
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if the caller is not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if the caller is not authorized to modify the
-    *            client.
+    * @param clientname The name of the client.
+    * @return The details of the client with the new private key.
     */
    @Named("client:generatekey")
    @PUT
@@ -277,29 +162,10 @@ public interface ChefApi extends Closeable {
          @PathParam("clientname") @BinderParam(BindGenerateKeyForClientToJsonPayload.class) String clientname);
 
    /**
-    * @return list of client names.
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have rights to list clients.
-    */
-   @Named("client:list")
-   @GET
-   @Path("/clients")
-   @ResponseParser(ParseKeySetFromJson.class)
-   @Fallback(EmptySetOnNotFoundOr404.class)
-   Set<String> listClients();
-
-   /**
-    * deletes an existing client.
+    * Deletes the given client.
     * 
-    * @return last state of the client you deleted or null, if not found
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have Delete rights on the client.
+    * @param clientname The name of the client to delete.
+    * @return The deleted client.
     */
    @Named("client:delete")
    @DELETE
@@ -307,180 +173,162 @@ public interface ChefApi extends Closeable {
    @Fallback(NullOnNotFoundOr404.class)
    Client deleteClient(@PathParam("clientname") String clientname);
 
+   // Cookbooks
+
    /**
-    * gets an existing client.
+    * List the names of the existing cookbooks.
     * 
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have view rights on the client.
+    * @return The names of the exsisting cookbooks.
     */
-   @Named("client:get")
+   @Named("cookbook:list")
    @GET
-   @Path("/clients/{clientname}")
-   @Fallback(NullOnNotFoundOr404.class)
-   Client getClient(@PathParam("clientname") String clientname);
+   @Path("/cookbooks")
+   @ResponseParser(ParseCookbookDefinitionCheckingChefVersion.class)
+   @Fallback(EmptySetOnNotFoundOr404.class)
+   Set<String> listCookbooks();
 
    /**
-    * creates a new node
+    * List the cookbooks that are available in the given environment.
     * 
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if the caller is not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if the caller is not authorized to create a
-    *            node.
-    * @throws HttpResponseException
-    *            "409 Conflict" if the node already exists
+    * @param environmentname The name of the environment to get the cookbooks
+    *        from.
+    * @return The definitions of the cookbooks (URL and versions) available in
+    *         the given environment.
     */
-   @Named("node:create")
-   @POST
-   @Path("/nodes")
-   void createNode(@BinderParam(BindToJsonPayload.class) Node node);
+   @SinceApiVersion("0.10.0")
+   @Named("cookbook:list")
+   @GET
+   @ResponseParser(ParseCookbookDefinitionListFromJsonv10.class)
+   @Path("/environments/{environmentname}/cookbooks")
+   @Fallback(NullOnNotFoundOr404.class)
+   Set<CookbookDefinition> listCookbooksInEnvironment(@PathParam("environmentname") String environmentname);
 
    /**
-    * Creates or updates (uploads) a node
+    * List the cookbooks that are available in the given environment, limiting
+    * the number of versions returned for each cookbook.
     * 
-    * @param node
-    *           updated node
-    * @throws HttpResponseException
-    *            "409 Conflict" if the node already exists
+    * @param environmentname The name of the environment.
+    * @param numversions The number of cookbook versions to include in the
+    *        response, where n is the number of cookbook versions.
+    * @return The definitions of the cookbooks (URL and versions) available in
+    *         the given environment.
     */
-   @Named("node:update")
-   @PUT
-   @Path("/nodes/{nodename}")
-   Node updateNode(@PathParam("nodename") @ParamParser(NodeName.class) @BinderParam(BindToJsonPayload.class) Node node);
+   @SinceApiVersion("0.10.0")
+   @Named("cookbook:list")
+   @GET
+   @ResponseParser(ParseCookbookDefinitionListFromJsonv10.class)
+   @Path("/environments/{environmentname}/cookbooks?num_versions={numversions}")
+   @Fallback(NullOnNotFoundOr404.class)
+   Set<CookbookDefinition> listCookbooksInEnvironment(@PathParam("environmentname") String environmentname,
+         @PathParam("numversions") String numversions);
 
    /**
-    * @return list of node names.
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have rights to list nodes.
+    * List the available versions of the given cookbook.
+    * 
+    * @param cookbookName The name of the cookbook.
+    * @return The available versions of the given cookbook.
     */
-   @Named("node:list")
+   @Named("cookbook:versions")
    @GET
-   @Path("/nodes")
-   @ResponseParser(ParseKeySetFromJson.class)
+   @Path("/cookbooks/{cookbookname}")
+   @ResponseParser(ParseCookbookVersionsCheckingChefVersion.class)
    @Fallback(EmptySetOnNotFoundOr404.class)
-   Set<String> listNodes();
+   Set<String> listVersionsOfCookbook(@PathParam("cookbookname") String cookbookName);
 
    /**
-    * deletes an existing node.
+    * Get the details of the given cookbook, with the links to each resource
+    * such as recipe files, attributes, etc.
     * 
-    * @return last state of the node you deleted or null, if not found
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have Delete rights on the node.
+    * @param cookbookName The name of the cookbook.
+    * @param version The version of the cookbook to get.
+    * @return The details of the given cookbook.
     */
-   @Named("node:delete")
-   @DELETE
-   @Path("/nodes/{nodename}")
+   @Named("cookbook:get")
+   @GET
+   @Path("/cookbooks/{cookbookname}/{version}")
    @Fallback(NullOnNotFoundOr404.class)
-   Node deleteNode(@PathParam("nodename") String nodename);
+   CookbookVersion getCookbook(@PathParam("cookbookname") String cookbookName, @PathParam("version") String version);
 
    /**
-    * gets an existing node.
+    * Get the definition of the cookbook in the given environment.
     * 
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have view rights on the node.
+    * @param environmentname The name of the environment.
+    * @param cookbookname The name of the cookbook.
+    * @return The definition of the cookbook (URL and versions) of the cookbook
+    *         in the given environment.
     */
-   @Named("node:get")
+   @SinceApiVersion("0.10.0")
+   @Named("environment:cookbook")
    @GET
-   @Path("/nodes/{nodename}")
-   @Fallback(NullOnNotFoundOr404.class)
-   Node getNode(@PathParam("nodename") String nodename);
+   @ResponseParser(ParseCookbookDefinitionFromJsonv10.class)
+   @Path("/environments/{environmentname}/cookbooks/{cookbookname}")
+   CookbookDefinition getCookbookInEnvironment(@PathParam("environmentname") String environmentname,
+         @PathParam("cookbookname") String cookbookname);
 
    /**
-    * creates a new role
+    * Get the definition of the cookbook in the given environment.
     * 
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if the caller is not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if the caller is not authorized to create a
-    *            role.
-    * @throws HttpResponseException
-    *            "409 Conflict" if the role already exists
+    * @param environmentname The name of the environment.
+    * @param cookbookname The name of the cookbook.
+    * @param numversions The number of cookbook versions to include in the
+    *        response, where n is the number of cookbook versions.
+    * @return The definition of the cookbook (URL and versions) of the cookbook
+    *         in the given environment.
     */
-   @Named("role:create")
-   @POST
-   @Path("/roles")
-   void createRole(@BinderParam(BindToJsonPayload.class) Role role);
+   @SinceApiVersion("0.10.0")
+   @Named("environment:cookbook")
+   @GET
+   @ResponseParser(ParseCookbookDefinitionFromJsonv10.class)
+   @Path("/environments/{environmentname}/cookbooks/{cookbookname}?num_versions={numversions}")
+   CookbookDefinition getCookbookInEnvironment(@PathParam("environmentname") String environmentname,
+         @PathParam("cookbookname") String cookbookname, @PathParam("numversions") String numversions);
 
    /**
-    * Creates or updates (uploads) a role
+    * List the names of the recipes in the given environment.
     * 
-    * @param roleName
-    * @throws HttpResponseException
-    *            "409 Conflict" if the role already exists
-    */
-   @Named("role:update")
-   @PUT
-   @Path("/roles/{rolename}")
-   Role updateRole(@PathParam("rolename") @ParamParser(RoleName.class) @BinderParam(BindToJsonPayload.class) Role role);
-
-   /**
-    * @return list of role names.
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have rights to list roles.
+    * @param environmentname The name of the environment.
+    * @return The names of the recipes in the given environment.
     */
-   @Named("role:list")
+   @SinceApiVersion("0.10.0")
+   @Named("environment:recipelist")
    @GET
-   @Path("/roles")
-   @ResponseParser(ParseKeySetFromJson.class)
+   @Path("/environments/{environmentname}/recipes")
    @Fallback(EmptySetOnNotFoundOr404.class)
-   Set<String> listRoles();
+   Set<String> listRecipesInEnvironment(@PathParam("environmentname") String environmentname);
 
    /**
-    * deletes an existing role.
+    * Creates or updates the given cookbook.
     * 
-    * @return last state of the role you deleted or null, if not found
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have Delete rights on the role.
+    * @param cookbookName The name of the cookbook to create or update.
+    * @param version The version of the cookbook to create or update.
+    * @param cookbook The contents of the cookbook to create or update.
+    * @return The details of the created or updated cookbook.
     */
-   @Named("role:delete")
-   @DELETE
-   @Path("/roles/{rolename}")
-   @Fallback(NullOnNotFoundOr404.class)
-   Role deleteRole(@PathParam("rolename") String rolename);
+   @Named("cookbook:update")
+   @PUT
+   @Path("/cookbooks/{cookbookname}/{version}")
+   CookbookVersion updateCookbook(@PathParam("cookbookname") String cookbookName, @PathParam("version") String version,
+         @BinderParam(BindToJsonPayload.class) CookbookVersion cookbook);
 
    /**
-    * gets an existing role.
+    * Delete the given cookbook.
     * 
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have view rights on the role.
+    * @param cookbookName The name of the cookbook to delete.
+    * @param version The version of the cookbook to delete.
+    * @return The details of the deleted cookbook.
     */
-   @Named("role:get")
-   @GET
-   @Path("/roles/{rolename}")
+   @Named("cookbook:delete")
+   @DELETE
+   @Path("/cookbooks/{cookbookname}/{version}")
    @Fallback(NullOnNotFoundOr404.class)
-   Role getRole(@PathParam("rolename") String rolename);
+   CookbookVersion deleteCookbook(@PathParam("cookbookname") String cookbookName, @PathParam("version") String version);
+
+   // Data bags
 
    /**
-    * lists databags available to the api
+    * List the names of the existing data bags.
     * 
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have view rights on the databag.
+    * @return The names of the existing data bags.
     */
    @Named("databag:list")
    @GET
@@ -490,13 +338,9 @@ public interface ChefApi extends Closeable {
    Set<String> listDatabags();
 
    /**
-    * creates a databag.
+    * Creates a new data bag.
     * 
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have view rights on the databag.
+    * @param databagName The name for the new data bag.
     */
    @Named("databag:create")
    @POST
@@ -504,13 +348,9 @@ public interface ChefApi extends Closeable {
    void createDatabag(@WrapWith("name") String databagName);
 
    /**
-    * Delete a data bag, including its items
+    * Deletes a data bag, including its items.
     * 
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have view rights on the databag.
+    * @param databagName The name of the data bag to delete.
     */
    @Named("databag:delete")
    @DELETE
@@ -519,13 +359,10 @@ public interface ChefApi extends Closeable {
    void deleteDatabag(@PathParam("name") String databagName);
 
    /**
-    * Show the items in a data bag.
+    * List the names of the items in a data bag.
     * 
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have view rights on the databag.
+    * @param databagName The name of the data bag.
+    * @return The names of the items in the given data bag.
     */
    @Named("databag:listitems")
    @GET
@@ -535,16 +372,25 @@ public interface ChefApi extends Closeable {
    Set<String> listDatabagItems(@PathParam("name") String databagName);
 
    /**
-    * Create a data bag item in the data bag
+    * Get an item in a data bag.
+    * 
+    * @param databagName The name of the data bag.
+    * @param databagItemId The identifier of the item to get.
+    * @return The details of the item in the given data bag.
+    */
+   @Named("databag:getitem")
+   @GET
+   @Path("/data/{databagName}/{databagItemId}")
+   @Fallback(NullOnNotFoundOr404.class)
+   DatabagItem getDatabagItem(@PathParam("databagName") String databagName,
+         @PathParam("databagItemId") String databagItemId);
+
+   /**
+    * Adds an item in a data bag.
     * 
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have view rights on the databag.
-    *            <p/>
-    * @throws IllegalStateException
-    *            if the item already exists
+    * @param databagName The name of the data bag.
+    * @param The item to add to the data bag.
+    * @param The item just added to the data bag.
     */
    @Named("databag:createitem")
    @POST
@@ -553,13 +399,11 @@ public interface ChefApi extends Closeable {
          @BinderParam(BindToJsonPayload.class) DatabagItem databagItem);
 
    /**
-    * Update (or create if not exists) a data bag item
+    * Update an item in a data bag.
     * 
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have view rights on the databag.
+    * @param databagName The name of the data bag.
+    * @param item The new contents for the item in the data bag.
+    * @return The details for the updated item in the data bag.
     */
    @Named("databag:updateitem")
    @PUT
@@ -569,29 +413,11 @@ public interface ChefApi extends Closeable {
          @PathParam("databagItemId") @ParamParser(DatabagItemId.class) @BinderParam(BindToJsonPayload.class) DatabagItem item);
 
    /**
-    * gets an existing databag item.
-    * 
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have view rights on the databag.
-    */
-   @Named("databag:getitem")
-   @GET
-   @Path("/data/{databagName}/{databagItemId}")
-   @Fallback(NullOnNotFoundOr404.class)
-   DatabagItem getDatabagItem(@PathParam("databagName") String databagName,
-         @PathParam("databagItemId") String databagItemId);
-
-   /**
-    * Delete a data bag item
+    * Delete an item from a data bag.
     * 
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have view rights on the databag.
+    * @param databagName The name of the data bag.
+    * @param databagItemId The identifier of the item to delete.
+    * @return The item deleted from the data bag.
     */
    @Named("databag:deleteitem")
    @DELETE
@@ -600,178 +426,239 @@ public interface ChefApi extends Closeable {
    DatabagItem deleteDatabagItem(@PathParam("databagName") String databagName,
          @PathParam("databagItemId") String databagItemId);
 
+   // Environments
+
    /**
-    * Show indexes you can search on
-    * <p/>
-    * By default, the "role", "node" and "api" indexes will always be available.
-    * <p/>
-    * Note that the search indexes may lag behind the most current data by at
-    * least 10 seconds at any given time - so if you need to write data and
-    * immediately query it, you likely need to produce an artificial delay (or
-    * simply retry until the data is available.)
+    * List the names of the existing environments.
     * 
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have view rights on the databag.
+    * @return The names of the existing environments.
     */
-   @Named("search:indexes")
+   @SinceApiVersion("0.10.0")
+   @Named("environment:list")
    @GET
-   @Path("/search")
+   @Path("/environments")
    @ResponseParser(ParseKeySetFromJson.class)
    @Fallback(EmptySetOnNotFoundOr404.class)
-   Set<String> listSearchIndexes();
+   Set<String> listEnvironments();
 
    /**
-    * search all roles.
-    * <p/>
-    * Note that without any request parameters this will return all of the data
-    * within the index.
+    * Get the details of an existing environment.
     * 
-    * @return The response contains the total number of rows that matched your
-    *         request, the position this result set returns (useful for paging)
-    *         and the rows themselves.
+    * @param environmentname The name of the environment to get.
+    * @return The details of the given environment.
     */
-   @Named("search:roles")
+   @SinceApiVersion("0.10.0")
+   @Named("environment:get")
    @GET
-   @Path("/search/role")
-   @ResponseParser(ParseSearchRolesFromJson.class)
-   SearchResult<? extends Role> searchRoles();
+   @Path("/environments/{environmentname}")
+   @Fallback(NullOnNotFoundOr404.class)
+   Environment getEnvironment(@PathParam("environmentname") String environmentname);
 
    /**
-    * search all roles that match the given options.
+    * Create a new environment.
     * 
-    * @return The response contains the total number of rows that matched your
-    *         request, the position this result set returns (useful for paging)
-    *         and the rows themselves.
+    * @param environment The environment to create.
     */
-   @Named("search:roles")
-   @GET
-   @Path("/search/role")
-   @ResponseParser(ParseSearchRolesFromJson.class)
-   SearchResult<? extends Role> searchRoles(SearchOptions options);
+   @SinceApiVersion("0.10.0")
+   @Named("environment:create")
+   @POST
+   @Path("/environments")
+   void createEnvironment(@BinderParam(BindToJsonPayload.class) Environment environment);
 
    /**
-    * search all clients.
-    * <p/>
-    * Note that without any request parameters this will return all of the data
-    * within the index.
+    * Updated the given environment.
     * 
-    * @return The response contains the total number of rows that matched your
-    *         request, the position this result set returns (useful for paging)
-    *         and the rows themselves.
+    * @param environment The new details for the environment.
+    * @return The details of the updated environment.
     */
-   @Named("search:clients")
-   @GET
-   @Path("/search/client")
-   @ResponseParser(ParseSearchClientsFromJson.class)
-   SearchResult<? extends Client> searchClients();
+   @SinceApiVersion("0.10.0")
+   @Named("environment:update")
+   @PUT
+   @Path("/environments/{environmentname}")
+   Environment updateEnvironment(
+         @PathParam("environmentname") @ParamParser(EnvironmentName.class) @BinderParam(BindToJsonPayload.class) Environment environment);
 
    /**
-    * search all clients that match the given options.
+    * Delete the given environment.
     * 
-    * @return The response contains the total number of rows that matched your
-    *         request, the position this result set returns (useful for paging)
-    *         and the rows themselves.
+    * @param environmentname The name of the environment to delete.
+    * @return The details of the deleted environment.
     */
-   @Named("search:clients")
-   @GET
-   @Path("/search/client")
-   @ResponseParser(ParseSearchClientsFromJson.class)
-   SearchResult<? extends Client> searchClients(SearchOptions options);
-
-   /**
-    * search all nodes.
-    * <p/>
-    * Note that without any request parameters this will return all of the data
-    * within the index.
+   @SinceApiVersion("0.10.0")
+   @Named("environment:delete")
+   @DELETE
+   @Path("/environments/{environmentname}")
+   @Fallback(NullOnNotFoundOr404.class)
+   Environment deleteEnvironment(@PathParam("environmentname") String environmentname);
+
+   // Nodes
+
+   /**
+    * List the names of the existing nodes.
     * 
-    * @return The response contains the total number of rows that matched your
-    *         request, the position this result set returns (useful for paging)
-    *         and the rows themselves.
+    * @return The names of the existing nodes.
     */
-   @Named("search:nodes")
+   @Named("node:list")
    @GET
-   @Path("/search/node")
-   @ResponseParser(ParseSearchNodesFromJson.class)
-   SearchResult<? extends Node> searchNodes();
+   @Path("/nodes")
+   @ResponseParser(ParseKeySetFromJson.class)
+   @Fallback(EmptySetOnNotFoundOr404.class)
+   Set<String> listNodes();
 
    /**
-    * search all nodes that match the given options.
+    * List the names of the nodes in the given environment.
     * 
-    * @return The response contains the total number of rows that matched your
-    *         request, the position this result set returns (useful for paging)
-    *         and the rows themselves.
+    * @param environmentname The name of the environment.
+    * @return The names of the existing nodes in the given environment.
     */
-   @Named("search:nodes")
+   @SinceApiVersion("0.10.0")
+   @Named("environment:nodelist")
    @GET
-   @Path("/search/node")
-   @ResponseParser(ParseSearchNodesFromJson.class)
-   SearchResult<? extends Node> searchNodes(SearchOptions options);
+   @Path("/environments/{environmentname}/nodes")
+   @ResponseParser(ParseKeySetFromJson.class)
+   @Fallback(EmptySetOnNotFoundOr404.class)
+   Set<String> listNodesInEnvironment(@PathParam("environmentname") String environmentname);
 
    /**
-    * search all items in a databag.
-    * <p/>
-    * Note that without any request parameters this will return all of the data
-    * within the index.
+    * Get the details of the given node.
     * 
-    * @return The response contains the total number of rows that matched your
-    *         request, the position this result set returns (useful for paging)
-    *         and the rows themselves.
+    * @param nodename The name of the node to get.
+    * @return The details of the given node.
     */
-   @Named("search:databag")
+   @Named("node:get")
    @GET
-   @Path("/search/{databagName}")
-   @ResponseParser(ParseSearchDatabagFromJson.class)
-   SearchResult<? extends DatabagItem> searchDatabag(@PathParam("databagName") String databagName);
+   @Path("/nodes/{nodename}")
+   @Fallback(NullOnNotFoundOr404.class)
+   Node getNode(@PathParam("nodename") String nodename);
 
    /**
-    * search all items in a databag that match the given options.
+    * Create a new node.
     * 
-    * @return The response contains the total number of rows that matched your
-    *         request, the position this result set returns (useful for paging)
-    *         and the rows themselves.
+    * @param node The details of the node to create.
     */
-   @Named("search:databag")
-   @GET
-   @Path("/search/{databagName}")
-   @ResponseParser(ParseSearchDatabagFromJson.class)
-   SearchResult<? extends DatabagItem> searchDatabag(@PathParam("databagName") String databagName, SearchOptions options);
+   @Named("node:create")
+   @POST
+   @Path("/nodes")
+   void createNode(@BinderParam(BindToJsonPayload.class) Node node);
 
    /**
-    * search all items in a environment that match the given options.
+    * Update an existing node.
     * 
-    * @return The response contains the total number of rows that matched your
-    *         request, the position this result set returns (useful for paging)
-    *         and the rows themselves.
+    * @param node The new details for the node.
+    * @return The details of the updated node.
     */
-   @SinceApiVersion("0.10.0")
-   @Named("search:environments")
+   @Named("node:update")
+   @PUT
+   @Path("/nodes/{nodename}")
+   Node updateNode(@PathParam("nodename") @ParamParser(NodeName.class) @BinderParam(BindToJsonPayload.class) Node node);
+
+   /**
+    * Delete the given node.
+    * 
+    * @param nodename The name of the node to delete.
+    * @return The details of the deleted node.
+    */
+   @Named("node:delete")
+   @DELETE
+   @Path("/nodes/{nodename}")
+   @Fallback(NullOnNotFoundOr404.class)
+   Node deleteNode(@PathParam("nodename") String nodename);
+
+   // Roles
+
+   /**
+    * List the names of the existing roles.
+    * 
+    * @return The names of the existing roles.
+    */
+   @Named("role:list")
    @GET
-   @Path("/search/environment")
-   @ResponseParser(ParseSearchEnvironmentsFromJson.class)
-   SearchResult<? extends Environment> searchEnvironments();
+   @Path("/roles")
+   @ResponseParser(ParseKeySetFromJson.class)
+   @Fallback(EmptySetOnNotFoundOr404.class)
+   Set<String> listRoles();
 
    /**
-    * search all environments that match the given options.
+    * Get the details of the given role.
     * 
-    * @return The response contains the total number of rows that matched your
-    *         request, the position this result set returns (useful for paging)
-    *         and the rows themselves.
+    * @param rolename The name of the role to get.
+    * @return The details of the given role.
     */
-   @SinceApiVersion("0.10.0")
-   @Named("search:environments")
+   @Named("role:get")
    @GET
-   @Path("/search/environment")
-   @ResponseParser(ParseSearchEnvironmentsFromJson.class)
-   SearchResult<? extends Environment> searchEnvironments(SearchOptions options);
+   @Path("/roles/{rolename}")
+   @Fallback(NullOnNotFoundOr404.class)
+   Role getRole(@PathParam("rolename") String rolename);
+
+   /**
+    * Create a new role.
+    * 
+    * @param role The details for the new role.
+    */
+   @Named("role:create")
+   @POST
+   @Path("/roles")
+   void createRole(@BinderParam(BindToJsonPayload.class) Role role);
+
+   /**
+    * Update the given role.
+    * 
+    * @param role The new details for the role.
+    * @return The details of the updated role.
+    */
+   @Named("role:update")
+   @PUT
+   @Path("/roles/{rolename}")
+   Role updateRole(@PathParam("rolename") @ParamParser(RoleName.class) @BinderParam(BindToJsonPayload.class) Role role);
+
+   /**
+    * Delete the given role.
+    * 
+    * @param rolename The name of the role to delete.
+    * @return The details of the deleted role.
+    */
+   @Named("role:delete")
+   @DELETE
+   @Path("/roles/{rolename}")
+   @Fallback(NullOnNotFoundOr404.class)
+   Role deleteRole(@PathParam("rolename") String rolename);
+
+   // Sandboxes
+
+   /**
+    * Creates a new sandbox.
+    * <p>
+    * It accepts a list of checksums as input and returns the URLs against which
+    * to PUT files that need to be uploaded.
+    * 
+    * @param md5s The raw md5 sums. Uses {@code Bytes.asList()} and
+    *        {@code Bytes.toByteArray()} as necessary
+    * @return The upload sandbox with the URLs against which to PUT files that
+    *         need to be uploaded.
+    */
+   @Named("sandbox:upload")
+   @POST
+   @Path("/sandboxes")
+   UploadSandbox createUploadSandboxForChecksums(@BinderParam(BindChecksumsToJsonPayload.class) Set<List<Byte>> md5s);
+
+   /**
+    * Uploads the given content to the sandbox at the given URI.
+    * <p>
+    * The URI must be obtained, after uploading a sandbox, from the
+    * {@link UploadSandbox#getUri()}.
+    * 
+    * @param location The URI where the upload must be performed.
+    * @param content The contents to upload.
+    */
+   @Named("content:upload")
+   @PUT
+   @Produces("application/x-binary")
+   void uploadContent(@EndpointParam URI location, Payload content);
 
    /**
     * Get the contents of the given resource.
     * 
-    * @param resource
-    *           The resource to get.
+    * @param resource The resource to get.
     * @return An input stream for the content of the requested resource.
     */
    @Named("content:get")
@@ -781,175 +668,186 @@ public interface ChefApi extends Closeable {
    InputStream getResourceContents(@EndpointParam(parser = UriForResource.class) Resource resource);
 
    /**
-    * @return list of environments names.
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have rights to list environments.
+    * Confirms if the sandbox is completed or not.
+    * <p>
+    * This method should be used after uploading contents to the sandbox.
+    * 
+    * @param id The id of the sandbox to commit.
+    * @param isCompleted Flag to set if the sandbox is completed or not.
+    * @return The details of the sandbox.
     */
-   @SinceApiVersion("0.10.0")
-   @Named("environment:list")
+   @Named("sandbox:commit")
+   @PUT
+   @Path("/sandboxes/{id}")
+   Sandbox commitSandbox(@PathParam("id") String id, @WrapWith("is_completed") boolean isCompleted);
+
+   // Search
+
+   /**
+    * List the names of the available search indexes.
+    * <p>
+    * By default, the "role", "node" and "api" indexes will always be available.
+    * <p>
+    * Note that the search indexes may lag behind the most current data by at
+    * least 10 seconds at any given time - so if you need to write data and
+    * immediately query it, you likely need to produce an artificial delay (or
+    * simply retry until the data is available).
+    * 
+    * @return The names of the available search indexes.
+    */
+   @Named("search:indexes")
    @GET
-   @Path("/environments")
+   @Path("/search")
    @ResponseParser(ParseKeySetFromJson.class)
    @Fallback(EmptySetOnNotFoundOr404.class)
-   Set<String> listEnvironments();
+   Set<String> listSearchIndexes();
 
    /**
-    * creates a new environment
+    * Search all clients.
+    * <p>
+    * Note that without any request parameters this will return all of the data
+    * within the index.
     * 
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if the caller is not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if the caller is not authorized to create a
-    *            client.
-    * @throws HttpResponseException
-    *            "409 Conflict" if the client already exists
+    * @return The response contains the total number of rows that matched the
+    *         request, the position this result set returns (useful for paging)
+    *         and the rows themselves.
     */
-   @SinceApiVersion("0.10.0")
-   @Named("environment:create")
-   @POST
-   @Path("/environments")
-   void createEnvironment(@BinderParam(BindToJsonPayload.class) Environment environment);
+   @Named("search:clients")
+   @GET
+   @Path("/search/client")
+   @ResponseParser(ParseSearchClientsFromJson.class)
+   SearchResult<? extends Client> searchClients();
 
    /**
-    * Creates or updates (uploads) a environment
+    * Search all clients that match the given options.
     * 
-    * @param environment
-    * @throws HttpResponseException
-    *            "409 Conflict" if the node already exists
+    * @return The response contains the total number of rows that matched the
+    *         request, the position this result set returns (useful for paging)
+    *         and the rows themselves.
     */
-   @SinceApiVersion("0.10.0")
-   @Named("environment:update")
-   @PUT
-   @Path("/environments/{environmentname}")
-   Environment updateEnvironment(
-         @PathParam("environmentname") @ParamParser(EnvironmentName.class) @BinderParam(BindToJsonPayload.class) Environment environment);
+   @Named("search:clients")
+   @GET
+   @Path("/search/client")
+   @ResponseParser(ParseSearchClientsFromJson.class)
+   SearchResult<? extends Client> searchClients(SearchOptions options);
 
    /**
-    * deletes an existing environment.
+    * Search all items in a data bag.
+    * <p>
+    * Note that without any request parameters this will return all of the data
+    * within the index.
     * 
-    * @return last state of the environment you deleted or null, if not found
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have Delete rights on the node.
+    * @return The response contains the total number of rows that matched the
+    *         request, the position this result set returns (useful for paging)
+    *         and the rows themselves.
     */
-   @SinceApiVersion("0.10.0")
-   @Named("environment:delete")
-   @DELETE
-   @Path("/environments/{environmentname}")
-   @Fallback(NullOnNotFoundOr404.class)
-   Environment deleteEnvironment(@PathParam("environmentname") String environmentname);
+   @Named("search:databag")
+   @GET
+   @Path("/search/{databagName}")
+   @ResponseParser(ParseSearchDatabagFromJson.class)
+   SearchResult<? extends DatabagItem> searchDatabagItems(@PathParam("databagName") String databagName);
 
    /**
-    * gets an existing environment.
+    * Search all items in a data bag that match the given options.
     * 
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have view rights on the node.
+    * @return The response contains the total number of rows that matched the
+    *         request, the position this result set returns (useful for paging)
+    *         and the rows themselves.
     */
-   @SinceApiVersion("0.10.0")
-   @Named("environment:get")
+   @Named("search:databag")
    @GET
-   @Path("/environments/{environmentname}")
-   @Fallback(NullOnNotFoundOr404.class)
-   Environment getEnvironment(@PathParam("environmentname") String environmentname);
+   @Path("/search/{databagName}")
+   @ResponseParser(ParseSearchDatabagFromJson.class)
+   SearchResult<? extends DatabagItem> searchDatabagItems(@PathParam("databagName") String databagName,
+         SearchOptions options);
 
    /**
-    * gets an environment cookbook list, show only latest cookbook version
+    * Search all environments.
+    * <p>
+    * Note that without any request parameters this will return all of the data
+    * within the index.
     * 
-    * @return List of environment cookbooks
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have view rights on the node.
+    * @return The response contains the total number of rows that matched the
+    *         request, the position this result set returns (useful for paging)
+    *         and the rows themselves.
     */
    @SinceApiVersion("0.10.0")
-   @Named("environment:cookbooklist")
+   @Named("search:environments")
    @GET
-   @ResponseParser(ParseCookbookDefinitionListFromJsonv10.class)
-   @Path("/environments/{environmentname}/cookbooks")
-   @Fallback(NullOnNotFoundOr404.class)
-   Set<CookbookDefinition> listEnvironmentCookbooks(@PathParam("environmentname") String environmentname);
-
-   /**
-    * gets an environment cookbook list
-    * 
-    * @param environmentname
-    *           environment name that you looking for
-    * @param numversions
-    *           how many versions you want to see: 3 returns 3 latest versions,
-    *           in descending order (high to low); all returns all available
-    *           versions in this environment, in descending order (high to low);
-    *           0 is a valid input that returns an empty array for the versions
-    *           of each cookbooks.up
-    * @return List of environment cookbooks
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have view rights on the node.
+   @Path("/search/environment")
+   @ResponseParser(ParseSearchEnvironmentsFromJson.class)
+   SearchResult<? extends Environment> searchEnvironments();
+
+   /**
+    * Search all environments that match the given options.
+    * 
+    * @return The response contains the total number of rows that matched the
+    *         request, the position this result set returns (useful for paging)
+    *         and the rows themselves.
     */
    @SinceApiVersion("0.10.0")
-   @Named("environment:cookbooklist")
+   @Named("search:environments")
    @GET
-   @ResponseParser(ParseCookbookDefinitionListFromJsonv10.class)
-   @Path("/environments/{environmentname}/cookbooks?num_versions={numversions}")
-   @Fallback(NullOnNotFoundOr404.class)
-   Set<CookbookDefinition> listEnvironmentCookbooks(@PathParam("environmentname") String environmentname,
-         @PathParam("numversions") String numversions);
+   @Path("/search/environment")
+   @ResponseParser(ParseSearchEnvironmentsFromJson.class)
+   SearchResult<? extends Environment> searchEnvironments(SearchOptions options);
 
-   @SinceApiVersion("0.10.0")
-   @Named("environment:cookbook")
+   /**
+    * Search all nodes.
+    * <p>
+    * Note that without any request parameters this will return all of the data
+    * within the index.
+    * 
+    * @return The response contains the total number of rows that matched the
+    *         request, the position this result set returns (useful for paging)
+    *         and the rows themselves.
+    */
+   @Named("search:nodes")
    @GET
-   @ResponseParser(ParseCookbookDefinitionFromJsonv10.class)
-   @Path("/environments/{environmentname}/cookbooks/{cookbookname}")
-   CookbookDefinition getEnvironmentCookbook(@PathParam("environmentname") String environmentname,
-         @PathParam("cookbookname") String cookbookname);
+   @Path("/search/node")
+   @ResponseParser(ParseSearchNodesFromJson.class)
+   SearchResult<? extends Node> searchNodes();
 
-   @SinceApiVersion("0.10.0")
-   @Named("environment:cookbook")
+   /**
+    * Search all nodes that match the given options.
+    * 
+    * @return The response contains the total number of rows that matched the
+    *         request, the position this result set returns (useful for paging)
+    *         and the rows themselves.
+    */
+   @Named("search:nodes")
    @GET
-   @ResponseParser(ParseCookbookDefinitionFromJsonv10.class)
-   @Path("/environments/{environmentname}/cookbooks/{cookbookname}?num_versions={numversions}")
-   CookbookDefinition getEnvironmentCookbook(@PathParam("environmentname") String environmentname,
-         @PathParam("cookbookname") String cookbookname, @PathParam("numversions") String numversions);
-  
+   @Path("/search/node")
+   @ResponseParser(ParseSearchNodesFromJson.class)
+   SearchResult<? extends Node> searchNodes(SearchOptions options);
+
    /**
-    * @return List of environment recipes.
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have rights to list environment recipes.
+    * Search all roles.
+    * <p>
+    * Note that without any request parameters this will return all of the data
+    * within the index.
+    * 
+    * @return The response contains the total number of rows that matched the
+    *         request, the position this result set returns (useful for paging)
+    *         and the rows themselves.
     */
-   @SinceApiVersion("0.10.0")
-   @Named("environment:recipelist")
+   @Named("search:roles")
    @GET
-   @Path("/environments/{environmentname}/recipes")
-   @Fallback(EmptySetOnNotFoundOr404.class)
-   Set<String> listEnvironmentRecipes(@PathParam("environmentname") String environmentname);
+   @Path("/search/role")
+   @ResponseParser(ParseSearchRolesFromJson.class)
+   SearchResult<? extends Role> searchRoles();
 
    /**
-    * @return List of environment nodes.
-    * @throws AuthorizationException
-    *            <p/>
-    *            "401 Unauthorized" if you are not a recognized user.
-    *            <p/>
-    *            "403 Forbidden" if you do not have rights to list environment nodes.
+    * Search all roles that match the given options.
+    * 
+    * @return The response contains the total number of rows that matched the
+    *         request, the position this result set returns (useful for paging)
+    *         and the rows themselves.
     */
-   @SinceApiVersion("0.10.0")
-   @Named("environment:nodelist")
+   @Named("search:roles")
    @GET
-   @Path("/environments/{environmentname}/nodes")
-   @ResponseParser(ParseKeySetFromJson.class)   
-   @Fallback(EmptySetOnNotFoundOr404.class)
-   Set<String> listEnvironmentNodes(@PathParam("environmentname") String environmentname);  
+   @Path("/search/role")
+   @ResponseParser(ParseSearchRolesFromJson.class)
+   SearchResult<? extends Role> searchRoles(SearchOptions options);
+
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java b/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
index 302e01b..d767fdd 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
@@ -44,6 +44,11 @@ import com.google.inject.Module;
  * @author Ignasi Barrera
  */
 public class ChefApiMetadata extends BaseHttpApiMetadata<ChefApi> {
+   
+   /**
+    * The default Chef Server API version to use.
+    */
+   public static final String DEFAULT_VERSION = "0.10.8";
 
    @Override
    public Builder toBuilder() {
@@ -83,7 +88,7 @@ public class ChefApiMetadata extends BaseHttpApiMetadata<ChefApi> {
                .name("OpsCode Chef Api")
                .identityName("User")
                .credentialName("Certificate")
-               .version(ChefApi.VERSION)
+               .version(DEFAULT_VERSION)
                .documentation(URI.create("http://wiki.opscode.com/display/chef/Server+API"))
                .defaultEndpoint("http://localhost:4000")
                .defaultProperties(ChefApiMetadata.defaultProperties())

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/ChefService.java b/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
index 293fb5b..f1c431b 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
@@ -20,116 +20,84 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.List;
 
+import org.jclouds.chef.config.ChefProperties;
 import org.jclouds.chef.domain.BootstrapConfig;
 import org.jclouds.chef.domain.Client;
 import org.jclouds.chef.domain.CookbookVersion;
 import org.jclouds.chef.domain.Environment;
 import org.jclouds.chef.domain.Node;
 import org.jclouds.chef.internal.BaseChefService;
+import org.jclouds.chef.util.ChefUtils;
 import org.jclouds.domain.JsonBall;
+import org.jclouds.ohai.config.OhaiModule;
 import org.jclouds.rest.annotations.SinceApiVersion;
 import org.jclouds.scriptbuilder.domain.Statement;
 
-import com.google.common.base.Predicate;
 import com.google.common.io.InputSupplier;
 import com.google.inject.ImplementedBy;
 
 /**
- * Provides high level chef operations
+ * Provides high level Chef operations.
  * 
  * @author Adrian Cole
  */
 @ImplementedBy(BaseChefService.class)
 public interface ChefService {
+
    /**
-    * @return a reference to the context that created this.
+    * Get the context that created this service.
+    * 
+    * @return The context that created the service.
     */
    ChefContext getContext();
 
-   byte[] encrypt(InputSupplier<? extends InputStream> supplier) throws IOException;
-
-   byte[] decrypt(InputSupplier<? extends InputStream> supplier) throws IOException;
-
-   void cleanupStaleNodesAndClients(String prefix, int secondsStale);
+   // Crypto
 
    /**
+    * Encrypt the given input stream.
     * 
-    * @param nodeName
-    * @param runList
-    * @return node sent to the server containing the automatic attributes
+    * @param supplier The input stream to encrypt.
+    * @return The encrypted bytes for the given input stream.
+    * @throws IOException If there is an error reading from the input stream.
     */
-   Node createNodeAndPopulateAutomaticAttributes(String nodeName, Iterable<String> runList);
+   byte[] encrypt(InputSupplier<? extends InputStream> supplier) throws IOException;
 
    /**
-    * Creates all steps necessary to bootstrap and run the chef api.
+    * Decrypt the given input stream.
     * 
-    * @param group
-    *           corresponds to a configured
-    *           {@link org.jclouds.chef.config.ChefProperties#CHEF_BOOTSTRAP_DATABAG
-    *           databag} where run_list and other information are stored
-    * @return boot script
-    * @see #updateRunListForTag
+    * @param supplier The input stream to decrypt.
+    * @return The decrypted bytes for the given input stream.
+    * @throws IOException If there is an error reading from the input stream.
     */
-   Statement createBootstrapScriptForGroup(String group);
+   byte[] decrypt(InputSupplier<? extends InputStream> supplier) throws IOException;
 
-   /**
-    * Configures how the nodes of a certain group will be bootstrapped
-    * 
-    * @param group
-    *           The group where the given bootstrap configuration will be
-    *           applied.
-    * @param bootstrapConfig
-    *           The configuration to be applied to the nodes in the group.
-    */
-   void updateBootstrapConfigForGroup(String group, BootstrapConfig bootstrapConfig);
+   // Bootstrap
 
    /**
-    * assigns a run list to all nodes bootstrapped with a certain group
+    * Creates all steps necessary to bootstrap the node.
     * 
-    * @param runList
-    *           list of recipes or roles to assign. syntax is
-    *           {@code recipe[name]} and {@code role[name]}
-    * 
-    * @param group
-    *           corresponds to a configured
-    *           {@link org.jclouds.chef.config.ChefProperties#CHEF_BOOTSTRAP_DATABAG
-    *           databag} where run_list and other information are stored
-    * @deprecated Use {link
-    *             {@link #updateBootstrapConfigForGroup(String, BootstrapConfig)}
+    * @param group corresponds to a configured
+    *        {@link ChefProperties#CHEF_BOOTSTRAP_DATABAG} data bag where
+    *        run_list and other information are stored.
+    * @return The script used to bootstrap the node.
     */
-   @Deprecated
-   void updateBootstrapConfigForGroup(Iterable<String> runList, String group);
+   Statement createBootstrapScriptForGroup(String group);
 
    /**
-    * assigns a run list to all nodes bootstrapped with a certain group, and
-    * configures the chef run to use the given json attributes.
-    * 
-    * @param runList
-    *           list of recipes or roles to assign. syntax is
-    *           {@code recipe[name]} and {@code role[name]}
-    * 
-    * @param jsonAttributes
-    *           A json string with the attributes to be populated. Since each
-    *           cookbook may define its own attribute structure, a simple Map or
-    *           Properties object may not be convenient.
+    * Configures how the nodes of a certain group will be bootstrapped
     * 
-    * @param group
-    *           corresponds to a configured
-    *           {@link org.jclouds.chef.config.ChefProperties#CHEF_BOOTSTRAP_DATABAG
-    *           databag} where run_list and other information are stored
-    * @deprecated Use {link
-    *             {@link #updateBootstrapConfigForGroup(String, BootstrapConfig)}
+    * @param group The group where the given bootstrap configuration will be
+    *        applied.
+    * @param bootstrapConfig The configuration to be applied to the nodes in the
+    *        group.
     */
-   @Deprecated
-   void updateBootstrapConfigForGroup(Iterable<String> runList, JsonBall jsonAttributes, String group);
+   void updateBootstrapConfigForGroup(String group, BootstrapConfig bootstrapConfig);
 
    /**
-    * @param group
-    *           corresponds to a configured
-    *           {@link org.jclouds.chef.config.ChefProperties#CHEF_BOOTSTRAP_DATABAG
-    *           databag} where run_list and other information are stored
+    * Get the run list for the given group.
+    * 
+    * @param The group to get the configured run list for.
     * @return run list for all nodes bootstrapped with a certain group
-    * @see #updateRunListForTag
     */
    List<String> getRunListForGroup(String group);
 
@@ -139,45 +107,91 @@ public interface ChefService {
     * The bootstrap configuration is a Json object containing the run list and
     * the configured attributes.
     * 
-    * @param group
-    *           The name of the group.
+    * @param group The name of the group.
     * @return The bootstrap configuration for the given group.
     */
    public JsonBall getBootstrapConfigForGroup(String group);
 
-   void deleteAllNodesInList(Iterable<String> names);
+   // Nodes
 
-   Iterable<? extends Node> listNodes();
+   /**
+    * Creates a new node and populates the automatic attributes.
+    * 
+    * @param nodeName The name of the node to create.
+    * @param runList The run list for the created node.
+    * @return The created node with the automatic attributes populated.
+    * @see OhaiModule
+    * @see ChefUtils#ohaiAutomaticAttributeBinder(com.google.inject.Binder)
+    */
+   Node createNodeAndPopulateAutomaticAttributes(String nodeName, Iterable<String> runList);
 
-   Iterable<? extends Node> listNodesMatching(Predicate<String> nodeNameSelector);
+   /**
+    * Update and populate the automatic attributes of the given node.
+    * 
+    * @param nodeName The node to update.
+    */
+   void updateAutomaticAttributesOnNode(String nodeName);
 
-   Iterable<? extends Node> listNodesNamed(Iterable<String> names);
+   /**
+    * Remove the nodes and clients that have been inactive for a given amount of
+    * time.
+    * 
+    * @param prefix The prefix for the nodes and clients to delete.
+    * @param secondsStale The seconds of inactivity to consider a node and
+    *        client obsolete.
+    */
+   void cleanupStaleNodesAndClients(String prefix, int secondsStale);
 
+   /**
+    * Delete the given nodes.
+    * 
+    * @param names The names of the nodes to delete.
+    */
+   void deleteAllNodesInList(Iterable<String> names);
+
+   /**
+    * Delete the given clients.
+    * 
+    * @param names The names of the client to delete.
+    */
    void deleteAllClientsInList(Iterable<String> names);
 
-   Iterable<? extends Client> listClientsDetails();
+   /**
+    * List the details of all existing nodes.
+    * 
+    * @return The details of all existing nodes.
+    */
+   Iterable<? extends Node> listNodes();
 
-   Iterable<? extends Client> listClientsDetailsMatching(Predicate<String> clientNameSelector);
+   /**
+    * List the details of all existing nodes in the given environment.
+    * 
+    * @param environmentName The name fo the environment.
+    * @return The details of all existing nodes in the given environment.
+    */
+   @SinceApiVersion("0.10.0")
+   Iterable<? extends Node> listNodesInEnvironment(String environmentName);
 
-   Iterable<? extends Client> listClientsNamed(Iterable<String> names);
+   /**
+    * List the details of all existing clients.
+    * 
+    * @return The details of all existing clients.
+    */
+   Iterable<? extends Client> listClients();
 
+   /**
+    * List the details of all existing cookbooks.
+    * 
+    * @return The details of all existing cookbooks.
+    */
    Iterable<? extends CookbookVersion> listCookbookVersions();
 
-   Iterable<? extends CookbookVersion> listCookbookVersionsMatching(Predicate<String> cookbookNameSelector);
-
-   Iterable<? extends CookbookVersion> listCookbookVersionsNamed(Iterable<String> cookbookNames);
-
-   void updateAutomaticAttributesOnNode(String nodeName);
-
+   /**
+    * List the details of all existing environments.
+    * 
+    * @return The details of all existing environments.
+    */
    @SinceApiVersion("0.10.0")
    Iterable<? extends Environment> listEnvironments();
 
-   @SinceApiVersion("0.10.0")
-   Iterable<? extends Environment> listEnvironmentsMatching(Predicate<String> environmentNameSelector);
-
-   @SinceApiVersion("0.10.0")
-   Iterable<? extends Environment> listEnvironmentsNamed(Iterable<String> names);
-
-   @SinceApiVersion("0.10.0")
-   Iterable<? extends Node> listEnvironmentNodes(String environmentName);
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java b/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
index 34d9005..50b58df 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
@@ -20,7 +20,6 @@ import static com.google.common.base.Charsets.UTF_8;
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.hash.Hashing.sha1;
 import static com.google.common.io.BaseEncoding.base64;
-import static com.google.common.io.ByteStreams.asByteSource;
 import static com.google.common.io.ByteStreams.toByteArray;
 
 import java.io.IOException;
@@ -58,6 +57,7 @@ import com.google.common.base.Throwables;
 import com.google.common.collect.ArrayListMultimap;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Multimap;
+import com.google.common.io.ByteSource;
 
 /**
  * Ported from mixlib-authentication in order to sign Chef requests.
@@ -135,7 +135,7 @@ public class SignedHeaderAuth implements HttpRequestFilter {
    @VisibleForTesting
    String hashPath(String path) {
       try {
-         return base64().encode(asByteSource(canonicalPath(path).getBytes(UTF_8)).hash(sha1()).asBytes());
+         return base64().encode(ByteSource.wrap(canonicalPath(path).getBytes(UTF_8)).hash(sha1()).asBytes());
       } catch (Exception e) {
          Throwables.propagateIfPossible(e);
          throw new HttpException("error creating sigature for path: " + path, e);

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java b/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
index cf3f879..9d33570 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
@@ -49,21 +49,19 @@ import org.jclouds.chef.strategy.DeleteAllClientsInList;
 import org.jclouds.chef.strategy.DeleteAllNodesInList;
 import org.jclouds.chef.strategy.ListClients;
 import org.jclouds.chef.strategy.ListCookbookVersions;
-import org.jclouds.chef.strategy.ListEnvironments;
 import org.jclouds.chef.strategy.ListEnvironmentNodes;
+import org.jclouds.chef.strategy.ListEnvironments;
 import org.jclouds.chef.strategy.ListNodes;
 import org.jclouds.chef.strategy.UpdateAutomaticAttributesOnNode;
 import org.jclouds.domain.JsonBall;
 import org.jclouds.io.Payloads;
 import org.jclouds.io.payloads.RSADecryptingPayload;
 import org.jclouds.io.payloads.RSAEncryptingPayload;
-import org.jclouds.javax.annotation.Nullable;
 import org.jclouds.json.Json;
 import org.jclouds.logging.Logger;
 import org.jclouds.scriptbuilder.domain.Statement;
 
 import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Predicate;
 import com.google.common.base.Supplier;
 import com.google.common.collect.Maps;
 import com.google.common.io.ByteStreams;
@@ -130,78 +128,40 @@ public class BaseChefService implements ChefService {
    }
 
    @Override
-   public void cleanupStaleNodesAndClients(String prefix, int secondsStale) {
-      cleanupStaleNodesAndClients.execute(prefix, secondsStale);
-   }
-
-   @Override
-   public Node createNodeAndPopulateAutomaticAttributes(String nodeName, Iterable<String> runList) {
-      return createNodeAndPopulateAutomaticAttributes.execute(nodeName, runList);
-   }
-
-   @Override
-   public void deleteAllNodesInList(Iterable<String> names) {
-      deleteAllNodesInList.execute(names);
-   }
-
-   @Override
-   public Iterable<? extends Node> listNodes() {
-      return listNodes.execute();
-   }
-
-   @Override
-   public Iterable<? extends Node> listNodesMatching(Predicate<String> nodeNameSelector) {
-      return listNodes.execute(nodeNameSelector);
-   }
-
-   @Override
-   public Iterable<? extends Node> listNodesNamed(Iterable<String> names) {
-      return listNodes.execute(names);
-   }
-
-   @Override
-   public void deleteAllClientsInList(Iterable<String> names) {
-      deleteAllClientsInList.execute(names);
-   }
-
-   @Override
-   public Iterable<? extends Client> listClientsDetails() {
-      return listClients.execute();
+   public ChefContext getContext() {
+      return chefContext;
    }
 
    @Override
-   public Iterable<? extends Client> listClientsDetailsMatching(Predicate<String> clientNameSelector) {
-      return listClients.execute(clientNameSelector);
+   public byte[] encrypt(InputSupplier<? extends InputStream> supplier) throws IOException {
+      return ByteStreams.toByteArray(new RSAEncryptingPayload(Payloads.newPayload(supplier.getInput()), privateKey
+            .get()));
    }
 
    @Override
-   public Iterable<? extends Client> listClientsNamed(Iterable<String> names) {
-      return listClients.execute(names);
+   public byte[] decrypt(InputSupplier<? extends InputStream> supplier) throws IOException {
+      return ByteStreams.toByteArray(new RSADecryptingPayload(Payloads.newPayload(supplier.getInput()), privateKey
+            .get()));
    }
 
-   @Override
-   public Iterable<? extends CookbookVersion> listCookbookVersions() {
-      return listCookbookVersions.execute();
-   }
+   @VisibleForTesting
+   String buildBootstrapConfiguration(BootstrapConfig bootstrapConfig) {
+      checkNotNull(bootstrapConfig, "bootstrapConfig must not be null");
 
-   @Override
-   public Iterable<? extends CookbookVersion> listCookbookVersionsMatching(Predicate<String> cookbookNameSelector) {
-      return listCookbookVersions.execute(cookbookNameSelector);
-   }
+      Map<String, Object> configMap = Maps.newHashMap();
+      configMap.put("run_list", bootstrapConfig.getRunList());
 
-   @Override
-   public Iterable<? extends CookbookVersion> listCookbookVersionsNamed(Iterable<String> names) {
-      return listCookbookVersions.execute(names);
-   }
+      if (bootstrapConfig.getEnvironment().isPresent()) {
+         configMap.put("environment", bootstrapConfig.getEnvironment().get());
+      }
 
-   @Override
-   public void updateAutomaticAttributesOnNode(String nodeName) {
-      updateAutomaticAttributesOnNode.execute(nodeName);
-   }
+      if (bootstrapConfig.getAttribtues().isPresent()) {
+         Map<String, Object> attributes = json.fromJson(bootstrapConfig.getAttribtues().get().toString(),
+               BootstrapConfigForGroup.BOOTSTRAP_CONFIG_TYPE);
+         configMap.putAll(attributes);
+      }
 
-   @Override
-   public ChefContext getContext() {
-      return chefContext;
+      return json.toJson(configMap);
    }
 
    @Override
@@ -228,19 +188,6 @@ public class BaseChefService implements ChefService {
    }
 
    @Override
-   @Deprecated
-   public void updateBootstrapConfigForGroup(Iterable<String> runList, String group) {
-      updateBootstrapConfigForGroup(runList, null, group);
-   }
-
-   @Override
-   @Deprecated
-   public void updateBootstrapConfigForGroup(Iterable<String> runList, @Nullable JsonBall jsonAttributes, String group) {
-      updateBootstrapConfigForGroup(group, BootstrapConfig.builder().runList(runList).attributes(jsonAttributes)
-            .build());
-   }
-
-   @Override
    public List<String> getRunListForGroup(String group) {
       return runListForGroup.apply(group);
    }
@@ -251,54 +198,52 @@ public class BaseChefService implements ChefService {
    }
 
    @Override
-   public byte[] decrypt(InputSupplier<? extends InputStream> supplier) throws IOException {
-      return ByteStreams.toByteArray(new RSADecryptingPayload(Payloads.newPayload(supplier.getInput()), privateKey
-            .get()));
+   public void cleanupStaleNodesAndClients(String prefix, int secondsStale) {
+      cleanupStaleNodesAndClients.execute(prefix, secondsStale);
    }
 
    @Override
-   public byte[] encrypt(InputSupplier<? extends InputStream> supplier) throws IOException {
-      return ByteStreams.toByteArray(new RSAEncryptingPayload(Payloads.newPayload(supplier.getInput()), privateKey
-            .get()));
+   public Node createNodeAndPopulateAutomaticAttributes(String nodeName, Iterable<String> runList) {
+      return createNodeAndPopulateAutomaticAttributes.execute(nodeName, runList);
    }
 
-   @VisibleForTesting
-   String buildBootstrapConfiguration(BootstrapConfig bootstrapConfig) {
-      checkNotNull(bootstrapConfig, "bootstrapConfig must not be null");
-
-      Map<String, Object> configMap = Maps.newHashMap();
-      configMap.put("run_list", bootstrapConfig.getRunList());
+   @Override
+   public void updateAutomaticAttributesOnNode(String nodeName) {
+      updateAutomaticAttributesOnNode.execute(nodeName);
+   }
 
-      if (bootstrapConfig.getEnvironment().isPresent()) {
-         configMap.put("environment", bootstrapConfig.getEnvironment().get());
-      }
+   @Override
+   public void deleteAllNodesInList(Iterable<String> names) {
+      deleteAllNodesInList.execute(names);
+   }
 
-      if (bootstrapConfig.getAttribtues().isPresent()) {
-         Map<String, Object> attributes = json.fromJson(bootstrapConfig.getAttribtues().get().toString(),
-               BootstrapConfigForGroup.BOOTSTRAP_CONFIG_TYPE);
-         configMap.putAll(attributes);
-      }
+   @Override
+   public void deleteAllClientsInList(Iterable<String> names) {
+      deleteAllClientsInList.execute(names);
+   }
 
-      return json.toJson(configMap);
+   @Override
+   public Iterable<? extends Node> listNodes() {
+      return listNodes.execute();
    }
 
    @Override
-   public Iterable<? extends Environment> listEnvironments() {
-      return listEnvironments.execute();
+   public Iterable<? extends Client> listClients() {
+      return listClients.execute();
    }
 
    @Override
-   public Iterable<? extends Environment> listEnvironmentsMatching(Predicate<String> environmentNameSelector) {
-      return listEnvironments.execute(environmentNameSelector);
+   public Iterable<? extends CookbookVersion> listCookbookVersions() {
+      return listCookbookVersions.execute();
    }
 
    @Override
-   public Iterable<? extends Environment> listEnvironmentsNamed(Iterable<String> names) {
-      return listEnvironments.execute(names);
+   public Iterable<? extends Environment> listEnvironments() {
+      return listEnvironments.execute();
    }
 
    @Override
-   public Iterable<? extends Node> listEnvironmentNodes(String environmentName) {
+   public Iterable<? extends Node> listNodesInEnvironment(String environmentName) {
       return listEnvironmentNodes.execute(environmentName);
    }
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java
index aab51b3..3bf77a6 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java
@@ -98,7 +98,7 @@ public class ListCookbookVersionsImpl implements ListCookbookVersions {
          @Override
          public Iterable<? extends CookbookVersion> apply(final String cookbook) {
             // TODO getting each version could also go parallel
-            Set<String> cookbookVersions = api.getVersionsOfCookbook(cookbook);
+            Set<String> cookbookVersions = api.listVersionsOfCookbook(cookbook);
             ListenableFuture<List<CookbookVersion>> futures = allAsList(transform(cookbookVersions,
                   new Function<String, ListenableFuture<CookbookVersion>>() {
                      @Override

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListEnvironmentNodesImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListEnvironmentNodesImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListEnvironmentNodesImpl.java
index a70db5a..c017828 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListEnvironmentNodesImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListEnvironmentNodesImpl.java
@@ -80,12 +80,12 @@ public class ListEnvironmentNodesImpl implements ListEnvironmentNodes {
 
    @Override
    public Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName) {
-      return execute(executor, environmentName, api.listEnvironmentNodes(environmentName));
+      return execute(executor, environmentName, api.listNodesInEnvironment(environmentName));
    }
 
    @Override
    public Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName, Predicate<String> nodeNameSelector) {
-      return execute(executor, environmentName, filter(api.listEnvironmentNodes(environmentName), nodeNameSelector));
+      return execute(executor, environmentName, filter(api.listNodesInEnvironment(environmentName), nodeNameSelector));
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApi.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApi.java b/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApi.java
index ad09275..2245826 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApi.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApi.java
@@ -203,12 +203,12 @@ public class TransientChefApi implements ChefApi {
    }
 
    @Override
-   public UploadSandbox getUploadSandboxForChecksums(Set<List<Byte>> md5s) {
+   public UploadSandbox createUploadSandboxForChecksums(Set<List<Byte>> md5s) {
       throw new UnsupportedOperationException();
    }
 
    @Override
-   public Set<String> getVersionsOfCookbook(String cookbookName) {
+   public Set<String> listVersionsOfCookbook(String cookbookName) {
       throw new UnsupportedOperationException();
    }
 
@@ -258,12 +258,12 @@ public class TransientChefApi implements ChefApi {
    }
 
    @Override
-   public SearchResult<? extends DatabagItem> searchDatabag(String databagName) {
+   public SearchResult<? extends DatabagItem> searchDatabagItems(String databagName) {
       throw new UnsupportedOperationException();
    }
 
    @Override
-   public SearchResult<? extends DatabagItem> searchDatabag(String databagName, SearchOptions options) {
+   public SearchResult<? extends DatabagItem> searchDatabagItems(String databagName, SearchOptions options) {
       throw new UnsupportedOperationException();
    }
 
@@ -343,22 +343,22 @@ public class TransientChefApi implements ChefApi {
    }
 
    @Override
-   public Set<CookbookDefinition> listEnvironmentCookbooks(String environmentname) {
+   public Set<CookbookDefinition> listCookbooksInEnvironment(String environmentname) {
       throw new UnsupportedOperationException();
    }
 
    @Override
-   public Set<CookbookDefinition> listEnvironmentCookbooks(String environmentname, String numversions) {
+   public Set<CookbookDefinition> listCookbooksInEnvironment(String environmentname, String numversions) {
       throw new UnsupportedOperationException();
    }
 
    @Override
-   public CookbookDefinition getEnvironmentCookbook(String environmentname, String cookbookname) {
+   public CookbookDefinition getCookbookInEnvironment(String environmentname, String cookbookname) {
       throw new UnsupportedOperationException();
    }
 
    @Override
-   public CookbookDefinition getEnvironmentCookbook(String environmentname, String cookbookname, String numversions) {
+   public CookbookDefinition getCookbookInEnvironment(String environmentname, String cookbookname, String numversions) {
       throw new UnsupportedOperationException();
    }
 
@@ -373,12 +373,12 @@ public class TransientChefApi implements ChefApi {
    }
 
    @Override
-   public Set<String> listEnvironmentRecipes(String environmentname) {
+   public Set<String> listRecipesInEnvironment(String environmentname) {
       throw new UnsupportedOperationException();
    }
 
    @Override
-   public Set<String> listEnvironmentNodes(String environmentname) {
+   public Set<String> listNodesInEnvironment(String environmentname) {
       throw new UnsupportedOperationException();
    }
   

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
index 39e6e5e..8cabec4 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
@@ -23,10 +23,8 @@ import java.util.Set;
 
 import javax.ws.rs.core.MediaType;
 
-import org.jclouds.chef.BaseChefApiExpectTest;
-import org.jclouds.chef.ChefApi;
-import org.jclouds.date.TimeStamp;
 import org.jclouds.chef.config.ChefHttpApiModule;
+import org.jclouds.date.TimeStamp;
 import org.jclouds.http.HttpRequest;
 import org.jclouds.http.HttpResponse;
 import org.jclouds.rest.ConfiguresRestClient;
@@ -51,12 +49,12 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
             signed(HttpRequest.builder() //
                   .method("GET") //
                   .endpoint("http://localhost:4000/environments/dev/recipes") //
-                  .addHeader("X-Chef-Version", ChefApi.VERSION) //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
                   .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
             HttpResponse.builder().statusCode(200)
                   .payload(payloadFromResourceWithContentType("/environment_recipes.json", MediaType.APPLICATION_JSON)) //
                   .build());
-      Set<String> recipes = api.listEnvironmentRecipes("dev");
+      Set<String> recipes = api.listRecipesInEnvironment("dev");
       assertEquals(recipes.size(), 3);
       assertTrue(recipes.contains("apache2"));
    }
@@ -66,12 +64,12 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
             signed(HttpRequest.builder() //
                   .method("GET") //
                   .endpoint("http://localhost:4000/environments/dev/recipes") //
-                  .addHeader("X-Chef-Version", ChefApi.VERSION) //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
                   .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
             HttpResponse.builder().statusCode(404)
                   .build());
 
-      assertTrue(api.listEnvironmentRecipes("dev").isEmpty());
+      assertTrue(api.listRecipesInEnvironment("dev").isEmpty());
    }
 
    public void testListEnvironmentNodesReturns2xx() {
@@ -79,12 +77,12 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
             signed(HttpRequest.builder() //
                   .method("GET") //
                   .endpoint("http://localhost:4000/environments/dev/nodes") //
-                  .addHeader("X-Chef-Version", ChefApi.VERSION) //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
                   .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
             HttpResponse.builder().statusCode(200)
                   .payload(payloadFromResourceWithContentType("/environment_nodes.json", MediaType.APPLICATION_JSON)) //
                   .build());
-      Set<String> nodes = api.listEnvironmentNodes("dev");
+      Set<String> nodes = api.listNodesInEnvironment("dev");
       assertEquals(nodes.size(), 3);
       assertTrue(nodes.contains("blah"));
    }
@@ -94,12 +92,12 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
             signed(HttpRequest.builder() //
                   .method("GET") //
                   .endpoint("http://localhost:4000/environments/dev/nodes") //
-                  .addHeader("X-Chef-Version", ChefApi.VERSION) //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
                   .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
             HttpResponse.builder().statusCode(404)
                   .build());
 
-      assertTrue(api.listEnvironmentNodes("dev").isEmpty());
+      assertTrue(api.listNodesInEnvironment("dev").isEmpty());
    }
 
    @Override


[24/50] [abbrv] git commit: JCLOUDS-368: Remove methods which are not exposed to public and hence not used.

Posted by na...@apache.org.
JCLOUDS-368: Remove methods which are not exposed to public and hence not used.


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/a08b91af
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/a08b91af
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/a08b91af

Branch: refs/heads/master
Commit: a08b91af73fa0df3179e44b64aedf834dcfa33e2
Parents: 3724ee6
Author: Noorul Islam K M <no...@noorul.com>
Authored: Fri Nov 1 08:20:37 2013 +0530
Committer: Andrew Phillips <an...@apache.org>
Committed: Wed Nov 6 18:03:18 2013 -0500

----------------------------------------------------------------------
 .../org/jclouds/chef/strategy/ListClients.java  | 10 ------
 .../chef/strategy/ListCookbookVersions.java     | 10 ------
 .../jclouds/chef/strategy/ListEnvironments.java |  9 -----
 .../org/jclouds/chef/strategy/ListNodes.java    | 10 ------
 .../chef/strategy/ListNodesInEnvironment.java   | 10 ------
 .../CleanupStaleNodesAndClientsImpl.java        | 37 ++++++++++----------
 .../chef/strategy/internal/ListClientsImpl.java | 21 +----------
 .../internal/ListCookbookVersionsImpl.java      | 24 ++-----------
 .../strategy/internal/ListEnvironmentsImpl.java | 21 +----------
 .../chef/strategy/internal/ListNodesImpl.java   | 21 +----------
 .../internal/ListNodesInEnvironmentImpl.java    | 21 +----------
 .../internal/ListNodesImplLiveTest.java         | 20 -----------
 .../ListNodesInEnvironmentImplLiveTest.java     | 20 -----------
 13 files changed, 24 insertions(+), 210 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/a08b91af/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java
index 18b7c13..5d6b8a0 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java
@@ -19,13 +19,11 @@ package org.jclouds.chef.strategy;
 import org.jclouds.chef.domain.Client;
 import org.jclouds.chef.strategy.internal.ListClientsImpl;
 
-import com.google.common.base.Predicate;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.ImplementedBy;
 
 /**
  * 
- * 
  * @author Adrian Cole
  */
 @ImplementedBy(ListClientsImpl.class)
@@ -33,13 +31,5 @@ public interface ListClients {
 
    Iterable<? extends Client> execute();
 
-   Iterable<? extends Client> execute(Predicate<String> clientNameSelector);
-
-   Iterable<? extends Client> execute(Iterable<String> toGet);
-
    Iterable<? extends Client> execute(ListeningExecutorService executor);
-
-   Iterable<? extends Client> execute(ListeningExecutorService executor, Predicate<String> clientNameSelector);
-
-   Iterable<? extends Client> execute(ListeningExecutorService executor, Iterable<String> toGet);
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/a08b91af/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java
index 5987de0..01bcd33 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java
@@ -19,13 +19,11 @@ package org.jclouds.chef.strategy;
 import org.jclouds.chef.domain.CookbookVersion;
 import org.jclouds.chef.strategy.internal.ListCookbookVersionsImpl;
 
-import com.google.common.base.Predicate;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.ImplementedBy;
 
 /**
  * 
- * 
  * @author Adrian Cole
  */
 @ImplementedBy(ListCookbookVersionsImpl.class)
@@ -33,13 +31,5 @@ public interface ListCookbookVersions {
 
    Iterable<? extends CookbookVersion> execute();
 
-   Iterable<? extends CookbookVersion> execute(Predicate<String> cookbookNameSelector);
-
-   Iterable<? extends CookbookVersion> execute(Iterable<String> cookbookNames);
-
    Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor);
-
-   Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor, Predicate<String> cookbookNameSelector);
-
-   Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor, Iterable<String> cookbookNames);
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/a08b91af/apis/chef/src/main/java/org/jclouds/chef/strategy/ListEnvironments.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListEnvironments.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListEnvironments.java
index 6dc4aa3..3e5b11f 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListEnvironments.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListEnvironments.java
@@ -19,7 +19,6 @@ package org.jclouds.chef.strategy;
 import org.jclouds.chef.domain.Environment;
 import org.jclouds.chef.strategy.internal.ListEnvironmentsImpl;
 
-import com.google.common.base.Predicate;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.ImplementedBy;
 
@@ -28,13 +27,5 @@ public interface ListEnvironments {
 
    Iterable<? extends Environment> execute();
 
-   Iterable<? extends Environment> execute(Predicate<String> environmentNameSelector);
-
-   Iterable<? extends Environment> execute(Iterable<String> toGet);
-
    Iterable<? extends Environment> execute(ListeningExecutorService executor);
-
-   Iterable<? extends Environment> execute(ListeningExecutorService executor, Predicate<String> environmentNameSelector);
-
-   Iterable<? extends Environment> execute(ListeningExecutorService executor, Iterable<String> toGet);
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/a08b91af/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java
index 8790456..92b451b 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java
@@ -19,13 +19,11 @@ package org.jclouds.chef.strategy;
 import org.jclouds.chef.domain.Node;
 import org.jclouds.chef.strategy.internal.ListNodesImpl;
 
-import com.google.common.base.Predicate;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.ImplementedBy;
 
 /**
  * 
- * 
  * @author Adrian Cole
  */
 @ImplementedBy(ListNodesImpl.class)
@@ -33,13 +31,5 @@ public interface ListNodes {
 
    Iterable<? extends Node> execute();
 
-   Iterable<? extends Node> execute(Predicate<String> nodeNameSelector);
-
-   Iterable<? extends Node> execute(Iterable<String> toGet);
-
    Iterable<? extends Node> execute(ListeningExecutorService executor);
-
-   Iterable<? extends Node> execute(ListeningExecutorService executor, Predicate<String> nodeNameSelector);
-
-   Iterable<? extends Node> execute(ListeningExecutorService executor, Iterable<String> toGet);
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/a08b91af/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
index 9f6b324..6308747 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
@@ -19,13 +19,11 @@ package org.jclouds.chef.strategy;
 import org.jclouds.chef.domain.Node;
 import org.jclouds.chef.strategy.internal.ListNodesInEnvironmentImpl;
 
-import com.google.common.base.Predicate;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.ImplementedBy;
 
 /**
  * 
- * 
  * @author Noorul Islam K M
  */
 @ImplementedBy(ListNodesInEnvironmentImpl.class)
@@ -33,13 +31,5 @@ public interface ListNodesInEnvironment {
 
    Iterable<? extends Node> execute(String environmentName);
 
-   Iterable<? extends Node> execute(String environmentName, Predicate<String> nodeNameSelector);
-
-   Iterable<? extends Node> execute(String environmentName, Iterable<String> toGet);
-
    Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName);
-
-   Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName, Predicate<String> nodeNameSelector);
-
-   Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName, Iterable<String> toGet);
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/a08b91af/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/CleanupStaleNodesAndClientsImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/CleanupStaleNodesAndClientsImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/CleanupStaleNodesAndClientsImpl.java
index a3ef7c2..a9dbaa8 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/CleanupStaleNodesAndClientsImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/CleanupStaleNodesAndClientsImpl.java
@@ -72,25 +72,24 @@ public class CleanupStaleNodesAndClientsImpl implements CleanupStaleNodesAndClie
       final Calendar expired = Calendar.getInstance();
       expired.setTime(new Date());
       expired.add(Calendar.SECOND, -secondsStale);
-      Iterable<? extends Node> staleNodes = filter(nodeLister.execute(new Predicate<String>() {
-
-         @Override
-         public boolean apply(String input) {
-            return input.startsWith(prefix);
-         }
-
-      }), and(notNull(), new Predicate<Node>() {
-         @Override
-         public boolean apply(Node input) {
-            JsonBall dateLong = input.getAutomaticAttributes().get("ohai_time");
-            if (dateLong == null)
-               return true;
-            Calendar nodeUpdate = Calendar.getInstance();
-            nodeUpdate.setTime(fromOhaiTime(dateLong));
-            return expired.after(nodeUpdate);
-         }
-
-      }));
+      Iterable<? extends Node> staleNodes = filter(
+         nodeLister.execute(), and(notNull(), new Predicate<Node>() {
+               @Override
+               public boolean apply(Node input) {
+                  return input.getName().startsWith(prefix);
+               }
+         },
+         new Predicate<Node>() {
+             @Override
+             public boolean apply(Node input) {
+                JsonBall dateLong = input.getAutomaticAttributes().get("ohai_time");
+                if (dateLong == null)
+                   return true;
+                Calendar nodeUpdate = Calendar.getInstance();
+                nodeUpdate.setTime(fromOhaiTime(dateLong));
+                return expired.after(nodeUpdate);
+             }
+         }));
       Iterable<String> nodeNames = transform(staleNodes, new Function<Node, String>() {
 
          @Override

http://git-wip-us.apache.org/repos/asf/jclouds/blob/a08b91af/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListClientsImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListClientsImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListClientsImpl.java
index 70e6a2a..63c2484 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListClientsImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListClientsImpl.java
@@ -17,7 +17,6 @@
 package org.jclouds.chef.strategy.internal;
 
 import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.collect.Iterables.filter;
 import static com.google.common.collect.Iterables.transform;
 import static com.google.common.util.concurrent.Futures.allAsList;
 import static com.google.common.util.concurrent.Futures.getUnchecked;
@@ -38,14 +37,12 @@ import org.jclouds.logging.Logger;
 
 import com.google.common.base.Function;
 import com.google.common.base.Joiner;
-import com.google.common.base.Predicate;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.Inject;
 
 /**
  * 
- * 
  * @author Adrian Cole
  */
 @Singleton
@@ -69,27 +66,11 @@ public class ListClientsImpl implements ListClients {
    }
 
    @Override
-   public Iterable<? extends Client> execute(Predicate<String> clientNameSelector) {
-      return execute(userExecutor, clientNameSelector);
-   }
-
-   @Override
-   public Iterable<? extends Client> execute(Iterable<String> toGet) {
-      return execute(userExecutor, toGet);
-   }
-
-   @Override
    public Iterable<? extends Client> execute(ListeningExecutorService executor) {
       return execute(executor, api.listClients());
    }
 
-   @Override
-   public Iterable<? extends Client> execute(ListeningExecutorService executor, Predicate<String> clientNameSelector) {
-      return execute(executor, filter(api.listClients(), clientNameSelector));
-   }
-
-   @Override
-   public Iterable<? extends Client> execute(final ListeningExecutorService executor, Iterable<String> toGet) {
+   private Iterable<? extends Client> execute(final ListeningExecutorService executor, Iterable<String> toGet) {
       ListenableFuture<List<Client>> futures = allAsList(transform(toGet,
             new Function<String, ListenableFuture<Client>>() {
                @Override

http://git-wip-us.apache.org/repos/asf/jclouds/blob/a08b91af/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java
index 3bf77a6..cdd71c4 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java
@@ -18,7 +18,6 @@ package org.jclouds.chef.strategy.internal;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 import static com.google.common.collect.Iterables.concat;
-import static com.google.common.collect.Iterables.filter;
 import static com.google.common.collect.Iterables.transform;
 import static com.google.common.util.concurrent.Futures.allAsList;
 import static com.google.common.util.concurrent.Futures.getUnchecked;
@@ -39,14 +38,12 @@ import org.jclouds.chef.strategy.ListCookbookVersions;
 import org.jclouds.logging.Logger;
 
 import com.google.common.base.Function;
-import com.google.common.base.Predicate;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.Inject;
 
 /**
  * 
- * 
  * @author Adrian Cole
  */
 @Singleton
@@ -70,28 +67,11 @@ public class ListCookbookVersionsImpl implements ListCookbookVersions {
    }
 
    @Override
-   public Iterable<? extends CookbookVersion> execute(Predicate<String> cookbookNameSelector) {
-      return execute(userExecutor, cookbookNameSelector);
-   }
-
-   @Override
-   public Iterable<? extends CookbookVersion> execute(Iterable<String> toGet) {
-      return execute(userExecutor, toGet);
-   }
-
-   @Override
    public Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor) {
       return execute(executor, api.listCookbooks());
    }
 
-   @Override
-   public Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor,
-         Predicate<String> cookbookNameSelector) {
-      return execute(executor, filter(api.listCookbooks(), cookbookNameSelector));
-   }
-
-   @Override
-   public Iterable<? extends CookbookVersion> execute(final ListeningExecutorService executor,
+   private Iterable<? extends CookbookVersion> execute(final ListeningExecutorService executor,
          Iterable<String> cookbookNames) {
       return concat(transform(cookbookNames, new Function<String, Iterable<? extends CookbookVersion>>() {
 
@@ -112,7 +92,7 @@ public class ListCookbookVersionsImpl implements ListCookbookVersions {
                      }
                   }));
 
-            logger.trace(String.format("getting versions of cookbook: " + cookbook));
+            logger.trace(String.format("getting versions of cookbook: %s", cookbook));
             return getUnchecked(futures);
          }
       }));

http://git-wip-us.apache.org/repos/asf/jclouds/blob/a08b91af/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListEnvironmentsImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListEnvironmentsImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListEnvironmentsImpl.java
index 6429b72..9b79de2 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListEnvironmentsImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListEnvironmentsImpl.java
@@ -17,7 +17,6 @@
 package org.jclouds.chef.strategy.internal;
 
 import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.collect.Iterables.filter;
 import static com.google.common.collect.Iterables.transform;
 import static com.google.common.util.concurrent.Futures.allAsList;
 import static com.google.common.util.concurrent.Futures.getUnchecked;
@@ -38,7 +37,6 @@ import org.jclouds.logging.Logger;
 
 import com.google.common.base.Function;
 import com.google.common.base.Joiner;
-import com.google.common.base.Predicate;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.Inject;
@@ -64,28 +62,11 @@ public class ListEnvironmentsImpl implements ListEnvironments {
    }
 
    @Override
-   public Iterable<? extends Environment> execute(Predicate<String> environmentNameSelector) {
-      return execute(userExecutor, environmentNameSelector);
-   }
-
-   @Override
-   public Iterable<? extends Environment> execute(Iterable<String> toGet) {
-      return execute(userExecutor, toGet);
-   }
-
-   @Override
    public Iterable<? extends Environment> execute(ListeningExecutorService executor) {
       return execute(executor, api.listEnvironments());
    }
 
-   @Override
-   public Iterable<? extends Environment> execute(ListeningExecutorService executor,
-         Predicate<String> environmentNameSelector) {
-      return execute(executor, filter(api.listEnvironments(), environmentNameSelector));
-   }
-
-   @Override
-   public Iterable<? extends Environment> execute(final ListeningExecutorService executor, Iterable<String> toGet) {
+   private Iterable<? extends Environment> execute(final ListeningExecutorService executor, Iterable<String> toGet) {
       ListenableFuture<List<Environment>> futures = allAsList(transform(toGet,
             new Function<String, ListenableFuture<Environment>>() {
                @Override

http://git-wip-us.apache.org/repos/asf/jclouds/blob/a08b91af/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesImpl.java
index 7547f6b..3af264b 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesImpl.java
@@ -17,7 +17,6 @@
 package org.jclouds.chef.strategy.internal;
 
 import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.collect.Iterables.filter;
 import static com.google.common.collect.Iterables.transform;
 import static com.google.common.util.concurrent.Futures.allAsList;
 import static com.google.common.util.concurrent.Futures.getUnchecked;
@@ -38,14 +37,12 @@ import org.jclouds.logging.Logger;
 
 import com.google.common.base.Function;
 import com.google.common.base.Joiner;
-import com.google.common.base.Predicate;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.Inject;
 
 /**
  * 
- * 
  * @author Adrian Cole
  */
 @Singleton
@@ -69,27 +66,11 @@ public class ListNodesImpl implements ListNodes {
    }
 
    @Override
-   public Iterable<? extends Node> execute(Predicate<String> nodeNameSelector) {
-      return execute(userExecutor, nodeNameSelector);
-   }
-
-   @Override
-   public Iterable<? extends Node> execute(Iterable<String> toGet) {
-      return execute(userExecutor, toGet);
-   }
-
-   @Override
    public Iterable<? extends Node> execute(ListeningExecutorService executor) {
       return execute(executor, api.listNodes());
    }
 
-   @Override
-   public Iterable<? extends Node> execute(ListeningExecutorService executor, Predicate<String> nodeNameSelector) {
-      return execute(executor, filter(api.listNodes(), nodeNameSelector));
-   }
-
-   @Override
-   public Iterable<? extends Node> execute(final ListeningExecutorService executor, Iterable<String> toGet) {
+   private Iterable<? extends Node> execute(final ListeningExecutorService executor, Iterable<String> toGet) {
       ListenableFuture<List<Node>> futures = allAsList(transform(toGet, new Function<String, ListenableFuture<Node>>() {
          @Override
          public ListenableFuture<Node> apply(final String input) {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/a08b91af/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImpl.java
index c430b95..a2b2244 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImpl.java
@@ -17,7 +17,6 @@
 package org.jclouds.chef.strategy.internal;
 
 import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.collect.Iterables.filter;
 import static com.google.common.collect.Iterables.transform;
 import static com.google.common.util.concurrent.Futures.allAsList;
 import static com.google.common.util.concurrent.Futures.getUnchecked;
@@ -38,14 +37,12 @@ import org.jclouds.logging.Logger;
 
 import com.google.common.base.Function;
 import com.google.common.base.Joiner;
-import com.google.common.base.Predicate;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.Inject;
 
 /**
  * 
- * 
  * @author Noorul Islam K M
  */
 @Singleton
@@ -69,27 +66,11 @@ public class ListNodesInEnvironmentImpl implements ListNodesInEnvironment {
    }
 
    @Override
-   public Iterable<? extends Node> execute(String environmentName, Predicate<String> nodeNameSelector) {
-      return execute(userExecutor, environmentName, nodeNameSelector);
-   }
-
-   @Override
-   public Iterable<? extends Node> execute(String environmentName, Iterable<String> toGet) {
-      return execute(userExecutor, environmentName, toGet);
-   }
-
-   @Override
    public Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName) {
       return execute(executor, environmentName, api.listNodesInEnvironment(environmentName));
    }
 
-   @Override
-   public Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName, Predicate<String> nodeNameSelector) {
-      return execute(executor, environmentName, filter(api.listNodesInEnvironment(environmentName), nodeNameSelector));
-   }
-
-   @Override
-   public Iterable<? extends Node> execute(final ListeningExecutorService executor, String environmentName, Iterable<String> toGet) {
+   private Iterable<? extends Node> execute(final ListeningExecutorService executor, String environmentName, Iterable<String> toGet) {
       ListenableFuture<List<Node>> futures = allAsList(transform(toGet, new Function<String, ListenableFuture<Node>>() {
          @Override
          public ListenableFuture<Node> apply(final String input) {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/a08b91af/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesImplLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesImplLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesImplLiveTest.java
index 80b9678..f4c7ed1 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesImplLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesImplLiveTest.java
@@ -17,7 +17,6 @@
 package org.jclouds.chef.strategy.internal;
 
 import static com.google.common.collect.Iterables.size;
-import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
 
 import org.jclouds.chef.ChefApi;
@@ -25,7 +24,6 @@ import org.jclouds.chef.internal.BaseChefLiveTest;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.Test;
 
-import com.google.common.base.Predicate;
 import com.google.common.collect.ImmutableSet;
 
 /**
@@ -60,22 +58,4 @@ public class ListNodesImplLiveTest extends BaseChefLiveTest<ChefApi> {
    public void testExecute() {
       assertTrue(size(strategy.execute()) > 0, "Expected one or more elements");
    }
-
-   @Test
-   public void testExecutePredicateOfString() {
-      assertEquals(size(strategy.execute(new Predicate<String>() {
-
-         @Override
-         public boolean apply(String input) {
-            return input.startsWith(prefix);
-         }
-
-      })), 2);
-   }
-
-   @Test
-   public void testExecuteIterableOfString() {
-      assertEquals(size(strategy.execute(ImmutableSet.of(prefix, prefix + 1))), 2);
-   }
-
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/a08b91af/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImplLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImplLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImplLiveTest.java
index 0d19c12..25863d9 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImplLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImplLiveTest.java
@@ -17,7 +17,6 @@
 package org.jclouds.chef.strategy.internal;
 
 import static com.google.common.collect.Iterables.size;
-import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
 
 import org.jclouds.chef.ChefApi;
@@ -25,7 +24,6 @@ import org.jclouds.chef.internal.BaseChefLiveTest;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.Test;
 
-import com.google.common.base.Predicate;
 import com.google.common.collect.ImmutableSet;
 
 /**
@@ -60,22 +58,4 @@ public class ListNodesInEnvironmentImplLiveTest extends BaseChefLiveTest<ChefApi
    public void testExecute() {
       assertTrue(size(strategy.execute("_default")) > 0, "Expected one or more elements");
    }
-
-   @Test
-   public void testExecutePredicateOfString() {
-      assertEquals(size(strategy.execute("_default", new Predicate<String>() {
-
-         @Override
-         public boolean apply(String input) {
-            return input.startsWith(prefix);
-         }
-
-      })), 2);
-   }
-
-   @Test
-   public void testExecuteIterableOfString() {
-      assertEquals(size(strategy.execute("_default", ImmutableSet.of(prefix, prefix + 1))), 2);
-   }
-
 }


[16/50] [abbrv] git commit: Rename test method names to reflect what is being tested.

Posted by na...@apache.org.
Rename test method names to reflect what is being tested.


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/d9a79366
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/d9a79366
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/d9a79366

Branch: refs/heads/master
Commit: d9a79366faa84192f162fcb0a20ec65949bf05ba
Parents: 61258a6
Author: Noorul Islam K M <no...@noorul.com>
Authored: Fri Sep 20 06:52:48 2013 +0530
Committer: Ignasi Barrera <na...@apache.org>
Committed: Fri Sep 20 09:31:20 2013 +0200

----------------------------------------------------------------------
 .../java/org/jclouds/chef/ChefApiExpectTest.java    | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/d9a79366/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
index 3a7bae4..c3a9372 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
@@ -53,7 +53,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
                   .addHeader("Accept", MediaType.APPLICATION_JSON);
    }
 
-   public void testListClientsReturns2xx() {
+   public void testListClientsReturnsValidSet() {
       ChefApi api = requestSendsResponse(
             signed(getHttpRequestBuilder("GET", "/clients").build()),
             HttpResponse.builder().statusCode(200) //
@@ -64,7 +64,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
       assertTrue(nodes.contains("adam"), String.format("Expected nodes to contain 'adam' but was: %s", nodes));
    }
 
-   public void testListClientsReturns404() {
+   public void testListClientsReturnsEmptySetOn404() {
       ChefApi api = requestSendsResponse(
             signed(getHttpRequestBuilder("GET", "/clients").build()),
             HttpResponse.builder().statusCode(404)
@@ -73,7 +73,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
       assertTrue(clients.isEmpty(), String.format("Expected clients to be empty but was: %s", clients));
    }
 
-   public void testListNodesReturns2xx() {
+   public void testListNodesReturnsValidSet() {
       ChefApi api = requestSendsResponse(
             signed(getHttpRequestBuilder("GET", "/nodes").build()),
             HttpResponse.builder().statusCode(200)
@@ -84,7 +84,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
       assertTrue(nodes.contains("blah"), String.format("Expected nodes to contain 'blah' but was: %s", nodes));
    }
 
-   public void testListNodesReturns404() {
+   public void testListNodesReturnsEmptySetOn404() {
       ChefApi api = requestSendsResponse(
             signed(getHttpRequestBuilder("GET", "/nodes").build()),
             HttpResponse.builder().statusCode(404).build());
@@ -92,7 +92,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
       assertTrue(nodes.isEmpty(), String.format("Expected nodes to be empty but was: %s", nodes));
    }
    
-   public void testListRecipesInEnvironmentReturns2xx() {
+   public void testListRecipesInEnvironmentReturnsValidSet() {
       ChefApi api = requestSendsResponse(
             signed(getHttpRequestBuilder("GET", "/environments/dev/recipes").build()),
             HttpResponse.builder().statusCode(200)
@@ -103,7 +103,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
       assertTrue(recipes.contains("apache2"), String.format("Expected recipes to contain 'apache2' but was: %s", recipes));
    }
 
-   public void testListRecipesInEnvironmentReturns404() {
+   public void testListRecipesInEnvironmentReturnsEmptySetOn404() {
       ChefApi api = requestSendsResponse(
             signed(getHttpRequestBuilder("GET", "/environments/dev/recipes").build()),
             HttpResponse.builder().statusCode(404).build());
@@ -111,7 +111,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
       assertTrue(recipes.isEmpty(), String.format("Expected recipes to be empty but was: %s", recipes));
    }
 
-   public void testListNodesInEnvironmentReturns2xx() {
+   public void testListNodesInEnvironmentReturnsValidSet() {
       ChefApi api = requestSendsResponse(
             signed(getHttpRequestBuilder("GET", "/environments/dev/nodes").build()),
             HttpResponse.builder().statusCode(200)
@@ -122,7 +122,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
       assertTrue(nodes.contains("blah"), String.format("Expected nodes to contain 'blah' but was: %s", nodes));
    }
 
-   public void testListNodesInEnvironmentReturns404() {
+   public void testListNodesInEnvironmentReturnsEmptySetOn404() {
       ChefApi api = requestSendsResponse(
             signed(getHttpRequestBuilder("GET", "/environments/dev/nodes").build()),
             HttpResponse.builder().statusCode(404).build());


[18/50] [abbrv] git commit: JCLOUDS-335: Properly deserialize the deleteDatabagItem response

Posted by na...@apache.org.
JCLOUDS-335: Properly deserialize the deleteDatabagItem response


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/2b3bcaf0
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/2b3bcaf0
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/2b3bcaf0

Branch: refs/heads/master
Commit: 2b3bcaf034be0d779436d759050ca30cd37e4dfb
Parents: 92b3f59
Author: Ignasi Barrera <na...@apache.org>
Authored: Fri Oct 4 10:14:28 2013 +0200
Committer: Ignasi Barrera <na...@apache.org>
Committed: Fri Oct 4 10:56:15 2013 +0200

----------------------------------------------------------------------
 apis/chef/src/main/java/org/jclouds/chef/ChefApi.java    |  2 ++
 .../chef/src/test/java/org/jclouds/chef/ChefApiTest.java |  4 ++--
 .../org/jclouds/chef/internal/BaseChefApiLiveTest.java   | 11 +++++++++++
 3 files changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/2b3bcaf0/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java b/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
index 5601022..1b1ca2a 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
@@ -79,6 +79,7 @@ import org.jclouds.rest.annotations.ParamParser;
 import org.jclouds.rest.annotations.PayloadParam;
 import org.jclouds.rest.annotations.RequestFilters;
 import org.jclouds.rest.annotations.ResponseParser;
+import org.jclouds.rest.annotations.SelectJson;
 import org.jclouds.rest.annotations.SinceApiVersion;
 import org.jclouds.rest.annotations.SkipEncoding;
 import org.jclouds.rest.annotations.WrapWith;
@@ -424,6 +425,7 @@ public interface ChefApi extends Closeable {
    @DELETE
    @Path("/data/{databagName}/{databagItemId}")
    @Fallback(NullOnNotFoundOr404.class)
+   @SelectJson("raw_data")
    DatabagItem deleteDatabagItem(@PathParam("databagName") String databagName,
          @PathParam("databagItemId") String databagItemId);
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2b3bcaf0/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
index 5899486..05eca4b 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
@@ -45,12 +45,12 @@ import org.jclouds.chef.functions.ParseKeySetFromJson;
 import org.jclouds.chef.functions.ParseSearchClientsFromJson;
 import org.jclouds.chef.functions.ParseSearchDatabagFromJson;
 import org.jclouds.chef.functions.ParseSearchNodesFromJson;
-import org.jclouds.chef.functions.ParseSearchRolesFromJson;
 import org.jclouds.chef.options.CreateClientOptions;
 import org.jclouds.chef.options.SearchOptions;
 import org.jclouds.date.TimeStamp;
 import org.jclouds.fallbacks.MapHttp4xxCodesToExceptions;
 import org.jclouds.http.HttpRequest;
+import org.jclouds.http.functions.ParseFirstJsonValueNamed;
 import org.jclouds.http.functions.ParseJson;
 import org.jclouds.http.functions.ReleasePayloadAndReturn;
 import org.jclouds.http.functions.ReturnInputStream;
@@ -490,7 +490,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
-      assertResponseParserClassEquals(method, httpRequest, ParseJson.class);
+      assertResponseParserClassEquals(method, httpRequest, ParseFirstJsonValueNamed.class);
       assertSaxResponseParserClassEquals(method, null);
       assertFallbackClassEquals(method, NullOnNotFoundOr404.class);
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2b3bcaf0/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
index 85acc44..bae390f 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
@@ -26,6 +26,7 @@ import static org.jclouds.util.Predicates2.retry;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertNull;
 import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.fail;
 
@@ -297,6 +298,16 @@ public abstract class BaseChefApiLiveTest<A extends ChefApi> extends BaseChefLiv
       }
    }
 
+   @Test(dependsOnMethods = "testSearchDatabagWithOptions")
+   public void testDeleteDatabagItem() throws Exception {
+      for (String databagItemId : api.listDatabagItems(PREFIX)) {
+         DatabagItem databagItem = api.deleteDatabagItem(PREFIX, databagItemId);
+         assertNotNull(databagItem, "Deleted data bag item should not be null");
+         assertEquals(databagItem.getId(), databagItemId, "Deleted data bag item id must match the original id");
+         assertNull(api.getDatabagItem(PREFIX, databagItemId), "Data bag item should not exist");
+      }
+   }
+
    @Test
    public void testListSearchIndexes() throws Exception {
       Set<String> indexes = api.listSearchIndexes();


[25/50] [abbrv] git commit: Enforce no unused imports via Checkstyle

Posted by na...@apache.org.
Enforce no unused imports via Checkstyle

Removed with:

mvn checkstyle:checkstyle --quiet -Dcheckstyle.output.file=/dev/stdout -Dcheckstyle.output.format=plain | tac | while read i; do echo $i | sed -n 's/\([^:]*\):\([^:]*\):.*/sed -i \2d \1/p' | bash; done


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/4375bdae
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/4375bdae
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/4375bdae

Branch: refs/heads/master
Commit: 4375bdaec03555b8ecc3890d2181db62a422f3b9
Parents: a08b91a
Author: Andrew Gaul <ga...@apache.org>
Authored: Wed Dec 11 17:27:59 2013 -0800
Committer: Andrew Gaul <ga...@apache.org>
Committed: Wed Dec 11 17:27:59 2013 -0800

----------------------------------------------------------------------
 apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java     | 1 -
 apis/chef/src/main/java/org/jclouds/chef/ChefService.java         | 3 ---
 .../src/main/java/org/jclouds/chef/config/ChefProperties.java     | 1 -
 .../main/java/org/jclouds/chef/functions/GroupToBootScript.java   | 1 -
 .../jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java  | 2 --
 .../strategy/internal/ListCookbookVersionsInEnvironmentImpl.java  | 3 ---
 .../main/java/org/jclouds/chef/test/TransientChefApiMetadata.java | 1 -
 7 files changed, 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/4375bdae/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java b/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
index 951d2d2..614d58d 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
@@ -28,7 +28,6 @@ import static org.jclouds.chef.config.ChefProperties.CHEF_USE_OMNIBUS;
 import java.net.URI;
 import java.util.Properties;
 
-import org.jclouds.apis.ApiMetadata;
 import org.jclouds.chef.config.ChefBootstrapModule;
 import org.jclouds.chef.config.ChefHttpApiModule;
 import org.jclouds.chef.config.ChefParserModule;

http://git-wip-us.apache.org/repos/asf/jclouds/blob/4375bdae/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/ChefService.java b/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
index 8006b88..1fe9814 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
@@ -20,16 +20,13 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.List;
 
-import org.jclouds.chef.config.ChefProperties;
 import org.jclouds.chef.domain.BootstrapConfig;
 import org.jclouds.chef.domain.Client;
 import org.jclouds.chef.domain.CookbookVersion;
 import org.jclouds.chef.domain.Environment;
 import org.jclouds.chef.domain.Node;
 import org.jclouds.chef.internal.BaseChefService;
-import org.jclouds.chef.util.ChefUtils;
 import org.jclouds.domain.JsonBall;
-import org.jclouds.ohai.config.OhaiModule;
 import org.jclouds.rest.annotations.SinceApiVersion;
 import org.jclouds.scriptbuilder.domain.Statement;
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/4375bdae/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java b/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java
index a6cf5f2..c366ee9 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java
@@ -16,7 +16,6 @@
  */
 package org.jclouds.chef.config;
 
-import org.jclouds.chef.ChefService;
 
 /**
  * Configuration properties and constants used in Chef connections.

http://git-wip-us.apache.org/repos/asf/jclouds/blob/4375bdae/apis/chef/src/main/java/org/jclouds/chef/functions/GroupToBootScript.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/GroupToBootScript.java b/apis/chef/src/main/java/org/jclouds/chef/functions/GroupToBootScript.java
index 707119b..1472d19 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/GroupToBootScript.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/GroupToBootScript.java
@@ -31,7 +31,6 @@ import java.util.Map;
 import java.util.regex.Pattern;
 
 import javax.inject.Inject;
-import javax.inject.Named;
 import javax.inject.Singleton;
 
 import org.jclouds.chef.config.InstallChef;

http://git-wip-us.apache.org/repos/asf/jclouds/blob/4375bdae/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java
index e19918c..1c1186e 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java
@@ -16,11 +16,9 @@
  */
 package org.jclouds.chef.strategy;
 
-import org.jclouds.chef.domain.CookbookDefinition;
 import org.jclouds.chef.domain.CookbookVersion;
 import org.jclouds.chef.strategy.internal.ListCookbookVersionsInEnvironmentImpl;
 
-import com.google.common.base.Predicate;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.ImplementedBy;
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/4375bdae/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImpl.java
index 48d563e..881f251 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImpl.java
@@ -18,8 +18,6 @@ package org.jclouds.chef.strategy.internal;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 import static com.google.common.collect.Iterables.concat;
-import static com.google.common.collect.Iterables.contains;
-import static com.google.common.collect.Iterables.filter;
 import static com.google.common.collect.Iterables.transform;
 import static com.google.common.util.concurrent.Futures.allAsList;
 import static com.google.common.util.concurrent.Futures.getUnchecked;
@@ -41,7 +39,6 @@ import org.jclouds.chef.strategy.ListCookbookVersionsInEnvironment;
 import org.jclouds.logging.Logger;
 
 import com.google.common.base.Function;
-import com.google.common.base.Predicate;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.Inject;

http://git-wip-us.apache.org/repos/asf/jclouds/blob/4375bdae/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApiMetadata.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApiMetadata.java b/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApiMetadata.java
index e0eaace..88f7a8d 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApiMetadata.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApiMetadata.java
@@ -18,7 +18,6 @@ package org.jclouds.chef.test;
 
 import java.net.URI;
 
-import org.jclouds.apis.ApiMetadata;
 import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefBootstrapModule;
 import org.jclouds.chef.config.ChefParserModule;


[49/50] [abbrv] git commit: Aligned pom.xml files for Chef

Posted by na...@apache.org.
Aligned pom.xml files for Chef


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/c9dfb07d
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/c9dfb07d
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/c9dfb07d

Branch: refs/heads/master
Commit: c9dfb07d02522e6a3e5552e55de3761f42d62892
Parents: 8a2de9a
Author: Ignasi Barrera <na...@apache.org>
Authored: Fri Oct 10 11:27:33 2014 +0200
Committer: Ignasi Barrera <na...@apache.org>
Committed: Fri Oct 10 15:11:27 2014 +0200

----------------------------------------------------------------------
 all/pom.xml                      | 10 ++++++++++
 apis/chef/pom.xml                | 24 ++++++++++++------------
 apis/pom.xml                     |  1 +
 project/pom.xml                  |  2 ++
 providers/enterprisechef/pom.xml | 15 +++++++--------
 providers/pom.xml                |  1 +
 6 files changed, 33 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/c9dfb07d/all/pom.xml
----------------------------------------------------------------------
diff --git a/all/pom.xml b/all/pom.xml
index 0510b0a..ce0fd2e 100644
--- a/all/pom.xml
+++ b/all/pom.xml
@@ -44,6 +44,11 @@
       <version>${project.version}</version>
     </dependency>
     <dependency>
+      <groupId>org.apache.jclouds.api</groupId>
+      <artifactId>chef</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
       <groupId>org.apache.jclouds.provider</groupId>
       <artifactId>aws-cloudwatch</artifactId>
       <version>${project.version}</version>
@@ -104,6 +109,11 @@
       <version>${project.version}</version>
     </dependency>
     <dependency>
+      <groupId>org.apache.jclouds.provider</groupId>
+      <artifactId>enterprisechef</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>jclouds-allloadbalancer</artifactId>
       <version>${project.version}</version>

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c9dfb07d/apis/chef/pom.xml
----------------------------------------------------------------------
diff --git a/apis/chef/pom.xml b/apis/chef/pom.xml
index 0744ba3..865d30a 100644
--- a/apis/chef/pom.xml
+++ b/apis/chef/pom.xml
@@ -20,15 +20,15 @@
 <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">
   <modelVersion>4.0.0</modelVersion>
   <parent>
-    <groupId>org.apache.jclouds.chef</groupId>
-    <artifactId>chef-project</artifactId>
+    <groupId>org.apache.jclouds</groupId>
+    <artifactId>jclouds-project</artifactId>
     <version>2.0.0-SNAPSHOT</version>
-    <relativePath>../project/pom.xml</relativePath>
+    <relativePath>../../project/pom.xml</relativePath>
   </parent>
   <groupId>org.apache.jclouds.api</groupId>
   <artifactId>chef</artifactId>
   <packaging>bundle</packaging>
-  <name>Apache jclouds Chef :: Core</name>
+  <name>jclouds Chef api</name>
   <description>jclouds components to access Chef</description>
 
   <properties>
@@ -38,8 +38,8 @@
     <test.chef.identity>chef-webui</test.chef.identity>
     <test.chef.credential>${user.home}/.chef/webui.pem</test.chef.credential>
     <jclouds.osgi.import>
-      org.jclouds;version=${jclouds.version},
-      org.jclouds*;version=${jclouds.version},
+      org.jclouds;version=${project.version},
+      org.jclouds*;version=${project.version},
       *
     </jclouds.osgi.import>
     <jclouds.osgi.export>
@@ -52,24 +52,24 @@
     <dependency>
       <groupId>org.apache.jclouds</groupId>
       <artifactId>jclouds-core</artifactId>
-      <version>${jclouds.version}</version>
+      <version>${project.version}</version>
     </dependency>
     <dependency>
       <groupId>org.apache.jclouds</groupId>
       <artifactId>jclouds-core</artifactId>
-      <version>${jclouds.version}</version>
+      <version>${project.version}</version>
       <type>test-jar</type>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.jclouds</groupId>
       <artifactId>jclouds-scriptbuilder</artifactId>
-      <version>${jclouds.version}</version>
+      <version>${project.version}</version>
     </dependency>
     <dependency>
       <groupId>org.apache.jclouds</groupId>
       <artifactId>jclouds-scriptbuilder</artifactId>
-      <version>${jclouds.version}</version>
+      <version>${project.version}</version>
       <type>test-jar</type>
       <scope>test</scope>
     </dependency>
@@ -83,13 +83,13 @@
     <dependency>
       <groupId>org.apache.jclouds</groupId>
       <artifactId>jclouds-blobstore</artifactId>
-      <version>${jclouds.version}</version>
+      <version>${project.version}</version>
       <optional>true</optional>
     </dependency>
     <dependency>
       <groupId>org.apache.jclouds.driver</groupId>
       <artifactId>jclouds-slf4j</artifactId>
-      <version>${jclouds.version}</version>
+      <version>${project.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c9dfb07d/apis/pom.xml
----------------------------------------------------------------------
diff --git a/apis/pom.xml b/apis/pom.xml
index 5226afe..b8efcda 100644
--- a/apis/pom.xml
+++ b/apis/pom.xml
@@ -54,5 +54,6 @@
     <module>rackspace-clouddns</module>
     <module>sts</module>
     <module>route53</module>
+    <module>chef</module>
   </modules>
 </project>

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c9dfb07d/project/pom.xml
----------------------------------------------------------------------
diff --git a/project/pom.xml b/project/pom.xml
index 933bb51..0bea1a0 100644
--- a/project/pom.xml
+++ b/project/pom.xml
@@ -532,8 +532,10 @@
             <ignoredResource>logback.xml</ignoredResource>
             <ignoredResource>amzn_images.xml</ignoredResource>
             <ignoredResource>test.jks</ignoredResource>
+            <ignoredResource>test</ignoredResource>
             <ignoredResource>CreateInternetService-options-test.xml</ignoredResource>
             <ignoredResource>.gitattributes</ignoredResource>
+            <ignoredResource>functions/.gitattributes</ignoredResource>
             <ignoredResource>OSGI-OPT/bnd.bnd</ignoredResource>
             <!-- For bouncycastle -->
             <ignoredResource>META-INF/BCKEY.DSA</ignoredResource>

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c9dfb07d/providers/enterprisechef/pom.xml
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/pom.xml b/providers/enterprisechef/pom.xml
index adce960..d256601 100644
--- a/providers/enterprisechef/pom.xml
+++ b/providers/enterprisechef/pom.xml
@@ -20,14 +20,14 @@
 <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">
   <modelVersion>4.0.0</modelVersion>
   <parent>
-    <groupId>org.apache.jclouds.chef</groupId>
-    <artifactId>chef-project</artifactId>
+    <groupId>org.apache.jclouds</groupId>
+    <artifactId>jclouds-project</artifactId>
     <version>2.0.0-SNAPSHOT</version>
-    <relativePath>../project/pom.xml</relativePath>
+    <relativePath>../../project/pom.xml</relativePath>
   </parent>
   <groupId>org.apache.jclouds.provider</groupId>
   <artifactId>enterprisechef</artifactId>
-  <name>Apache jclouds Chef :: Enterprise</name>
+  <name>jclouds Enterprise Chef provider</name>
   <description>jclouds components to access Enterprise Chef</description>
 
   <properties>
@@ -38,7 +38,7 @@
     <test.enterprisechef.identity>YOUR_USER</test.enterprisechef.identity>
     <test.enterprisechef.credential>${user.home}/.chef/${test.enterprisechef.org}/${test.enterprisechef.identity}.pem</test.enterprisechef.credential>
     <jclouds.osgi.export>org.jclouds.enterprisechef*;version="${project.version}"</jclouds.osgi.export>
-    <jclouds.osgi.import>org.jclouds*;version="${jclouds.version}",*</jclouds.osgi.import>
+    <jclouds.osgi.import>org.jclouds*;version="${project.version}",*</jclouds.osgi.import>
   </properties>
 
   <dependencies>
@@ -57,20 +57,19 @@
     <dependency>
       <groupId>org.apache.jclouds</groupId>
       <artifactId>jclouds-core</artifactId>
-      <version>${jclouds.version}</version>
+      <version>${project.version}</version>
       <type>test-jar</type>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.jclouds.driver</groupId>
       <artifactId>jclouds-slf4j</artifactId>
-      <version>${jclouds.version}</version>
+      <version>${project.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>ch.qos.logback</groupId>
       <artifactId>logback-classic</artifactId>
-      <version>1.0.9</version>
       <scope>test</scope>
     </dependency>
   </dependencies>

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c9dfb07d/providers/pom.xml
----------------------------------------------------------------------
diff --git a/providers/pom.xml b/providers/pom.xml
index d1ef987..5a3dcec 100644
--- a/providers/pom.xml
+++ b/providers/pom.xml
@@ -72,5 +72,6 @@
     <module>aws-route53</module>
     <module>ultradns-ws</module>
     <module>dynect</module>
+    <module>enterprisechef</module>
   </modules>
 </project>


[08/50] [abbrv] git commit: Renamed test methods to match the new api naming convention

Posted by na...@apache.org.
Renamed test methods to match the new api naming convention


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/15b1da60
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/15b1da60
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/15b1da60

Branch: refs/heads/master
Commit: 15b1da6014daadb0f68145440f4cef7b4a24673e
Parents: 58784cc
Author: Noorul Islam K M <no...@noorul.com>
Authored: Mon Sep 16 18:43:27 2013 +0530
Committer: Ignasi Barrera <na...@apache.org>
Committed: Mon Sep 16 15:43:22 2013 +0200

----------------------------------------------------------------------
 .../test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/15b1da60/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
index 84cc092..a742bd1 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
@@ -468,13 +468,13 @@ public abstract class BaseChefApiLiveTest<A extends ChefApi> extends BaseChefLiv
    }
 
    @Test(dependsOnMethods = "testCreateEnvironment")
-   public void testListEnvironmentRecipes() {
+   public void testListRecipesInEnvironment() {
       Set<String> recipeList = api.listRecipesInEnvironment(PREFIX);
       assertTrue(!recipeList.isEmpty());
    }
 
    @Test(dependsOnMethods = "testCreateEnvironment")
-   public void testListEnvironmentNodes() {
+   public void testListNodesInEnvironment() {
       api.deleteNode(ENV_NODE);
       api.createNode(Node.builder().name(ENV_NODE).runListElement("role[" + PREFIX + "]").environment(PREFIX).build());
       Node node = api.getNode(ENV_NODE);


[35/50] [abbrv] git commit: JCLOUDS-617: Use the configured JCE provider in the Cipher payloads

Posted by na...@apache.org.
JCLOUDS-617: Use the configured JCE provider in the Cipher payloads


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/73929940
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/73929940
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/73929940

Branch: refs/heads/master
Commit: 73929940d90d9c530a91a23373dcad994153c49f
Parents: c0d16e7
Author: Ignasi Barrera <na...@apache.org>
Authored: Tue Jul 1 16:07:12 2014 +0200
Committer: Ignasi Barrera <na...@apache.org>
Committed: Wed Jul 2 17:54:33 2014 +0200

----------------------------------------------------------------------
 .../jclouds/chef/filters/SignedHeaderAuth.java   | 19 ++++++++++++-------
 .../jclouds/chef/internal/BaseChefService.java   | 10 +++++++---
 .../chef/filters/SignedHeaderAuthTest.java       |  4 +++-
 .../chef/functions/ParseClientFromJsonTest.java  |  8 +++++---
 4 files changed, 27 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/73929940/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java b/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
index 30b26c0..0cab71f 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
@@ -18,6 +18,7 @@ package org.jclouds.chef.filters;
 
 import static com.google.common.base.Charsets.UTF_8;
 import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Preconditions.checkNotNull;
 import static com.google.common.hash.Hashing.sha1;
 import static com.google.common.io.BaseEncoding.base64;
 import static com.google.common.io.ByteStreams.toByteArray;
@@ -33,6 +34,7 @@ import javax.inject.Provider;
 import javax.inject.Singleton;
 
 import org.jclouds.Constants;
+import org.jclouds.crypto.Crypto;
 import org.jclouds.date.TimeStamp;
 import org.jclouds.domain.Credentials;
 import org.jclouds.http.HttpException;
@@ -50,6 +52,7 @@ import org.jclouds.logging.Logger;
 import org.jclouds.util.Strings2;
 
 import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
 import com.google.common.base.Predicate;
 import com.google.common.base.Splitter;
 import com.google.common.base.Supplier;
@@ -74,6 +77,7 @@ public class SignedHeaderAuth implements HttpRequestFilter {
    private final Provider<String> timeStampProvider;
    private final String emptyStringHash;
    private final HttpUtils utils;
+   private final Crypto crypto;
 
    @Resource
    @Named(Constants.LOGGER_SIGNATURE)
@@ -81,13 +85,14 @@ public class SignedHeaderAuth implements HttpRequestFilter {
 
    @Inject
    public SignedHeaderAuth(SignatureWire signatureWire, @org.jclouds.location.Provider Supplier<Credentials> creds,
-         Supplier<PrivateKey> supplyKey, @TimeStamp Provider<String> timeStampProvider, HttpUtils utils) {
-      this.signatureWire = signatureWire;
-      this.creds = creds;
-      this.supplyKey = supplyKey;
-      this.timeStampProvider = timeStampProvider;
+         Supplier<PrivateKey> supplyKey, @TimeStamp Provider<String> timeStampProvider, HttpUtils utils, Crypto crypto) {
+      this.signatureWire = checkNotNull(signatureWire, "signatureWire");
+      this.creds = checkNotNull(creds, "creds");
+      this.supplyKey = checkNotNull(supplyKey, "supplyKey");
+      this.timeStampProvider = checkNotNull(timeStampProvider, "timeStampProvider");
       this.emptyStringHash = hashBody(Payloads.newStringPayload(""));
-      this.utils = utils;
+      this.utils = checkNotNull(utils, "utils");
+      this.crypto = checkNotNull(crypto, "crypto");
    }
 
    public HttpRequest filter(HttpRequest input) throws HttpException {
@@ -186,7 +191,7 @@ public class SignedHeaderAuth implements HttpRequestFilter {
 
    public String sign(String toSign) {
       try {
-         byte[] encrypted = toByteArray(new RSAEncryptingPayload(Payloads.newStringPayload(toSign), supplyKey.get()));
+         byte[] encrypted = toByteArray(new RSAEncryptingPayload(crypto, Payloads.newStringPayload(toSign), supplyKey.get()));
          return base64().encode(encrypted);
       } catch (IOException e) {
          throw new HttpException("error signing request", e);

http://git-wip-us.apache.org/repos/asf/jclouds/blob/73929940/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java b/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
index 9619b44..c22e697 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
@@ -54,6 +54,7 @@ import org.jclouds.chef.strategy.ListNodesInEnvironment;
 import org.jclouds.chef.strategy.ListEnvironments;
 import org.jclouds.chef.strategy.ListNodes;
 import org.jclouds.chef.strategy.UpdateAutomaticAttributesOnNode;
+import org.jclouds.crypto.Crypto;
 import org.jclouds.domain.JsonBall;
 import org.jclouds.io.Payloads;
 import org.jclouds.io.payloads.RSADecryptingPayload;
@@ -90,6 +91,8 @@ public class BaseChefService implements ChefService {
    private final ListEnvironments listEnvironments;
    private final ListNodesInEnvironment listNodesInEnvironment;
    private final Json json;
+   private final Crypto crypto;
+   
    @Resource
    @Named(ChefProperties.CHEF_LOGGER)
    protected Logger logger = Logger.NULL;
@@ -104,7 +107,7 @@ public class BaseChefService implements ChefService {
          @Named(CHEF_BOOTSTRAP_DATABAG) String databag, GroupToBootScript groupToBootScript,
          BootstrapConfigForGroup bootstrapConfigForGroup, RunListForGroup runListForGroup,
          ListEnvironments listEnvironments, ListNodesInEnvironment listNodesInEnvironment,
-         ListCookbookVersionsInEnvironment listCookbookVersionsInEnvironment, Json json) {
+         ListCookbookVersionsInEnvironment listCookbookVersionsInEnvironment, Json json, Crypto crypto) {
       this.chefContext = checkNotNull(chefContext, "chefContext");
       this.api = checkNotNull(api, "api");
       this.cleanupStaleNodesAndClients = checkNotNull(cleanupStaleNodesAndClients, "cleanupStaleNodesAndClients");
@@ -126,6 +129,7 @@ public class BaseChefService implements ChefService {
       this.listNodesInEnvironment = checkNotNull(listNodesInEnvironment, "listNodesInEnvironment");
       this.listCookbookVersionsInEnvironment = checkNotNull(listCookbookVersionsInEnvironment, "listCookbookVersionsInEnvironment");
       this.json = checkNotNull(json, "json");
+      this.crypto = checkNotNull(crypto, "crypto");
    }
 
    @Override
@@ -135,13 +139,13 @@ public class BaseChefService implements ChefService {
 
    @Override
    public byte[] encrypt(InputSupplier<? extends InputStream> supplier) throws IOException {
-      return ByteStreams.toByteArray(new RSAEncryptingPayload(Payloads.newPayload(supplier.getInput()), privateKey
+      return ByteStreams.toByteArray(new RSAEncryptingPayload(crypto, Payloads.newPayload(supplier.getInput()), privateKey
             .get()));
    }
 
    @Override
    public byte[] decrypt(InputSupplier<? extends InputStream> supplier) throws IOException {
-      return ByteStreams.toByteArray(new RSADecryptingPayload(Payloads.newPayload(supplier.getInput()), privateKey
+      return ByteStreams.toByteArray(new RSADecryptingPayload(crypto, Payloads.newPayload(supplier.getInput()), privateKey
             .get()));
    }
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/73929940/apis/chef/src/test/java/org/jclouds/chef/filters/SignedHeaderAuthTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/filters/SignedHeaderAuthTest.java b/apis/chef/src/test/java/org/jclouds/chef/filters/SignedHeaderAuthTest.java
index 0e6ca4a..bfba190 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/filters/SignedHeaderAuthTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/filters/SignedHeaderAuthTest.java
@@ -28,6 +28,7 @@ import javax.ws.rs.HttpMethod;
 
 import org.jclouds.ContextBuilder;
 import org.jclouds.chef.ChefApiMetadata;
+import org.jclouds.crypto.Crypto;
 import org.jclouds.domain.Credentials;
 import org.jclouds.http.HttpRequest;
 import org.jclouds.http.HttpUtils;
@@ -193,6 +194,7 @@ public class SignedHeaderAuthTest {
             .modules(ImmutableSet.<Module> of(new MockModule(), new NullLoggingModule())).buildInjector();
 
       HttpUtils utils = injector.getInstance(HttpUtils.class);
+      Crypto crypto = injector.getInstance(Crypto.class);
 
       Supplier<PrivateKey> privateKey = injector.getInstance(Key.get(new TypeLiteral<Supplier<PrivateKey>>() {
       }));
@@ -205,7 +207,7 @@ public class SignedHeaderAuthTest {
                   return TIMESTAMP_ISO8601;
                }
 
-            }, utils);
+            }, utils, crypto);
    }
 
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/73929940/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
index 671ff93..e8bebcb 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
@@ -19,6 +19,7 @@ package org.jclouds.chef.functions;
 import static org.testng.Assert.assertEquals;
 
 import java.io.IOException;
+import java.security.NoSuchAlgorithmException;
 import java.security.PrivateKey;
 import java.security.cert.CertificateException;
 import java.security.cert.X509Certificate;
@@ -29,6 +30,7 @@ import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.chef.domain.Client;
 import org.jclouds.crypto.Crypto;
 import org.jclouds.crypto.Pems;
+import org.jclouds.encryption.internal.JCECrypto;
 import org.jclouds.http.HttpResponse;
 import org.jclouds.http.functions.ParseJson;
 import org.jclouds.io.Payloads;
@@ -77,16 +79,16 @@ public class ParseClientFromJsonTest {
       privateKey = crypto.rsaKeyFactory().generatePrivate(Pems.privateKeySpec(ByteSource.wrap(PRIVATE_KEY.getBytes(Charsets.UTF_8))));
    }
 
-   public void test() throws IOException {
+   public void test() throws IOException, CertificateException, NoSuchAlgorithmException {
 
       Client user = Client.builder().certificate(certificate).orgname("jclouds").clientname("adriancole-jcloudstest")
             .name("adriancole-jcloudstest").isValidator(false).privateKey(privateKey).build();
 
-      byte[] encrypted = ByteStreams.toByteArray(new RSAEncryptingPayload(Payloads.newPayload("fooya"), user
+      byte[] encrypted = ByteStreams.toByteArray(new RSAEncryptingPayload(new JCECrypto(), Payloads.newPayload("fooya"), user
             .getCertificate().getPublicKey()));
 
       assertEquals(
-            ByteStreams.toByteArray(new RSADecryptingPayload(Payloads.newPayload(encrypted), user.getPrivateKey())),
+            ByteStreams.toByteArray(new RSADecryptingPayload(new JCECrypto(), Payloads.newPayload(encrypted), user.getPrivateKey())),
             "fooya".getBytes());
 
       assertEquals(


[11/50] [abbrv] git commit: Use meaningful parameter name in ParseSearchResultFromJson and ParseSearchDatabagFromJson.

Posted by na...@apache.org.
Use meaningful parameter name in ParseSearchResultFromJson and ParseSearchDatabagFromJson.

Also use static import for Sets and Iterables.


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/e780bf24
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/e780bf24
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/e780bf24

Branch: refs/heads/master
Commit: e780bf240408f16f96015c559f6b77b62da5854d
Parents: 288b236
Author: Noorul Islam K M <no...@noorul.com>
Authored: Wed Sep 18 14:09:18 2013 +0530
Committer: Ignasi Barrera <na...@apache.org>
Committed: Thu Sep 19 08:38:24 2013 +0200

----------------------------------------------------------------------
 .../chef/functions/ParseCookbookVersionsV09FromJson.java    | 6 +++---
 .../chef/functions/ParseCookbookVersionsV10FromJson.java    | 9 +++++----
 .../jclouds/chef/functions/ParseSearchDatabagFromJson.java  | 8 ++++----
 .../jclouds/chef/functions/ParseSearchResultFromJson.java   | 4 ++--
 4 files changed, 14 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/e780bf24/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJson.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJson.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJson.java
index f5c0487..5c94e41 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJson.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJson.java
@@ -26,7 +26,7 @@ import org.jclouds.http.HttpResponse;
 import org.jclouds.http.functions.ParseJson;
 
 import com.google.common.base.Function;
-import com.google.common.collect.Iterables;
+import static com.google.common.collect.Iterables.getFirst;
 
 /**
  * Parses the cookbook versions in a Chef Server <= 0.9.8.
@@ -44,8 +44,8 @@ public class ParseCookbookVersionsV09FromJson implements Function<HttpResponse,
    }
 
    @Override
-   public Set<String> apply(HttpResponse arg0) {
-      return Iterables.getFirst(json.apply(arg0).values(), null);
+   public Set<String> apply(HttpResponse response) {
+      return getFirst(json.apply(response).values(), null);
 
    }
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/e780bf24/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJson.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJson.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJson.java
index 4a34374..955fe8e 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJson.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJson.java
@@ -28,8 +28,9 @@ import org.jclouds.http.HttpResponse;
 import org.jclouds.http.functions.ParseJson;
 
 import com.google.common.base.Function;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Sets;
+import static com.google.common.collect.Iterables.getFirst;
+import static com.google.common.collect.Iterables.transform;
+import static com.google.common.collect.Sets.newLinkedHashSet;
 
 /**
  * Parses the cookbook versions in a Chef Server >= 0.10.8.
@@ -49,8 +50,8 @@ public class ParseCookbookVersionsV10FromJson implements Function<HttpResponse,
 
    @Override
    public Set<String> apply(HttpResponse response) {
-      CookbookDefinition def = Iterables.getFirst(parser.apply(response).values(), null);
-      return Sets.newLinkedHashSet(Iterables.transform(def.getVersions(), new Function<Version, String>() {
+      CookbookDefinition def = getFirst(parser.apply(response).values(), null);
+      return newLinkedHashSet(transform(def.getVersions(), new Function<Version, String>() {
          @Override
          public String apply(Version input) {
             return input.getVersion();

http://git-wip-us.apache.org/repos/asf/jclouds/blob/e780bf24/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchDatabagFromJson.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchDatabagFromJson.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchDatabagFromJson.java
index 90aebd3..4826b38 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchDatabagFromJson.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchDatabagFromJson.java
@@ -29,8 +29,8 @@ import org.jclouds.http.functions.ParseJson;
 import org.jclouds.json.Json;
 
 import com.google.common.base.Function;
-import com.google.common.collect.Iterables;
 import com.google.gson.annotations.SerializedName;
+import static com.google.common.collect.Iterables.transform;
 
 /**
  * Parses the search result into a {@link DatabagItem} object.
@@ -64,9 +64,9 @@ public class ParseSearchDatabagFromJson implements Function<HttpResponse, Search
    }
 
    @Override
-   public SearchResult<DatabagItem> apply(HttpResponse arg0) {
-      Response returnVal = responseParser.apply(arg0);
-      Iterable<DatabagItem> items = Iterables.transform(returnVal.rows, new Function<Row, DatabagItem>() {
+   public SearchResult<DatabagItem> apply(HttpResponse response) {
+      Response returnVal = responseParser.apply(response);
+      Iterable<DatabagItem> items = transform(returnVal.rows, new Function<Row, DatabagItem>() {
          @Override
          public DatabagItem apply(Row input) {
             return json.fromJson(input.rawData.toString(), DatabagItem.class);

http://git-wip-us.apache.org/repos/asf/jclouds/blob/e780bf24/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchResultFromJson.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchResultFromJson.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchResultFromJson.java
index 2346638..983ce8f 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchResultFromJson.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchResultFromJson.java
@@ -46,8 +46,8 @@ public class ParseSearchResultFromJson<T> implements Function<HttpResponse, Sear
    }
 
    @Override
-   public SearchResult<T> apply(HttpResponse arg0) {
-      Response<T> returnVal = json.apply(arg0);
+   public SearchResult<T> apply(HttpResponse response) {
+      Response<T> returnVal = json.apply(response);
       return new SearchResult<T>(returnVal.start, returnVal.rows);
    }
 }


[17/50] [abbrv] git commit: JCLOUDS-272: Migrate search role tests from ChefApiTest to ChefApiExpectTest.

Posted by na...@apache.org.
JCLOUDS-272: Migrate search role tests from ChefApiTest to ChefApiExpectTest.


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/92b3f594
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/92b3f594
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/92b3f594

Branch: refs/heads/master
Commit: 92b3f5942c1d080c3c21059168ca1df34a491041
Parents: d9a7936
Author: Noorul Islam K M <no...@noorul.com>
Authored: Wed Sep 18 13:05:37 2013 +0530
Committer: Ignasi Barrera <na...@apache.org>
Committed: Mon Sep 23 09:24:43 2013 +0200

----------------------------------------------------------------------
 .../org/jclouds/chef/ChefApiExpectTest.java     | 53 ++++++++++++++++++--
 .../test/java/org/jclouds/chef/ChefApiTest.java | 34 -------------
 apis/chef/src/test/resources/search_role.json   | 34 +++++++++++++
 .../src/test/resources/search_role_empty.json   |  5 ++
 4 files changed, 89 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/92b3f594/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
index c3a9372..90e99da 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
@@ -25,6 +25,9 @@ import javax.ws.rs.core.MediaType;
 
 import org.jclouds.chef.config.ChefHttpApiModule;
 import org.jclouds.chef.domain.CookbookDefinition;
+import org.jclouds.chef.domain.Role;
+import org.jclouds.chef.domain.SearchResult;
+import org.jclouds.chef.options.SearchOptions;
 import org.jclouds.date.TimeStamp;
 import org.jclouds.http.HttpRequest;
 import org.jclouds.http.HttpResponse;
@@ -36,7 +39,7 @@ import com.google.inject.Module;
 
 /**
  * Expect tests for the {@link ChefApi} class.
- * 
+ *
  * @author Noorul Islam K M
  */
 @Test(groups = "unit", testName = "ChefApiExpectTest")
@@ -91,7 +94,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
       Set<String> nodes = api.listNodes();
       assertTrue(nodes.isEmpty(), String.format("Expected nodes to be empty but was: %s", nodes));
    }
-   
+
    public void testListRecipesInEnvironmentReturnsValidSet() {
       ChefApi api = requestSendsResponse(
             signed(getHttpRequestBuilder("GET", "/environments/dev/recipes").build()),
@@ -156,6 +159,50 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
       assertTrue(cookbooks.isEmpty(), String.format("Expected cookbooks to be empty but was: %s", cookbooks));
    }
 
+   public void testSearchRolesReturnsValidResult() {
+      ChefApi api = requestSendsResponse(
+            signed(getHttpRequestBuilder("GET", "/search/role").build()),
+            HttpResponse.builder().statusCode(200)
+                  .payload(payloadFromResourceWithContentType("/search_role.json", MediaType.APPLICATION_JSON)) //
+                  .build());
+      SearchResult<? extends Role> result = api.searchRoles();
+      assertEquals(result.size(), 1);
+      assertEquals(result.iterator().next().getName(), "webserver");
+   }
+
+   public void testSearchRolesReturnsEmptyResult() {
+      ChefApi api = requestSendsResponse(
+            signed(getHttpRequestBuilder("GET", "/search/role").build()),
+            HttpResponse.builder().statusCode(200)
+                  .payload(payloadFromResourceWithContentType("/search_role_empty.json", MediaType.APPLICATION_JSON)) //
+                  .build());
+      SearchResult<? extends Role> result = api.searchRoles();
+      assertTrue(result.isEmpty(), String.format("Expected search result to be empty but was: %s", result));
+   }
+
+   public void testSearchRolesWithOptionsReturnsValidResult() {
+      ChefApi api = requestSendsResponse(
+            signed(getHttpRequestBuilder("GET", "/search/role").addQueryParam("q", "name:webserver").build()),
+            HttpResponse.builder().statusCode(200)
+                  .payload(payloadFromResourceWithContentType("/search_role.json", MediaType.APPLICATION_JSON)) //
+                  .build());
+      SearchOptions options = SearchOptions.Builder.query("name:webserver");
+      SearchResult<? extends Role> result = api.searchRoles(options);
+      assertEquals(result.size(), 1);
+      assertEquals(result.iterator().next().getName(), "webserver");
+   }
+
+   public void testSearchRolesWithOptionsReturnsEmptyResult() {
+      ChefApi api = requestSendsResponse(
+            signed(getHttpRequestBuilder("GET", "/search/role").addQueryParam("q", "name:dummy").build()),
+            HttpResponse.builder().statusCode(200)
+                  .payload(payloadFromResourceWithContentType("/search_role_empty.json", MediaType.APPLICATION_JSON)) //
+                  .build());
+      SearchOptions options = SearchOptions.Builder.query("name:dummy");
+      SearchResult<? extends Role> result = api.searchRoles(options);
+      assertTrue(result.isEmpty(), String.format("Expected search result to be empty but was: %s", result));
+   }
+
    @Override
    protected Module createModule() {
       return new TestChefRestClientModule();
@@ -173,5 +220,5 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
    protected ChefApiMetadata createApiMetadata() {
       return new ChefApiMetadata();
    }
-   
+
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/92b3f594/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
index e6e2c66..5899486 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
@@ -635,40 +635,6 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
 
    }
 
-   public void testSearchRoles() throws SecurityException, NoSuchMethodException, IOException {
-      Invokable<?, ?> method = method(ChefApi.class, "searchRoles");
-      GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
-
-      assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search/role HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
-            + "-test\n");
-      assertPayloadEquals(httpRequest, null, null, false);
-
-      assertResponseParserClassEquals(method, httpRequest, ParseSearchRolesFromJson.class);
-      assertSaxResponseParserClassEquals(method, null);
-      assertFallbackClassEquals(method, MapHttp4xxCodesToExceptions.class);
-
-      checkFilters(httpRequest);
-
-   }
-
-   public void testSearchRolesWithOptions() throws SecurityException, NoSuchMethodException, IOException {
-      Invokable<?, ?> method = method(ChefApi.class, "searchRoles", SearchOptions.class);
-      GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method,
-            ImmutableList.<Object> of(SearchOptions.Builder.query("text"))));
-
-      assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search/role?q=text HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
-            + "-test\n");
-      assertPayloadEquals(httpRequest, null, null, false);
-
-      assertResponseParserClassEquals(method, httpRequest, ParseSearchRolesFromJson.class);
-      assertSaxResponseParserClassEquals(method, null);
-      assertFallbackClassEquals(method, MapHttp4xxCodesToExceptions.class);
-
-      checkFilters(httpRequest);
-
-   }
 
    public void testSearchClients() throws SecurityException, NoSuchMethodException, IOException {
       Invokable<?, ?> method = method(ChefApi.class, "searchClients");

http://git-wip-us.apache.org/repos/asf/jclouds/blob/92b3f594/apis/chef/src/test/resources/search_role.json
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/search_role.json b/apis/chef/src/test/resources/search_role.json
new file mode 100644
index 0000000..5e51663
--- /dev/null
+++ b/apis/chef/src/test/resources/search_role.json
@@ -0,0 +1,34 @@
+{
+    "total": 1,
+    "start": 0,
+    "rows": [
+        {
+            "name": "webserver",
+            "description": "The base role for systems that serve HTTP traffic",
+            "json_class": "Chef::Role",
+            "default_attributes": {
+                "apache2": {
+                    "listen_ports": [
+                        "80",
+                        "443"
+                    ]
+                }
+            },
+            "override_attributes": {
+                "apache2": {
+                    "max_children": "50"
+                }
+            },
+            "chef_type": "role",
+            "run_list": [],
+            "env_run_lists": {
+                "prod": [
+                    "recipe[apache2]"
+                ],
+                "staging": [
+                    "recipe[apache2::staging]"
+                ]
+            }
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/92b3f594/apis/chef/src/test/resources/search_role_empty.json
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/search_role_empty.json b/apis/chef/src/test/resources/search_role_empty.json
new file mode 100644
index 0000000..ab859ca
--- /dev/null
+++ b/apis/chef/src/test/resources/search_role_empty.json
@@ -0,0 +1,5 @@
+{
+    "total": 0,
+    "start": 0,
+    "rows": []
+}


[21/50] [abbrv] git commit: Remove public keyword from interface method.

Posted by na...@apache.org.
Remove public keyword from interface method.


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/6182a7e3
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/6182a7e3
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/6182a7e3

Branch: refs/heads/master
Commit: 6182a7e3b1378304dcaec9851459fbb870247021
Parents: 5354b68
Author: Noorul Islam K M <no...@noorul.com>
Authored: Wed Oct 30 22:09:52 2013 +0530
Committer: Ignasi Barrera <na...@apache.org>
Committed: Wed Oct 30 23:20:11 2013 +0100

----------------------------------------------------------------------
 apis/chef/src/main/java/org/jclouds/chef/ChefService.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/6182a7e3/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/ChefService.java b/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
index cf6993f..f20df68 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
@@ -110,7 +110,7 @@ public interface ChefService {
     * @param group The name of the group.
     * @return The bootstrap configuration for the given group.
     */
-   public JsonBall getBootstrapConfigForGroup(String group);
+   JsonBall getBootstrapConfigForGroup(String group);
 
    // Nodes / Clients
 


[36/50] [abbrv] git commit: Remove unused imports to make checkstyle happy

Posted by na...@apache.org.
Remove unused imports to make checkstyle happy


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/18467a11
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/18467a11
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/18467a11

Branch: refs/heads/master
Commit: 18467a118fb0eb3776f32f59870a8d31c88105cd
Parents: 7392994
Author: Ignasi Barrera <na...@apache.org>
Authored: Tue Jul 1 16:20:01 2014 +0200
Committer: Ignasi Barrera <na...@apache.org>
Committed: Wed Jul 2 17:54:33 2014 +0200

----------------------------------------------------------------------
 .../java/org/jclouds/chef/filters/SignedHeaderAuth.java   |  1 -
 apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java |  1 -
 .../ListCookbookVersionsInEnvironmentImplLiveTest.java    | 10 +++-------
 3 files changed, 3 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/18467a11/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java b/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
index 0cab71f..7d789bb 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
@@ -52,7 +52,6 @@ import org.jclouds.logging.Logger;
 import org.jclouds.util.Strings2;
 
 import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Preconditions;
 import com.google.common.base.Predicate;
 import com.google.common.base.Splitter;
 import com.google.common.base.Supplier;

http://git-wip-us.apache.org/repos/asf/jclouds/blob/18467a11/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
index 98eeb0b..434c22c 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
@@ -39,7 +39,6 @@ import org.jclouds.chef.domain.Resource;
 import org.jclouds.chef.domain.Role;
 import org.jclouds.chef.filters.SignedHeaderAuth;
 import org.jclouds.chef.filters.SignedHeaderAuthTest;
-import org.jclouds.chef.functions.ParseCookbookDefinitionCheckingChefVersion;
 import org.jclouds.chef.functions.ParseCookbookVersionsCheckingChefVersion;
 import org.jclouds.chef.functions.ParseKeySetFromJson;
 import org.jclouds.chef.functions.ParseSearchClientsFromJson;

http://git-wip-us.apache.org/repos/asf/jclouds/blob/18467a11/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java
index 76ecee8..a9b667d 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java
@@ -17,14 +17,14 @@
 package org.jclouds.chef.strategy.internal;
 
 import static com.google.common.collect.Iterables.size;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
 import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.fail;
 
+import java.io.File;
+import java.util.List;
+
 import org.jclouds.chef.ChefApi;
 import org.jclouds.chef.domain.ChecksumStatus;
-import org.jclouds.chef.domain.CookbookDefinition;
 import org.jclouds.chef.domain.CookbookVersion;
 import org.jclouds.chef.domain.Metadata;
 import org.jclouds.chef.domain.Resource;
@@ -36,10 +36,6 @@ import org.jclouds.io.payloads.FilePayload;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.Test;
 
-import java.io.File;
-import java.util.List;
-
-import com.google.common.base.Predicate;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.hash.Hashing;
 import com.google.common.io.Files;


[50/50] [abbrv] git commit: Removed obsolete TransientChefApi

Posted by na...@apache.org.
Removed obsolete TransientChefApi


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/2caf6ea8
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/2caf6ea8
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/2caf6ea8

Branch: refs/heads/master
Commit: 2caf6ea86e3ebbfc6423a52728de385988216ab2
Parents: c9dfb07
Author: Ignasi Barrera <na...@apache.org>
Authored: Fri Oct 10 11:29:45 2014 +0200
Committer: Ignasi Barrera <na...@apache.org>
Committed: Fri Oct 10 15:11:30 2014 +0200

----------------------------------------------------------------------
 .../org/jclouds/chef/test/TransientChefApi.java | 387 -------------------
 .../chef/test/TransientChefApiMetadata.java     |  75 ----
 .../test/config/TransientChefApiModule.java     | 114 ------
 .../services/org.jclouds.apis.ApiMetadata       |   1 -
 .../test/TransientChefApiIntegrationTest.java   |  69 ----
 .../chef/test/TransientChefApiMetadataTest.java |  33 --
 6 files changed, 679 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/2caf6ea8/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApi.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApi.java b/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApi.java
deleted file mode 100644
index c2c5f10..0000000
--- a/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApi.java
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.chef.test;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.base.Throwables.propagate;
-import static com.google.common.collect.Iterables.transform;
-import static com.google.common.collect.Sets.newLinkedHashSet;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.util.List;
-import java.util.Set;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.inject.Singleton;
-
-import org.jclouds.blobstore.config.LocalBlobStore;
-import org.jclouds.blobstore.domain.Blob;
-import org.jclouds.blobstore.domain.PageSet;
-import org.jclouds.blobstore.domain.StorageMetadata;
-import org.jclouds.chef.ChefApi;
-import org.jclouds.chef.domain.Client;
-import org.jclouds.chef.domain.CookbookDefinition;
-import org.jclouds.chef.domain.CookbookVersion;
-import org.jclouds.chef.domain.DatabagItem;
-import org.jclouds.chef.domain.Environment;
-import org.jclouds.chef.domain.Node;
-import org.jclouds.chef.domain.Resource;
-import org.jclouds.chef.domain.Role;
-import org.jclouds.chef.domain.Sandbox;
-import org.jclouds.chef.domain.SearchResult;
-import org.jclouds.chef.domain.UploadSandbox;
-import org.jclouds.chef.options.CreateClientOptions;
-import org.jclouds.chef.options.SearchOptions;
-import org.jclouds.io.Payload;
-import org.jclouds.lifecycle.Closer;
-import org.jclouds.util.Strings2;
-
-import com.google.common.base.Function;
-
-/**
- * In-memory chef simulator.
- */
-public class TransientChefApi implements ChefApi {
-   @Singleton
-   private static class StorageMetadataToName implements Function<PageSet<? extends StorageMetadata>, Set<String>> {
-      @Override
-      public Set<String> apply(PageSet<? extends StorageMetadata> from) {
-         return newLinkedHashSet(transform(from, new Function<StorageMetadata, String>() {
-
-            @Override
-            public String apply(StorageMetadata from) {
-               return from.getName();
-            }
-         }));
-      }
-   }
-
-   @Singleton
-   private static class BlobToDatabagItem implements Function<Blob, DatabagItem> {
-      @Override
-      public DatabagItem apply(Blob from) {
-         try {
-            return from == null ? null : new DatabagItem(from.getMetadata().getName(), Strings2.toStringAndClose(from
-                  .getPayload().getInput()));
-         } catch (IOException e) {
-            propagate(e);
-            return null;
-         }
-      }
-   }
-
-   private final LocalBlobStore databags;
-   private final BlobToDatabagItem blobToDatabagItem;
-   private final StorageMetadataToName storageMetadataToName;
-   private final Closer closer;
-
-   @Inject
-   TransientChefApi(@Named("databags") LocalBlobStore databags, StorageMetadataToName storageMetadataToName,
-         BlobToDatabagItem blobToDatabagItem, Closer closer) {
-      this.databags = checkNotNull(databags, "databags");
-      this.storageMetadataToName = checkNotNull(storageMetadataToName, "storageMetadataToName");
-      this.blobToDatabagItem = checkNotNull(blobToDatabagItem, "blobToDatabagItem");
-      this.closer = checkNotNull(closer, "closer");
-   }
-
-   @Override
-   public Sandbox commitSandbox(String id, boolean isCompleted) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Client createClient(String clientName) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Client createClient(String clientName, CreateClientOptions options) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public void createDatabag(String databagName) {
-      databags.createContainerInLocation(null, databagName);
-   }
-
-   @Override
-   public DatabagItem createDatabagItem(String databagName, DatabagItem databagItem) {
-      Blob blob = databags.blobBuilder(databagItem.getId()).payload(databagItem.toString()).build();
-      databags.putBlob(databagName, blob);
-      return databagItem;
-   }
-
-   @Override
-   public void createNode(Node node) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public void createRole(Role role) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Client deleteClient(String clientName) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public CookbookVersion deleteCookbook(String cookbookName, String version) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public void deleteDatabag(String databagName) {
-      databags.deleteContainer(databagName);
-   }
-
-   @Override
-   public DatabagItem deleteDatabagItem(String databagName, String databagItemId) {
-      DatabagItem item = blobToDatabagItem.apply(databags.getBlob(databagName, databagItemId));
-      databags.removeBlob(databagName, databagItemId);
-      return item;
-   }
-
-   @Override
-   public Node deleteNode(String nodeName) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Role deleteRole(String rolename) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Client generateKeyForClient(String clientName) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Client getClient(String clientName) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public CookbookVersion getCookbook(String cookbookName, String version) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public DatabagItem getDatabagItem(String databagName, String databagItemId) {
-      return blobToDatabagItem.apply(databags.getBlob(databagName, databagItemId));
-   }
-
-   @Override
-   public Node getNode(String nodeName) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Role getRole(String roleName) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public UploadSandbox createUploadSandboxForChecksums(Set<List<Byte>> md5s) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Set<String> listVersionsOfCookbook(String cookbookName) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Set<String> listClients() {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Set<String> listCookbooks() {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Set<String> listDatabagItems(String databagName) {
-      return storageMetadataToName.apply(databags.list(databagName));
-   }
-
-   @Override
-   public Set<String> listDatabags() {
-      return storageMetadataToName.apply(databags.list());
-   }
-
-   @Override
-   public Set<String> listNodes() {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Set<String> listRoles() {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Set<String> listSearchIndexes() {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public SearchResult<? extends Client> searchClients() {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public SearchResult<? extends Client> searchClients(SearchOptions options) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public SearchResult<? extends DatabagItem> searchDatabagItems(String databagName) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public SearchResult<? extends DatabagItem> searchDatabagItems(String databagName, SearchOptions options) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public SearchResult<? extends Node> searchNodes() {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public SearchResult<? extends Node> searchNodes(SearchOptions options) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public SearchResult<? extends Role> searchRoles() {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public SearchResult<? extends Role> searchRoles(SearchOptions options) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public CookbookVersion updateCookbook(String cookbookName, String version, CookbookVersion cookbook) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public DatabagItem updateDatabagItem(String databagName, DatabagItem item) {
-      return createDatabagItem(databagName, item);
-   }
-
-   @Override
-   public Node updateNode(Node node) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Role updateRole(Role role) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public void uploadContent(URI location, Payload content) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public InputStream getResourceContents(Resource resource) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Set<String> listEnvironments() {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public void createEnvironment(Environment environment) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Environment deleteEnvironment(String environmentName) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Environment getEnvironment(String environmentName) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Environment updateEnvironment(Environment environment) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Set<CookbookDefinition> listCookbooksInEnvironment(String environmentName) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Set<CookbookDefinition> listCookbooksInEnvironment(String environmentName, String numVersions) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public CookbookDefinition getCookbookInEnvironment(String environmentName, String cookbookName) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public CookbookDefinition getCookbookInEnvironment(String environmentName, String cookbookName, String numVersions) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public SearchResult<? extends Environment> searchEnvironments() {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public SearchResult<? extends Environment> searchEnvironments(SearchOptions options) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Set<String> listRecipesInEnvironment(String environmentName) {
-      throw new UnsupportedOperationException();
-   }
-
-   @Override
-   public Set<String> listNodesInEnvironment(String environmentName) {
-      throw new UnsupportedOperationException();
-   }
-  
-   @Override
-   public void close() throws IOException {
-      closer.close();
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2caf6ea8/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApiMetadata.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApiMetadata.java b/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApiMetadata.java
deleted file mode 100644
index c485080..0000000
--- a/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApiMetadata.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.chef.test;
-
-import java.net.URI;
-
-import org.jclouds.chef.ChefApiMetadata;
-import org.jclouds.chef.config.ChefBootstrapModule;
-import org.jclouds.chef.config.ChefParserModule;
-import org.jclouds.chef.test.config.TransientChefApiModule;
-import org.jclouds.ohai.config.JMXOhaiModule;
-import org.jclouds.rest.internal.BaseHttpApiMetadata;
-
-import com.google.common.collect.ImmutableSet;
-import com.google.inject.Module;
-
-/**
- * Implementation of {@link ApiMetadata} for the Amazon-specific Chef API
- */
-public class TransientChefApiMetadata extends BaseHttpApiMetadata<TransientChefApi> {
-
-   @Override
-   public Builder toBuilder() {
-      return new Builder().fromApiMetadata(this);
-   }
-
-   public TransientChefApiMetadata() {
-      this(new Builder());
-   }
-
-   protected TransientChefApiMetadata(Builder builder) {
-      super(builder);
-   }
-
-   public static class Builder extends BaseHttpApiMetadata.Builder<TransientChefApi, Builder> {
-      protected Builder() {
-         id("transientchef")
-               .name("In-memory Chef API")
-               .identityName("unused")
-               .defaultIdentity("api")
-               .documentation(URI.create("http://localhost"))
-               .defaultCredential(
-                     "-----BEGIN RSA PRIVATE KEY-----\nMIIEpQIBAAKCAQEAyb2ZJJqGm0KKR+8nfQJNsSd+F9tXNMV7CfOcW6jsqs8EZgiV\nR09hD1IYOj4YqM0qJONlgyg4xRWewdSG7QTPj1lJpVAida9sXy2+kzyagZA1Am0O\nZcbqb5hoeIDgcX+eDa79s0u0DomjcfO9EKhvHLBz+zM+3QqPRkPV8nYTbfs+HjVz\nzOU6D1B0XR3+IPZZl2AnWs2d0qhnStHcDUvnRVQ0P482YwN9VgceOZtpPz0DCKEJ\n5Tx5STub8k0/zt/VAMHQafLSuQMLd2s4ZLuOZptN//uAsTmxireqd37z+8ZTdBbJ\n8LEpJ+iCXuSfm5aUh7iw6oxvToY2AL53+jK2UQIDAQABAoIBAQDA88B3i/xWn0vX\nBVxFamCYoecuNjGwXXkSyZew616A+EOCu47bh4aTurdFbYL0YFaAtaWvzlaN2eHg\nDb+HDuTefE29+WkcGk6SshPmiz5T0XOCAICWw6wSVDkHmGwS4jZvbAFm7W8nwGk9\nYhxgxFiRngswJZFopOLoF5WXs2td8guIYNslMpo7tu50iFnBHwKO2ZsPAk8t9nnS\nxlDavKruymEmqHCr3+dtio5eaenJcp3fjoXBQOKUk3ipII29XRB8NqeCVV/7Kxwq\nckqOBEbRwBclckyIbD+RiAgKvOelORjEiE9R42vuqvxRA6k9kd9o7utlX0AUtpEn\n3gZc6LepAoGBAP9ael5Y75+sK2JJUNOOhO8ae45cdsilp2yI0X+UBaSuQs2+dyPp\nkpEHAxd4pmmSvn/8c9TlEZhr+qYbABXVPlDncxpIuw2Ajbk7s/S4XaSKsRqpXL57\nzj/QOqLkRk8+OVV9q6lMeQNqLtEj1u6JPviX70Ro+FQtRttNOYbfdP/fAoGBAMpA\nXjR5woV5sUb+REg9vE
 uYo8RSyOarxqKFCIXVUNsLOx+22+AK4+CQpbueWN7jotrl\nYD6uT6svWi3AAC7kiY0UI/fjVPRCUi8tVoQUE0TaU5VLITaYOB+W/bBaDE4M9560\n1NuDWO90baA5dfU44iuzva02rGJXK9+nS3o8nk/PAoGBALOL6djnDe4mwAaG6Jco\ncd4xr8jkyPzCRZuyBCSBbwphIUXLc7hDprPky064ncJD1UDmwIdkXd/fpMkg2QmA\n/CUk6LEFjMisqHojOaCL9gQZJPhLN5QUN2x1PJWGjs1vQh8Tkx0iUUCOa8bQPXNR\n+34OTsW6TUna4CSZAycLfhffAoGBAIggVsefBCvuQkF0NeUhmDCRZfhnd8y55RHR\n1HCvqKIlpv+rhcX/zmyBLuteopYyRJRsOiE2FW00i8+rIPRu4Z3Q5nybx7w3PzV9\noHN5R5baE9OyI4KpZWztpYYitZF67NcnAvVULHHOvVJQGnKYfLHJYmrJF7GA1ojM\nAuMdFbjFAoGAPxUhxwFy8gaqBahKUEZn4F81HFP5ihGhkT4QL6AFPO2e+JhIGjuR\n27+85hcFqQ+HHVtFsm81b/a+R7P4UuCRgc8eCjxQMoJ1Xl4n7VbjPbHMnIN0Ryvd\nO4ZpWDWYnCO021JTOUUOJ4J/y0416Bvkw0z59y7sNX7wDBBHHbK/XCc=\n-----END RSA PRIVATE KEY-----\n")
-               .defaultEndpoint("transientchef")
-               .defaultProperties(ChefApiMetadata.defaultProperties())
-               .defaultModules(
-                     ImmutableSet.<Class<? extends Module>> of(TransientChefApiModule.class, ChefParserModule.class,
-                           ChefBootstrapModule.class, JMXOhaiModule.class));
-      }
-
-      @Override
-      public TransientChefApiMetadata build() {
-         return new TransientChefApiMetadata(this);
-      }
-
-      @Override
-      protected Builder self() {
-         return this;
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2caf6ea8/apis/chef/src/main/java/org/jclouds/chef/test/config/TransientChefApiModule.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/test/config/TransientChefApiModule.java b/apis/chef/src/main/java/org/jclouds/chef/test/config/TransientChefApiModule.java
deleted file mode 100644
index bab35d0..0000000
--- a/apis/chef/src/main/java/org/jclouds/chef/test/config/TransientChefApiModule.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.chef.test.config;
-
-import static com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor;
-
-import java.io.IOException;
-import java.security.PrivateKey;
-import java.security.spec.InvalidKeySpecException;
-import java.util.List;
-
-import javax.inject.Singleton;
-
-import org.jclouds.ContextBuilder;
-import org.jclouds.blobstore.TransientApiMetadata;
-import org.jclouds.blobstore.config.LocalBlobStore;
-import org.jclouds.chef.ChefApi;
-import org.jclouds.chef.config.Validator;
-import org.jclouds.chef.domain.Client;
-import org.jclouds.chef.functions.BootstrapConfigForGroup;
-import org.jclouds.chef.functions.ClientForGroup;
-import org.jclouds.chef.functions.RunListForGroup;
-import org.jclouds.chef.test.TransientChefApi;
-import org.jclouds.concurrent.config.ExecutorServiceModule;
-import org.jclouds.crypto.Crypto;
-import org.jclouds.domain.JsonBall;
-import org.jclouds.rest.ConfiguresHttpApi;
-import org.jclouds.rest.config.RestModule;
-
-import com.google.common.base.Optional;
-import com.google.common.base.Supplier;
-import com.google.common.cache.CacheLoader;
-import com.google.common.collect.ImmutableSet;
-import com.google.inject.AbstractModule;
-import com.google.inject.Injector;
-import com.google.inject.Module;
-import com.google.inject.Provides;
-import com.google.inject.name.Names;
-
-@ConfiguresHttpApi
-public class TransientChefApiModule extends AbstractModule {
-
-   @Override
-   protected void configure() {
-      install(new RestModule());
-      bind(ChefApi.class).to(TransientChefApi.class);
-      bind(LocalBlobStore.class).annotatedWith(Names.named("databags"))
-            .toInstance(
-                  ContextBuilder
-                        .newBuilder(new TransientApiMetadata())
-                        .modules(
-                              ImmutableSet.<Module> of(new ExecutorServiceModule(sameThreadExecutor(),
-                                    sameThreadExecutor()))).buildInjector().getInstance(LocalBlobStore.class));
-   }
-
-   @Provides
-   @Singleton
-   public Supplier<PrivateKey> supplyKey() {
-      return new Supplier<PrivateKey>() {
-         @Override
-         public PrivateKey get() {
-            return null;
-         }
-      };
-   }
-
-   @Provides
-   @Singleton
-   CacheLoader<String, List<String>> runListForGroup(RunListForGroup runListForGroup) {
-      return CacheLoader.from(runListForGroup);
-   }
-
-   @Provides
-   @Singleton
-   CacheLoader<String, ? extends JsonBall> bootstrapConfigForGroup(BootstrapConfigForGroup bootstrapConfigForGroup) {
-      return CacheLoader.from(bootstrapConfigForGroup);
-   }
-
-   @Provides
-   @Singleton
-   CacheLoader<String, Client> groupToClient(ClientForGroup clientForGroup) {
-      return CacheLoader.from(clientForGroup);
-   }
-
-   @Provides
-   @Singleton
-   @Validator
-   public Optional<String> provideValidatorName(Injector injector) {
-      return Optional.absent();
-   }
-
-   @Provides
-   @Singleton
-   @Validator
-   public Optional<PrivateKey> provideValidatorCredential(Crypto crypto, Injector injector)
-         throws InvalidKeySpecException, IOException {
-      return Optional.absent();
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2caf6ea8/apis/chef/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata b/apis/chef/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata
index 07e3240..c7a6f4e 100644
--- a/apis/chef/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata
+++ b/apis/chef/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata
@@ -1,2 +1 @@
-org.jclouds.chef.test.TransientChefApiMetadata
 org.jclouds.chef.ChefApiMetadata
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2caf6ea8/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiIntegrationTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiIntegrationTest.java b/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiIntegrationTest.java
deleted file mode 100644
index ecd5d16..0000000
--- a/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiIntegrationTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.chef.test;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-
-import java.util.Properties;
-
-import org.jclouds.chef.ChefApi;
-import org.jclouds.chef.domain.DatabagItem;
-import org.jclouds.chef.internal.BaseChefLiveTest;
-import org.testng.annotations.Test;
-
-/**
- * Tests behavior of {@code TransientChefApi}
- */
-@Test(groups = { "integration" })
-public class TransientChefApiIntegrationTest extends BaseChefLiveTest<ChefApi> {
-   public static final String PREFIX = System.getProperty("user.name") + "-jcloudstest";
-   private DatabagItem databagItem;
-
-   public TransientChefApiIntegrationTest() {
-      provider = "transientchef";
-   }
-
-   @Override
-   protected Properties setupProperties() {
-      return new Properties();
-   }
-
-   public void testCreateDatabag() {
-      api.deleteDatabag(PREFIX);
-      api.createDatabag(PREFIX);
-   }
-
-   @Test(dependsOnMethods = { "testCreateDatabag" })
-   public void testCreateDatabagItem() {
-      Properties config = new Properties();
-      config.setProperty("foo", "bar");
-      databagItem = api.createDatabagItem(PREFIX, new DatabagItem("config", json.toJson(config)));
-      assertNotNull(databagItem);
-      assertEquals(databagItem.getId(), "config");
-      assertEquals(config, json.fromJson(databagItem.toString(), Properties.class));
-   }
-
-   @Test(dependsOnMethods = "testCreateDatabagItem")
-   public void testUpdateDatabagItem() {
-      for (String databagItemId : api.listDatabagItems(PREFIX)) {
-         DatabagItem databagItem = api.getDatabagItem(PREFIX, databagItemId);
-         api.updateDatabagItem(PREFIX, databagItem);
-      }
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2caf6ea8/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiMetadataTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiMetadataTest.java b/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiMetadataTest.java
deleted file mode 100644
index eac33f3..0000000
--- a/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiMetadataTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.chef.test;
-
-import org.jclouds.View;
-import org.jclouds.rest.internal.BaseHttpApiMetadataTest;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableSet;
-import com.google.common.reflect.TypeToken;
-
-@Test(groups = "unit", testName = "TransientChefApiMetadataTest")
-public class TransientChefApiMetadataTest extends BaseHttpApiMetadataTest {
-
-   // no config management abstraction, yet
-   public TransientChefApiMetadataTest() {
-      super(new TransientChefApiMetadata(), ImmutableSet.<TypeToken<? extends View>> of());
-   }
-}


[31/50] [abbrv] git commit: JCLOUDS-546: Remove Javadoc @author annotations

Posted by na...@apache.org.
JCLOUDS-546: Remove Javadoc @author annotations

Annotations removed with:

find -name \*.java | xargs sed -i /@author/d

Empty Javadoc removed with multiple iterations of:

find -name \*.java | xargs sed -i -z 's/ \*\n \*\// \*\//'
find -name \*.java | xargs sed -i -z 's/ \* \n \*\// \*\//'
find -name \*.java | xargs sed -i -z 's/\/\*\*\n \*\/\n//'


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/b9b6f39d
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/b9b6f39d
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/b9b6f39d

Branch: refs/heads/master
Commit: b9b6f39d420336844f00cd1f00a4ad669148d831
Parents: bd36ccd
Author: Andrew Gaul <ga...@apache.org>
Authored: Fri Jun 6 22:25:04 2014 -0700
Committer: Andrew Gaul <ga...@apache.org>
Committed: Sat Jun 7 21:09:23 2014 -0700

----------------------------------------------------------------------
 .../main/java/org/jclouds/enterprisechef/EnterpriseChefApi.java    | 2 --
 .../java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java | 2 --
 .../org/jclouds/enterprisechef/EnterpriseChefProviderMetadata.java | 2 --
 .../binders/BindGroupToUpdateRequestJsonPayload.java               | 2 --
 .../main/java/org/jclouds/enterprisechef/binders/GroupName.java    | 2 --
 .../jclouds/enterprisechef/config/EnterpriseChefHttpApiModule.java | 2 --
 .../src/main/java/org/jclouds/enterprisechef/domain/Group.java     | 2 --
 .../src/main/java/org/jclouds/enterprisechef/domain/User.java      | 2 --
 .../org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java    | 2 --
 .../java/org/jclouds/enterprisechef/EnterpriseChefApiLiveTest.java | 2 --
 .../jclouds/enterprisechef/EnterpriseChefProviderMetadataTest.java | 2 --
 .../binders/BindGroupToUpdateRequestJsonPayloadTest.java           | 2 --
 .../java/org/jclouds/enterprisechef/binders/GroupNameTest.java     | 2 --
 13 files changed, 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/b9b6f39d/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApi.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApi.java b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApi.java
index 33f85c6..8f1a0ed 100644
--- a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApi.java
+++ b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApi.java
@@ -47,8 +47,6 @@ import org.jclouds.rest.annotations.WrapWith;
 
 /**
  * Provides synchronous access to the Enterprise Chef Api.
- * 
- * @author Ignasi Barrera
  */
 @RequestFilters(SignedHeaderAuth.class)
 @Consumes(MediaType.APPLICATION_JSON)

http://git-wip-us.apache.org/repos/asf/jclouds/blob/b9b6f39d/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java
index ed5ca34..fdccf46 100644
--- a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java
+++ b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java
@@ -32,8 +32,6 @@ import com.google.inject.Module;
 
 /**
  * Implementation of {@link ApiMetadata} for the Enterprise Chef api.
- * 
- * @author Adrian Cole
  */
 public class EnterpriseChefApiMetadata extends BaseHttpApiMetadata<EnterpriseChefApi> {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/b9b6f39d/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadata.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadata.java b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadata.java
index 89c6db8..336ea7a 100644
--- a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadata.java
+++ b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadata.java
@@ -24,8 +24,6 @@ import org.jclouds.providers.internal.BaseProviderMetadata;
 
 /**
  * Implementation of @ link org.jclouds.types.ProviderMetadata} for Enterprise Chef
- * 
- * @author Adrian Cole
  */
 public class EnterpriseChefProviderMetadata extends BaseProviderMetadata
 {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/b9b6f39d/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayload.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayload.java b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayload.java
index 0b24341..2573b9d 100644
--- a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayload.java
+++ b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayload.java
@@ -32,8 +32,6 @@ import org.jclouds.rest.binders.BindToJsonPayload;
 /**
  * Binds a group to the payload expected for the Put method in the Enterprise Chef
  * Api.
- * 
- * @author Ignasi Barrera
  */
 @Singleton
 public class BindGroupToUpdateRequestJsonPayload extends BindToJsonPayload {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/b9b6f39d/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/binders/GroupName.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/binders/GroupName.java b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/binders/GroupName.java
index ec79567..12286a6 100644
--- a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/binders/GroupName.java
+++ b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/binders/GroupName.java
@@ -26,8 +26,6 @@ import com.google.common.base.Function;
 
 /**
  * Gets the name of a group.
- * 
- * @author Ignasi Barrera
  */
 @Singleton
 public class GroupName implements Function<Object, String> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/b9b6f39d/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/config/EnterpriseChefHttpApiModule.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/config/EnterpriseChefHttpApiModule.java b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/config/EnterpriseChefHttpApiModule.java
index d1e16c7..ed0a49f 100644
--- a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/config/EnterpriseChefHttpApiModule.java
+++ b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/config/EnterpriseChefHttpApiModule.java
@@ -23,8 +23,6 @@ import org.jclouds.rest.ConfiguresHttpApi;
 
 /**
  * Configures the Enterprise Chef connection.
- * 
- * @author Ignasi Barrera
  */
 @ConfiguresHttpApi
 public class EnterpriseChefHttpApiModule extends BaseChefHttpApiModule<EnterpriseChefApi> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/b9b6f39d/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/domain/Group.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/domain/Group.java b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/domain/Group.java
index 2c0f058..8535ca2 100644
--- a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/domain/Group.java
+++ b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/domain/Group.java
@@ -28,8 +28,6 @@ import com.google.common.collect.ImmutableSet;
 
 /**
  * Group object.
- * 
- * @author Ignasi Barrera
  */
 public class Group {
    public static Builder builder(String groupname) {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/b9b6f39d/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/domain/User.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/domain/User.java b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/domain/User.java
index c2c71fa..da4e9e5 100644
--- a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/domain/User.java
+++ b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/domain/User.java
@@ -25,8 +25,6 @@ import com.google.gson.annotations.SerializedName;
 
 /**
  * User object.
- * 
- * @author Ignasi Barrera
  */
 public class User {
    public static Builder builder() {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/b9b6f39d/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java
index 2a58dd0..3785cf6 100644
--- a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java
+++ b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java
@@ -42,8 +42,6 @@ import com.google.inject.Module;
 
 /**
  * Expect tests for the {@link EnterpriseChefApi} class.
- * 
- * @author Ignasi Barrera
  */
 @Test(groups = "unit", testName = "EnterpriseChefApiExpectTest")
 public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<EnterpriseChefApi> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/b9b6f39d/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiLiveTest.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiLiveTest.java b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiLiveTest.java
index 47148c9..6ac99c1 100644
--- a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiLiveTest.java
+++ b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiLiveTest.java
@@ -33,8 +33,6 @@ import org.testng.annotations.Test;
 
 /**
  * Tests behavior of the EnterpriseChefApi.
- * 
- * @author Adrian Cole
  */
 @Test(groups = "live", singleThreaded = true, testName = "EnterpriseChefApiLiveTest")
 public class EnterpriseChefApiLiveTest extends BaseChefApiLiveTest<EnterpriseChefApi> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/b9b6f39d/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadataTest.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadataTest.java b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadataTest.java
index f6784a0..9675af8 100644
--- a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadataTest.java
+++ b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadataTest.java
@@ -21,8 +21,6 @@ import org.testng.annotations.Test;
 
 /**
  * Unit tests for the {@link EnterpriseChefProviderMetadata} class.
- * 
- * @author Adrian Cole
  */
 @Test(groups = "unit", testName = "EnterpriseChefProviderTest")
 public class EnterpriseChefProviderMetadataTest extends BaseProviderMetadataTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/b9b6f39d/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayloadTest.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayloadTest.java b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayloadTest.java
index 26a599d..4e9a3c2 100644
--- a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayloadTest.java
+++ b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayloadTest.java
@@ -36,8 +36,6 @@ import com.google.inject.Injector;
 
 /**
  * Unit tests for the {@link BindGroupToUpdateRequestJsonPayload} class.
- * 
- * @author Ignasi Barrera
  */
 @Test(groups = "unit", testName = "BindGroupToUpdateRequestJsonPayloadTest")
 public class BindGroupToUpdateRequestJsonPayloadTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/b9b6f39d/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/GroupNameTest.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/GroupNameTest.java b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/GroupNameTest.java
index cbe6642..98ea715 100644
--- a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/GroupNameTest.java
+++ b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/GroupNameTest.java
@@ -25,8 +25,6 @@ import org.testng.annotations.Test;
 
 /**
  * Unit tests for the {@link GroupName} class.
- * 
- * @author Ignasi Barrera
  */
 @Test(groups = "unit", testName = "GroupNameTest")
 public class GroupNameTest {


[10/50] [abbrv] git commit: Use meaningful parameter name in ParseKeySetFromJson

Posted by na...@apache.org.
Use meaningful parameter name in ParseKeySetFromJson


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/288b2360
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/288b2360
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/288b2360

Branch: refs/heads/master
Commit: 288b236087de49c5d5c27eaf5f32885b17820542
Parents: 10261f7
Author: Noorul Islam K M <no...@noorul.com>
Authored: Tue Sep 17 16:48:34 2013 +0530
Committer: Ignasi Barrera <na...@apache.org>
Committed: Tue Sep 17 14:45:06 2013 +0200

----------------------------------------------------------------------
 .../java/org/jclouds/chef/functions/ParseKeySetFromJson.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/288b2360/apis/chef/src/main/java/org/jclouds/chef/functions/ParseKeySetFromJson.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseKeySetFromJson.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseKeySetFromJson.java
index b24d668..06714aa 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseKeySetFromJson.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseKeySetFromJson.java
@@ -41,8 +41,8 @@ public class ParseKeySetFromJson implements Function<HttpResponse, Set<String>>
    }
 
    @Override
-   public Set<String> apply(HttpResponse arg0) {
-      return json.apply(arg0).keySet();
+   public Set<String> apply(HttpResponse response) {
+      return json.apply(response).keySet();
 
    }
 }


[38/50] [abbrv] git commit: Correct typo

Posted by na...@apache.org.
Correct typo


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/5c850947
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/5c850947
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/5c850947

Branch: refs/heads/master
Commit: 5c850947da31ec9ad1e4d5dd2ad027939ef2715e
Parents: 011aed7
Author: Andrew Gaul <ga...@apache.org>
Authored: Thu Jul 24 23:41:13 2014 -0700
Committer: Andrew Gaul <ga...@apache.org>
Committed: Thu Jul 24 23:41:13 2014 -0700

----------------------------------------------------------------------
 .../test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/5c850947/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
index b57499c..225e593 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
@@ -54,7 +54,7 @@ import org.jclouds.chef.domain.UploadSandbox;
 import org.jclouds.chef.options.CreateClientOptions;
 import org.jclouds.chef.options.SearchOptions;
 import org.jclouds.crypto.Pems;
-import org.jclouds.io.ByteStream2;
+import org.jclouds.io.ByteStreams2;
 import org.jclouds.io.Payloads;
 import org.jclouds.io.payloads.FilePayload;
 import org.jclouds.rest.ResourceNotFoundException;
@@ -167,7 +167,7 @@ public abstract class BaseChefApiLiveTest<A extends ChefApi> extends BaseChefLiv
             InputStream stream = api.getResourceContents(resource);
             assertNotNull(stream, "Resource contents are null for resource: " + resource.getName());
 
-            byte[] md5 = ByteStream2.hashAndClose(stream, md5()).asBytes();
+            byte[] md5 = ByteStreams2.hashAndClose(stream, md5()).asBytes();
             assertEquals(md5, resource.getChecksum());
          }
       }


[13/50] [abbrv] git commit: Removed unused imports

Posted by na...@apache.org.
Removed unused imports


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/ce1cba6f
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/ce1cba6f
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/ce1cba6f

Branch: refs/heads/master
Commit: ce1cba6f85088649554c9739a7750c9d73abc4bc
Parents: 65b64b0
Author: Ignasi Barrera <na...@apache.org>
Authored: Thu Sep 19 15:21:36 2013 +0200
Committer: Ignasi Barrera <na...@apache.org>
Committed: Thu Sep 19 15:21:36 2013 +0200

----------------------------------------------------------------------
 .../test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/ce1cba6f/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
index 6d5f075..85acc44 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
@@ -17,6 +17,7 @@
 package org.jclouds.chef.internal;
 
 import static com.google.common.base.Throwables.propagate;
+import static com.google.common.collect.Iterables.any;
 import static com.google.common.collect.Iterables.isEmpty;
 import static com.google.common.hash.Hashing.md5;
 import static java.util.concurrent.TimeUnit.MILLISECONDS;
@@ -65,9 +66,6 @@ import com.google.common.collect.ImmutableSet;
 import com.google.common.io.Closeables;
 import com.google.common.primitives.Bytes;
 
-import static com.google.common.collect.Iterables.any;
-import static com.google.common.collect.Iterables.all;
-
 /**
  * Tests behavior of {@code ChefApi}
  * 


[19/50] [abbrv] git commit: JCLOUDS-272: Migrate list roles, cookbooks and databags tests from ChefApiTest to ChefApiExpectTest.

Posted by na...@apache.org.
JCLOUDS-272: Migrate list roles, cookbooks and databags tests from ChefApiTest to ChefApiExpectTest.


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/b2c44b4a
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/b2c44b4a
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/b2c44b4a

Branch: refs/heads/master
Commit: b2c44b4a537e3c0c201155d0782662af31099a98
Parents: 2b3bcaf
Author: Noorul Islam K M <no...@noorul.com>
Authored: Sun Oct 13 11:48:28 2013 +0530
Committer: Ignasi Barrera <na...@apache.org>
Committed: Tue Oct 15 23:09:23 2013 +0200

----------------------------------------------------------------------
 .../org/jclouds/chef/ChefApiExpectTest.java     | 57 ++++++++++++++++++++
 .../test/java/org/jclouds/chef/ChefApiTest.java | 51 ------------------
 apis/chef/src/test/resources/data_list.json     |  4 ++
 apis/chef/src/test/resources/roles_list.json    |  4 ++
 4 files changed, 65 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/b2c44b4a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
index 90e99da..4417f0d 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
@@ -133,6 +133,25 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
       assertTrue(nodes.isEmpty(), String.format("Expected nodes to be empty but was: %s", nodes));
    }
 
+   public void testListCookbooksReturnsValidSet() {
+      ChefApi api = requestSendsResponse(
+            signed(getHttpRequestBuilder("GET", "/cookbooks").build()),
+            HttpResponse.builder().statusCode(200)
+                  .payload(payloadFromResourceWithContentType("/env_cookbooks.json", MediaType.APPLICATION_JSON)) //
+                  .build());
+      Set<String> cookbooks = api.listCookbooks();
+      assertEquals(cookbooks.size(), 2);
+      assertTrue(cookbooks.contains("apache2"), String.format("Expected cookbooks to contain 'apache2' but was: %s", cookbooks));
+   }
+
+   public void testListCookbooksReturnsEmptySetOn404() {
+      ChefApi api = requestSendsResponse(
+            signed(getHttpRequestBuilder("GET", "/cookbooks").build()),
+            HttpResponse.builder().statusCode(404).build());
+      Set<String> cookbooks = api.listCookbooks();
+      assertTrue(cookbooks.isEmpty(), String.format("Expected cookbooks to be empty but was: %s", cookbooks));
+   }
+
    public void testListCookbooksInEnvironmentReturnsValidSet() {
       ChefApi api = requestSendsResponse(
             signed(getHttpRequestBuilder("GET", "/environments/dev/cookbooks").build()),
@@ -203,6 +222,44 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
       assertTrue(result.isEmpty(), String.format("Expected search result to be empty but was: %s", result));
    }
 
+   public void testListRolesReturnsValidSet() {
+      ChefApi api = requestSendsResponse(
+            signed(getHttpRequestBuilder("GET", "/roles").build()),
+            HttpResponse.builder().statusCode(200)
+                  .payload(payloadFromResourceWithContentType("/roles_list.json", MediaType.APPLICATION_JSON)) //
+                  .build());
+      Set<String> roles = api.listRoles();
+      assertEquals(roles.size(), 2);
+      assertTrue(roles.contains("webserver"), String.format("Expected roles to contain 'websever' but was: %s", roles));
+   }
+
+   public void testListRolesReturnsEmptySetOn404() {
+      ChefApi api = requestSendsResponse(
+            signed(getHttpRequestBuilder("GET", "/roles").build()),
+            HttpResponse.builder().statusCode(404).build());
+      Set<String> roles = api.listRoles();
+      assertTrue(roles.isEmpty(), String.format("Expected roles to be empty but was: %s", roles));
+   }
+
+   public void testListDatabagsReturnsValidSet() {
+      ChefApi api = requestSendsResponse(
+            signed(getHttpRequestBuilder("GET", "/data").build()),
+            HttpResponse.builder().statusCode(200)
+                  .payload(payloadFromResourceWithContentType("/data_list.json", MediaType.APPLICATION_JSON)) //
+                  .build());
+      Set<String> databags = api.listDatabags();
+      assertEquals(databags.size(), 2);
+      assertTrue(databags.contains("applications"), String.format("Expected databags to contain 'applications' but was: %s", databags));
+   }
+
+   public void testListDatabagsReturnsEmptySetOn404() {
+      ChefApi api = requestSendsResponse(
+            signed(getHttpRequestBuilder("GET", "/data").build()),
+            HttpResponse.builder().statusCode(404).build());
+      Set<String> databags = api.listDatabags();
+      assertTrue(databags.isEmpty(), String.format("Expected databags to be empty but was: %s", databags));
+   }
+
    @Override
    protected Module createModule() {
       return new TestChefRestClientModule();

http://git-wip-us.apache.org/repos/asf/jclouds/blob/b2c44b4a/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
index 05eca4b..28df35f 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
@@ -192,23 +192,6 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
 
    }
 
-   public void testListCookbooks() throws SecurityException, NoSuchMethodException, IOException {
-      Invokable<?, ?> method = method(ChefApi.class, "listCookbooks");
-      GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
-
-      assertRequestLineEquals(httpRequest, "GET http://localhost:4000/cookbooks HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
-            + "-test\n");
-      assertPayloadEquals(httpRequest, null, null, false);
-
-      assertResponseParserClassEquals(method, httpRequest, ParseCookbookDefinitionCheckingChefVersion.class);
-      assertSaxResponseParserClassEquals(method, null);
-      assertFallbackClassEquals(method, EmptySetOnNotFoundOr404.class);
-
-      checkFilters(httpRequest);
-
-   }
-
    public void testListVersionsOfCookbook() throws SecurityException, NoSuchMethodException, IOException {
       Invokable<?, ?> method = method(ChefApi.class, "listVersionsOfCookbook", String.class);
       GeneratedHttpRequest httpRequest = processor
@@ -414,23 +397,6 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
 
    }
 
-   public void testListRoles() throws SecurityException, NoSuchMethodException, IOException {
-      Invokable<?, ?> method = method(ChefApi.class, "listRoles");
-      GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
-
-      assertRequestLineEquals(httpRequest, "GET http://localhost:4000/roles HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
-            + "-test\n");
-      assertPayloadEquals(httpRequest, null, null, false);
-
-      assertResponseParserClassEquals(method, httpRequest, ParseKeySetFromJson.class);
-      assertSaxResponseParserClassEquals(method, null);
-      assertFallbackClassEquals(method, EmptySetOnNotFoundOr404.class);
-
-      checkFilters(httpRequest);
-
-   }
-
    public void testDeleteDatabag() throws SecurityException, NoSuchMethodException, IOException {
       Invokable<?, ?> method = method(ChefApi.class, "deleteDatabag", String.class);
       GeneratedHttpRequest httpRequest = processor
@@ -465,23 +431,6 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
 
    }
 
-   public void testListDatabags() throws SecurityException, NoSuchMethodException, IOException {
-      Invokable<?, ?> method = method(ChefApi.class, "listDatabags");
-      GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
-
-      assertRequestLineEquals(httpRequest, "GET http://localhost:4000/data HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
-            + "-test\n");
-      assertPayloadEquals(httpRequest, null, null, false);
-
-      assertResponseParserClassEquals(method, httpRequest, ParseKeySetFromJson.class);
-      assertSaxResponseParserClassEquals(method, null);
-      assertFallbackClassEquals(method, EmptySetOnNotFoundOr404.class);
-
-      checkFilters(httpRequest);
-
-   }
-
    public void testDeleteDatabagItem() throws SecurityException, NoSuchMethodException, IOException {
       Invokable<?, ?> method = method(ChefApi.class, "deleteDatabagItem", String.class, String.class);
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method,

http://git-wip-us.apache.org/repos/asf/jclouds/blob/b2c44b4a/apis/chef/src/test/resources/data_list.json
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/data_list.json b/apis/chef/src/test/resources/data_list.json
new file mode 100644
index 0000000..de9205d
--- /dev/null
+++ b/apis/chef/src/test/resources/data_list.json
@@ -0,0 +1,4 @@
+{
+    "users": "http://localhost:4000/data/users",
+    "applications": "http://localhost:4000/data/applications"
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/b2c44b4a/apis/chef/src/test/resources/roles_list.json
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/roles_list.json b/apis/chef/src/test/resources/roles_list.json
new file mode 100644
index 0000000..1f75bc1
--- /dev/null
+++ b/apis/chef/src/test/resources/roles_list.json
@@ -0,0 +1,4 @@
+{
+    "webserver": "http://localhost:4000/roles/webserver",
+    "smtpserver": "http://localhost:4000/roles/smtpserver"
+}


[15/50] [abbrv] git commit: JCLOUDS-286: Use by default the Omnibus installer

Posted by na...@apache.org.
JCLOUDS-286: Use by default the Omnibus installer


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/61258a64
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/61258a64
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/61258a64

Branch: refs/heads/master
Commit: 61258a64f6d9d04a2b533895d32cfbb32a84060c
Parents: 0e4d32b
Author: Ignasi Barrera <na...@apache.org>
Authored: Tue Sep 17 14:43:16 2013 +0200
Committer: Ignasi Barrera <na...@apache.org>
Committed: Thu Sep 19 23:45:06 2013 +0200

----------------------------------------------------------------------
 .../java/org/jclouds/chef/ChefApiMetadata.java  |  4 +-
 .../chef/config/ChefBootstrapModule.java        | 28 +++++-
 .../org/jclouds/chef/config/ChefProperties.java | 15 +++-
 .../org/jclouds/chef/config/InstallChef.java    | 39 ++++++++
 .../chef/functions/GroupToBootScript.java       | 10 ++-
 .../org/jclouds/chef/ChefApiExpectTest.java     |  2 +-
 .../chef/functions/GroupToBootScriptTest.java   | 93 +++++++++++++++++---
 7 files changed, 167 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/61258a64/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java b/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
index e28b481..951d2d2 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
@@ -23,6 +23,7 @@ import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX;
 import static org.jclouds.chef.config.ChefProperties.CHEF_BOOTSTRAP_DATABAG;
 import static org.jclouds.chef.config.ChefProperties.CHEF_UPDATE_GEMS;
 import static org.jclouds.chef.config.ChefProperties.CHEF_UPDATE_GEM_SYSTEM;
+import static org.jclouds.chef.config.ChefProperties.CHEF_USE_OMNIBUS;
 
 import java.net.URI;
 import java.util.Properties;
@@ -44,7 +45,7 @@ import com.google.inject.Module;
  * @author Ignasi Barrera
  */
 public class ChefApiMetadata extends BaseHttpApiMetadata<ChefApi> {
-   
+
    /**
     * The default Chef Server API version to use.
     */
@@ -78,6 +79,7 @@ public class ChefApiMetadata extends BaseHttpApiMetadata<ChefApi> {
       properties.setProperty(CHEF_BOOTSTRAP_DATABAG, "bootstrap");
       properties.setProperty(CHEF_UPDATE_GEM_SYSTEM, "false");
       properties.setProperty(CHEF_UPDATE_GEMS, "false");
+      properties.setProperty(CHEF_USE_OMNIBUS, "true");
       return properties;
    }
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/61258a64/apis/chef/src/main/java/org/jclouds/chef/config/ChefBootstrapModule.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/config/ChefBootstrapModule.java b/apis/chef/src/main/java/org/jclouds/chef/config/ChefBootstrapModule.java
index 3d9d04f..65d1422 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/config/ChefBootstrapModule.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/config/ChefBootstrapModule.java
@@ -19,6 +19,7 @@ package org.jclouds.chef.config;
 import static org.jclouds.chef.config.ChefProperties.CHEF_GEM_SYSTEM_VERSION;
 import static org.jclouds.chef.config.ChefProperties.CHEF_UPDATE_GEMS;
 import static org.jclouds.chef.config.ChefProperties.CHEF_UPDATE_GEM_SYSTEM;
+import static org.jclouds.chef.config.ChefProperties.CHEF_USE_OMNIBUS;
 import static org.jclouds.chef.config.ChefProperties.CHEF_VERSION;
 
 import javax.inject.Named;
@@ -27,6 +28,7 @@ import javax.inject.Singleton;
 import org.jclouds.scriptbuilder.domain.Statement;
 import org.jclouds.scriptbuilder.domain.StatementList;
 import org.jclouds.scriptbuilder.statements.chef.InstallChefGems;
+import org.jclouds.scriptbuilder.statements.chef.InstallChefUsingOmnibus;
 import org.jclouds.scriptbuilder.statements.ruby.InstallRuby;
 import org.jclouds.scriptbuilder.statements.ruby.InstallRubyGems;
 
@@ -45,8 +47,7 @@ public class ChefBootstrapModule extends AbstractModule {
    @Provides
    @Named("installChefGems")
    @Singleton
-   Statement installChef(BootstrapProperties bootstrapProperties) {
-
+   Statement installChefGems(BootstrapProperties bootstrapProperties) {
       InstallRubyGems installRubyGems = InstallRubyGems.builder()
             .version(bootstrapProperties.gemSystemVersion().orNull())
             .updateSystem(bootstrapProperties.updateGemSystem(), bootstrapProperties.gemSystemVersion().orNull())
@@ -58,6 +59,21 @@ public class ChefBootstrapModule extends AbstractModule {
       return new StatementList(InstallRuby.builder().build(), installRubyGems, installChef);
    }
 
+   @Provides
+   @Named("installChefOmnibus")
+   @Singleton
+   Statement installChefUsingOmnibus() {
+      return new InstallChefUsingOmnibus();
+   }
+
+   @Provides
+   @InstallChef
+   @Singleton
+   Statement installChef(BootstrapProperties bootstrapProperties, @Named("installChefGems") Statement installChefGems,
+         @Named("installChefOmnibus") Statement installChefOmnibus) {
+      return bootstrapProperties.useOmnibus() ? installChefOmnibus : installChefGems;
+   }
+
    @Singleton
    private static class BootstrapProperties {
       @Named(CHEF_VERSION)
@@ -76,6 +92,10 @@ public class ChefBootstrapModule extends AbstractModule {
       @Inject
       private String updateGemsProperty;
 
+      @Named(CHEF_USE_OMNIBUS)
+      @Inject
+      private String useOmnibus;
+
       public Optional<String> chefVersion() {
          return Optional.fromNullable(chefVersionProperty);
       }
@@ -91,6 +111,10 @@ public class ChefBootstrapModule extends AbstractModule {
       public boolean updateGems() {
          return Boolean.parseBoolean(updateGemsProperty);
       }
+
+      public boolean useOmnibus() {
+         return Boolean.parseBoolean(useOmnibus);
+      }
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/jclouds/blob/61258a64/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java b/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java
index 75b3aa8..a6cf5f2 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java
@@ -31,7 +31,7 @@ public interface ChefProperties {
    public static final String CHEF_LOGGER = "jclouds.chef";
 
    /**
-    * Ddatabag that holds chef bootstrap hints, should be a json ball in the
+    * Databag that holds chef bootstrap hints, should be a json ball in the
     * following format:
     * <p>
     * {"tag":{"run_list":["recipe[apache2]"]}}
@@ -91,7 +91,7 @@ public interface ChefProperties {
    /**
     * Boolean property. Default (false).
     * <p>
-    * When bootstrapping a node, updates teh existing gems before installing
+    * When bootstrapping a node, updates the existing gems before installing
     * Chef.
     * <p>
     * This property must be set prior to running the
@@ -99,4 +99,15 @@ public interface ChefProperties {
     */
    public static final String CHEF_UPDATE_GEMS = "chef.update-gems";
 
+   /**
+    * Boolean property. Default (true).
+    * <p>
+    * When bootstrapping a node, install the Chef client using the Omnibus
+    * installer.
+    * <p>
+    * This property must be set prior to running the
+    * {@link ChefService#createBootstrapScriptForGroup(String)} method.
+    */
+   public static final String CHEF_USE_OMNIBUS = "chef.use-omnibus";
+
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/61258a64/apis/chef/src/main/java/org/jclouds/chef/config/InstallChef.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/config/InstallChef.java b/apis/chef/src/main/java/org/jclouds/chef/config/InstallChef.java
new file mode 100644
index 0000000..909b99a
--- /dev/null
+++ b/apis/chef/src/main/java/org/jclouds/chef/config/InstallChef.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.chef.config;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+/**
+ * Used to configure the Chef install script.
+ * 
+ * @author Ignasi Barrera
+ */
+@Target({ METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Qualifier
+public @interface InstallChef {
+
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/61258a64/apis/chef/src/main/java/org/jclouds/chef/functions/GroupToBootScript.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/GroupToBootScript.java b/apis/chef/src/main/java/org/jclouds/chef/functions/GroupToBootScript.java
index 9154471..707119b 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/GroupToBootScript.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/GroupToBootScript.java
@@ -34,11 +34,13 @@ import javax.inject.Inject;
 import javax.inject.Named;
 import javax.inject.Singleton;
 
+import org.jclouds.chef.config.InstallChef;
 import org.jclouds.chef.config.Validator;
 import org.jclouds.crypto.Pems;
 import org.jclouds.domain.JsonBall;
 import org.jclouds.json.Json;
 import org.jclouds.location.Provider;
+import org.jclouds.scriptbuilder.ExitInsteadOfReturn;
 import org.jclouds.scriptbuilder.domain.Statement;
 
 import com.google.common.annotations.VisibleForTesting;
@@ -68,19 +70,19 @@ public class GroupToBootScript implements Function<String, Statement> {
    private final Supplier<URI> endpoint;
    private final Json json;
    private final CacheLoader<String, ? extends JsonBall> bootstrapConfigForGroup;
-   private final Statement installChefGems;
+   private final Statement installChef;
    private final Optional<String> validatorName;
    private final Optional<PrivateKey> validatorCredential;
 
    @Inject
    public GroupToBootScript(@Provider Supplier<URI> endpoint, Json json,
          CacheLoader<String, ? extends JsonBall> bootstrapConfigForGroup,
-         @Named("installChefGems") Statement installChefGems, @Validator Optional<String> validatorName,
+         @InstallChef Statement installChef, @Validator Optional<String> validatorName,
          @Validator Optional<PrivateKey> validatorCredential) {
       this.endpoint = checkNotNull(endpoint, "endpoint");
       this.json = checkNotNull(json, "json");
       this.bootstrapConfigForGroup = checkNotNull(bootstrapConfigForGroup, "bootstrapConfigForGroup");
-      this.installChefGems = checkNotNull(installChefGems, "installChefGems");
+      this.installChef = checkNotNull(installChef, "installChef");
       this.validatorName = checkNotNull(validatorName, "validatorName");
       this.validatorCredential = checkNotNull(validatorCredential, validatorCredential);
    }
@@ -124,7 +126,7 @@ public class GroupToBootScript implements Function<String, Statement> {
       String strOptions = Joiner.on(' ').withKeyValueSeparator(" ").join(options.build());
       Statement runChef = exec("chef-client " + strOptions);
 
-      return newStatementList(installChefGems, createChefConfigDir, createClientRb, createValidationPem,
+      return newStatementList(new ExitInsteadOfReturn(installChef), createChefConfigDir, createClientRb, createValidationPem,
             createFirstBoot, runChef);
    }
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/61258a64/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
index 634c5da..3a7bae4 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
@@ -45,7 +45,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
      provider = "chef";
    }
 
-   private HttpRequest.Builder getHttpRequestBuilder(String method, String endPoint) {
+   private HttpRequest.Builder<?> getHttpRequestBuilder(String method, String endPoint) {
       return HttpRequest.builder() //
                   .method(method) //
                   .endpoint("http://localhost:4000" + endPoint) //

http://git-wip-us.apache.org/repos/asf/jclouds/blob/61258a64/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java
index 7b51f04..fa9cf3f 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java
@@ -22,6 +22,7 @@ import static org.easymock.EasyMock.replay;
 import static org.easymock.EasyMock.verify;
 import static org.jclouds.chef.config.ChefProperties.CHEF_UPDATE_GEMS;
 import static org.jclouds.chef.config.ChefProperties.CHEF_UPDATE_GEM_SYSTEM;
+import static org.jclouds.chef.config.ChefProperties.CHEF_USE_OMNIBUS;
 import static org.testng.Assert.assertEquals;
 
 import java.io.IOException;
@@ -31,6 +32,7 @@ import java.security.PrivateKey;
 import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefBootstrapModule;
 import org.jclouds.chef.config.ChefParserModule;
+import org.jclouds.chef.config.InstallChef;
 import org.jclouds.chef.domain.DatabagItem;
 import org.jclouds.crypto.PemsTest;
 import org.jclouds.domain.JsonBall;
@@ -64,21 +66,34 @@ public class GroupToBootScriptTest {
 
    private Json json;
    private Statement installChefGems;
+   private Statement installChefOmnibus;
    private Optional<String> validatorName;
 
    @BeforeClass
    public void setup() {
-      Injector injector = Guice.createInjector(new AbstractModule() {
+      Injector injectorGems = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
             bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
             bind(String.class).annotatedWith(Names.named(CHEF_UPDATE_GEM_SYSTEM)).toInstance("true");
             bind(String.class).annotatedWith(Names.named(CHEF_UPDATE_GEMS)).toInstance("true");
+            bind(String.class).annotatedWith(Names.named(CHEF_USE_OMNIBUS)).toInstance("false");
          }
       }, new ChefParserModule(), new GsonModule(), new ChefBootstrapModule());
 
-      json = injector.getInstance(Json.class);
-      installChefGems = injector.getInstance(Key.get(Statement.class, Names.named("installChefGems")));
+      Injector injectorOmnibus = Guice.createInjector(new AbstractModule() {
+         @Override
+         protected void configure() {
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
+            bind(String.class).annotatedWith(Names.named(CHEF_UPDATE_GEM_SYSTEM)).toInstance("true");
+            bind(String.class).annotatedWith(Names.named(CHEF_UPDATE_GEMS)).toInstance("true");
+            bind(String.class).annotatedWith(Names.named(CHEF_USE_OMNIBUS)).toInstance("true");
+         }
+      }, new ChefParserModule(), new GsonModule(), new ChefBootstrapModule());
+
+      json = injectorGems.getInstance(Json.class);
+      installChefGems = injectorGems.getInstance(Key.get(Statement.class, InstallChef.class));
+      installChefOmnibus = injectorOmnibus.getInstance(Key.get(Statement.class, InstallChef.class));
       validatorName = Optional.<String> of("chef-validator");
    }
 
@@ -130,13 +145,15 @@ public class GroupToBootScriptTest {
 
       assertEquals(
             fn.apply("foo").render(OsFamily.UNIX),
-            Resources.toString(Resources.getResource("test_install_ruby." + ShellToken.SH.to(OsFamily.UNIX)),
-                  Charsets.UTF_8)
-                  + Resources.toString(
-                        Resources.getResource("test_install_rubygems." + ShellToken.SH.to(OsFamily.UNIX)),
+            exitInsteadOfReturn(
+                  OsFamily.UNIX,
+                  Resources.toString(Resources.getResource("test_install_ruby." + ShellToken.SH.to(OsFamily.UNIX)),
                         Charsets.UTF_8)
-                  + "gem install chef --no-rdoc --no-ri\n"
-                  + Resources.toString(Resources.getResource("bootstrap.sh"), Charsets.UTF_8));
+                        + Resources.toString(
+                              Resources.getResource("test_install_rubygems." + ShellToken.SH.to(OsFamily.UNIX)),
+                              Charsets.UTF_8)
+                        + "gem install chef --no-rdoc --no-ri\n"
+                        + Resources.toString(Resources.getResource("bootstrap.sh"), Charsets.UTF_8)));
 
       verify(validatorKey);
    }
@@ -155,14 +172,62 @@ public class GroupToBootScriptTest {
 
       assertEquals(
             fn.apply("foo").render(OsFamily.UNIX),
-            Resources.toString(Resources.getResource("test_install_ruby." + ShellToken.SH.to(OsFamily.UNIX)),
-                  Charsets.UTF_8)
-                  + Resources.toString(
-                        Resources.getResource("test_install_rubygems." + ShellToken.SH.to(OsFamily.UNIX)),
+            exitInsteadOfReturn(
+                  OsFamily.UNIX,
+                  Resources.toString(Resources.getResource("test_install_ruby." + ShellToken.SH.to(OsFamily.UNIX)),
                         Charsets.UTF_8)
-                  + "gem install chef --no-rdoc --no-ri\n"
+                        + Resources.toString(
+                              Resources.getResource("test_install_rubygems." + ShellToken.SH.to(OsFamily.UNIX)),
+                              Charsets.UTF_8)
+                        + "gem install chef --no-rdoc --no-ri\n"
+                        + Resources.toString(Resources.getResource("bootstrap-env.sh"), Charsets.UTF_8)));
+
+      verify(validatorKey);
+   }
+
+   public void testOneRecipeOmnibus() throws IOException {
+      Optional<PrivateKey> validatorCredential = Optional.of(createMock(PrivateKey.class));
+      GroupToBootScript fn = new GroupToBootScript(Suppliers.ofInstance(URI.create("http://localhost:4000")), json,
+            CacheLoader.from(Functions.forMap(ImmutableMap.<String, JsonBall> of("foo", new JsonBall(
+                  "{\"tomcat6\":{\"ssl_port\":8433},\"run_list\":[\"recipe[apache2]\",\"role[webserver]\"]}")))),
+            installChefOmnibus, validatorName, validatorCredential);
+
+      PrivateKey validatorKey = validatorCredential.get();
+      expect(validatorKey.getEncoded()).andReturn(PemsTest.PRIVATE_KEY.getBytes());
+      replay(validatorKey);
+
+      assertEquals(
+            fn.apply("foo").render(OsFamily.UNIX),
+            "setupPublicCurl || exit 1\ncurl -q -s -S -L --connect-timeout 10 --max-time 600 --retry 20 "
+                  + "-X GET  https://www.opscode.com/chef/install.sh |(bash)\n"
+                  + Resources.toString(Resources.getResource("bootstrap.sh"), Charsets.UTF_8));
+
+      verify(validatorKey);
+   }
+
+   public void testOneRecipeAndEnvironmentOmnibus() throws IOException {
+      Optional<PrivateKey> validatorCredential = Optional.of(createMock(PrivateKey.class));
+      GroupToBootScript fn = new GroupToBootScript(Suppliers.ofInstance(URI.create("http://localhost:4000")), json,
+            CacheLoader.from(Functions.forMap(ImmutableMap.<String, JsonBall> of("foo", new JsonBall(
+                  "{\"tomcat6\":{\"ssl_port\":8433},\"environment\":\"env\","
+                        + "\"run_list\":[\"recipe[apache2]\",\"role[webserver]\"]}")))), installChefOmnibus,
+            validatorName, validatorCredential);
+
+      PrivateKey validatorKey = validatorCredential.get();
+      expect(validatorKey.getEncoded()).andReturn(PemsTest.PRIVATE_KEY.getBytes());
+      replay(validatorKey);
+
+      assertEquals(
+            fn.apply("foo").render(OsFamily.UNIX),
+            "setupPublicCurl || exit 1\ncurl -q -s -S -L --connect-timeout 10 --max-time 600 --retry 20 "
+                  + "-X GET  https://www.opscode.com/chef/install.sh |(bash)\n"
                   + Resources.toString(Resources.getResource("bootstrap-env.sh"), Charsets.UTF_8));
 
       verify(validatorKey);
    }
+
+   private static String exitInsteadOfReturn(OsFamily family, String input) {
+      return input.replaceAll(ShellToken.RETURN.to(family), ShellToken.EXIT.to(family));
+   }
+
 }


[06/50] [abbrv] git commit: Improved javadoc and parameter naming

Posted by na...@apache.org.
Improved javadoc and parameter naming


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/174531ed
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/174531ed
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/174531ed

Branch: refs/heads/master
Commit: 174531ed13a97ff1235f8aa3428f5458ef4a51d6
Parents: 353651d
Author: Ignasi Barrera <na...@apache.org>
Authored: Mon Sep 16 09:52:46 2013 +0200
Committer: Ignasi Barrera <na...@apache.org>
Committed: Mon Sep 16 09:52:46 2013 +0200

----------------------------------------------------------------------
 .../src/main/java/org/jclouds/chef/ChefApi.java | 130 +++++++++----------
 .../java/org/jclouds/chef/ChefApiMetadata.java  |   4 +-
 .../main/java/org/jclouds/chef/ChefService.java |  30 ++---
 .../chef/suppliers/ChefVersionSupplier.java     |   6 +-
 .../org/jclouds/chef/test/TransientChefApi.java |  32 ++---
 .../org/jclouds/chef/ChefApiExpectTest.java     |   8 +-
 .../test/java/org/jclouds/chef/ChefApiTest.java |  84 ++++++------
 .../BindHexEncodedMD5sToJsonPayloadTest.java    |   2 +-
 .../chef/functions/GroupToBootScriptTest.java   |   2 +-
 .../chef/functions/ParseClientFromJsonTest.java |   2 +-
 .../ParseCookbookDefinitionFromJsonTest.java    |   2 +-
 .../ParseCookbookDefinitionFromJsonv10Test.java |   2 +-
 ...seCookbookDefinitionListFromJsonv10Test.java |   2 +-
 .../ParseCookbookVersionFromJsonTest.java       |   2 +-
 .../ParseCookbookVersionsV09FromJsonTest.java   |   2 +-
 .../ParseCookbookVersionsV10FromJsonTest.java   |   2 +-
 .../functions/ParseDataBagItemFromJsonTest.java |   2 +-
 .../chef/functions/ParseKeySetFromJsonTest.java |   2 +-
 .../chef/functions/ParseNodeFromJsonTest.java   |   2 +-
 .../functions/ParseSandboxFromJsonTest.java     |   2 +-
 .../ParseSearchDataBagItemFromJsonTest.java     |   2 +-
 .../ParseUploadSandboxFromJsonTest.java         |   2 +-
 .../chef/functions/RunListForGroupTest.java     |   2 +-
 .../chef/suppliers/ChefVersionSupplierTest.java |   8 +-
 .../java/org/jclouds/ohai/config/JMXTest.java   |   2 +-
 .../org/jclouds/ohai/config/OhaiModuleTest.java |   4 +-
 .../ohai/functions/NestSlashKeysTest.java       |   2 +-
 27 files changed, 171 insertions(+), 171 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java b/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
index 877deb6..b8b4513 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
@@ -98,7 +98,7 @@ public interface ChefApi extends Closeable {
    // Clients
 
    /**
-    * List the names of the existing clients.
+    * Lists the names of the existing clients.
     * 
     * @return The names of the existing clients.
     */
@@ -110,7 +110,7 @@ public interface ChefApi extends Closeable {
    Set<String> listClients();
 
    /**
-    * Get the details of existing client.
+    * Gets the details of existing client.
     * 
     * @param clientname The name of the client to get.
     * @return The details of the given client.
@@ -119,7 +119,7 @@ public interface ChefApi extends Closeable {
    @GET
    @Path("/clients/{clientname}")
    @Fallback(NullOnNotFoundOr404.class)
-   Client getClient(@PathParam("clientname") String clientname);
+   Client getClient(@PathParam("clientname") String clientName);
 
    /**
     * Creates a new client.
@@ -132,7 +132,7 @@ public interface ChefApi extends Closeable {
    @POST
    @Path("/clients")
    @MapBinder(BindToJsonPayload.class)
-   Client createClient(@PayloadParam("name") String clientname);
+   Client createClient(@PayloadParam("name") String clientName);
 
    /**
     * Creates a new client with custom options.
@@ -146,10 +146,10 @@ public interface ChefApi extends Closeable {
    @POST
    @Path("/clients")
    @MapBinder(BindCreateClientOptionsToJsonPayload.class)
-   Client createClient(@PayloadParam("name") String clientname, CreateClientOptions options);
+   Client createClient(@PayloadParam("name") String clientName, CreateClientOptions options);
 
    /**
-    * Generate a new key-pair for this client, and return the new private key in
+    * Generates a new key-pair for this client, and return the new private key in
     * the response body.
     * 
     * @param clientname The name of the client.
@@ -159,7 +159,7 @@ public interface ChefApi extends Closeable {
    @PUT
    @Path("/clients/{clientname}")
    Client generateKeyForClient(
-         @PathParam("clientname") @BinderParam(BindGenerateKeyForClientToJsonPayload.class) String clientname);
+         @PathParam("clientname") @BinderParam(BindGenerateKeyForClientToJsonPayload.class) String clientName);
 
    /**
     * Deletes the given client.
@@ -171,12 +171,12 @@ public interface ChefApi extends Closeable {
    @DELETE
    @Path("/clients/{clientname}")
    @Fallback(NullOnNotFoundOr404.class)
-   Client deleteClient(@PathParam("clientname") String clientname);
+   Client deleteClient(@PathParam("clientname") String clientName);
 
    // Cookbooks
 
    /**
-    * List the names of the existing cookbooks.
+    * Lists the names of the existing cookbooks.
     * 
     * @return The names of the exsisting cookbooks.
     */
@@ -188,7 +188,7 @@ public interface ChefApi extends Closeable {
    Set<String> listCookbooks();
 
    /**
-    * List the cookbooks that are available in the given environment.
+    * Lists the cookbooks that are available in the given environment.
     * 
     * @param environmentname The name of the environment to get the cookbooks
     *        from.
@@ -201,10 +201,10 @@ public interface ChefApi extends Closeable {
    @ResponseParser(ParseCookbookDefinitionListFromJsonv10.class)
    @Path("/environments/{environmentname}/cookbooks")
    @Fallback(NullOnNotFoundOr404.class)
-   Set<CookbookDefinition> listCookbooksInEnvironment(@PathParam("environmentname") String environmentname);
+   Set<CookbookDefinition> listCookbooksInEnvironment(@PathParam("environmentname") String environmentName);
 
    /**
-    * List the cookbooks that are available in the given environment, limiting
+    * Lists the cookbooks that are available in the given environment, limiting
     * the number of versions returned for each cookbook.
     * 
     * @param environmentname The name of the environment.
@@ -219,11 +219,11 @@ public interface ChefApi extends Closeable {
    @ResponseParser(ParseCookbookDefinitionListFromJsonv10.class)
    @Path("/environments/{environmentname}/cookbooks?num_versions={numversions}")
    @Fallback(NullOnNotFoundOr404.class)
-   Set<CookbookDefinition> listCookbooksInEnvironment(@PathParam("environmentname") String environmentname,
-         @PathParam("numversions") String numversions);
+   Set<CookbookDefinition> listCookbooksInEnvironment(@PathParam("environmentname") String environmentName,
+         @PathParam("numversions") String numVersions);
 
    /**
-    * List the available versions of the given cookbook.
+    * Lists the available versions of the given cookbook.
     * 
     * @param cookbookName The name of the cookbook.
     * @return The available versions of the given cookbook.
@@ -236,7 +236,7 @@ public interface ChefApi extends Closeable {
    Set<String> listVersionsOfCookbook(@PathParam("cookbookname") String cookbookName);
 
    /**
-    * Get the details of the given cookbook, with the links to each resource
+    * Gets the details of the given cookbook, with the links to each resource
     * such as recipe files, attributes, etc.
     * 
     * @param cookbookName The name of the cookbook.
@@ -250,7 +250,7 @@ public interface ChefApi extends Closeable {
    CookbookVersion getCookbook(@PathParam("cookbookname") String cookbookName, @PathParam("version") String version);
 
    /**
-    * Get the definition of the cookbook in the given environment.
+    * Gets the definition of the cookbook in the given environment.
     * 
     * @param environmentname The name of the environment.
     * @param cookbookname The name of the cookbook.
@@ -262,11 +262,11 @@ public interface ChefApi extends Closeable {
    @GET
    @ResponseParser(ParseCookbookDefinitionFromJsonv10.class)
    @Path("/environments/{environmentname}/cookbooks/{cookbookname}")
-   CookbookDefinition getCookbookInEnvironment(@PathParam("environmentname") String environmentname,
-         @PathParam("cookbookname") String cookbookname);
+   CookbookDefinition getCookbookInEnvironment(@PathParam("environmentname") String environmentName,
+         @PathParam("cookbookname") String cookbookName);
 
    /**
-    * Get the definition of the cookbook in the given environment.
+    * Gets the definition of the cookbook in the given environment.
     * 
     * @param environmentname The name of the environment.
     * @param cookbookname The name of the cookbook.
@@ -280,11 +280,11 @@ public interface ChefApi extends Closeable {
    @GET
    @ResponseParser(ParseCookbookDefinitionFromJsonv10.class)
    @Path("/environments/{environmentname}/cookbooks/{cookbookname}?num_versions={numversions}")
-   CookbookDefinition getCookbookInEnvironment(@PathParam("environmentname") String environmentname,
-         @PathParam("cookbookname") String cookbookname, @PathParam("numversions") String numversions);
+   CookbookDefinition getCookbookInEnvironment(@PathParam("environmentname") String environmentName,
+         @PathParam("cookbookname") String cookbookName, @PathParam("numversions") String numVersions);
 
    /**
-    * List the names of the recipes in the given environment.
+    * Lists the names of the recipes in the given environment.
     * 
     * @param environmentname The name of the environment.
     * @return The names of the recipes in the given environment.
@@ -294,7 +294,7 @@ public interface ChefApi extends Closeable {
    @GET
    @Path("/environments/{environmentname}/recipes")
    @Fallback(EmptySetOnNotFoundOr404.class)
-   Set<String> listRecipesInEnvironment(@PathParam("environmentname") String environmentname);
+   Set<String> listRecipesInEnvironment(@PathParam("environmentname") String environmentName);
 
    /**
     * Creates or updates the given cookbook.
@@ -311,7 +311,7 @@ public interface ChefApi extends Closeable {
          @BinderParam(BindToJsonPayload.class) CookbookVersion cookbook);
 
    /**
-    * Delete the given cookbook.
+    * Deletes the given cookbook.
     * 
     * @param cookbookName The name of the cookbook to delete.
     * @param version The version of the cookbook to delete.
@@ -326,7 +326,7 @@ public interface ChefApi extends Closeable {
    // Data bags
 
    /**
-    * List the names of the existing data bags.
+    * Lists the names of the existing data bags.
     * 
     * @return The names of the existing data bags.
     */
@@ -359,7 +359,7 @@ public interface ChefApi extends Closeable {
    void deleteDatabag(@PathParam("name") String databagName);
 
    /**
-    * List the names of the items in a data bag.
+    * Lists the names of the items in a data bag.
     * 
     * @param databagName The name of the data bag.
     * @return The names of the items in the given data bag.
@@ -372,7 +372,7 @@ public interface ChefApi extends Closeable {
    Set<String> listDatabagItems(@PathParam("name") String databagName);
 
    /**
-    * Get an item in a data bag.
+    * Gets an item in a data bag.
     * 
     * @param databagName The name of the data bag.
     * @param databagItemId The identifier of the item to get.
@@ -399,7 +399,7 @@ public interface ChefApi extends Closeable {
          @BinderParam(BindToJsonPayload.class) DatabagItem databagItem);
 
    /**
-    * Update an item in a data bag.
+    * Updates an item in a data bag.
     * 
     * @param databagName The name of the data bag.
     * @param item The new contents for the item in the data bag.
@@ -413,7 +413,7 @@ public interface ChefApi extends Closeable {
          @PathParam("databagItemId") @ParamParser(DatabagItemId.class) @BinderParam(BindToJsonPayload.class) DatabagItem item);
 
    /**
-    * Delete an item from a data bag.
+    * Deletes an item from a data bag.
     * 
     * @param databagName The name of the data bag.
     * @param databagItemId The identifier of the item to delete.
@@ -429,7 +429,7 @@ public interface ChefApi extends Closeable {
    // Environments
 
    /**
-    * List the names of the existing environments.
+    * Lists the names of the existing environments.
     * 
     * @return The names of the existing environments.
     */
@@ -442,7 +442,7 @@ public interface ChefApi extends Closeable {
    Set<String> listEnvironments();
 
    /**
-    * Get the details of an existing environment.
+    * Gets the details of an existing environment.
     * 
     * @param environmentname The name of the environment to get.
     * @return The details of the given environment.
@@ -452,10 +452,10 @@ public interface ChefApi extends Closeable {
    @GET
    @Path("/environments/{environmentname}")
    @Fallback(NullOnNotFoundOr404.class)
-   Environment getEnvironment(@PathParam("environmentname") String environmentname);
+   Environment getEnvironment(@PathParam("environmentname") String environmentName);
 
    /**
-    * Create a new environment.
+    * Creates a new environment.
     * 
     * @param environment The environment to create.
     */
@@ -466,7 +466,7 @@ public interface ChefApi extends Closeable {
    void createEnvironment(@BinderParam(BindToJsonPayload.class) Environment environment);
 
    /**
-    * Updated the given environment.
+    * Updates the given environment.
     * 
     * @param environment The new details for the environment.
     * @return The details of the updated environment.
@@ -479,7 +479,7 @@ public interface ChefApi extends Closeable {
          @PathParam("environmentname") @ParamParser(EnvironmentName.class) @BinderParam(BindToJsonPayload.class) Environment environment);
 
    /**
-    * Delete the given environment.
+    * Deletes the given environment.
     * 
     * @param environmentname The name of the environment to delete.
     * @return The details of the deleted environment.
@@ -489,12 +489,12 @@ public interface ChefApi extends Closeable {
    @DELETE
    @Path("/environments/{environmentname}")
    @Fallback(NullOnNotFoundOr404.class)
-   Environment deleteEnvironment(@PathParam("environmentname") String environmentname);
+   Environment deleteEnvironment(@PathParam("environmentname") String environmentName);
 
    // Nodes
 
    /**
-    * List the names of the existing nodes.
+    * Lists the names of the existing nodes.
     * 
     * @return The names of the existing nodes.
     */
@@ -506,7 +506,7 @@ public interface ChefApi extends Closeable {
    Set<String> listNodes();
 
    /**
-    * List the names of the nodes in the given environment.
+    * Lists the names of the nodes in the given environment.
     * 
     * @param environmentname The name of the environment.
     * @return The names of the existing nodes in the given environment.
@@ -517,10 +517,10 @@ public interface ChefApi extends Closeable {
    @Path("/environments/{environmentname}/nodes")
    @ResponseParser(ParseKeySetFromJson.class)
    @Fallback(EmptySetOnNotFoundOr404.class)
-   Set<String> listNodesInEnvironment(@PathParam("environmentname") String environmentname);
+   Set<String> listNodesInEnvironment(@PathParam("environmentname") String environmentName);
 
    /**
-    * Get the details of the given node.
+    * Gets the details of the given node.
     * 
     * @param nodename The name of the node to get.
     * @return The details of the given node.
@@ -529,10 +529,10 @@ public interface ChefApi extends Closeable {
    @GET
    @Path("/nodes/{nodename}")
    @Fallback(NullOnNotFoundOr404.class)
-   Node getNode(@PathParam("nodename") String nodename);
+   Node getNode(@PathParam("nodename") String nodeName);
 
    /**
-    * Create a new node.
+    * Creates a new node.
     * 
     * @param node The details of the node to create.
     */
@@ -542,7 +542,7 @@ public interface ChefApi extends Closeable {
    void createNode(@BinderParam(BindToJsonPayload.class) Node node);
 
    /**
-    * Update an existing node.
+    * Updates an existing node.
     * 
     * @param node The new details for the node.
     * @return The details of the updated node.
@@ -553,7 +553,7 @@ public interface ChefApi extends Closeable {
    Node updateNode(@PathParam("nodename") @ParamParser(NodeName.class) @BinderParam(BindToJsonPayload.class) Node node);
 
    /**
-    * Delete the given node.
+    * Deletes the given node.
     * 
     * @param nodename The name of the node to delete.
     * @return The details of the deleted node.
@@ -562,12 +562,12 @@ public interface ChefApi extends Closeable {
    @DELETE
    @Path("/nodes/{nodename}")
    @Fallback(NullOnNotFoundOr404.class)
-   Node deleteNode(@PathParam("nodename") String nodename);
+   Node deleteNode(@PathParam("nodename") String nodeName);
 
    // Roles
 
    /**
-    * List the names of the existing roles.
+    * Lists the names of the existing roles.
     * 
     * @return The names of the existing roles.
     */
@@ -579,7 +579,7 @@ public interface ChefApi extends Closeable {
    Set<String> listRoles();
 
    /**
-    * Get the details of the given role.
+    * Gets the details of the given role.
     * 
     * @param rolename The name of the role to get.
     * @return The details of the given role.
@@ -588,10 +588,10 @@ public interface ChefApi extends Closeable {
    @GET
    @Path("/roles/{rolename}")
    @Fallback(NullOnNotFoundOr404.class)
-   Role getRole(@PathParam("rolename") String rolename);
+   Role getRole(@PathParam("rolename") String roleName);
 
    /**
-    * Create a new role.
+    * Creates a new role.
     * 
     * @param role The details for the new role.
     */
@@ -601,7 +601,7 @@ public interface ChefApi extends Closeable {
    void createRole(@BinderParam(BindToJsonPayload.class) Role role);
 
    /**
-    * Update the given role.
+    * Updates the given role.
     * 
     * @param role The new details for the role.
     * @return The details of the updated role.
@@ -612,7 +612,7 @@ public interface ChefApi extends Closeable {
    Role updateRole(@PathParam("rolename") @ParamParser(RoleName.class) @BinderParam(BindToJsonPayload.class) Role role);
 
    /**
-    * Delete the given role.
+    * Deletes the given role.
     * 
     * @param rolename The name of the role to delete.
     * @return The details of the deleted role.
@@ -621,7 +621,7 @@ public interface ChefApi extends Closeable {
    @DELETE
    @Path("/roles/{rolename}")
    @Fallback(NullOnNotFoundOr404.class)
-   Role deleteRole(@PathParam("rolename") String rolename);
+   Role deleteRole(@PathParam("rolename") String roleName);
 
    // Sandboxes
 
@@ -656,7 +656,7 @@ public interface ChefApi extends Closeable {
    void uploadContent(@EndpointParam URI location, Payload content);
 
    /**
-    * Get the contents of the given resource.
+    * Gets the contents of the given resource.
     * 
     * @param resource The resource to get.
     * @return An input stream for the content of the requested resource.
@@ -684,7 +684,7 @@ public interface ChefApi extends Closeable {
    // Search
 
    /**
-    * List the names of the available search indexes.
+    * Lists the names of the available search indexes.
     * <p>
     * By default, the "role", "node" and "api" indexes will always be available.
     * <p>
@@ -703,7 +703,7 @@ public interface ChefApi extends Closeable {
    Set<String> listSearchIndexes();
 
    /**
-    * Search all clients.
+    * Searches all clients.
     * <p>
     * Note that without any request parameters this will return all of the data
     * within the index.
@@ -719,7 +719,7 @@ public interface ChefApi extends Closeable {
    SearchResult<? extends Client> searchClients();
 
    /**
-    * Search all clients that match the given options.
+    * Searches all clients that match the given options.
     * 
     * @return The response contains the total number of rows that matched the
     *         request, the position this result set returns (useful for paging)
@@ -732,7 +732,7 @@ public interface ChefApi extends Closeable {
    SearchResult<? extends Client> searchClients(SearchOptions options);
 
    /**
-    * Search all items in a data bag.
+    * Searches all items in a data bag.
     * <p>
     * Note that without any request parameters this will return all of the data
     * within the index.
@@ -748,7 +748,7 @@ public interface ChefApi extends Closeable {
    SearchResult<? extends DatabagItem> searchDatabagItems(@PathParam("databagName") String databagName);
 
    /**
-    * Search all items in a data bag that match the given options.
+    * Searches all items in a data bag that match the given options.
     * 
     * @return The response contains the total number of rows that matched the
     *         request, the position this result set returns (useful for paging)
@@ -762,7 +762,7 @@ public interface ChefApi extends Closeable {
          SearchOptions options);
 
    /**
-    * Search all environments.
+    * Searches all environments.
     * <p>
     * Note that without any request parameters this will return all of the data
     * within the index.
@@ -779,7 +779,7 @@ public interface ChefApi extends Closeable {
    SearchResult<? extends Environment> searchEnvironments();
 
    /**
-    * Search all environments that match the given options.
+    * Searches all environments that match the given options.
     * 
     * @return The response contains the total number of rows that matched the
     *         request, the position this result set returns (useful for paging)
@@ -793,7 +793,7 @@ public interface ChefApi extends Closeable {
    SearchResult<? extends Environment> searchEnvironments(SearchOptions options);
 
    /**
-    * Search all nodes.
+    * Searches all nodes.
     * <p>
     * Note that without any request parameters this will return all of the data
     * within the index.
@@ -809,7 +809,7 @@ public interface ChefApi extends Closeable {
    SearchResult<? extends Node> searchNodes();
 
    /**
-    * Search all nodes that match the given options.
+    * Searches all nodes that match the given options.
     * 
     * @return The response contains the total number of rows that matched the
     *         request, the position this result set returns (useful for paging)
@@ -822,7 +822,7 @@ public interface ChefApi extends Closeable {
    SearchResult<? extends Node> searchNodes(SearchOptions options);
 
    /**
-    * Search all roles.
+    * Searches all roles.
     * <p>
     * Note that without any request parameters this will return all of the data
     * within the index.
@@ -838,7 +838,7 @@ public interface ChefApi extends Closeable {
    SearchResult<? extends Role> searchRoles();
 
    /**
-    * Search all roles that match the given options.
+    * Searches all roles that match the given options.
     * 
     * @return The response contains the total number of rows that matched the
     *         request, the position this result set returns (useful for paging)

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java b/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
index d767fdd..e28b481 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
@@ -48,7 +48,7 @@ public class ChefApiMetadata extends BaseHttpApiMetadata<ChefApi> {
    /**
     * The default Chef Server API version to use.
     */
-   public static final String DEFAULT_VERSION = "0.10.8";
+   public static final String DEFAULT_API_VERSION = "0.10.8";
 
    @Override
    public Builder toBuilder() {
@@ -88,7 +88,7 @@ public class ChefApiMetadata extends BaseHttpApiMetadata<ChefApi> {
                .name("OpsCode Chef Api")
                .identityName("User")
                .credentialName("Certificate")
-               .version(DEFAULT_VERSION)
+               .version(DEFAULT_API_VERSION)
                .documentation(URI.create("http://wiki.opscode.com/display/chef/Server+API"))
                .defaultEndpoint("http://localhost:4000")
                .defaultProperties(ChefApiMetadata.defaultProperties())

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/ChefService.java b/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
index f1c431b..cf6993f 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
@@ -45,7 +45,7 @@ import com.google.inject.ImplementedBy;
 public interface ChefService {
 
    /**
-    * Get the context that created this service.
+    * Gets the context that created this service.
     * 
     * @return The context that created the service.
     */
@@ -54,7 +54,7 @@ public interface ChefService {
    // Crypto
 
    /**
-    * Encrypt the given input stream.
+    * Encrypts the given input stream.
     * 
     * @param supplier The input stream to encrypt.
     * @return The encrypted bytes for the given input stream.
@@ -63,7 +63,7 @@ public interface ChefService {
    byte[] encrypt(InputSupplier<? extends InputStream> supplier) throws IOException;
 
    /**
-    * Decrypt the given input stream.
+    * Decrypts the given input stream.
     * 
     * @param supplier The input stream to decrypt.
     * @return The decrypted bytes for the given input stream.
@@ -94,7 +94,7 @@ public interface ChefService {
    void updateBootstrapConfigForGroup(String group, BootstrapConfig bootstrapConfig);
 
    /**
-    * Get the run list for the given group.
+    * Gets the run list for the given group.
     * 
     * @param The group to get the configured run list for.
     * @return run list for all nodes bootstrapped with a certain group
@@ -102,7 +102,7 @@ public interface ChefService {
    List<String> getRunListForGroup(String group);
 
    /**
-    * Get the bootstrap configuration for a given group.
+    * Gets the bootstrap configuration for a given group.
     * <p>
     * The bootstrap configuration is a Json object containing the run list and
     * the configured attributes.
@@ -112,7 +112,7 @@ public interface ChefService {
     */
    public JsonBall getBootstrapConfigForGroup(String group);
 
-   // Nodes
+   // Nodes / Clients
 
    /**
     * Creates a new node and populates the automatic attributes.
@@ -126,14 +126,14 @@ public interface ChefService {
    Node createNodeAndPopulateAutomaticAttributes(String nodeName, Iterable<String> runList);
 
    /**
-    * Update and populate the automatic attributes of the given node.
+    * Updates and populate the automatic attributes of the given node.
     * 
     * @param nodeName The node to update.
     */
    void updateAutomaticAttributesOnNode(String nodeName);
 
    /**
-    * Remove the nodes and clients that have been inactive for a given amount of
+    * Removes the nodes and clients that have been inactive for a given amount of
     * time.
     * 
     * @param prefix The prefix for the nodes and clients to delete.
@@ -143,28 +143,28 @@ public interface ChefService {
    void cleanupStaleNodesAndClients(String prefix, int secondsStale);
 
    /**
-    * Delete the given nodes.
+    * Deletes the given nodes.
     * 
     * @param names The names of the nodes to delete.
     */
    void deleteAllNodesInList(Iterable<String> names);
 
    /**
-    * Delete the given clients.
+    * Deletes the given clients.
     * 
     * @param names The names of the client to delete.
     */
    void deleteAllClientsInList(Iterable<String> names);
 
    /**
-    * List the details of all existing nodes.
+    * Lists the details of all existing nodes.
     * 
     * @return The details of all existing nodes.
     */
    Iterable<? extends Node> listNodes();
 
    /**
-    * List the details of all existing nodes in the given environment.
+    * Lists the details of all existing nodes in the given environment.
     * 
     * @param environmentName The name fo the environment.
     * @return The details of all existing nodes in the given environment.
@@ -173,21 +173,21 @@ public interface ChefService {
    Iterable<? extends Node> listNodesInEnvironment(String environmentName);
 
    /**
-    * List the details of all existing clients.
+    * Lists the details of all existing clients.
     * 
     * @return The details of all existing clients.
     */
    Iterable<? extends Client> listClients();
 
    /**
-    * List the details of all existing cookbooks.
+    * Lists the details of all existing cookbooks.
     * 
     * @return The details of all existing cookbooks.
     */
    Iterable<? extends CookbookVersion> listCookbookVersions();
 
    /**
-    * List the details of all existing environments.
+    * Lists the details of all existing environments.
     * 
     * @return The details of all existing environments.
     */

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/main/java/org/jclouds/chef/suppliers/ChefVersionSupplier.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/suppliers/ChefVersionSupplier.java b/apis/chef/src/main/java/org/jclouds/chef/suppliers/ChefVersionSupplier.java
index a08fc40..7f7f4e9 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/suppliers/ChefVersionSupplier.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/suppliers/ChefVersionSupplier.java
@@ -42,7 +42,7 @@ import com.google.common.base.Supplier;
 public class ChefVersionSupplier implements Supplier<Integer> {
 
    /** The default version to assume in case we can not parse it. */
-   public static final Integer DEFAULT_VERSION = 10;
+   public static final Integer FALLBACK_VERSION = 10;
 
    @Resource
    @Named(ChefProperties.CHEF_LOGGER)
@@ -65,8 +65,8 @@ public class ChefVersionSupplier implements Supplier<Integer> {
       Matcher m = versionPattern.matcher(apiVersion);
       if (!m.matches()) {
          logger.warn("Configured version does not match the standard version pattern. Assuming version %s",
-               DEFAULT_VERSION);
-         return DEFAULT_VERSION;
+               FALLBACK_VERSION);
+         return FALLBACK_VERSION;
       }
 
       return Integer.valueOf(firstNonNull(m.group(1), m.group(2)));

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApi.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApi.java b/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApi.java
index 2245826..812fd29 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApi.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApi.java
@@ -109,12 +109,12 @@ public class TransientChefApi implements ChefApi {
    }
 
    @Override
-   public Client createClient(String clientname) {
+   public Client createClient(String clientName) {
       throw new UnsupportedOperationException();
    }
 
    @Override
-   public Client createClient(String clientname, CreateClientOptions options) {
+   public Client createClient(String clientName, CreateClientOptions options) {
       throw new UnsupportedOperationException();
    }
 
@@ -141,7 +141,7 @@ public class TransientChefApi implements ChefApi {
    }
 
    @Override
-   public Client deleteClient(String clientname) {
+   public Client deleteClient(String clientName) {
       throw new UnsupportedOperationException();
    }
 
@@ -163,7 +163,7 @@ public class TransientChefApi implements ChefApi {
    }
 
    @Override
-   public Node deleteNode(String nodename) {
+   public Node deleteNode(String nodeName) {
       throw new UnsupportedOperationException();
    }
 
@@ -173,12 +173,12 @@ public class TransientChefApi implements ChefApi {
    }
 
    @Override
-   public Client generateKeyForClient(String clientname) {
+   public Client generateKeyForClient(String clientName) {
       throw new UnsupportedOperationException();
    }
 
    @Override
-   public Client getClient(String clientname) {
+   public Client getClient(String clientName) {
       throw new UnsupportedOperationException();
    }
 
@@ -193,12 +193,12 @@ public class TransientChefApi implements ChefApi {
    }
 
    @Override
-   public Node getNode(String nodename) {
+   public Node getNode(String nodeName) {
       throw new UnsupportedOperationException();
    }
 
    @Override
-   public Role getRole(String rolename) {
+   public Role getRole(String roleName) {
       throw new UnsupportedOperationException();
    }
 
@@ -328,12 +328,12 @@ public class TransientChefApi implements ChefApi {
    }
 
    @Override
-   public Environment deleteEnvironment(String environmentname) {
+   public Environment deleteEnvironment(String environmentName) {
       throw new UnsupportedOperationException();
    }
 
    @Override
-   public Environment getEnvironment(String environmentname) {
+   public Environment getEnvironment(String environmentName) {
       throw new UnsupportedOperationException();
    }
 
@@ -343,22 +343,22 @@ public class TransientChefApi implements ChefApi {
    }
 
    @Override
-   public Set<CookbookDefinition> listCookbooksInEnvironment(String environmentname) {
+   public Set<CookbookDefinition> listCookbooksInEnvironment(String environmentName) {
       throw new UnsupportedOperationException();
    }
 
    @Override
-   public Set<CookbookDefinition> listCookbooksInEnvironment(String environmentname, String numversions) {
+   public Set<CookbookDefinition> listCookbooksInEnvironment(String environmentName, String numVersions) {
       throw new UnsupportedOperationException();
    }
 
    @Override
-   public CookbookDefinition getCookbookInEnvironment(String environmentname, String cookbookname) {
+   public CookbookDefinition getCookbookInEnvironment(String environmentName, String cookbookName) {
       throw new UnsupportedOperationException();
    }
 
    @Override
-   public CookbookDefinition getCookbookInEnvironment(String environmentname, String cookbookname, String numversions) {
+   public CookbookDefinition getCookbookInEnvironment(String environmentName, String cookbookName, String numVersions) {
       throw new UnsupportedOperationException();
    }
 
@@ -373,12 +373,12 @@ public class TransientChefApi implements ChefApi {
    }
 
    @Override
-   public Set<String> listRecipesInEnvironment(String environmentname) {
+   public Set<String> listRecipesInEnvironment(String environmentName) {
       throw new UnsupportedOperationException();
    }
 
    @Override
-   public Set<String> listNodesInEnvironment(String environmentname) {
+   public Set<String> listNodesInEnvironment(String environmentName) {
       throw new UnsupportedOperationException();
    }
   

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
index 8cabec4..f19b2ef 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
@@ -49,7 +49,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
             signed(HttpRequest.builder() //
                   .method("GET") //
                   .endpoint("http://localhost:4000/environments/dev/recipes") //
-                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
                   .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
             HttpResponse.builder().statusCode(200)
                   .payload(payloadFromResourceWithContentType("/environment_recipes.json", MediaType.APPLICATION_JSON)) //
@@ -64,7 +64,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
             signed(HttpRequest.builder() //
                   .method("GET") //
                   .endpoint("http://localhost:4000/environments/dev/recipes") //
-                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
                   .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
             HttpResponse.builder().statusCode(404)
                   .build());
@@ -77,7 +77,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
             signed(HttpRequest.builder() //
                   .method("GET") //
                   .endpoint("http://localhost:4000/environments/dev/nodes") //
-                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
                   .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
             HttpResponse.builder().statusCode(200)
                   .payload(payloadFromResourceWithContentType("/environment_nodes.json", MediaType.APPLICATION_JSON)) //
@@ -92,7 +92,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
             signed(HttpRequest.builder() //
                   .method("GET") //
                   .endpoint("http://localhost:4000/environments/dev/nodes") //
-                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
                   .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
             HttpResponse.builder().statusCode(404)
                   .build());

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
index 7cf9c40..5ca105d 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
@@ -83,7 +83,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of("0189e76ccc476701d6b374e5a1a27347", true)));
       assertRequestLineEquals(httpRequest,
             "PUT http://localhost:4000/sandboxes/0189e76ccc476701d6b374e5a1a27347 HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"is_completed\":true}", "application/json", false);
 
@@ -102,7 +102,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
                   asList(base16().lowerCase().decode("0c5ecd7788cf4f6c7de2a57193897a6c")), asList(base16().lowerCase()
                         .decode("1dda05ed139664f1f89b9dec482b77c0"))))));
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/sandboxes HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest,
             "{\"checksums\":{\"0189e76ccc476701d6b374e5a1a27347\":null,\"0c5ecd7788cf4f6c7de2a57193897a6c\":null,"
@@ -120,7 +120,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method,
             ImmutableList.<Object> of(URI.create("http://foo/bar"), new StringPayload("{\"foo\": \"bar\"}"))));
       assertRequestLineEquals(httpRequest, "PUT http://foo/bar HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"foo\": \"bar\"}", "application/x-binary", false);
 
@@ -137,7 +137,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method,
             ImmutableList.<Object> of("cookbook", "1.0.0")));
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/cookbooks/cookbook/1.0.0 HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -154,7 +154,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method,
             ImmutableList.<Object> of("cookbook", "1.0.0")));
       assertRequestLineEquals(httpRequest, "DELETE http://localhost:4000/cookbooks/cookbook/1.0.0 HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -173,7 +173,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of("cookbook", "1.0.1", CookbookVersion.builder("cookbook", "1.0.1").build())));
 
       assertRequestLineEquals(httpRequest, "PUT http://localhost:4000/cookbooks/cookbook/1.0.1 HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest,
             "{\"name\":\"cookbook-1.0.1\",\"definitions\":[],\"attributes\":[],\"files\":[],"
@@ -197,7 +197,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/cookbooks HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -215,7 +215,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             .apply(Invocation.create(method, ImmutableList.<Object> of("apache2")));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/cookbooks/apache2 HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -232,7 +232,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor
             .apply(Invocation.create(method, ImmutableList.<Object> of("client")));
       assertRequestLineEquals(httpRequest, "DELETE http://localhost:4000/clients/client HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -249,7 +249,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.<Object> of("api")));
 
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/clients HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"name\":\"api\"}", "application/json", false);
 
@@ -267,7 +267,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of("api", CreateClientOptions.Builder.admin())));
 
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/clients HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"name\":\"api\",\"admin\":true}", "application/json", false);
 
@@ -284,7 +284,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/clients HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -301,7 +301,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor
             .apply(Invocation.create(method, ImmutableList.<Object> of("client")));
       assertRequestLineEquals(httpRequest, "PUT http://localhost:4000/clients/client HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"name\":\"client\", \"private_key\": true}", "application/json", false);
 
@@ -317,7 +317,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       Invokable<?, ?> method = method(ChefApi.class, "deleteNode", String.class);
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.<Object> of("node")));
       assertRequestLineEquals(httpRequest, "DELETE http://localhost:4000/nodes/node HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -337,7 +337,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
                   .environment("_default").build())));
 
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/nodes HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest,
             "{\"name\":\"testnode\",\"normal\":{},\"override\":{},\"default\":{},\"automatic\":{},"
@@ -360,7 +360,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
                   .environment("_default").build())));
 
       assertRequestLineEquals(httpRequest, "PUT http://localhost:4000/nodes/testnode HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest,
             "{\"name\":\"testnode\",\"normal\":{},\"override\":{},\"default\":{},\"automatic\":{},"
@@ -380,7 +380,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/nodes HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -396,7 +396,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       Invokable<?, ?> method = method(ChefApi.class, "deleteRole", String.class);
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.<Object> of("role")));
       assertRequestLineEquals(httpRequest, "DELETE http://localhost:4000/roles/role HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -414,7 +414,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of(Role.builder().name("testrole").runListElement("recipe[java]").build())));
 
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/roles HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"name\":\"testrole\",\"override_attributes\":{},\"default_attributes\":{},"
             + "\"run_list\":[\"recipe[java]\"],\"json_class\":\"Chef::Role\",\"chef_type\":\"role\"}",
@@ -434,7 +434,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of(Role.builder().name("testrole").runListElement("recipe[java]").build())));
 
       assertRequestLineEquals(httpRequest, "PUT http://localhost:4000/roles/testrole HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"name\":\"testrole\",\"override_attributes\":{},\"default_attributes\":{},"
             + "\"run_list\":[\"recipe[java]\"],\"json_class\":\"Chef::Role\",\"chef_type\":\"role\"}",
@@ -453,7 +453,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/roles HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -470,7 +470,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor
             .apply(Invocation.create(method, ImmutableList.<Object> of("databag")));
       assertRequestLineEquals(httpRequest, "DELETE http://localhost:4000/data/databag HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -487,7 +487,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.<Object> of("name")));
 
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/data HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"name\":\"name\"}", "application/json", false);
 
@@ -504,7 +504,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/data HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -520,7 +520,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       Invokable<?, ?> method = method(ChefApi.class, "deleteDatabagItem", String.class, String.class);
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method,
             ImmutableList.<Object> of("name", "databagItem")));
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -540,7 +540,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of("name", new DatabagItem("id", "100"))));
 
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/data/name HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(
             httpRequest,
@@ -564,7 +564,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of("name", new DatabagItem("id", "{\"id\": \"item1\",\"my_key\": \"my_data\"}"))));
 
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/data/name HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(
             httpRequest,
@@ -586,7 +586,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of("name", new DatabagItem("id", "{\"id\": \"id\",\"my_key\": \"my_data\"}"))));
 
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/data/name HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"id\": \"id\",\"my_key\": \"my_data\"}", "application/json", false);
 
@@ -604,7 +604,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of("name", new DatabagItem("id", "{\"my_key\": \"my_data\"}"))));
 
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/data/name HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"id\":\"id\",\"my_key\": \"my_data\"}", "application/json", false);
 
@@ -622,7 +622,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of("name", new DatabagItem("id", "{\"my_key\": \"my_data\"}"))));
 
       assertRequestLineEquals(httpRequest, "PUT http://localhost:4000/data/name/id HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
 
       assertPayloadEquals(httpRequest, "{\"id\":\"id\",\"my_key\": \"my_data\"}", "application/json", false);
@@ -640,7 +640,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.<Object> of("name")));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/data/name HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -657,7 +657,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -674,7 +674,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search/role HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -692,7 +692,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of(SearchOptions.Builder.query("text"))));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search/role?q=text HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -709,7 +709,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search/client HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -727,7 +727,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of(SearchOptions.Builder.query("text").rows(5))));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search/client?q=text&rows=5 HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -744,7 +744,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search/node HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -762,7 +762,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of(SearchOptions.Builder.query("foo:foo").start(3))));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search/node?q=foo%3Afoo&start=3 HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -779,7 +779,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.<Object> of("foo")));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search/foo HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -797,7 +797,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of("foo", SearchOptions.Builder.query("bar").sort("name DESC"))));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search/foo?q=bar&sort=name%20DESC HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -815,7 +815,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of(Resource.builder().name("test").url(URI.create("http://foo/bar")).build())));
 
       assertRequestLineEquals(httpRequest, "GET http://foo/bar HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -841,7 +841,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
    @Override
    protected Properties setupProperties() {
       Properties props = super.setupProperties();
-      props.put(Constants.PROPERTY_API_VERSION, ChefApiMetadata.DEFAULT_VERSION + "-test");
+      props.put(Constants.PROPERTY_API_VERSION, ChefApiMetadata.DEFAULT_API_VERSION + "-test");
       return props;
    }
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/chef/binders/BindHexEncodedMD5sToJsonPayloadTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/binders/BindHexEncodedMD5sToJsonPayloadTest.java b/apis/chef/src/test/java/org/jclouds/chef/binders/BindHexEncodedMD5sToJsonPayloadTest.java
index c929dad..cd40808 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/binders/BindHexEncodedMD5sToJsonPayloadTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/binders/BindHexEncodedMD5sToJsonPayloadTest.java
@@ -45,7 +45,7 @@ public class BindHexEncodedMD5sToJsonPayloadTest {
    Injector injector = Guice.createInjector(new AbstractModule() {
       @Override
       protected void configure() {
-         bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+         bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
       }
    }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java
index 42b826a..7b51f04 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java
@@ -71,7 +71,7 @@ public class GroupToBootScriptTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
             bind(String.class).annotatedWith(Names.named(CHEF_UPDATE_GEM_SYSTEM)).toInstance("true");
             bind(String.class).annotatedWith(Names.named(CHEF_UPDATE_GEMS)).toInstance("true");
          }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
index 226697f..7685a95 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
@@ -66,7 +66,7 @@ public class ParseClientFromJsonTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonTest.java
index 77c16f7..a89da9a 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonTest.java
@@ -48,7 +48,7 @@ public class ParseCookbookDefinitionFromJsonTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10Test.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10Test.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10Test.java
index 9a47c1d..0df9d64 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10Test.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10Test.java
@@ -45,7 +45,7 @@ public class ParseCookbookDefinitionFromJsonv10Test {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10Test.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10Test.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10Test.java
index 51a3f6d..b39343d 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10Test.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10Test.java
@@ -46,7 +46,7 @@ public class ParseCookbookDefinitionListFromJsonv10Test {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionFromJsonTest.java
index 438d725..9a279b4 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionFromJsonTest.java
@@ -59,7 +59,7 @@ public class ParseCookbookVersionFromJsonTest {
       injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJsonTest.java
index 797e0a6..77128d0 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJsonTest.java
@@ -48,7 +48,7 @@ public class ParseCookbookVersionsV09FromJsonTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJsonTest.java
index a0d6670..0d14c31 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJsonTest.java
@@ -48,7 +48,7 @@ public class ParseCookbookVersionsV10FromJsonTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/chef/functions/ParseDataBagItemFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseDataBagItemFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseDataBagItemFromJsonTest.java
index b8c3744..cab8d8a 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseDataBagItemFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseDataBagItemFromJsonTest.java
@@ -50,7 +50,7 @@ public class ParseDataBagItemFromJsonTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/chef/functions/ParseKeySetFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseKeySetFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseKeySetFromJsonTest.java
index 31341e5..82e6d90 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseKeySetFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseKeySetFromJsonTest.java
@@ -48,7 +48,7 @@ public class ParseKeySetFromJsonTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/chef/functions/ParseNodeFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseNodeFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseNodeFromJsonTest.java
index 57da4c4..f0b8a7d 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseNodeFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseNodeFromJsonTest.java
@@ -52,7 +52,7 @@ public class ParseNodeFromJsonTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSandboxFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSandboxFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSandboxFromJsonTest.java
index 1a0d333..781b7a6 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSandboxFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSandboxFromJsonTest.java
@@ -53,7 +53,7 @@ public class ParseSandboxFromJsonTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSearchDataBagItemFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSearchDataBagItemFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSearchDataBagItemFromJsonTest.java
index ae29e1c..c506d61 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSearchDataBagItemFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSearchDataBagItemFromJsonTest.java
@@ -46,7 +46,7 @@ public class ParseSearchDataBagItemFromJsonTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/chef/functions/ParseUploadSandboxFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseUploadSandboxFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseUploadSandboxFromJsonTest.java
index a5d2bfb..e242992 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseUploadSandboxFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseUploadSandboxFromJsonTest.java
@@ -56,7 +56,7 @@ public class ParseUploadSandboxFromJsonTest {
       injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/chef/functions/RunListForGroupTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/RunListForGroupTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/RunListForGroupTest.java
index 8da3e79..fdb1c52 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/RunListForGroupTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/RunListForGroupTest.java
@@ -49,7 +49,7 @@ public class RunListForGroupTest {
    private Injector injector = Guice.createInjector(new AbstractModule() {
       @Override
       protected void configure() {
-         bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+         bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
       }
    }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/chef/suppliers/ChefVersionSupplierTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/suppliers/ChefVersionSupplierTest.java b/apis/chef/src/test/java/org/jclouds/chef/suppliers/ChefVersionSupplierTest.java
index 7bde5ac..a32359d 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/suppliers/ChefVersionSupplierTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/suppliers/ChefVersionSupplierTest.java
@@ -16,7 +16,7 @@
  */
 package org.jclouds.chef.suppliers;
 
-import static org.jclouds.chef.suppliers.ChefVersionSupplier.DEFAULT_VERSION;
+import static org.jclouds.chef.suppliers.ChefVersionSupplier.FALLBACK_VERSION;
 import static org.testng.Assert.assertEquals;
 
 import org.testng.annotations.Test;
@@ -30,9 +30,9 @@ import org.testng.annotations.Test;
 public class ChefVersionSupplierTest {
 
    public void testReturnsDefaultVersion() {
-      assertEquals(new ChefVersionSupplier("15").get(), DEFAULT_VERSION);
-      assertEquals(new ChefVersionSupplier("0").get(), DEFAULT_VERSION);
-      assertEquals(new ChefVersionSupplier("0.").get(), DEFAULT_VERSION);
+      assertEquals(new ChefVersionSupplier("15").get(), FALLBACK_VERSION);
+      assertEquals(new ChefVersionSupplier("0").get(), FALLBACK_VERSION);
+      assertEquals(new ChefVersionSupplier("0.").get(), FALLBACK_VERSION);
    }
 
    public void testReturnsMajorVersionIfNotZero() {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/ohai/config/JMXTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/ohai/config/JMXTest.java b/apis/chef/src/test/java/org/jclouds/ohai/config/JMXTest.java
index 98b32dd..f3f12c6 100644
--- a/apis/chef/src/test/java/org/jclouds/ohai/config/JMXTest.java
+++ b/apis/chef/src/test/java/org/jclouds/ohai/config/JMXTest.java
@@ -60,7 +60,7 @@ public class JMXTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
          }
       }, new ChefParserModule(), new GsonModule(), new JMXOhaiModule() {
          @Override

http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java b/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java
index d2749b3..ca600a1 100644
--- a/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java
+++ b/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java
@@ -63,7 +63,7 @@ public class OhaiModuleTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
          }
       }, new ChefParserModule(), new GsonModule(), new OhaiModule() {
          @Override
@@ -97,7 +97,7 @@ public class OhaiModuleTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
          }
       }, new ChefParserModule(), new GsonModule(), new OhaiModule() {
          @Override


[42/50] [abbrv] git commit: Fixing compilation errors caused by Payload no longer being an InputSupplier

Posted by na...@apache.org.
Fixing compilation errors caused by Payload no longer being an InputSupplier

See 80a0256c in jclouds


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/4ef699a3
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/4ef699a3
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/4ef699a3

Branch: refs/heads/master
Commit: 4ef699a35cbddee69c9385c55ebb7ca6f837de39
Parents: 55e403d
Author: Andrew Phillips <an...@apache.org>
Authored: Mon Aug 11 08:13:40 2014 -0400
Committer: Andrew Phillips <an...@apache.org>
Committed: Mon Aug 11 15:41:34 2014 -0400

----------------------------------------------------------------------
 .../java/org/jclouds/chef/filters/SignedHeaderAuth.java   |  3 +--
 .../java/org/jclouds/chef/internal/BaseChefService.java   | 10 +++++-----
 .../jclouds/chef/functions/ParseClientFromJsonTest.java   |  8 ++++----
 3 files changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/4ef699a3/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java b/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
index cabe579..50d26a1 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
@@ -21,7 +21,6 @@ import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
 import static com.google.common.hash.Hashing.sha1;
 import static com.google.common.io.BaseEncoding.base64;
-import static com.google.common.io.ByteStreams.toByteArray;
 
 import java.io.IOException;
 import java.security.PrivateKey;
@@ -190,7 +189,7 @@ public class SignedHeaderAuth implements HttpRequestFilter {
 
    public String sign(String toSign) {
       try {
-         byte[] encrypted = toByteArray(new RSAEncryptingPayload(crypto, Payloads.newStringPayload(toSign), supplyKey.get()));
+         byte[] encrypted = ByteStreams2.toByteArrayAndClose(new RSAEncryptingPayload(crypto, Payloads.newStringPayload(toSign), supplyKey.get()).openStream());
          return base64().encode(encrypted);
       } catch (IOException e) {
          throw new HttpException("error signing request", e);

http://git-wip-us.apache.org/repos/asf/jclouds/blob/4ef699a3/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java b/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
index d390555..40a44a9 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
@@ -57,6 +57,7 @@ import org.jclouds.chef.strategy.ListNodesInEnvironment;
 import org.jclouds.chef.strategy.UpdateAutomaticAttributesOnNode;
 import org.jclouds.crypto.Crypto;
 import org.jclouds.domain.JsonBall;
+import org.jclouds.io.ByteStreams2;
 import org.jclouds.io.Payloads;
 import org.jclouds.io.payloads.RSADecryptingPayload;
 import org.jclouds.io.payloads.RSAEncryptingPayload;
@@ -67,7 +68,6 @@ import org.jclouds.scriptbuilder.domain.Statement;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Supplier;
 import com.google.common.collect.Maps;
-import com.google.common.io.ByteStreams;
 import com.google.common.io.InputSupplier;
 
 @Singleton
@@ -140,14 +140,14 @@ public class BaseChefService implements ChefService {
 
    @Override
    public byte[] encrypt(InputSupplier<? extends InputStream> supplier) throws IOException {
-      return ByteStreams.toByteArray(new RSAEncryptingPayload(crypto, Payloads.newPayload(supplier.getInput()), privateKey
-                  .get()));
+      return ByteStreams2.toByteArrayAndClose(new RSAEncryptingPayload(crypto, Payloads.newPayload(supplier.getInput()), privateKey
+                  .get()).openStream());
    }
 
    @Override
    public byte[] decrypt(InputSupplier<? extends InputStream> supplier) throws IOException {
-      return ByteStreams.toByteArray(new RSADecryptingPayload(crypto, Payloads.newPayload(supplier.getInput()), privateKey
-                  .get()));
+      return ByteStreams2.toByteArrayAndClose(new RSADecryptingPayload(crypto, Payloads.newPayload(supplier.getInput()), privateKey
+                  .get()).openStream());
    }
 
    @VisibleForTesting

http://git-wip-us.apache.org/repos/asf/jclouds/blob/4ef699a3/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
index e8bebcb..1382a6c 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
@@ -33,6 +33,7 @@ import org.jclouds.crypto.Pems;
 import org.jclouds.encryption.internal.JCECrypto;
 import org.jclouds.http.HttpResponse;
 import org.jclouds.http.functions.ParseJson;
+import org.jclouds.io.ByteStreams2;
 import org.jclouds.io.Payloads;
 import org.jclouds.io.payloads.RSADecryptingPayload;
 import org.jclouds.io.payloads.RSAEncryptingPayload;
@@ -43,7 +44,6 @@ import org.testng.annotations.Test;
 
 import com.google.common.base.Charsets;
 import com.google.common.io.ByteSource;
-import com.google.common.io.ByteStreams;
 import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
@@ -84,11 +84,11 @@ public class ParseClientFromJsonTest {
       Client user = Client.builder().certificate(certificate).orgname("jclouds").clientname("adriancole-jcloudstest")
             .name("adriancole-jcloudstest").isValidator(false).privateKey(privateKey).build();
 
-      byte[] encrypted = ByteStreams.toByteArray(new RSAEncryptingPayload(new JCECrypto(), Payloads.newPayload("fooya"), user
-            .getCertificate().getPublicKey()));
+      byte[] encrypted = ByteStreams2.toByteArrayAndClose(new RSAEncryptingPayload(new JCECrypto(), Payloads.newPayload("fooya"), user
+            .getCertificate().getPublicKey()).openStream());
 
       assertEquals(
-            ByteStreams.toByteArray(new RSADecryptingPayload(new JCECrypto(), Payloads.newPayload(encrypted), user.getPrivateKey())),
+            ByteStreams2.toByteArrayAndClose(new RSADecryptingPayload(new JCECrypto(), Payloads.newPayload(encrypted), user.getPrivateKey()).openStream()),
             "fooya".getBytes());
 
       assertEquals(


[29/50] [abbrv] git commit: Prefer Guava HttpHeaders over JAX-RS

Posted by na...@apache.org.
Prefer Guava HttpHeaders over JAX-RS

jclouds code contains more instances of the former and Guava has
additional constants like CONTENT_MD5.


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/3b7d657a
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/3b7d657a
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/3b7d657a

Branch: refs/heads/master
Commit: 3b7d657a6d1705d85d2e97dd65c085761b3a58ad
Parents: 4f22884
Author: Andrew Gaul <ga...@apache.org>
Authored: Thu May 15 02:06:22 2014 -0700
Committer: Andrew Gaul <ga...@apache.org>
Committed: Thu May 15 02:06:39 2014 -0700

----------------------------------------------------------------------
 .../test/java/org/jclouds/chef/filters/SignedHeaderAuthTest.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/3b7d657a/apis/chef/src/test/java/org/jclouds/chef/filters/SignedHeaderAuthTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/filters/SignedHeaderAuthTest.java b/apis/chef/src/test/java/org/jclouds/chef/filters/SignedHeaderAuthTest.java
index 27472ca..da67279 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/filters/SignedHeaderAuthTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/filters/SignedHeaderAuthTest.java
@@ -25,7 +25,6 @@ import java.security.PrivateKey;
 
 import javax.inject.Provider;
 import javax.ws.rs.HttpMethod;
-import javax.ws.rs.core.HttpHeaders;
 
 import org.jclouds.ContextBuilder;
 import org.jclouds.chef.ChefApiMetadata;
@@ -47,6 +46,7 @@ import com.google.common.collect.ImmutableMultimap;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.LinkedHashMultimap;
 import com.google.common.collect.Multimap;
+import com.google.common.net.HttpHeaders;
 import com.google.inject.Injector;
 import com.google.inject.Key;
 import com.google.inject.Module;


[34/50] [abbrv] git commit: Address removal of calculateMD5

Posted by na...@apache.org.
Address removal of calculateMD5


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/c0d16e79
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/c0d16e79
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/c0d16e79

Branch: refs/heads/master
Commit: c0d16e79f091efdb6c23d4e90a38013a6eddb7c3
Parents: 88a6a26
Author: Andrew Gaul <ga...@apache.org>
Authored: Sat Jun 7 21:39:21 2014 -0700
Committer: Andrew Gaul <ga...@apache.org>
Committed: Sat Jun 7 21:39:21 2014 -0700

----------------------------------------------------------------------
 .../java/org/jclouds/chef/internal/BaseChefApiLiveTest.java   | 7 +++++--
 .../ListCookbookVersionsInEnvironmentImplLiveTest.java        | 7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/c0d16e79/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
index bbc1473..2d04dcd 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
@@ -64,7 +64,9 @@ import org.testng.annotations.Test;
 import com.google.common.base.Predicate;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
+import com.google.common.hash.Hashing;
 import com.google.common.io.Closeables;
+import com.google.common.io.Files;
 import com.google.common.primitives.Bytes;
 
 /**
@@ -84,11 +86,12 @@ public abstract class BaseChefApiLiveTest<A extends ChefApi> extends BaseChefLiv
 
    public void testCreateNewCookbook() throws Exception {
       // Define the file you want in the cookbook
-      FilePayload content = Payloads.newFilePayload(new File(System.getProperty("user.dir"), "pom.xml"));
+      File file = new File(System.getProperty("user.dir"), "pom.xml");
+      FilePayload content = Payloads.newFilePayload(file);
       content.getContentMetadata().setContentType("application/x-binary");
 
       // Get an md5 so that you can see if the server already has it or not
-      Payloads.calculateMD5(content);
+      content.getContentMetadata().setContentMD5(Files.asByteSource(file).hash(Hashing.md5()).asBytes());
 
       // Note that java collections cannot effectively do equals or hashcodes on
       // byte arrays, so let's convert to a list of bytes.

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c0d16e79/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java
index d1786aa..76ecee8 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java
@@ -41,6 +41,8 @@ import java.util.List;
 
 import com.google.common.base.Predicate;
 import com.google.common.collect.ImmutableSet;
+import com.google.common.hash.Hashing;
+import com.google.common.io.Files;
 import com.google.common.primitives.Bytes;
 
 /**
@@ -94,11 +96,12 @@ public class ListCookbookVersionsInEnvironmentImplLiveTest extends BaseChefLiveT
 
    private FilePayload uploadContent(String fileName) throws Exception {
       // Define the file you want in the cookbook
-      FilePayload content = Payloads.newFilePayload(new File(System.getProperty("user.dir"), fileName));
+      File file = new File(System.getProperty("user.dir"), fileName);
+      FilePayload content = Payloads.newFilePayload(file);
       content.getContentMetadata().setContentType("application/x-binary");
 
       // Get an md5 so that you can see if the server already has it or not
-      Payloads.calculateMD5(content);
+      content.getContentMetadata().setContentMD5(Files.asByteSource(file).hash(Hashing.md5()).asBytes());
 
       // Note that java collections cannot effectively do equals or hashcodes on
       // byte arrays, so let's convert to a list of bytes.


[43/50] [abbrv] git commit: JCLOUDS-428: Use Maps with a consistent iteration order

Posted by na...@apache.org.
JCLOUDS-428: Use Maps with a consistent iteration order


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/cd4ce6b1
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/cd4ce6b1
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/cd4ce6b1

Branch: refs/heads/master
Commit: cd4ce6b1923b37c30a98f3ff5c54947c68ecf292
Parents: 4ef699a
Author: Ignasi Barrera <na...@apache.org>
Authored: Tue Aug 26 10:32:04 2014 +0200
Committer: Ignasi Barrera <na...@apache.org>
Committed: Tue Aug 26 10:32:48 2014 +0200

----------------------------------------------------------------------
 .../jclouds/chef/internal/BaseChefService.java  |  2 +-
 .../jclouds/ohai/functions/NestSlashKeys.java   |  4 +--
 .../chef/internal/BaseChefServiceTest.java      |  4 +--
 .../org/jclouds/ohai/config/OhaiModuleTest.java |  2 +-
 .../ohai/functions/NestSlashKeysTest.java       | 26 ++++++++++----------
 5 files changed, 19 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/cd4ce6b1/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java b/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
index 40a44a9..1a3b153 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
@@ -154,7 +154,7 @@ public class BaseChefService implements ChefService {
    String buildBootstrapConfiguration(BootstrapConfig bootstrapConfig) {
       checkNotNull(bootstrapConfig, "bootstrapConfig must not be null");
 
-      Map<String, Object> configMap = Maps.newHashMap();
+      Map<String, Object> configMap = Maps.newLinkedHashMap();
       configMap.put("run_list", bootstrapConfig.getRunList());
 
       if (bootstrapConfig.getEnvironment().isPresent()) {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/cd4ce6b1/apis/chef/src/main/java/org/jclouds/ohai/functions/NestSlashKeys.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/ohai/functions/NestSlashKeys.java b/apis/chef/src/main/java/org/jclouds/ohai/functions/NestSlashKeys.java
index c709463..d68ed14 100644
--- a/apis/chef/src/main/java/org/jclouds/ohai/functions/NestSlashKeys.java
+++ b/apis/chef/src/main/java/org/jclouds/ohai/functions/NestSlashKeys.java
@@ -94,7 +94,7 @@ public class NestSlashKeys implements Function<Multimap<String, Supplier<JsonBal
    @VisibleForTesting
    void mergeAsPeer(String key, JsonBall value, Map<String, JsonBall> insertionContext) {
       Map<String, JsonBall> immutableValueContext = json.fromJson(insertionContext.get(key).toString(), mapLiteral);
-      Map<String, JsonBall> valueContext = Maps.newHashMap(immutableValueContext);
+      Map<String, JsonBall> valueContext = Maps.newLinkedHashMap(immutableValueContext);
       Map<String, JsonBall> toPut = json.<Map<String, JsonBall>> fromJson(value.toString(), mapLiteral);
       Set<String> uniques = Sets.difference(toPut.keySet(), valueContext.keySet());
       for (String k : uniques) {
@@ -135,7 +135,7 @@ public class NestSlashKeys implements Function<Multimap<String, Supplier<JsonBal
 
       checkArgument(rootValue.matches("^\\{.*\\}$"), "value must be a hash: %s", rootValue);
       Map<String, JsonBall> immutableInsertionContext = json.fromJson(rootValue, mapLiteral);
-      Map<String, JsonBall> insertionContext = Maps.newHashMap(immutableInsertionContext);
+      Map<String, JsonBall> insertionContext = Maps.newLinkedHashMap(immutableInsertionContext);
       if (keyParts.size() == 1) {
          if (!insertionContext.containsKey(keyParts.get(0))) {
             insertionContext.put(keyParts.get(0), toInsert);

http://git-wip-us.apache.org/repos/asf/jclouds/blob/cd4ce6b1/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefServiceTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefServiceTest.java b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefServiceTest.java
index e763d8f..d998534 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefServiceTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefServiceTest.java
@@ -84,7 +84,7 @@ public class BaseChefServiceTest {
       BootstrapConfig bootstrapConfig = BootstrapConfig.builder().runList(runlist)
             .attributes(new JsonBall("{\"tomcat6\":{\"ssl_port\":8433}}")).build();
       String config = chefService.buildBootstrapConfiguration(bootstrapConfig);
-      assertEquals(config, "{\"tomcat6\":{\"ssl_port\":8433},\"run_list\":[\"recipe[apache2]\",\"role[webserver]\"]}");
+      assertEquals(config, "{\"run_list\":[\"recipe[apache2]\",\"role[webserver]\"],\"tomcat6\":{\"ssl_port\":8433}}");
    }
 
    public void testBuildBootstrapConfigurationWithRunlistAndAttributesAndEnvironment() {
@@ -93,7 +93,7 @@ public class BaseChefServiceTest {
             .attributes(new JsonBall("{\"tomcat6\":{\"ssl_port\":8433}}")).environment("env").build();
       String config = chefService.buildBootstrapConfiguration(bootstrapConfig);
       assertEquals(config,
-            "{\"tomcat6\":{\"ssl_port\":8433},\"environment\":\"env\",\"run_list\":[\"recipe[apache2]\",\"role[webserver]\"]}");
+            "{\"run_list\":[\"recipe[apache2]\",\"role[webserver]\"],\"environment\":\"env\",\"tomcat6\":{\"ssl_port\":8433}}");
    }
 
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/cd4ce6b1/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java b/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java
index ecc4562..9f36fe9 100644
--- a/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java
+++ b/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java
@@ -133,7 +133,7 @@ public class OhaiModuleTest {
       assertEquals(
             json.toJson(ohai.ohai.get(), new TypeLiteral<Map<String, JsonBall>>() {
             }.getType()),
-            "{\"ohai_time\":1279992919,\"platform\":\"macosx\",\"platform_version\":\"10.3.0\",\"current_user\":\"user\",\"test\":{\"prop2\":\"test2\",\"prop1\":\"test1\"},\"jvm\":{\"system\":{\"user.name\":\"user\",\"os.version\":\"10.3.0\",\"os.name\":\"Mac OS X\"}}}");
+            "{\"ohai_time\":1279992919,\"platform\":\"macosx\",\"platform_version\":\"10.3.0\",\"current_user\":\"user\",\"test\":{\"prop1\":\"test1\",\"prop2\":\"test2\"},\"jvm\":{\"system\":{\"user.name\":\"user\",\"os.version\":\"10.3.0\",\"os.name\":\"Mac OS X\"}}}");
    }
 
    static class Ohai {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/cd4ce6b1/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java b/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java
index 594ab58..f1edb7d 100644
--- a/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java
+++ b/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java
@@ -31,7 +31,7 @@ import org.testng.annotations.Test;
 
 import com.google.common.base.Supplier;
 import com.google.common.base.Suppliers;
-import com.google.common.collect.ImmutableMultimap;
+import com.google.common.collect.ImmutableListMultimap;
 import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
@@ -39,7 +39,7 @@ import com.google.inject.Injector;
 /**
  * Tests behavior of {@code NestSlashKeys}
  */
-@Test(groups = { "unit" }, sequential = true)
+@Test(groups = "unit", testName = "NestSlashKeysTest")
 public class NestSlashKeysTest {
 
    private NestSlashKeys converter;
@@ -60,56 +60,56 @@ public class NestSlashKeysTest {
    @Test
    public void testBase() {
       assertEquals(
-            json.toJson(converter.apply(ImmutableMultimap.<String, Supplier<JsonBall>> of("java",
+            json.toJson(converter.apply(ImmutableListMultimap.<String, Supplier<JsonBall>> of("java",
                   Suppliers.ofInstance(new JsonBall("java"))))), "{\"java\":\"java\"}");
    }
 
    @Test(expectedExceptions = IllegalArgumentException.class)
    public void testIllegal() {
-      json.toJson(converter.apply(ImmutableMultimap.<String, Supplier<JsonBall>> of("java",
+      json.toJson(converter.apply(ImmutableListMultimap.<String, Supplier<JsonBall>> of("java",
             Suppliers.ofInstance(new JsonBall("java")), "java/system", Suppliers.ofInstance(new JsonBall("system")))));
    }
 
    @Test
    public void testOne() {
       assertEquals(
-            json.toJson(converter.apply(ImmutableMultimap.<String, Supplier<JsonBall>> of("java",
+            json.toJson(converter.apply(ImmutableListMultimap.<String, Supplier<JsonBall>> of("java",
                   Suppliers.ofInstance(new JsonBall("{\"time\":\"time\"}")), "java/system",
                   Suppliers.ofInstance(new JsonBall("system"))))),
-            "{\"java\":{\"system\":\"system\",\"time\":\"time\"}}");
+            "{\"java\":{\"time\":\"time\",\"system\":\"system\"}}");
    }
 
    @Test
    public void testOneDuplicate() {
       assertEquals(
-            json.toJson(converter.apply(ImmutableMultimap.<String, Supplier<JsonBall>> of("java",
+            json.toJson(converter.apply(ImmutableListMultimap.<String, Supplier<JsonBall>> of("java",
                   Suppliers.ofInstance(new JsonBall("{\"time\":\"time\"}")), "java",
                   Suppliers.ofInstance(new JsonBall("{\"system\":\"system\"}"))))),
-            "{\"java\":{\"system\":\"system\",\"time\":\"time\"}}");
+            "{\"java\":{\"time\":\"time\",\"system\":\"system\"}}");
    }
 
    @Test
    public void testMerge() {
       assertEquals(
-            json.toJson(converter.apply(ImmutableMultimap.<String, Supplier<JsonBall>> of("java",
+            json.toJson(converter.apply(ImmutableListMultimap.<String, Supplier<JsonBall>> of("java",
                   Suppliers.ofInstance(new JsonBall("{\"time\":{\"1\":\"hello\"}}")), "java/time",
                   Suppliers.ofInstance(new JsonBall("{\"2\":\"goodbye\"}"))))),
-            "{\"java\":{\"time\":{\"2\":\"goodbye\",\"1\":\"hello\"}}}");
+            "{\"java\":{\"time\":{\"1\":\"hello\",\"2\":\"goodbye\"}}}");
    }
 
    @Test
    public void testMergeNestedTwice() {
       assertEquals(
-            json.toJson(converter.apply(ImmutableMultimap.<String, Supplier<JsonBall>> of("java",
+            json.toJson(converter.apply(ImmutableListMultimap.<String, Supplier<JsonBall>> of("java",
                   Suppliers.ofInstance(new JsonBall("{\"time\":{\"1\":\"hello\"}}")), "java",
                   Suppliers.ofInstance(new JsonBall("{\"time\":{\"2\":\"goodbye\"}}"))))),
-            "{\"java\":{\"time\":{\"2\":\"goodbye\",\"1\":\"hello\"}}}");
+            "{\"java\":{\"time\":{\"1\":\"hello\",\"2\":\"goodbye\"}}}");
    }
 
    @Test
    public void testReplaceList() {
       assertEquals(
-            json.toJson(converter.apply(ImmutableMultimap.<String, Supplier<JsonBall>> of("java",
+            json.toJson(converter.apply(ImmutableListMultimap.<String, Supplier<JsonBall>> of("java",
                   Suppliers.ofInstance(new JsonBall("{\"time\":{\"1\":[\"hello\"]}}")), "java/time",
                   Suppliers.ofInstance(new JsonBall("{\"1\":[\"goodbye\"]}"))))),
             "{\"java\":{\"time\":{\"1\":[\"goodbye\"]}}}");


[14/50] [abbrv] git commit: Make listCookbooksInEnvironment return an empty set on 404

Posted by na...@apache.org.
Make listCookbooksInEnvironment return an empty set on 404

Added tests to validate above.
Also factored out some duplicate code in test.


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/0e4d32b9
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/0e4d32b9
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/0e4d32b9

Branch: refs/heads/master
Commit: 0e4d32b98ec0373b679eba2301e827968f6e7590
Parents: ce1cba6
Author: Noorul Islam K M <no...@noorul.com>
Authored: Thu Sep 19 17:16:30 2013 +0530
Committer: Ignasi Barrera <na...@apache.org>
Committed: Thu Sep 19 15:48:05 2013 +0200

----------------------------------------------------------------------
 .../src/main/java/org/jclouds/chef/ChefApi.java | 11 +--
 .../org/jclouds/chef/ChefApiExpectTest.java     | 93 ++++++++------------
 2 files changed, 45 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/0e4d32b9/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java b/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
index b8b4513..5601022 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
@@ -192,7 +192,7 @@ public interface ChefApi extends Closeable {
     * 
     * @param environmentname The name of the environment to get the cookbooks
     *        from.
-    * @return The definitions of the cookbooks (URL and versions) available in
+    * @return The definitions of the cookbooks (name, URL and versions) available in
     *         the given environment.
     */
    @SinceApiVersion("0.10.0")
@@ -200,17 +200,18 @@ public interface ChefApi extends Closeable {
    @GET
    @ResponseParser(ParseCookbookDefinitionListFromJsonv10.class)
    @Path("/environments/{environmentname}/cookbooks")
-   @Fallback(NullOnNotFoundOr404.class)
+   @Fallback(EmptySetOnNotFoundOr404.class)
    Set<CookbookDefinition> listCookbooksInEnvironment(@PathParam("environmentname") String environmentName);
 
    /**
     * Lists the cookbooks that are available in the given environment, limiting
     * the number of versions returned for each cookbook.
     * 
-    * @param environmentname The name of the environment.
+    * @param environmentname The name of the environment to get the cookbooks
+    *        from.
     * @param numversions The number of cookbook versions to include in the
     *        response, where n is the number of cookbook versions.
-    * @return The definitions of the cookbooks (URL and versions) available in
+    * @return The definitions of the cookbooks (name, URL and versions) available in
     *         the given environment.
     */
    @SinceApiVersion("0.10.0")
@@ -218,7 +219,7 @@ public interface ChefApi extends Closeable {
    @GET
    @ResponseParser(ParseCookbookDefinitionListFromJsonv10.class)
    @Path("/environments/{environmentname}/cookbooks?num_versions={numversions}")
-   @Fallback(NullOnNotFoundOr404.class)
+   @Fallback(EmptySetOnNotFoundOr404.class)
    Set<CookbookDefinition> listCookbooksInEnvironment(@PathParam("environmentname") String environmentName,
          @PathParam("numversions") String numVersions);
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/0e4d32b9/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
index 65344ef..634c5da 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
@@ -45,16 +45,20 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
      provider = "chef";
    }
 
+   private HttpRequest.Builder getHttpRequestBuilder(String method, String endPoint) {
+      return HttpRequest.builder() //
+                  .method(method) //
+                  .endpoint("http://localhost:4000" + endPoint) //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
+                  .addHeader("Accept", MediaType.APPLICATION_JSON);
+   }
+
    public void testListClientsReturns2xx() {
       ChefApi api = requestSendsResponse(
-            signed(HttpRequest.builder() //
-                  .method("GET") //
-                  .endpoint("http://localhost:4000/clients") //
-                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
-                  .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
-            HttpResponse.builder().statusCode(200)
-                  .payload(payloadFromResourceWithContentType("/clients_list.json", MediaType.APPLICATION_JSON)) //
-                  .build());
+            signed(getHttpRequestBuilder("GET", "/clients").build()),
+            HttpResponse.builder().statusCode(200) //
+                        .payload(payloadFromResourceWithContentType("/clients_list.json", MediaType.APPLICATION_JSON)) //
+                        .build());
       Set<String> nodes = api.listClients();
       assertEquals(nodes.size(), 3);
       assertTrue(nodes.contains("adam"), String.format("Expected nodes to contain 'adam' but was: %s", nodes));
@@ -62,11 +66,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
 
    public void testListClientsReturns404() {
       ChefApi api = requestSendsResponse(
-            signed(HttpRequest.builder() //
-                  .method("GET") //
-                  .endpoint("http://localhost:4000/clients") //
-                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
-                  .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
+            signed(getHttpRequestBuilder("GET", "/clients").build()),
             HttpResponse.builder().statusCode(404)
                   .build());
       Set<String> clients = api.listClients();
@@ -75,11 +75,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
 
    public void testListNodesReturns2xx() {
       ChefApi api = requestSendsResponse(
-            signed(HttpRequest.builder() //
-                  .method("GET") //
-                  .endpoint("http://localhost:4000/nodes") //
-                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
-                  .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
+            signed(getHttpRequestBuilder("GET", "/nodes").build()),
             HttpResponse.builder().statusCode(200)
                   .payload(payloadFromResourceWithContentType("/nodes_list.json", MediaType.APPLICATION_JSON)) //
                   .build());
@@ -90,24 +86,15 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
 
    public void testListNodesReturns404() {
       ChefApi api = requestSendsResponse(
-            signed(HttpRequest.builder() //
-                  .method("GET") //
-                  .endpoint("http://localhost:4000/nodes") //
-                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
-                  .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
-            HttpResponse.builder().statusCode(404)
-                  .build());
+            signed(getHttpRequestBuilder("GET", "/nodes").build()),
+            HttpResponse.builder().statusCode(404).build());
       Set<String> nodes = api.listNodes();
       assertTrue(nodes.isEmpty(), String.format("Expected nodes to be empty but was: %s", nodes));
    }
    
    public void testListRecipesInEnvironmentReturns2xx() {
       ChefApi api = requestSendsResponse(
-            signed(HttpRequest.builder() //
-                  .method("GET") //
-                  .endpoint("http://localhost:4000/environments/dev/recipes") //
-                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
-                  .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
+            signed(getHttpRequestBuilder("GET", "/environments/dev/recipes").build()),
             HttpResponse.builder().statusCode(200)
                   .payload(payloadFromResourceWithContentType("/environment_recipes.json", MediaType.APPLICATION_JSON)) //
                   .build());
@@ -118,24 +105,15 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
 
    public void testListRecipesInEnvironmentReturns404() {
       ChefApi api = requestSendsResponse(
-            signed(HttpRequest.builder() //
-                  .method("GET") //
-                  .endpoint("http://localhost:4000/environments/dev/recipes") //
-                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
-                  .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
-            HttpResponse.builder().statusCode(404)
-                  .build());
+            signed(getHttpRequestBuilder("GET", "/environments/dev/recipes").build()),
+            HttpResponse.builder().statusCode(404).build());
       Set<String> recipes = api.listRecipesInEnvironment("dev");
       assertTrue(recipes.isEmpty(), String.format("Expected recipes to be empty but was: %s", recipes));
    }
 
    public void testListNodesInEnvironmentReturns2xx() {
       ChefApi api = requestSendsResponse(
-            signed(HttpRequest.builder() //
-                  .method("GET") //
-                  .endpoint("http://localhost:4000/environments/dev/nodes") //
-                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
-                  .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
+            signed(getHttpRequestBuilder("GET", "/environments/dev/nodes").build()),
             HttpResponse.builder().statusCode(200)
                   .payload(payloadFromResourceWithContentType("/nodes_list.json", MediaType.APPLICATION_JSON)) //
                   .build());
@@ -146,24 +124,15 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
 
    public void testListNodesInEnvironmentReturns404() {
       ChefApi api = requestSendsResponse(
-            signed(HttpRequest.builder() //
-                  .method("GET") //
-                  .endpoint("http://localhost:4000/environments/dev/nodes") //
-                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
-                  .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
-            HttpResponse.builder().statusCode(404)
-                  .build());
+            signed(getHttpRequestBuilder("GET", "/environments/dev/nodes").build()),
+            HttpResponse.builder().statusCode(404).build());
       Set<String> nodes = api.listNodesInEnvironment("dev");
       assertTrue(nodes.isEmpty(), String.format("Expected nodes to be empty but was: %s", nodes));
    }
 
    public void testListCookbooksInEnvironmentReturnsValidSet() {
       ChefApi api = requestSendsResponse(
-            signed(HttpRequest.builder() //
-                  .method("GET") //
-                  .endpoint("http://localhost:4000/environments/dev/cookbooks") //
-                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
-                  .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
+            signed(getHttpRequestBuilder("GET", "/environments/dev/cookbooks").build()),
             HttpResponse.builder().statusCode(200)
                   .payload(payloadFromResourceWithContentType("/env_cookbooks.json", MediaType.APPLICATION_JSON)) //
                   .build());
@@ -171,6 +140,22 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
       assertEquals(cookbooks.size(), 2);
    }
 
+   public void testListCookbooksInEnvironmentReturnsEmptySetOn404() {
+      ChefApi api = requestSendsResponse(
+            signed(getHttpRequestBuilder("GET", "/environments/dev/cookbooks").build()),
+            HttpResponse.builder().statusCode(404).build());
+      Set<CookbookDefinition> cookbooks = api.listCookbooksInEnvironment("dev");
+      assertTrue(cookbooks.isEmpty(), String.format("Expected cookbooks to be empty but was: %s", cookbooks));
+   }
+
+   public void testListCookbooksInEnvironmentWithNumVersionReturnsEmptySetOn404() {
+      ChefApi api = requestSendsResponse(
+            signed(getHttpRequestBuilder("GET", "/environments/dev/cookbooks").addQueryParam("num_versions", "2").build()),
+            HttpResponse.builder().statusCode(404).build());
+      Set<CookbookDefinition> cookbooks = api.listCookbooksInEnvironment("dev", "2");
+      assertTrue(cookbooks.isEmpty(), String.format("Expected cookbooks to be empty but was: %s", cookbooks));
+   }
+
    @Override
    protected Module createModule() {
       return new TestChefRestClientModule();


[26/50] [abbrv] git commit: Enforce no unused imports via Checkstyle

Posted by na...@apache.org.
Enforce no unused imports via Checkstyle

Removed with:

mvn checkstyle:checkstyle --quiet -Dcheckstyle.output.file=/dev/stdout -Dcheckstyle.output.format=plain | tac | while read i; do echo $i | sed -n 's/\([^:]*\):\([^:]*\):.*/sed -i \2d \1/p' | bash; done


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/f4895cc0
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/f4895cc0
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/f4895cc0

Branch: refs/heads/master
Commit: f4895cc0e2be714f6a1df824da2d0d3d1cc60275
Parents: ec1f237
Author: Andrew Gaul <ga...@apache.org>
Authored: Wed Dec 11 17:27:59 2013 -0800
Committer: Andrew Gaul <ga...@apache.org>
Committed: Wed Dec 11 17:27:59 2013 -0800

----------------------------------------------------------------------
 .../java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java  | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/f4895cc0/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java
index a0a6d08..ed5ca34 100644
--- a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java
+++ b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java
@@ -19,7 +19,6 @@ package org.jclouds.enterprisechef;
 import java.net.URI;
 import java.util.Properties;
 
-import org.jclouds.apis.ApiMetadata;
 import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.ChefContext;
 import org.jclouds.chef.config.ChefBootstrapModule;


[46/50] [abbrv] git commit: Fix drift due to unasyncing

Posted by na...@apache.org.
Fix drift due to unasyncing


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/3123f8d3
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/3123f8d3
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/3123f8d3

Branch: refs/heads/master
Commit: 3123f8d3aea38ed2494003a30c56ba5609bb937b
Parents: 2ebcc39
Author: Adrian Cole <ad...@gmail.com>
Authored: Sun Oct 5 20:12:46 2014 -0700
Committer: Adrian Cole <ad...@gmail.com>
Committed: Sun Oct 5 20:22:19 2014 -0700

----------------------------------------------------------------------
 .../jclouds/enterprisechef/EnterpriseChefApiExpectTest.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/3123f8d3/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java
index 3785cf6..7ca79f7 100644
--- a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java
+++ b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java
@@ -33,7 +33,7 @@ import org.jclouds.enterprisechef.domain.User;
 import org.jclouds.http.HttpRequest;
 import org.jclouds.http.HttpResponse;
 import org.jclouds.providers.ProviderMetadata;
-import org.jclouds.rest.ConfiguresRestClient;
+import org.jclouds.rest.ConfiguresHttpApi;
 import org.jclouds.rest.ResourceNotFoundException;
 import org.testng.annotations.Test;
 
@@ -190,11 +190,11 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
 
    @Override
    protected Module createModule() {
-      return new TestEnterpriseChefRestClientModule();
+      return new TestEnterpriseChefHttpApiModule();
    }
 
-   @ConfiguresRestClient
-   static class TestEnterpriseChefRestClientModule extends EnterpriseChefHttpApiModule {
+   @ConfiguresHttpApi
+   static class TestEnterpriseChefHttpApiModule extends EnterpriseChefHttpApiModule {
       @Override
       protected String provideTimeStamp(@TimeStamp Supplier<String> cache) {
          return "timestamp";


[05/50] [abbrv] Improved javadoc and parameter naming

Posted by na...@apache.org.
http://git-wip-us.apache.org/repos/asf/jclouds/blob/174531ed/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java b/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java
index ed73769..6d26cb6 100644
--- a/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java
+++ b/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java
@@ -52,7 +52,7 @@ public class NestSlashKeysTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
       converter = injector.getInstance(NestSlashKeys.class);


[28/50] [abbrv] git commit: Updating to 1.8.0-SNAPSHOT

Posted by na...@apache.org.
Updating to 1.8.0-SNAPSHOT


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/4f22884c
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/4f22884c
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/4f22884c

Branch: refs/heads/master
Commit: 4f22884c4842a2fc838b2afd2fe8ad37a79d953c
Parents: 4375bda
Author: Andrew Bayer <an...@gmail.com>
Authored: Tue Dec 17 11:51:11 2013 -0800
Committer: Andrew Bayer <an...@gmail.com>
Committed: Tue Dec 17 11:51:11 2013 -0800

----------------------------------------------------------------------
 apis/chef/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/4f22884c/apis/chef/pom.xml
----------------------------------------------------------------------
diff --git a/apis/chef/pom.xml b/apis/chef/pom.xml
index fec3d8a..74780d2 100644
--- a/apis/chef/pom.xml
+++ b/apis/chef/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.jclouds.chef</groupId>
     <artifactId>chef-project</artifactId>
-    <version>1.7.0-SNAPSHOT</version>
+    <version>1.8.0-SNAPSHOT</version>
     <relativePath>../project/pom.xml</relativePath>
   </parent>
   <groupId>org.apache.jclouds.api</groupId>


[02/50] [abbrv] Cleaned up ChefApi and ChefService interfaces

Posted by na...@apache.org.
http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
index 33d6a98..7cf9c40 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
@@ -83,7 +83,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of("0189e76ccc476701d6b374e5a1a27347", true)));
       assertRequestLineEquals(httpRequest,
             "PUT http://localhost:4000/sandboxes/0189e76ccc476701d6b374e5a1a27347 HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"is_completed\":true}", "application/json", false);
 
@@ -95,14 +95,14 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
 
    }
 
-   public void testGetUploadSandboxForChecksums() throws SecurityException, NoSuchMethodException, IOException {
-      Invokable<?, ?> method = method(ChefApi.class, "getUploadSandboxForChecksums", Set.class);
+   public void testCreateUploadSandboxForChecksums() throws SecurityException, NoSuchMethodException, IOException {
+      Invokable<?, ?> method = method(ChefApi.class, "createUploadSandboxForChecksums", Set.class);
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList
             .<Object> of(ImmutableSet.of(asList(base16().lowerCase().decode("0189e76ccc476701d6b374e5a1a27347")),
                   asList(base16().lowerCase().decode("0c5ecd7788cf4f6c7de2a57193897a6c")), asList(base16().lowerCase()
                         .decode("1dda05ed139664f1f89b9dec482b77c0"))))));
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/sandboxes HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest,
             "{\"checksums\":{\"0189e76ccc476701d6b374e5a1a27347\":null,\"0c5ecd7788cf4f6c7de2a57193897a6c\":null,"
@@ -120,7 +120,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method,
             ImmutableList.<Object> of(URI.create("http://foo/bar"), new StringPayload("{\"foo\": \"bar\"}"))));
       assertRequestLineEquals(httpRequest, "PUT http://foo/bar HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"foo\": \"bar\"}", "application/x-binary", false);
 
@@ -137,7 +137,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method,
             ImmutableList.<Object> of("cookbook", "1.0.0")));
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/cookbooks/cookbook/1.0.0 HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -154,7 +154,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method,
             ImmutableList.<Object> of("cookbook", "1.0.0")));
       assertRequestLineEquals(httpRequest, "DELETE http://localhost:4000/cookbooks/cookbook/1.0.0 HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -173,7 +173,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of("cookbook", "1.0.1", CookbookVersion.builder("cookbook", "1.0.1").build())));
 
       assertRequestLineEquals(httpRequest, "PUT http://localhost:4000/cookbooks/cookbook/1.0.1 HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest,
             "{\"name\":\"cookbook-1.0.1\",\"definitions\":[],\"attributes\":[],\"files\":[],"
@@ -197,7 +197,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/cookbooks HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -209,13 +209,13 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
 
    }
 
-   public void testGetVersionsOfCookbook() throws SecurityException, NoSuchMethodException, IOException {
-      Invokable<?, ?> method = method(ChefApi.class, "getVersionsOfCookbook", String.class);
+   public void testListVersionsOfCookbook() throws SecurityException, NoSuchMethodException, IOException {
+      Invokable<?, ?> method = method(ChefApi.class, "listVersionsOfCookbook", String.class);
       GeneratedHttpRequest httpRequest = processor
             .apply(Invocation.create(method, ImmutableList.<Object> of("apache2")));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/cookbooks/apache2 HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -232,7 +232,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor
             .apply(Invocation.create(method, ImmutableList.<Object> of("client")));
       assertRequestLineEquals(httpRequest, "DELETE http://localhost:4000/clients/client HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -249,7 +249,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.<Object> of("api")));
 
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/clients HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"name\":\"api\"}", "application/json", false);
 
@@ -267,7 +267,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of("api", CreateClientOptions.Builder.admin())));
 
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/clients HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"name\":\"api\",\"admin\":true}", "application/json", false);
 
@@ -284,7 +284,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/clients HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -301,7 +301,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor
             .apply(Invocation.create(method, ImmutableList.<Object> of("client")));
       assertRequestLineEquals(httpRequest, "PUT http://localhost:4000/clients/client HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"name\":\"client\", \"private_key\": true}", "application/json", false);
 
@@ -317,7 +317,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       Invokable<?, ?> method = method(ChefApi.class, "deleteNode", String.class);
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.<Object> of("node")));
       assertRequestLineEquals(httpRequest, "DELETE http://localhost:4000/nodes/node HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -337,7 +337,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
                   .environment("_default").build())));
 
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/nodes HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest,
             "{\"name\":\"testnode\",\"normal\":{},\"override\":{},\"default\":{},\"automatic\":{},"
@@ -360,7 +360,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
                   .environment("_default").build())));
 
       assertRequestLineEquals(httpRequest, "PUT http://localhost:4000/nodes/testnode HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest,
             "{\"name\":\"testnode\",\"normal\":{},\"override\":{},\"default\":{},\"automatic\":{},"
@@ -380,7 +380,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/nodes HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -396,7 +396,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       Invokable<?, ?> method = method(ChefApi.class, "deleteRole", String.class);
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.<Object> of("role")));
       assertRequestLineEquals(httpRequest, "DELETE http://localhost:4000/roles/role HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -414,7 +414,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of(Role.builder().name("testrole").runListElement("recipe[java]").build())));
 
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/roles HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"name\":\"testrole\",\"override_attributes\":{},\"default_attributes\":{},"
             + "\"run_list\":[\"recipe[java]\"],\"json_class\":\"Chef::Role\",\"chef_type\":\"role\"}",
@@ -434,7 +434,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of(Role.builder().name("testrole").runListElement("recipe[java]").build())));
 
       assertRequestLineEquals(httpRequest, "PUT http://localhost:4000/roles/testrole HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"name\":\"testrole\",\"override_attributes\":{},\"default_attributes\":{},"
             + "\"run_list\":[\"recipe[java]\"],\"json_class\":\"Chef::Role\",\"chef_type\":\"role\"}",
@@ -453,7 +453,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/roles HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -470,7 +470,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor
             .apply(Invocation.create(method, ImmutableList.<Object> of("databag")));
       assertRequestLineEquals(httpRequest, "DELETE http://localhost:4000/data/databag HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -487,7 +487,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.<Object> of("name")));
 
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/data HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"name\":\"name\"}", "application/json", false);
 
@@ -504,7 +504,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/data HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -520,7 +520,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       Invokable<?, ?> method = method(ChefApi.class, "deleteDatabagItem", String.class, String.class);
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method,
             ImmutableList.<Object> of("name", "databagItem")));
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -540,7 +540,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of("name", new DatabagItem("id", "100"))));
 
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/data/name HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(
             httpRequest,
@@ -564,7 +564,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of("name", new DatabagItem("id", "{\"id\": \"item1\",\"my_key\": \"my_data\"}"))));
 
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/data/name HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(
             httpRequest,
@@ -586,7 +586,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of("name", new DatabagItem("id", "{\"id\": \"id\",\"my_key\": \"my_data\"}"))));
 
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/data/name HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"id\": \"id\",\"my_key\": \"my_data\"}", "application/json", false);
 
@@ -604,7 +604,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of("name", new DatabagItem("id", "{\"my_key\": \"my_data\"}"))));
 
       assertRequestLineEquals(httpRequest, "POST http://localhost:4000/data/name HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, "{\"id\":\"id\",\"my_key\": \"my_data\"}", "application/json", false);
 
@@ -622,7 +622,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of("name", new DatabagItem("id", "{\"my_key\": \"my_data\"}"))));
 
       assertRequestLineEquals(httpRequest, "PUT http://localhost:4000/data/name/id HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
 
       assertPayloadEquals(httpRequest, "{\"id\":\"id\",\"my_key\": \"my_data\"}", "application/json", false);
@@ -640,7 +640,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.<Object> of("name")));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/data/name HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -657,7 +657,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -674,7 +674,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search/role HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -692,7 +692,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of(SearchOptions.Builder.query("text"))));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search/role?q=text HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -709,7 +709,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search/client HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -727,7 +727,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of(SearchOptions.Builder.query("text").rows(5))));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search/client?q=text&rows=5 HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -744,7 +744,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search/node HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -762,7 +762,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of(SearchOptions.Builder.query("foo:foo").start(3))));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search/node?q=foo%3Afoo&start=3 HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -774,12 +774,12 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
 
    }
 
-   public void testSearchDatabag() throws SecurityException, NoSuchMethodException, IOException {
-      Invokable<?, ?> method = method(ChefApi.class, "searchDatabag", String.class);
+   public void testSearchDatabagItems() throws SecurityException, NoSuchMethodException, IOException {
+      Invokable<?, ?> method = method(ChefApi.class, "searchDatabagItems", String.class);
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.<Object> of("foo")));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search/foo HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -791,13 +791,13 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
 
    }
 
-   public void testSearchDatabagWithOptions() throws SecurityException, NoSuchMethodException, IOException {
-      Invokable<?, ?> method = method(ChefApi.class, "searchDatabag", String.class, SearchOptions.class);
+   public void testSearchDatabagItemsWithOptions() throws SecurityException, NoSuchMethodException, IOException {
+      Invokable<?, ?> method = method(ChefApi.class, "searchDatabagItems", String.class, SearchOptions.class);
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method,
             ImmutableList.<Object> of("foo", SearchOptions.Builder.query("bar").sort("name DESC"))));
 
       assertRequestLineEquals(httpRequest, "GET http://localhost:4000/search/foo?q=bar&sort=name%20DESC HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -815,7 +815,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
             ImmutableList.<Object> of(Resource.builder().name("test").url(URI.create("http://foo/bar")).build())));
 
       assertRequestLineEquals(httpRequest, "GET http://foo/bar HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApi.VERSION
+      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_VERSION
             + "-test\n");
       assertPayloadEquals(httpRequest, null, null, false);
 
@@ -841,7 +841,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
    @Override
    protected Properties setupProperties() {
       Properties props = super.setupProperties();
-      props.put(Constants.PROPERTY_API_VERSION, ChefApi.VERSION + "-test");
+      props.put(Constants.PROPERTY_API_VERSION, ChefApiMetadata.DEFAULT_VERSION + "-test");
       return props;
    }
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/binders/BindHexEncodedMD5sToJsonPayloadTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/binders/BindHexEncodedMD5sToJsonPayloadTest.java b/apis/chef/src/test/java/org/jclouds/chef/binders/BindHexEncodedMD5sToJsonPayloadTest.java
index 282e68e..c929dad 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/binders/BindHexEncodedMD5sToJsonPayloadTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/binders/BindHexEncodedMD5sToJsonPayloadTest.java
@@ -24,7 +24,7 @@ import java.io.File;
 
 import javax.ws.rs.HttpMethod;
 
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.http.HttpRequest;
 import org.jclouds.json.config.GsonModule;
@@ -45,7 +45,7 @@ public class BindHexEncodedMD5sToJsonPayloadTest {
    Injector injector = Guice.createInjector(new AbstractModule() {
       @Override
       protected void configure() {
-         bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+         bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
       }
    }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java
index bbfb4bf..42b826a 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java
@@ -28,7 +28,7 @@ import java.io.IOException;
 import java.net.URI;
 import java.security.PrivateKey;
 
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefBootstrapModule;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.chef.domain.DatabagItem;
@@ -71,7 +71,7 @@ public class GroupToBootScriptTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
             bind(String.class).annotatedWith(Names.named(CHEF_UPDATE_GEM_SYSTEM)).toInstance("true");
             bind(String.class).annotatedWith(Names.named(CHEF_UPDATE_GEMS)).toInstance("true");
          }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
index 355d9a4..226697f 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
@@ -24,7 +24,7 @@ import java.security.cert.CertificateException;
 import java.security.cert.X509Certificate;
 import java.security.spec.InvalidKeySpecException;
 
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.chef.domain.Client;
 import org.jclouds.crypto.Crypto;
@@ -66,7 +66,7 @@ public class ParseClientFromJsonTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonTest.java
index 9f97a1c..77c16f7 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonTest.java
@@ -20,7 +20,7 @@ import static org.testng.Assert.assertEquals;
 
 import java.io.IOException;
 
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.http.HttpResponse;
 import org.jclouds.json.config.GsonModule;
@@ -48,7 +48,7 @@ public class ParseCookbookDefinitionFromJsonTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10Test.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10Test.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10Test.java
index 987e45a..9a47c1d 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10Test.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10Test.java
@@ -22,7 +22,7 @@ import java.io.IOException;
 import java.net.URI;
 import java.net.URISyntaxException;
 
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.chef.domain.CookbookDefinition;
 import org.jclouds.http.HttpResponse;
@@ -45,7 +45,7 @@ public class ParseCookbookDefinitionFromJsonv10Test {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10Test.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10Test.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10Test.java
index d2cc882..51a3f6d 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10Test.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10Test.java
@@ -22,7 +22,7 @@ import java.io.IOException;
 import java.net.URI;
 import java.net.URISyntaxException;
 
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.chef.domain.CookbookDefinition;
 import org.jclouds.http.HttpResponse;
@@ -46,7 +46,7 @@ public class ParseCookbookDefinitionListFromJsonv10Test {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionFromJsonTest.java
index c1f21de..438d725 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionFromJsonTest.java
@@ -22,7 +22,7 @@ import static org.testng.Assert.assertEquals;
 import java.io.IOException;
 import java.net.URI;
 
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.chef.domain.CookbookVersion;
 import org.jclouds.chef.domain.Metadata;
@@ -59,7 +59,7 @@ public class ParseCookbookVersionFromJsonTest {
       injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJsonTest.java
index bd6552c..797e0a6 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJsonTest.java
@@ -20,7 +20,7 @@ import static org.testng.Assert.assertEquals;
 
 import java.io.IOException;
 
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.http.HttpResponse;
 import org.jclouds.json.config.GsonModule;
@@ -48,7 +48,7 @@ public class ParseCookbookVersionsV09FromJsonTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJsonTest.java
index ea781f8..a0d6670 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJsonTest.java
@@ -20,7 +20,7 @@ import static org.testng.Assert.assertEquals;
 
 import java.io.IOException;
 
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.http.HttpResponse;
 import org.jclouds.json.config.GsonModule;
@@ -48,7 +48,7 @@ public class ParseCookbookVersionsV10FromJsonTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/functions/ParseDataBagItemFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseDataBagItemFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseDataBagItemFromJsonTest.java
index 14b342d..b8c3744 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseDataBagItemFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseDataBagItemFromJsonTest.java
@@ -20,7 +20,7 @@ import static org.testng.Assert.assertEquals;
 
 import java.io.IOException;
 
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.chef.domain.DatabagItem;
 import org.jclouds.http.HttpResponse;
@@ -50,7 +50,7 @@ public class ParseDataBagItemFromJsonTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/functions/ParseKeySetFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseKeySetFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseKeySetFromJsonTest.java
index cc0c942..31341e5 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseKeySetFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseKeySetFromJsonTest.java
@@ -20,7 +20,7 @@ import static org.testng.Assert.assertEquals;
 
 import java.io.IOException;
 
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.http.HttpResponse;
 import org.jclouds.json.config.GsonModule;
@@ -48,7 +48,7 @@ public class ParseKeySetFromJsonTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/functions/ParseNodeFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseNodeFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseNodeFromJsonTest.java
index 5f825dd..57da4c4 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseNodeFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseNodeFromJsonTest.java
@@ -20,7 +20,7 @@ import static org.testng.Assert.assertEquals;
 
 import java.io.IOException;
 
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.chef.domain.Node;
 import org.jclouds.domain.JsonBall;
@@ -52,7 +52,7 @@ public class ParseNodeFromJsonTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSandboxFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSandboxFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSandboxFromJsonTest.java
index 13843ee..1a0d333 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSandboxFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSandboxFromJsonTest.java
@@ -20,7 +20,7 @@ import static org.testng.Assert.assertEquals;
 
 import java.io.IOException;
 
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.chef.domain.Sandbox;
 import org.jclouds.date.DateService;
@@ -53,7 +53,7 @@ public class ParseSandboxFromJsonTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSearchDataBagItemFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSearchDataBagItemFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSearchDataBagItemFromJsonTest.java
index 173fa0f..ae29e1c 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSearchDataBagItemFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSearchDataBagItemFromJsonTest.java
@@ -20,7 +20,7 @@ import static org.testng.Assert.assertEquals;
 
 import java.io.IOException;
 
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.chef.domain.DatabagItem;
 import org.jclouds.chef.domain.SearchResult;
@@ -46,7 +46,7 @@ public class ParseSearchDataBagItemFromJsonTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/functions/ParseUploadSandboxFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseUploadSandboxFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseUploadSandboxFromJsonTest.java
index 03e61ca..a5d2bfb 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseUploadSandboxFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseUploadSandboxFromJsonTest.java
@@ -23,7 +23,7 @@ import static org.testng.Assert.assertEquals;
 import java.io.IOException;
 import java.net.URI;
 
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.chef.domain.ChecksumStatus;
 import org.jclouds.chef.domain.UploadSandbox;
@@ -56,7 +56,7 @@ public class ParseUploadSandboxFromJsonTest {
       injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/functions/RunListForGroupTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/RunListForGroupTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/RunListForGroupTest.java
index 3bb2f99..8da3e79 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/RunListForGroupTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/RunListForGroupTest.java
@@ -25,6 +25,7 @@ import static org.testng.Assert.assertEquals;
 import java.io.IOException;
 
 import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.chef.domain.Client;
 import org.jclouds.chef.domain.DatabagItem;
@@ -48,7 +49,7 @@ public class RunListForGroupTest {
    private Injector injector = Guice.createInjector(new AbstractModule() {
       @Override
       protected void configure() {
-         bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+         bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
       }
    }, new ChefParserModule(), new GsonModule());
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
index 0cd9562..84cc092 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
@@ -77,7 +77,7 @@ public abstract class BaseChefApiLiveTest<A extends ChefApi> extends BaseChefLiv
 
    // It may take a bit until the search index is populated
    protected int maxWaitForIndexInMs = 60000;
-   
+
    // The id of the data bag item used in search tests
    private String databagitemId;
 
@@ -94,7 +94,7 @@ public abstract class BaseChefApiLiveTest<A extends ChefApi> extends BaseChefLiv
       List<Byte> md5 = Bytes.asList(content.getContentMetadata().getContentMD5());
 
       // Request an upload site for this file
-      UploadSandbox site = api.getUploadSandboxForChecksums(ImmutableSet.of(md5));
+      UploadSandbox site = api.createUploadSandboxForChecksums(ImmutableSet.of(md5));
       assertTrue(site.getChecksums().containsKey(md5), md5 + " not in " + site.getChecksums());
 
       try {
@@ -135,10 +135,10 @@ public abstract class BaseChefApiLiveTest<A extends ChefApi> extends BaseChefLiv
       assertFalse(cookbookNames.isEmpty(), "No cookbooks were found");
 
       for (String cookbookName : cookbookNames) {
-         Set<String> versions = api.getVersionsOfCookbook(cookbookName);
+         Set<String> versions = api.listVersionsOfCookbook(cookbookName);
          assertFalse(versions.isEmpty(), "There are no versions of the cookbook: " + cookbookName);
 
-         for (String version : api.getVersionsOfCookbook(cookbookName)) {
+         for (String version : api.listVersionsOfCookbook(cookbookName)) {
             CookbookVersion cookbook = api.getCookbook(cookbookName, version);
             assertNotNull(cookbook, "Could not get cookbook: " + cookbookName);
          }
@@ -390,7 +390,7 @@ public abstract class BaseChefApiLiveTest<A extends ChefApi> extends BaseChefLiv
 
    @Test(dependsOnMethods = { "testListSearchIndexes", "testCreateDatabagItem" })
    public void testSearchDatabag() throws Exception {
-      SearchResult<? extends DatabagItem> results = api.searchDatabag(PREFIX);
+      SearchResult<? extends DatabagItem> results = api.searchDatabagItems(PREFIX);
       assertNotNull(results, "Data bag item result list should not be null");
    }
 
@@ -399,7 +399,7 @@ public abstract class BaseChefApiLiveTest<A extends ChefApi> extends BaseChefLiv
       Predicate<SearchOptions> waitForIndex = retry(new Predicate<SearchOptions>() {
          @Override
          public boolean apply(SearchOptions input) {
-            SearchResult<? extends DatabagItem> results = api.searchDatabag(PREFIX, input);
+            SearchResult<? extends DatabagItem> results = api.searchDatabagItems(PREFIX, input);
             assertNotNull(results);
             if (results.size() > 0) {
                assertEquals(results.size(), 1);
@@ -418,7 +418,7 @@ public abstract class BaseChefApiLiveTest<A extends ChefApi> extends BaseChefLiv
 
    @Test(expectedExceptions = ResourceNotFoundException.class, dependsOnMethods = "testListSearchIndexes")
    public void testSearchDatabagNotFound() throws Exception {
-      SearchResult<? extends DatabagItem> results = api.searchDatabag("whoopie");
+      SearchResult<? extends DatabagItem> results = api.searchDatabagItems("whoopie");
       assertNotNull(results, "Data bag item result list should not be null");
    }
 
@@ -469,7 +469,7 @@ public abstract class BaseChefApiLiveTest<A extends ChefApi> extends BaseChefLiv
 
    @Test(dependsOnMethods = "testCreateEnvironment")
    public void testListEnvironmentRecipes() {
-      Set<String> recipeList = api.listEnvironmentRecipes(PREFIX);
+      Set<String> recipeList = api.listRecipesInEnvironment(PREFIX);
       assertTrue(!recipeList.isEmpty());
    }
 
@@ -479,7 +479,7 @@ public abstract class BaseChefApiLiveTest<A extends ChefApi> extends BaseChefLiv
       api.createNode(Node.builder().name(ENV_NODE).runListElement("role[" + PREFIX + "]").environment(PREFIX).build());
       Node node = api.getNode(ENV_NODE);
       assertNotNull(node, "Created node should not be null");
-      Set<String> nodeList = api.listEnvironmentNodes(PREFIX);
+      Set<String> nodeList = api.listNodesInEnvironment(PREFIX);
       assertTrue(!nodeList.isEmpty());
    }
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/chef/internal/BaseStubbedOhaiLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseStubbedOhaiLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseStubbedOhaiLiveTest.java
index 458fd02..b057e68 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseStubbedOhaiLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseStubbedOhaiLiveTest.java
@@ -22,8 +22,8 @@ import org.jclouds.apis.ApiMetadata;
 import org.jclouds.chef.ChefApi;
 import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefBootstrapModule;
-import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.chef.config.ChefHttpApiModule;
+import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.domain.JsonBall;
 import org.jclouds.ohai.AutomaticSupplier;
 import org.jclouds.ohai.config.ConfiguresOhai;

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/ohai/config/JMXTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/ohai/config/JMXTest.java b/apis/chef/src/test/java/org/jclouds/ohai/config/JMXTest.java
index 94571d9..98b32dd 100644
--- a/apis/chef/src/test/java/org/jclouds/ohai/config/JMXTest.java
+++ b/apis/chef/src/test/java/org/jclouds/ohai/config/JMXTest.java
@@ -26,7 +26,7 @@ import java.util.Map;
 
 import javax.inject.Inject;
 
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.domain.JsonBall;
 import org.jclouds.json.Json;
@@ -60,7 +60,7 @@ public class JMXTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
          }
       }, new ChefParserModule(), new GsonModule(), new JMXOhaiModule() {
          @Override

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java b/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java
index e2bed2e..d2749b3 100644
--- a/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java
+++ b/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java
@@ -25,7 +25,7 @@ import java.util.Properties;
 
 import javax.inject.Inject;
 
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.domain.JsonBall;
 import org.jclouds.json.Json;
@@ -63,7 +63,7 @@ public class OhaiModuleTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
          }
       }, new ChefParserModule(), new GsonModule(), new OhaiModule() {
          @Override
@@ -97,7 +97,7 @@ public class OhaiModuleTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
          }
       }, new ChefParserModule(), new GsonModule(), new OhaiModule() {
          @Override

http://git-wip-us.apache.org/repos/asf/jclouds/blob/353651d3/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java b/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java
index 27c1919..ed73769 100644
--- a/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java
+++ b/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java
@@ -20,7 +20,7 @@ import static org.testng.Assert.assertEquals;
 
 import java.io.IOException;
 
-import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.ChefApiMetadata;
 import org.jclouds.chef.config.ChefParserModule;
 import org.jclouds.domain.JsonBall;
 import org.jclouds.json.Json;
@@ -52,7 +52,7 @@ public class NestSlashKeysTest {
       Injector injector = Guice.createInjector(new AbstractModule() {
          @Override
          protected void configure() {
-            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApi.VERSION);
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
          }
       }, new ChefParserModule(), new GsonModule());
       converter = injector.getInstance(NestSlashKeys.class);


[07/50] [abbrv] git commit: JCLOUDS-272: Migrate unit tests from ChefApiTest to ChefApiExpectTest.

Posted by na...@apache.org.
JCLOUDS-272: Migrate unit tests from ChefApiTest to ChefApiExpectTest.


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/58784cc4
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/58784cc4
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/58784cc4

Branch: refs/heads/master
Commit: 58784cc492c519afb460987daa8f4e2931035636
Parents: 174531e
Author: Noorul Islam K M <no...@noorul.com>
Authored: Mon Sep 9 11:13:11 2013 +0530
Committer: Ignasi Barrera <na...@apache.org>
Committed: Mon Sep 16 15:06:24 2013 +0200

----------------------------------------------------------------------
 .../org/jclouds/chef/ChefApiExpectTest.java     | 78 +++++++++++++++++---
 .../test/java/org/jclouds/chef/ChefApiTest.java | 34 ---------
 apis/chef/src/test/resources/clients_list.json  |  5 ++
 .../src/test/resources/environment_nodes.json   |  5 --
 apis/chef/src/test/resources/nodes_list.json    |  5 ++
 5 files changed, 77 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/58784cc4/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
index f19b2ef..7706609 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
@@ -44,7 +44,63 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
      provider = "chef";
    }
 
-   public void testListEnvironmentRecipesReturns2xx() {
+   public void testListClientsReturns2xx() {
+      ChefApi api = requestSendsResponse(
+            signed(HttpRequest.builder() //
+                  .method("GET") //
+                  .endpoint("http://localhost:4000/clients") //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
+                  .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
+            HttpResponse.builder().statusCode(200)
+                  .payload(payloadFromResourceWithContentType("/clients_list.json", MediaType.APPLICATION_JSON)) //
+                  .build());
+      Set<String> nodes = api.listClients();
+      assertEquals(nodes.size(), 3);
+      assertTrue(nodes.contains("adam"), String.format("Expected nodes to contain 'adam' but was: %s", nodes));
+   }
+
+   public void testListClientsReturns404() {
+      ChefApi api = requestSendsResponse(
+            signed(HttpRequest.builder() //
+                  .method("GET") //
+                  .endpoint("http://localhost:4000/clients") //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
+                  .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
+            HttpResponse.builder().statusCode(404)
+                  .build());
+      Set<String> clients = api.listClients();
+      assertTrue(clients.isEmpty(), String.format("Expected clients to be empty but was: %s", clients));
+   }
+
+   public void testListNodesReturns2xx() {
+      ChefApi api = requestSendsResponse(
+            signed(HttpRequest.builder() //
+                  .method("GET") //
+                  .endpoint("http://localhost:4000/nodes") //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
+                  .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
+            HttpResponse.builder().statusCode(200)
+                  .payload(payloadFromResourceWithContentType("/nodes_list.json", MediaType.APPLICATION_JSON)) //
+                  .build());
+      Set<String> nodes = api.listNodes();
+      assertEquals(nodes.size(), 3);
+      assertTrue(nodes.contains("blah"), String.format("Expected nodes to contain 'blah' but was: %s", nodes));
+   }
+
+   public void testListNodesReturns404() {
+      ChefApi api = requestSendsResponse(
+            signed(HttpRequest.builder() //
+                  .method("GET") //
+                  .endpoint("http://localhost:4000/nodes") //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
+                  .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
+            HttpResponse.builder().statusCode(404)
+                  .build());
+      Set<String> nodes = api.listNodes();
+      assertTrue(nodes.isEmpty(), String.format("Expected nodes to be empty but was: %s", nodes));
+   }
+   
+   public void testListRecipesInEnvironmentReturns2xx() {
       ChefApi api = requestSendsResponse(
             signed(HttpRequest.builder() //
                   .method("GET") //
@@ -56,10 +112,10 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
                   .build());
       Set<String> recipes = api.listRecipesInEnvironment("dev");
       assertEquals(recipes.size(), 3);
-      assertTrue(recipes.contains("apache2"));
+      assertTrue(recipes.contains("apache2"), String.format("Expected recipes to contain 'apache2' but was: %s", recipes));
    }
 
-   public void testListEnvironmentRecipesReturns404() {
+   public void testListRecipesInEnvironmentReturns404() {
       ChefApi api = requestSendsResponse(
             signed(HttpRequest.builder() //
                   .method("GET") //
@@ -68,11 +124,11 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
                   .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
             HttpResponse.builder().statusCode(404)
                   .build());
-
-      assertTrue(api.listRecipesInEnvironment("dev").isEmpty());
+      Set<String> recipes = api.listRecipesInEnvironment("dev");
+      assertTrue(recipes.isEmpty(), String.format("Expected recipes to be empty but was: %s", recipes));
    }
 
-   public void testListEnvironmentNodesReturns2xx() {
+   public void testListNodesInEnvironmentReturns2xx() {
       ChefApi api = requestSendsResponse(
             signed(HttpRequest.builder() //
                   .method("GET") //
@@ -80,14 +136,14 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
                   .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
                   .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
             HttpResponse.builder().statusCode(200)
-                  .payload(payloadFromResourceWithContentType("/environment_nodes.json", MediaType.APPLICATION_JSON)) //
+                  .payload(payloadFromResourceWithContentType("/nodes_list.json", MediaType.APPLICATION_JSON)) //
                   .build());
       Set<String> nodes = api.listNodesInEnvironment("dev");
       assertEquals(nodes.size(), 3);
-      assertTrue(nodes.contains("blah"));
+      assertTrue(nodes.contains("blah"), String.format("Expected nodes to contain 'blah' but was: %s", nodes));
    }
 
-   public void testListEnvironmentNodesReturns404() {
+   public void testListNodesInEnvironmentReturns404() {
       ChefApi api = requestSendsResponse(
             signed(HttpRequest.builder() //
                   .method("GET") //
@@ -96,8 +152,8 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
                   .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
             HttpResponse.builder().statusCode(404)
                   .build());
-
-      assertTrue(api.listNodesInEnvironment("dev").isEmpty());
+      Set<String> nodes = api.listNodesInEnvironment("dev");
+      assertTrue(nodes.isEmpty(), String.format("Expected nodes to be empty but was: %s", nodes));
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/jclouds/blob/58784cc4/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
index 5ca105d..e6e2c66 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
@@ -279,23 +279,6 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
 
    }
 
-   public void testListClients() throws SecurityException, NoSuchMethodException, IOException {
-      Invokable<?, ?> method = method(ChefApi.class, "listClients");
-      GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
-
-      assertRequestLineEquals(httpRequest, "GET http://localhost:4000/clients HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
-            + "-test\n");
-      assertPayloadEquals(httpRequest, null, null, false);
-
-      assertResponseParserClassEquals(method, httpRequest, ParseKeySetFromJson.class);
-      assertSaxResponseParserClassEquals(method, null);
-      assertFallbackClassEquals(method, EmptySetOnNotFoundOr404.class);
-
-      checkFilters(httpRequest);
-
-   }
-
    public void testGenerateKeyForClient() throws SecurityException, NoSuchMethodException, IOException {
       Invokable<?, ?> method = method(ChefApi.class, "generateKeyForClient", String.class);
       GeneratedHttpRequest httpRequest = processor
@@ -375,23 +358,6 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
 
    }
 
-   public void testListNodes() throws SecurityException, NoSuchMethodException, IOException {
-      Invokable<?, ?> method = method(ChefApi.class, "listNodes");
-      GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.of()));
-
-      assertRequestLineEquals(httpRequest, "GET http://localhost:4000/nodes HTTP/1.1");
-      assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\nX-Chef-Version: " + ChefApiMetadata.DEFAULT_API_VERSION
-            + "-test\n");
-      assertPayloadEquals(httpRequest, null, null, false);
-
-      assertResponseParserClassEquals(method, httpRequest, ParseKeySetFromJson.class);
-      assertSaxResponseParserClassEquals(method, null);
-      assertFallbackClassEquals(method, EmptySetOnNotFoundOr404.class);
-
-      checkFilters(httpRequest);
-
-   }
-
    public void testDeleteRole() throws SecurityException, NoSuchMethodException, IOException {
       Invokable<?, ?> method = method(ChefApi.class, "deleteRole", String.class);
       GeneratedHttpRequest httpRequest = processor.apply(Invocation.create(method, ImmutableList.<Object> of("role")));

http://git-wip-us.apache.org/repos/asf/jclouds/blob/58784cc4/apis/chef/src/test/resources/clients_list.json
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/clients_list.json b/apis/chef/src/test/resources/clients_list.json
new file mode 100644
index 0000000..000110b
--- /dev/null
+++ b/apis/chef/src/test/resources/clients_list.json
@@ -0,0 +1,5 @@
+{
+  "chef-webui": "http://localhost:4000/clients/chef-webui",
+  "chef-validator": "http://localhost:4000/clients/chef-validator",
+  "adam": "http://localhost:4000/clients/adam"
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/58784cc4/apis/chef/src/test/resources/environment_nodes.json
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/environment_nodes.json b/apis/chef/src/test/resources/environment_nodes.json
deleted file mode 100644
index 92ef95a..0000000
--- a/apis/chef/src/test/resources/environment_nodes.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-  "blah": "https://api.opscode.com/org/directory/nodes/blah",
-  "boxer": "https://api.opscode.com/org/directory/nodes/boxer",
-  "blarrrrgh": "https://api.opscode.com/org/directory/nodes/blarrrrgh"
-}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/58784cc4/apis/chef/src/test/resources/nodes_list.json
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/nodes_list.json b/apis/chef/src/test/resources/nodes_list.json
new file mode 100644
index 0000000..92ef95a
--- /dev/null
+++ b/apis/chef/src/test/resources/nodes_list.json
@@ -0,0 +1,5 @@
+{
+  "blah": "https://api.opscode.com/org/directory/nodes/blah",
+  "boxer": "https://api.opscode.com/org/directory/nodes/boxer",
+  "blarrrrgh": "https://api.opscode.com/org/directory/nodes/blarrrrgh"
+}


[27/50] [abbrv] git commit: Updating to 1.8.0-SNAPSHOT

Posted by na...@apache.org.
Updating to 1.8.0-SNAPSHOT


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/bd36ccd5
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/bd36ccd5
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/bd36ccd5

Branch: refs/heads/master
Commit: bd36ccd55121cd06aec67b2601775090a7832de3
Parents: f4895cc
Author: Andrew Bayer <an...@gmail.com>
Authored: Tue Dec 17 11:51:11 2013 -0800
Committer: Andrew Bayer <an...@gmail.com>
Committed: Tue Dec 17 11:51:11 2013 -0800

----------------------------------------------------------------------
 providers/enterprisechef/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/bd36ccd5/providers/enterprisechef/pom.xml
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/pom.xml b/providers/enterprisechef/pom.xml
index 849c9b6..b148e4c 100644
--- a/providers/enterprisechef/pom.xml
+++ b/providers/enterprisechef/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.jclouds.chef</groupId>
     <artifactId>chef-project</artifactId>
-    <version>1.7.0-SNAPSHOT</version>
+    <version>1.8.0-SNAPSHOT</version>
     <relativePath>../project/pom.xml</relativePath>
   </parent>
   <groupId>org.apache.jclouds.provider</groupId>


[23/50] [abbrv] git commit: JCLOUDS-274 Implement listCookbookVersionsInEnvironment in ChefService API

Posted by na...@apache.org.
JCLOUDS-274 Implement listCookbookVersionsInEnvironment in ChefService API


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/3724ee67
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/3724ee67
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/3724ee67

Branch: refs/heads/master
Commit: 3724ee6749fc01328969025030fcba92c6ea74a9
Parents: 6697e0a
Author: Noorul Islam K M <no...@noorul.com>
Authored: Fri Oct 4 14:09:05 2013 +0530
Committer: Ignasi Barrera <na...@apache.org>
Committed: Tue Nov 5 12:10:58 2013 +0100

----------------------------------------------------------------------
 .../main/java/org/jclouds/chef/ChefService.java |  19 +++
 .../jclouds/chef/internal/BaseChefService.java  |  16 +-
 .../ListCookbookVersionsInEnvironment.java      |  41 +++++
 .../ListCookbookVersionsInEnvironmentImpl.java  | 113 ++++++++++++
 ...okbookVersionsInEnvironmentImplLiveTest.java | 171 +++++++++++++++++++
 5 files changed, 359 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/3724ee67/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/ChefService.java b/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
index f20df68..8006b88 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
@@ -187,6 +187,25 @@ public interface ChefService {
    Iterable<? extends CookbookVersion> listCookbookVersions();
 
    /**
+    * Lists the details of all existing cookbooks in an environment.
+    *
+    * @param environmentName The environment name.
+    * @return The details of all existing cookbooks in an environment.
+    */
+   Iterable<? extends CookbookVersion> listCookbookVersionsInEnvironment(String environmentName);
+
+   /**
+    * Lists the details of all existing cookbooks in an environment
+    * limiting number of versions.
+    *
+    * @param environmentName The environment name.
+    * @param numVersions The number of cookbook versions to include.
+    *                    Use 'all' to return all cookbook versions.
+    * @return The details of all existing cookbooks in environment.
+    */
+   Iterable<? extends CookbookVersion> listCookbookVersionsInEnvironment(String environmentName, String numVersions);
+
+   /**
     * Lists the details of all existing environments.
     * 
     * @return The details of all existing environments.

http://git-wip-us.apache.org/repos/asf/jclouds/blob/3724ee67/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java b/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
index 4600ffc..a841922 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
@@ -49,6 +49,7 @@ import org.jclouds.chef.strategy.DeleteAllClientsInList;
 import org.jclouds.chef.strategy.DeleteAllNodesInList;
 import org.jclouds.chef.strategy.ListClients;
 import org.jclouds.chef.strategy.ListCookbookVersions;
+import org.jclouds.chef.strategy.ListCookbookVersionsInEnvironment;
 import org.jclouds.chef.strategy.ListNodesInEnvironment;
 import org.jclouds.chef.strategy.ListEnvironments;
 import org.jclouds.chef.strategy.ListNodes;
@@ -88,6 +89,7 @@ public class BaseChefService implements ChefService {
    private final BootstrapConfigForGroup bootstrapConfigForGroup;
    private final RunListForGroup runListForGroup;
    private final ListCookbookVersions listCookbookVersions;
+   private final ListCookbookVersionsInEnvironment listCookbookVersionsInEnvironment;
    private final ListEnvironments listEnvironments;
    private final ListNodesInEnvironment listNodesInEnvironment;
    private final Json json;
@@ -104,7 +106,8 @@ public class BaseChefService implements ChefService {
          UpdateAutomaticAttributesOnNode updateAutomaticAttributesOnNode, Supplier<PrivateKey> privateKey,
          @Named(CHEF_BOOTSTRAP_DATABAG) String databag, GroupToBootScript groupToBootScript,
          BootstrapConfigForGroup bootstrapConfigForGroup, RunListForGroup runListForGroup,
-         ListEnvironments listEnvironments, ListNodesInEnvironment listNodesInEnvironment, Json json) {
+         ListEnvironments listEnvironments, ListNodesInEnvironment listNodesInEnvironment,
+         ListCookbookVersionsInEnvironment listCookbookVersionsInEnvironment, Json json) {
       this.chefContext = checkNotNull(chefContext, "chefContext");
       this.api = checkNotNull(api, "api");
       this.cleanupStaleNodesAndClients = checkNotNull(cleanupStaleNodesAndClients, "cleanupStaleNodesAndClients");
@@ -124,6 +127,7 @@ public class BaseChefService implements ChefService {
       this.runListForGroup = checkNotNull(runListForGroup, "runListForGroup");
       this.listEnvironments = checkNotNull(listEnvironments, "listEnvironments");
       this.listNodesInEnvironment = checkNotNull(listNodesInEnvironment, "listNodesInEnvironment");
+      this.listCookbookVersionsInEnvironment = checkNotNull(listCookbookVersionsInEnvironment, "listCookbookVersionsInEnvironment");
       this.json = checkNotNull(json, "json");
    }
 
@@ -238,6 +242,16 @@ public class BaseChefService implements ChefService {
    }
 
    @Override
+   public Iterable<? extends CookbookVersion> listCookbookVersionsInEnvironment(String environmentName) {
+      return listCookbookVersionsInEnvironment.execute(environmentName);
+   }
+
+   @Override
+   public Iterable<? extends CookbookVersion> listCookbookVersionsInEnvironment(String environmentName, String numVersions) {
+      return listCookbookVersionsInEnvironment.execute(environmentName, numVersions);
+   }
+
+   @Override
    public Iterable<? extends Environment> listEnvironments() {
       return listEnvironments.execute();
    }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/3724ee67/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java
new file mode 100644
index 0000000..e19918c
--- /dev/null
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.chef.strategy;
+
+import org.jclouds.chef.domain.CookbookDefinition;
+import org.jclouds.chef.domain.CookbookVersion;
+import org.jclouds.chef.strategy.internal.ListCookbookVersionsInEnvironmentImpl;
+
+import com.google.common.base.Predicate;
+import com.google.common.util.concurrent.ListeningExecutorService;
+import com.google.inject.ImplementedBy;
+
+/**
+ *
+ * @author Noorul Islam K M
+ */
+@ImplementedBy(ListCookbookVersionsInEnvironmentImpl.class)
+public interface ListCookbookVersionsInEnvironment {
+
+   Iterable<? extends CookbookVersion> execute(String environmentName);
+
+   Iterable<? extends CookbookVersion> execute(String environmentName, String numVersions);
+
+   Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor, String environmentName);
+
+   Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor, String environmentName, String numVersions);
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/3724ee67/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImpl.java
new file mode 100644
index 0000000..48d563e
--- /dev/null
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImpl.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.chef.strategy.internal;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.common.collect.Iterables.concat;
+import static com.google.common.collect.Iterables.contains;
+import static com.google.common.collect.Iterables.filter;
+import static com.google.common.collect.Iterables.transform;
+import static com.google.common.util.concurrent.Futures.allAsList;
+import static com.google.common.util.concurrent.Futures.getUnchecked;
+
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.Callable;
+
+import javax.annotation.Resource;
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import org.jclouds.Constants;
+import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.config.ChefProperties;
+import org.jclouds.chef.domain.CookbookDefinition;
+import org.jclouds.chef.domain.CookbookVersion;
+import org.jclouds.chef.strategy.ListCookbookVersionsInEnvironment;
+import org.jclouds.logging.Logger;
+
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.ListeningExecutorService;
+import com.google.inject.Inject;
+
+/**
+ *
+ * @author Noorul Islam K M
+ */
+@Singleton
+public class ListCookbookVersionsInEnvironmentImpl implements ListCookbookVersionsInEnvironment {
+
+   protected final ChefApi api;
+   protected final ListeningExecutorService userExecutor;
+   @Resource
+   @Named(ChefProperties.CHEF_LOGGER)
+   protected Logger logger = Logger.NULL;
+
+   @Inject
+   ListCookbookVersionsInEnvironmentImpl(@Named(Constants.PROPERTY_USER_THREADS) ListeningExecutorService userExecutor, ChefApi api) {
+      this.userExecutor = checkNotNull(userExecutor, "userExecuor");
+      this.api = checkNotNull(api, "api");
+   }
+
+   @Override
+   public Iterable<? extends CookbookVersion> execute(String environmentName) {
+      return execute(userExecutor, environmentName);
+   }
+
+   @Override
+   public Iterable<? extends CookbookVersion> execute(String environmentName, String numVersions) {
+      return execute(userExecutor, environmentName, numVersions);
+   }
+
+   public Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor, String environmentName) {
+      return execute(executor, api.listCookbooksInEnvironment(environmentName));
+   }
+
+   @Override
+   public Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor, String environmentName, String numVersions) {
+      return execute(executor, api.listCookbooksInEnvironment(environmentName, numVersions));
+   }
+
+   private Iterable<? extends CookbookVersion> execute(final ListeningExecutorService executor,
+         Iterable<CookbookDefinition> cookbookDefs) {
+      return concat(transform(cookbookDefs, new Function<CookbookDefinition, Iterable<? extends CookbookVersion>>() {
+
+         @Override
+         public Iterable<? extends CookbookVersion> apply(final CookbookDefinition cookbookDef) {
+            // TODO getting each version could also go parallel
+            Set<CookbookDefinition.Version> cookbookVersions = cookbookDef.getVersions();
+            ListenableFuture<List<CookbookVersion>> futures = allAsList(transform(cookbookVersions,
+                  new Function<CookbookDefinition.Version, ListenableFuture<CookbookVersion>>() {
+                     @Override
+                     public ListenableFuture<CookbookVersion> apply(final CookbookDefinition.Version version) {
+                        return executor.submit(new Callable<CookbookVersion>() {
+                           @Override
+                           public CookbookVersion call() throws Exception {
+                              return api.getCookbook(cookbookDef.getName(), version.getVersion());
+                           }
+                        });
+                     }
+                  }));
+
+            logger.trace(String.format("getting versions of cookbook %s: ", cookbookDef.getName()));
+            return getUnchecked(futures);
+         }
+      }));
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/3724ee67/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java
new file mode 100644
index 0000000..1868256
--- /dev/null
+++ b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java
@@ -0,0 +1,171 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.chef.strategy.internal;
+
+import static com.google.common.collect.Iterables.size;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
+
+import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.domain.ChecksumStatus;
+import org.jclouds.chef.domain.CookbookDefinition;
+import org.jclouds.chef.domain.CookbookVersion;
+import org.jclouds.chef.domain.Metadata;
+import org.jclouds.chef.domain.Resource;
+import org.jclouds.chef.domain.Sandbox;
+import org.jclouds.chef.domain.UploadSandbox;
+import org.jclouds.chef.internal.BaseChefLiveTest;
+import org.jclouds.io.Payloads;
+import org.jclouds.io.payloads.FilePayload;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.Test;
+
+import java.io.File;
+import java.util.List;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.primitives.Bytes;
+
+/**
+ * Tests behavior of {@code ListCookbookVersionsInEnvironmentImpl} strategies
+ *
+ * @author Noorul Islam K M
+ */
+@Test(groups = "live", testName = "ListCookbookVersionsInEnvironmentImplLiveTest")
+public class ListCookbookVersionsInEnvironmentImplLiveTest extends BaseChefLiveTest<ChefApi> {
+   public static final String PREFIX = "jcloudstest-strategy-" + System.getProperty("user.name");
+
+   private ListCookbookVersionsInEnvironmentImpl strategy;
+   private CreateNodeAndPopulateAutomaticAttributesImpl creator;
+
+   @Override
+   protected void initialize() {
+      super.initialize();
+
+      try {
+         createCookbooksWithMultipleVersions(PREFIX);
+         createCookbooksWithMultipleVersions(PREFIX + 1);
+      } catch (Exception e) {
+         fail("Could not create cookbooks", e);
+      }
+
+      this.strategy = injector.getInstance(ListCookbookVersionsInEnvironmentImpl.class);
+   }
+
+   @AfterClass(groups = { "integration", "live" })
+   @Override
+   protected void tearDown() {
+      api.deleteCookbook(PREFIX, "0.0.0");
+      api.deleteCookbook(PREFIX, "1.0.0");
+      api.deleteCookbook(PREFIX + 1, "0.0.0");
+      api.deleteCookbook(PREFIX + 1, "1.0.0");
+      super.tearDown();
+   }
+
+   @Test
+   public void testExecute() {
+      assertTrue(size(strategy.execute("_default")) > 0, "Expected one or more elements");
+   }
+
+   @Test
+   public void testExecuteWithNumVersions() {
+      assertTrue(size(strategy.execute("_default", "2")) > 0, "Expected one or more elements");
+   }
+
+   @Test
+   public void testExecuteWithNumVersionsAll() {
+      assertTrue(size(strategy.execute("_default", "all")) > 0, "Expected one or more elements");
+   }
+
+   private FilePayload uploadContent(String fileName) throws Exception {
+      // Define the file you want in the cookbook
+      FilePayload content = Payloads.newFilePayload(new File(System.getProperty("user.dir"), fileName));
+      content.getContentMetadata().setContentType("application/x-binary");
+
+      // Get an md5 so that you can see if the server already has it or not
+      Payloads.calculateMD5(content);
+
+      // Note that java collections cannot effectively do equals or hashcodes on
+      // byte arrays, so let's convert to a list of bytes.
+      List<Byte> md5 = Bytes.asList(content.getContentMetadata().getContentMD5());
+
+      // Request an upload site for this file
+      UploadSandbox site = api.createUploadSandboxForChecksums(ImmutableSet.of(md5));
+      assertTrue(site.getChecksums().containsKey(md5), md5 + " not in " + site.getChecksums());
+
+      try {
+         // Upload the file contents, if still not uploaded
+         ChecksumStatus status = site.getChecksums().get(md5);
+         if (status.needsUpload()) {
+            api.uploadContent(status.getUrl(), content);
+         }
+         Sandbox sandbox = api.commitSandbox(site.getSandboxId(), true);
+         assertTrue(sandbox.isCompleted(), "Sandbox should be completed after uploading");
+      } catch (RuntimeException e) {
+         api.commitSandbox(site.getSandboxId(), false);
+         fail("Could not upload content", e);
+      }
+
+      return content;
+   }
+
+   private void createCookbooksWithMultipleVersions(String cookbookName) throws Exception {
+      FilePayload v0content = uploadContent("pom.xml");
+      FilePayload v1content = uploadContent("../README.md");
+
+      // Create the metadata of the cookbook
+      Metadata metadata = Metadata.builder() //
+            .name(cookbookName) //
+            .version("0.0.0") //
+            .description("Jclouds test uploaded cookbook") //
+            .maintainer("jclouds") //
+            .maintainerEmail("someone@jclouds.org") //
+            .license("Apache 2.0") //
+            .build();
+
+      // Create new cookbook version
+      CookbookVersion cookbook = CookbookVersion.builder(cookbookName, "0.0.0") //
+            .metadata(metadata) //
+            .rootFile(Resource.builder().fromPayload(v0content).build()) //
+            .build();
+
+      // upload the cookbook to the remote server
+      api.updateCookbook(cookbookName, "0.0.0", cookbook);
+
+      // Create the metadata of the cookbook
+      metadata = Metadata.builder() //
+            .name(cookbookName) //
+            .version("1.0.0") //
+            .description("Jclouds test uploaded cookbook") //
+            .maintainer("jclouds") //
+            .maintainerEmail("someone@jclouds.org") //
+            .license("Apache 2.0") //
+            .build();
+
+      // Create a new cookbook version
+      cookbook = CookbookVersion.builder(cookbookName, "1.0.0") //
+            .metadata(metadata) //
+            .rootFile(Resource.builder().fromPayload(v1content).build()) //
+            .build();
+
+      // upload the cookbook to the remote server
+      api.updateCookbook(cookbookName, "1.0.0", cookbook);
+   }
+}


[32/50] [abbrv] JCLOUDS-546: Remove Javadoc @author annotations

Posted by na...@apache.org.
http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/ohai/config/OhaiModule.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/ohai/config/OhaiModule.java b/apis/chef/src/main/java/org/jclouds/ohai/config/OhaiModule.java
index 152b120..650fe9e 100644
--- a/apis/chef/src/main/java/org/jclouds/ohai/config/OhaiModule.java
+++ b/apis/chef/src/main/java/org/jclouds/ohai/config/OhaiModule.java
@@ -45,8 +45,6 @@ import com.google.inject.multibindings.MapBinder;
 
 /**
  * Wires the components needed to parse ohai data
- * 
- * @author Adrian Cole
  */
 @ConfiguresOhai
 public class OhaiModule extends AbstractModule {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/ohai/functions/ByteArrayToMacAddress.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/ohai/functions/ByteArrayToMacAddress.java b/apis/chef/src/main/java/org/jclouds/ohai/functions/ByteArrayToMacAddress.java
index 81a2a54..be7e46a 100644
--- a/apis/chef/src/main/java/org/jclouds/ohai/functions/ByteArrayToMacAddress.java
+++ b/apis/chef/src/main/java/org/jclouds/ohai/functions/ByteArrayToMacAddress.java
@@ -32,8 +32,6 @@ import com.google.common.base.Joiner;
 /**
  * 
  * Creates a string in the form: {@code 00:26:bb:09:e6:c4 }
- * 
- * @author Adrian Cole
  */
 @Singleton
 public class ByteArrayToMacAddress implements Function<byte[], String> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/ohai/functions/MapSetToMultimap.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/ohai/functions/MapSetToMultimap.java b/apis/chef/src/main/java/org/jclouds/ohai/functions/MapSetToMultimap.java
index 623df9b..4ef3c87 100644
--- a/apis/chef/src/main/java/org/jclouds/ohai/functions/MapSetToMultimap.java
+++ b/apis/chef/src/main/java/org/jclouds/ohai/functions/MapSetToMultimap.java
@@ -26,10 +26,6 @@ import com.google.common.base.Function;
 import com.google.common.collect.LinkedHashMultimap;
 import com.google.common.collect.Multimap;
 
-/**
- * 
- * @author Adrian Cole
- */
 @Singleton
 public class MapSetToMultimap<K, V> implements Function<Map<K, Set<V>>, Multimap<K, V>> {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/ohai/functions/NestSlashKeys.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/ohai/functions/NestSlashKeys.java b/apis/chef/src/main/java/org/jclouds/ohai/functions/NestSlashKeys.java
index 7e5019a..c709463 100644
--- a/apis/chef/src/main/java/org/jclouds/ohai/functions/NestSlashKeys.java
+++ b/apis/chef/src/main/java/org/jclouds/ohai/functions/NestSlashKeys.java
@@ -42,11 +42,6 @@ import com.google.common.collect.Multimap;
 import com.google.common.collect.Sets;
 import com.google.inject.TypeLiteral;
 
-/**
- * 
- * 
- * @author Adrian Cole
- */
 @Singleton
 public class NestSlashKeys implements Function<Multimap<String, Supplier<JsonBall>>, Map<String, JsonBall>> {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/ohai/suppliers/UptimeSecondsSupplier.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/ohai/suppliers/UptimeSecondsSupplier.java b/apis/chef/src/main/java/org/jclouds/ohai/suppliers/UptimeSecondsSupplier.java
index e4b6800..9713902 100644
--- a/apis/chef/src/main/java/org/jclouds/ohai/suppliers/UptimeSecondsSupplier.java
+++ b/apis/chef/src/main/java/org/jclouds/ohai/suppliers/UptimeSecondsSupplier.java
@@ -25,10 +25,6 @@ import org.jclouds.domain.JsonBall;
 
 import com.google.common.base.Supplier;
 
-/**
- * 
- * @author Adrian Cole
- */
 @Singleton
 public class UptimeSecondsSupplier implements Supplier<JsonBall> {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/BaseChefApiExpectTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/BaseChefApiExpectTest.java b/apis/chef/src/test/java/org/jclouds/chef/BaseChefApiExpectTest.java
index 6e20ed7..23013a9 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/BaseChefApiExpectTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/BaseChefApiExpectTest.java
@@ -26,8 +26,6 @@ import com.google.common.collect.ImmutableMap;
 
 /**
  * Base class for Chef Api expect tests.
- * 
- * @author Ignasi Barrera
  */
 public abstract class BaseChefApiExpectTest<S> extends BaseRestApiExpectTest<S> {
    public static final String PRIVATE_KEY = "-----BEGIN RSA PRIVATE KEY-----\nMIIEpQIBAAKCAQEAyb2ZJJqGm0KKR+8nfQJNsSd+F9tXNMV7CfOcW6jsqs8EZgiV\nR09hD1IYOj4YqM0qJONlgyg4xRWewdSG7QTPj1lJpVAida9sXy2+kzyagZA1Am0O\nZcbqb5hoeIDgcX+eDa79s0u0DomjcfO9EKhvHLBz+zM+3QqPRkPV8nYTbfs+HjVz\nzOU6D1B0XR3+IPZZl2AnWs2d0qhnStHcDUvnRVQ0P482YwN9VgceOZtpPz0DCKEJ\n5Tx5STub8k0/zt/VAMHQafLSuQMLd2s4ZLuOZptN//uAsTmxireqd37z+8ZTdBbJ\n8LEpJ+iCXuSfm5aUh7iw6oxvToY2AL53+jK2UQIDAQABAoIBAQDA88B3i/xWn0vX\nBVxFamCYoecuNjGwXXkSyZew616A+EOCu47bh4aTurdFbYL0YFaAtaWvzlaN2eHg\nDb+HDuTefE29+WkcGk6SshPmiz5T0XOCAICWw6wSVDkHmGwS4jZvbAFm7W8nwGk9\nYhxgxFiRngswJZFopOLoF5WXs2td8guIYNslMpo7tu50iFnBHwKO2ZsPAk8t9nnS\nxlDavKruymEmqHCr3+dtio5eaenJcp3fjoXBQOKUk3ipII29XRB8NqeCVV/7Kxwq\nckqOBEbRwBclckyIbD+RiAgKvOelORjEiE9R42vuqvxRA6k9kd9o7utlX0AUtpEn\n3gZc6LepAoGBAP9ael5Y75+sK2JJUNOOhO8ae45cdsilp2yI0X+UBaSuQs2+dyPp\nkpEHAxd4pmmSvn/8c9TlEZhr+qYbABXVPlDncxpIuw2Ajbk7s/S4XaSKsRqpXL57\nzj/QOqLkRk8+OVV9q6lMeQNqLtEj1u6JPviX70Ro+FQtRttNOYbfdP/fAoGBA
 MpA\nXjR5woV5sUb+REg9vEuYo8RSyOarxqKFCIXVUNsLOx+22+AK4+CQpbueWN7jotrl\nYD6uT6svWi3AAC7kiY0UI/fjVPRCUi8tVoQUE0TaU5VLITaYOB+W/bBaDE4M9560\n1NuDWO90baA5dfU44iuzva02rGJXK9+nS3o8nk/PAoGBALOL6djnDe4mwAaG6Jco\ncd4xr8jkyPzCRZuyBCSBbwphIUXLc7hDprPky064ncJD1UDmwIdkXd/fpMkg2QmA\n/CUk6LEFjMisqHojOaCL9gQZJPhLN5QUN2x1PJWGjs1vQh8Tkx0iUUCOa8bQPXNR\n+34OTsW6TUna4CSZAycLfhffAoGBAIggVsefBCvuQkF0NeUhmDCRZfhnd8y55RHR\n1HCvqKIlpv+rhcX/zmyBLuteopYyRJRsOiE2FW00i8+rIPRu4Z3Q5nybx7w3PzV9\noHN5R5baE9OyI4KpZWztpYYitZF67NcnAvVULHHOvVJQGnKYfLHJYmrJF7GA1ojM\nAuMdFbjFAoGAPxUhxwFy8gaqBahKUEZn4F81HFP5ihGhkT4QL6AFPO2e+JhIGjuR\n27+85hcFqQ+HHVtFsm81b/a+R7P4UuCRgc8eCjxQMoJ1Xl4n7VbjPbHMnIN0Ryvd\nO4ZpWDWYnCO021JTOUUOJ4J/y0416Bvkw0z59y7sNX7wDBBHHbK/XCc=\n-----END RSA PRIVATE KEY-----\n";

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
index 4417f0d..ea4070d 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
@@ -39,8 +39,6 @@ import com.google.inject.Module;
 
 /**
  * Expect tests for the {@link ChefApi} class.
- *
- * @author Noorul Islam K M
  */
 @Test(groups = "unit", testName = "ChefApiExpectTest")
 public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/ChefApiLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiLiveTest.java
index b8fce0e..e4ad583 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiLiveTest.java
@@ -21,8 +21,6 @@ import org.testng.annotations.Test;
 
 /**
  * Tests behavior of {@code ChefApi} against a Chef Server <= 0.9.8.
- * 
- * @author Adrian Cole
  */
 @Test(groups = { "live" })
 public class ChefApiLiveTest extends BaseChefApiLiveTest<ChefApi> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/ChefApiMetadataTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiMetadataTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiMetadataTest.java
index cb6f714..a78c20a 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiMetadataTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiMetadataTest.java
@@ -23,10 +23,6 @@ import org.testng.annotations.Test;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.reflect.TypeToken;
 
-/**
- * 
- * @author Adrian Cole
- */
 @Test(groups = "unit", testName = "ChefApiMetadataTest")
 public class ChefApiMetadataTest extends BaseHttpApiMetadataTest {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
index 28df35f..98eeb0b 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
@@ -70,8 +70,6 @@ import com.google.inject.Module;
 
 /**
  * Tests annotation parsing of {@code ChefApi}.
- * 
- * @author Adrian Cole
  */
 @Test(groups = { "unit" })
 public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/binders/BindHexEncodedMD5sToJsonPayloadTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/binders/BindHexEncodedMD5sToJsonPayloadTest.java b/apis/chef/src/test/java/org/jclouds/chef/binders/BindHexEncodedMD5sToJsonPayloadTest.java
index cd40808..7648732 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/binders/BindHexEncodedMD5sToJsonPayloadTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/binders/BindHexEncodedMD5sToJsonPayloadTest.java
@@ -36,9 +36,6 @@ import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
 
-/**
- * @author Adrian Cole
- */
 @Test(groups = { "unit" })
 public class BindHexEncodedMD5sToJsonPayloadTest {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/config/ChefParserModuleTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/config/ChefParserModuleTest.java b/apis/chef/src/test/java/org/jclouds/chef/config/ChefParserModuleTest.java
index 76db791..9b1354e 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/config/ChefParserModuleTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/config/ChefParserModuleTest.java
@@ -33,8 +33,6 @@ import com.google.gson.GsonBuilder;
 
 /**
  * Unit tests for the {@link ChefParserModule} class.
- * 
- * @author Ignasi Barrera
  */
 @Test(groups = "unit", testName = "ChefParserModuleTest")
 public class ChefParserModuleTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/filters/SignedHeaderAuthTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/filters/SignedHeaderAuthTest.java b/apis/chef/src/test/java/org/jclouds/chef/filters/SignedHeaderAuthTest.java
index da67279..0e6ca4a 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/filters/SignedHeaderAuthTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/filters/SignedHeaderAuthTest.java
@@ -52,10 +52,6 @@ import com.google.inject.Key;
 import com.google.inject.Module;
 import com.google.inject.TypeLiteral;
 
-/**
- * 
- * @author Adrian Cole
- */
 @Test(groups = { "unit" })
 public class SignedHeaderAuthTest {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/functions/BootstrapConfigForGroupTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/BootstrapConfigForGroupTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/BootstrapConfigForGroupTest.java
index b8cb982..f326482 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/BootstrapConfigForGroupTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/BootstrapConfigForGroupTest.java
@@ -30,10 +30,6 @@ import org.jclouds.chef.domain.DatabagItem;
 import org.jclouds.rest.annotations.Api;
 import org.testng.annotations.Test;
 
-/**
- * @author Adrian Cole
- * @author Ignasi Barrera
- */
 @Test(groups = "unit", testName = "BootstrapConfigForGroupTest")
 public class BootstrapConfigForGroupTest {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/functions/ClientForGroupTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ClientForGroupTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ClientForGroupTest.java
index 6737ca6..4be873c 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ClientForGroupTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ClientForGroupTest.java
@@ -31,9 +31,6 @@ import org.testng.annotations.Test;
 
 import com.google.common.collect.ImmutableSet;
 
-/**
- * @author Adrian Cole
- */
 @Test(groups = "unit", testName = "ClientForGroupTest")
 public class ClientForGroupTest {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java
index fa9cf3f..8792025 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/GroupToBootScriptTest.java
@@ -58,9 +58,6 @@ import com.google.inject.Injector;
 import com.google.inject.Key;
 import com.google.inject.name.Names;
 
-/**
- * @author Adrian Cole
- */
 @Test(groups = "unit", testName = "GroupToBootScriptTest")
 public class GroupToBootScriptTest {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
index e21fb15..671ff93 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
@@ -50,8 +50,6 @@ import com.google.inject.TypeLiteral;
 
 /**
  * Tests behavior of {@code ParseClientFromJson}
- * 
- * @author Adrian Cole
  */
 @Test(groups = { "unit" })
 public class ParseClientFromJsonTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionCheckingChefVersionTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionCheckingChefVersionTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionCheckingChefVersionTest.java
index ad984a6..300c8e0 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionCheckingChefVersionTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionCheckingChefVersionTest.java
@@ -29,8 +29,6 @@ import com.google.inject.Injector;
 
 /**
  * Tests behavior of {@code ParseCookbookDefinitionCheckingChefVersion}.
- * 
- * @author Ignasi Barrera
  */
 @Test(groups = { "unit" }, singleThreaded = true)
 public class ParseCookbookDefinitionCheckingChefVersionTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonTest.java
index a89da9a..736b283 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonTest.java
@@ -35,8 +35,6 @@ import com.google.inject.Injector;
 
 /**
  * Tests behavior of {@code ParseCookbookDefinitionFromJson}.
- * 
- * @author Ignasi Barrera
  */
 @Test(groups = { "unit" }, singleThreaded = true)
 public class ParseCookbookDefinitionFromJsonTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionFromJsonTest.java
index 9a279b4..7bc19bf 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionFromJsonTest.java
@@ -43,9 +43,6 @@ import com.google.inject.TypeLiteral;
 
 /**
  * Tests behavior of {@code ParseCookbookVersionFromJson}
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 @Test(groups = { "unit" }, singleThreaded = true)
 public class ParseCookbookVersionFromJsonTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsCheckingChefVersionTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsCheckingChefVersionTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsCheckingChefVersionTest.java
index 21fb712..bad0edf 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsCheckingChefVersionTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsCheckingChefVersionTest.java
@@ -29,8 +29,6 @@ import com.google.inject.Injector;
 
 /**
  * Tests behavior of {@code ParseCookbookVersionsCheckingChefVersion}.
- * 
- * @author Ignasi Barrera
  */
 @Test(groups = { "unit" }, singleThreaded = true)
 public class ParseCookbookVersionsCheckingChefVersionTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJsonTest.java
index 77128d0..08cf1d2 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJsonTest.java
@@ -35,8 +35,6 @@ import com.google.inject.Injector;
 
 /**
  * Tests behavior of {@code ParseCookbookVersionsV09FromJson}
- * 
- * @author Ignasi Barrera
  */
 @Test(groups = { "unit" }, singleThreaded = true)
 public class ParseCookbookVersionsV09FromJsonTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJsonTest.java
index 0d14c31..e8b396a 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJsonTest.java
@@ -35,8 +35,6 @@ import com.google.inject.Injector;
 
 /**
  * Tests behavior of {@code ParseCookbookVersionsV10FromJson}
- * 
- * @author Ignasi Barrera
  */
 @Test(groups = { "unit" }, singleThreaded = true)
 public class ParseCookbookVersionsV10FromJsonTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseDataBagItemFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseDataBagItemFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseDataBagItemFromJsonTest.java
index cab8d8a..5dde523 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseDataBagItemFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseDataBagItemFromJsonTest.java
@@ -37,9 +37,6 @@ import com.google.inject.Injector;
 import com.google.inject.Key;
 import com.google.inject.TypeLiteral;
 
-/**
- * @author AdrianCole
- */
 @Test(groups = { "unit" })
 public class ParseDataBagItemFromJsonTest {
    private ParseJson<DatabagItem> handler;

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseErrorFromJsonOrReturnBodyTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseErrorFromJsonOrReturnBodyTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseErrorFromJsonOrReturnBodyTest.java
index 9749664..940e858 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseErrorFromJsonOrReturnBodyTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseErrorFromJsonOrReturnBodyTest.java
@@ -26,9 +26,6 @@ import org.jclouds.http.functions.ReturnStringIf2xx;
 import org.jclouds.util.Strings2;
 import org.testng.annotations.Test;
 
-/**
- * @author Adrian Cole
- */
 @Test(groups = { "unit" })
 public class ParseErrorFromJsonOrReturnBodyTest {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseKeySetFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseKeySetFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseKeySetFromJsonTest.java
index 82e6d90..8c646b2 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseKeySetFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseKeySetFromJsonTest.java
@@ -35,8 +35,6 @@ import com.google.inject.Injector;
 
 /**
  * Tests behavior of {@code ParseKeySetFromJson}
- * 
- * @author Adrian Cole
  */
 @Test(groups = { "unit" }, singleThreaded = true)
 public class ParseKeySetFromJsonTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseNodeFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseNodeFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseNodeFromJsonTest.java
index f0b8a7d..72b4956 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseNodeFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseNodeFromJsonTest.java
@@ -39,8 +39,6 @@ import com.google.inject.TypeLiteral;
 
 /**
  * Tests behavior of {@code ParseNodeFromJson}
- * 
- * @author Adrian Cole
  */
 @Test(groups = { "unit" }, singleThreaded = true)
 public class ParseNodeFromJsonTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSandboxFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSandboxFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSandboxFromJsonTest.java
index 781b7a6..dd31d38 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSandboxFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSandboxFromJsonTest.java
@@ -39,8 +39,6 @@ import com.google.inject.TypeLiteral;
 
 /**
  * Tests behavior of {@code ParseSandboxFromJson}
- * 
- * @author Adrian Cole
  */
 @Test(groups = { "unit" }, singleThreaded = true)
 public class ParseSandboxFromJsonTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSearchDataBagItemFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSearchDataBagItemFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSearchDataBagItemFromJsonTest.java
index c506d61..3daf3a8 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSearchDataBagItemFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseSearchDataBagItemFromJsonTest.java
@@ -34,9 +34,6 @@ import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
 
-/**
- * @author Ignasi Barrera
- */
 @Test(groups = { "unit" })
 public class ParseSearchDataBagItemFromJsonTest {
    private ParseSearchDatabagFromJson handler;

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseUploadSandboxFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseUploadSandboxFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseUploadSandboxFromJsonTest.java
index e242992..b92fb3a 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseUploadSandboxFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseUploadSandboxFromJsonTest.java
@@ -42,8 +42,6 @@ import com.google.inject.TypeLiteral;
 
 /**
  * Tests behavior of {@code ParseUploadSiteFromJson}
- * 
- * @author Adrian Cole
  */
 @Test(groups = { "unit" }, singleThreaded = true)
 public class ParseUploadSandboxFromJsonTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/functions/RunListForGroupTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/RunListForGroupTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/RunListForGroupTest.java
index fdb1c52..28b8833 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/RunListForGroupTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/RunListForGroupTest.java
@@ -40,10 +40,6 @@ import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
 
-/**
- * @author Adrian Cole
- * @author Ignasi Barrera
- */
 @Test(groups = "unit", testName = "RunListForGroupTest")
 public class RunListForGroupTest {
    private Injector injector = Guice.createInjector(new AbstractModule() {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/functions/UriForResourceTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/UriForResourceTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/UriForResourceTest.java
index 98c7d07..3285a1c 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/UriForResourceTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/UriForResourceTest.java
@@ -27,8 +27,6 @@ import com.google.common.base.Function;
 
 /**
  * Tests behavior of {@code UriForResource}
- * 
- * @author Ignasi Barrera
  */
 @Test(groups = { "unit" })
 public class UriForResourceTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/handlers/ChefApiErrorRetryHandlerTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/handlers/ChefApiErrorRetryHandlerTest.java b/apis/chef/src/test/java/org/jclouds/chef/handlers/ChefApiErrorRetryHandlerTest.java
index 85c9240..5e99675 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/handlers/ChefApiErrorRetryHandlerTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/handlers/ChefApiErrorRetryHandlerTest.java
@@ -29,8 +29,6 @@ import org.testng.annotations.Test;
 
 /**
  * Tests behavior of {@code ChefClientErrorRetryHandler}
- * 
- * @author Adrian Cole
  */
 @Test(groups = { "unit" })
 public class ChefApiErrorRetryHandlerTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
index bae390f..bbc1473 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
@@ -69,8 +69,6 @@ import com.google.common.primitives.Bytes;
 
 /**
  * Tests behavior of {@code ChefApi}
- * 
- * @author Adrian Cole
  */
 @Test(groups = { "live", "integration" })
 public abstract class BaseChefApiLiveTest<A extends ChefApi> extends BaseChefLiveTest<A> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefLiveTest.java
index 4c6ca59..e314418 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefLiveTest.java
@@ -35,10 +35,6 @@ import com.google.common.reflect.TypeToken;
 import com.google.inject.Injector;
 import com.google.inject.Module;
 
-/**
- * 
- * @author Adrian Cole
- */
 @Test(groups = "live")
 public abstract class BaseChefLiveTest<A extends ChefApi> extends BaseApiLiveTest<A> {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefServiceTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefServiceTest.java b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefServiceTest.java
index 7f74e54..e763d8f 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefServiceTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefServiceTest.java
@@ -38,8 +38,6 @@ import com.google.inject.Module;
 
 /**
  * Unit tests for the <code>BaseChefService</code> class.
- * 
- * @author Ignasi Barrera
  */
 @Test(groups = "unit", testName = "BaseChefServiceTest")
 public class BaseChefServiceTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseStubbedOhaiLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseStubbedOhaiLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseStubbedOhaiLiveTest.java
index b057e68..8779017 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseStubbedOhaiLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseStubbedOhaiLiveTest.java
@@ -36,10 +36,6 @@ import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import com.google.inject.Module;
 
-/**
- * 
- * @author Adrian Cole
- */
 @Test(groups = "live")
 @Deprecated
 public class BaseStubbedOhaiLiveTest extends BaseChefLiveTest<ChefApi> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/CleanupStaleNodesAndClientsImplLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/CleanupStaleNodesAndClientsImplLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/CleanupStaleNodesAndClientsImplLiveTest.java
index 30363c3..e8b249b 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/CleanupStaleNodesAndClientsImplLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/CleanupStaleNodesAndClientsImplLiveTest.java
@@ -27,8 +27,6 @@ import com.google.common.collect.ImmutableSet;
 
 /**
  * Tests behavior of {@code CleanupStaleNodesAndClientsImpl} strategies
- * 
- * @author Adrian Cole
  */
 @Test(groups = "live", testName = "CleanupStaleNodesAndClientsImplLiveTest")
 public class CleanupStaleNodesAndClientsImplLiveTest extends BaseChefLiveTest<ChefApi> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/CreateNodeAndPopulateAutomaticAttributesImplLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/CreateNodeAndPopulateAutomaticAttributesImplLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/CreateNodeAndPopulateAutomaticAttributesImplLiveTest.java
index 4b55efd..60f2661 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/CreateNodeAndPopulateAutomaticAttributesImplLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/CreateNodeAndPopulateAutomaticAttributesImplLiveTest.java
@@ -31,8 +31,6 @@ import com.google.common.collect.ImmutableSet;
 /**
  * Tests behavior of {@code CreateNodeAndPopulateAutomaticAttributesImpl}
  * strategies
- * 
- * @author Adrian Cole
  */
 @Test(groups = "live", testName = "CreateNodeAndPopulateAutomaticAttributesImplLiveTest")
 public class CreateNodeAndPopulateAutomaticAttributesImplLiveTest extends BaseChefLiveTest<ChefApi> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/CreateNodeAndPopulateAutomaticAttributesImplTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/CreateNodeAndPopulateAutomaticAttributesImplTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/CreateNodeAndPopulateAutomaticAttributesImplTest.java
index ace63e1..3ba7110 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/CreateNodeAndPopulateAutomaticAttributesImplTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/CreateNodeAndPopulateAutomaticAttributesImplTest.java
@@ -34,8 +34,6 @@ import com.google.common.collect.ImmutableSet;
 
 /**
  * Tests behavior of {@code CreateNodeAndPopulateAutomaticAttributesImpl}
- * 
- * @author Adrian Cole
  */
 @Test(groups = "unit", testName = "CreateNodeAndPopulateAutomaticAttributesImplTest")
 public class CreateNodeAndPopulateAutomaticAttributesImplTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/DeleteAllApisAndNodesInListImplLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/DeleteAllApisAndNodesInListImplLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/DeleteAllApisAndNodesInListImplLiveTest.java
index 79cef87..6f0e595 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/DeleteAllApisAndNodesInListImplLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/DeleteAllApisAndNodesInListImplLiveTest.java
@@ -27,8 +27,6 @@ import com.google.common.collect.ImmutableSet;
 
 /**
  * Tests behavior of {@code DeleteAllApisAndNodesInListImpl} strategies
- * 
- * @author Adrian Cole
  */
 @Test(groups = "live", testName = "DeleteAllApisAndNodesInListImplLiveTest")
 public class DeleteAllApisAndNodesInListImplLiveTest extends BaseChefLiveTest<ChefApi> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java
index 1868256..d1786aa 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java
@@ -45,8 +45,6 @@ import com.google.common.primitives.Bytes;
 
 /**
  * Tests behavior of {@code ListCookbookVersionsInEnvironmentImpl} strategies
- *
- * @author Noorul Islam K M
  */
 @Test(groups = "live", testName = "ListCookbookVersionsInEnvironmentImplLiveTest")
 public class ListCookbookVersionsInEnvironmentImplLiveTest extends BaseChefLiveTest<ChefApi> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesImplLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesImplLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesImplLiveTest.java
index f4c7ed1..b9de2b8 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesImplLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesImplLiveTest.java
@@ -28,8 +28,6 @@ import com.google.common.collect.ImmutableSet;
 
 /**
  * Tests behavior of {@code ListNodesImpl} strategies
- * 
- * @author Adrian Cole
  */
 @Test(groups = "live", testName = "ListNodesImplLiveTest")
 public class ListNodesImplLiveTest extends BaseChefLiveTest<ChefApi> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImplLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImplLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImplLiveTest.java
index 25863d9..81dd6d8 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImplLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImplLiveTest.java
@@ -28,8 +28,6 @@ import com.google.common.collect.ImmutableSet;
 
 /**
  * Tests behavior of {@code ListNodesInEnvironmentImpl} strategies
- *
- * @author Noorul Islam K M
  */
 @Test(groups = "live", testName = "ListNodesInEnvironmentImplLiveTest")
 public class ListNodesInEnvironmentImplLiveTest extends BaseChefLiveTest<ChefApi> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/UpdateAutomaticAttributesOnNodeImplLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/UpdateAutomaticAttributesOnNodeImplLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/UpdateAutomaticAttributesOnNodeImplLiveTest.java
index e8681d2..a8f7438 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/UpdateAutomaticAttributesOnNodeImplLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/UpdateAutomaticAttributesOnNodeImplLiveTest.java
@@ -30,8 +30,6 @@ import com.google.common.collect.ImmutableSet;
 
 /**
  * Tests behavior of {@code UpdateAutomaticAttributesOnNodeImpl} strategies
- * 
- * @author Adrian Cole
  */
 @Test(groups = "live", testName = "UpdateAutomaticAttributesOnNodeImplLiveTest")
 public class UpdateAutomaticAttributesOnNodeImplLiveTest extends BaseChefLiveTest<ChefApi> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/UpdateAutomaticAttributesOnNodeImplTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/UpdateAutomaticAttributesOnNodeImplTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/UpdateAutomaticAttributesOnNodeImplTest.java
index 792e391..2e0d198 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/UpdateAutomaticAttributesOnNodeImplTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/UpdateAutomaticAttributesOnNodeImplTest.java
@@ -34,8 +34,6 @@ import com.google.common.collect.ImmutableMap;
 
 /**
  * Tests behavior of {@code UpdateAutomaticAttributesOnNodeImpl}
- * 
- * @author Adrian Cole
  */
 @Test(groups = { "unit" })
 public class UpdateAutomaticAttributesOnNodeImplTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/suppliers/ChefVersionSupplierTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/suppliers/ChefVersionSupplierTest.java b/apis/chef/src/test/java/org/jclouds/chef/suppliers/ChefVersionSupplierTest.java
index a32359d..915f5cf 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/suppliers/ChefVersionSupplierTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/suppliers/ChefVersionSupplierTest.java
@@ -23,8 +23,6 @@ import org.testng.annotations.Test;
 
 /**
  * Unit tests for the {@link ChefVersionSupplier} class.
- * 
- * @author Ignasi Barrera
  */
 @Test(groups = "unit", testName = "ChefVersionSupplierTest")
 public class ChefVersionSupplierTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiIntegrationTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiIntegrationTest.java b/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiIntegrationTest.java
index 13c002e..ecd5d16 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiIntegrationTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiIntegrationTest.java
@@ -28,8 +28,6 @@ import org.testng.annotations.Test;
 
 /**
  * Tests behavior of {@code TransientChefApi}
- * 
- * @author Adrian Cole
  */
 @Test(groups = { "integration" })
 public class TransientChefApiIntegrationTest extends BaseChefLiveTest<ChefApi> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiMetadataTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiMetadataTest.java b/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiMetadataTest.java
index 50f23fb..eac33f3 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiMetadataTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiMetadataTest.java
@@ -23,10 +23,6 @@ import org.testng.annotations.Test;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.reflect.TypeToken;
 
-/**
- * 
- * @author Adrian Cole
- */
 @Test(groups = "unit", testName = "TransientChefApiMetadataTest")
 public class TransientChefApiMetadataTest extends BaseHttpApiMetadataTest {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/util/ChefUtilsTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/util/ChefUtilsTest.java b/apis/chef/src/test/java/org/jclouds/chef/util/ChefUtilsTest.java
index 70b9e97..40645e7 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/util/ChefUtilsTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/util/ChefUtilsTest.java
@@ -28,8 +28,6 @@ import com.google.common.collect.ImmutableList;
 
 /**
  * Tests behavior of {@code ChefUtils}
- * 
- * @author Adrian Cole
  */
 @Test(groups = { "unit" }, sequential = true)
 public class ChefUtilsTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/chef/util/RunListBuilderTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/util/RunListBuilderTest.java b/apis/chef/src/test/java/org/jclouds/chef/util/RunListBuilderTest.java
index 9e3ca25..674be80 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/util/RunListBuilderTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/util/RunListBuilderTest.java
@@ -24,8 +24,6 @@ import com.google.common.collect.ImmutableList;
 
 /**
  * Tests possible uses of RunListBuilder
- * 
- * @author Adrian Cole
  */
 public class RunListBuilderTest {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/ohai/config/JMXTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/ohai/config/JMXTest.java b/apis/chef/src/test/java/org/jclouds/ohai/config/JMXTest.java
index f3f12c6..bcda2e9 100644
--- a/apis/chef/src/test/java/org/jclouds/ohai/config/JMXTest.java
+++ b/apis/chef/src/test/java/org/jclouds/ohai/config/JMXTest.java
@@ -42,8 +42,6 @@ import com.google.inject.Injector;
 
 /**
  * Tests behavior of {@code JMX}
- * 
- * @author Adrian Cole
  */
 @Test(groups = { "unit" })
 public class JMXTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java b/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java
index ca600a1..ecc4562 100644
--- a/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java
+++ b/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java
@@ -45,8 +45,6 @@ import com.google.inject.util.Providers;
 
 /**
  * Tests behavior of {@code OhaiModule}
- * 
- * @author Adrian Cole
  */
 @Test(groups = { "unit" })
 public class OhaiModuleTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/ohai/functions/ByteArrayToMacAddressTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/ohai/functions/ByteArrayToMacAddressTest.java b/apis/chef/src/test/java/org/jclouds/ohai/functions/ByteArrayToMacAddressTest.java
index 0825374..f736dad 100644
--- a/apis/chef/src/test/java/org/jclouds/ohai/functions/ByteArrayToMacAddressTest.java
+++ b/apis/chef/src/test/java/org/jclouds/ohai/functions/ByteArrayToMacAddressTest.java
@@ -23,8 +23,6 @@ import org.testng.annotations.Test;
 
 /**
  * Tests behavior of {@code ByteArrayToMacAddress}
- * 
- * @author Adrian Cole
  */
 @Test(groups = { "unit" }, sequential = true)
 public class ByteArrayToMacAddressTest {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java b/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java
index 6d26cb6..594ab58 100644
--- a/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java
+++ b/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java
@@ -38,8 +38,6 @@ import com.google.inject.Injector;
 
 /**
  * Tests behavior of {@code NestSlashKeys}
- * 
- * @author Adrian Cole
  */
 @Test(groups = { "unit" }, sequential = true)
 public class NestSlashKeysTest {


[09/50] [abbrv] git commit: Renamed test methods and file names to match the new api naming convention

Posted by na...@apache.org.
Renamed test methods and file names to match the new api naming convention


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/10261f74
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/10261f74
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/10261f74

Branch: refs/heads/master
Commit: 10261f7417ee8d221266b3b010c44167b46aece4
Parents: 15b1da6
Author: Noorul Islam K M <no...@noorul.com>
Authored: Tue Sep 17 08:49:41 2013 +0530
Committer: Ignasi Barrera <na...@apache.org>
Committed: Tue Sep 17 14:44:23 2013 +0200

----------------------------------------------------------------------
 .../jclouds/chef/internal/BaseChefService.java  |  10 +-
 .../chef/strategy/ListEnvironmentNodes.java     |  45 --------
 .../chef/strategy/ListNodesInEnvironment.java   |  45 ++++++++
 .../internal/ListEnvironmentNodesImpl.java      | 109 -------------------
 .../internal/ListNodesInEnvironmentImpl.java    | 109 +++++++++++++++++++
 .../GetEnvironmentNodesImplLiveTest.java        |  81 --------------
 .../strategy/internal/GetNodesImplLiveTest.java |  81 --------------
 .../internal/ListNodesImplLiveTest.java         |  81 ++++++++++++++
 .../ListNodesInEnvironmentImplLiveTest.java     |  81 ++++++++++++++
 9 files changed, 321 insertions(+), 321 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/10261f74/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java b/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
index 9d33570..4600ffc 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
@@ -49,7 +49,7 @@ import org.jclouds.chef.strategy.DeleteAllClientsInList;
 import org.jclouds.chef.strategy.DeleteAllNodesInList;
 import org.jclouds.chef.strategy.ListClients;
 import org.jclouds.chef.strategy.ListCookbookVersions;
-import org.jclouds.chef.strategy.ListEnvironmentNodes;
+import org.jclouds.chef.strategy.ListNodesInEnvironment;
 import org.jclouds.chef.strategy.ListEnvironments;
 import org.jclouds.chef.strategy.ListNodes;
 import org.jclouds.chef.strategy.UpdateAutomaticAttributesOnNode;
@@ -89,7 +89,7 @@ public class BaseChefService implements ChefService {
    private final RunListForGroup runListForGroup;
    private final ListCookbookVersions listCookbookVersions;
    private final ListEnvironments listEnvironments;
-   private final ListEnvironmentNodes listEnvironmentNodes;
+   private final ListNodesInEnvironment listNodesInEnvironment;
    private final Json json;
    @Resource
    @Named(ChefProperties.CHEF_LOGGER)
@@ -104,7 +104,7 @@ public class BaseChefService implements ChefService {
          UpdateAutomaticAttributesOnNode updateAutomaticAttributesOnNode, Supplier<PrivateKey> privateKey,
          @Named(CHEF_BOOTSTRAP_DATABAG) String databag, GroupToBootScript groupToBootScript,
          BootstrapConfigForGroup bootstrapConfigForGroup, RunListForGroup runListForGroup,
-         ListEnvironments listEnvironments, ListEnvironmentNodes listEnvironmentNodes, Json json) {
+         ListEnvironments listEnvironments, ListNodesInEnvironment listNodesInEnvironment, Json json) {
       this.chefContext = checkNotNull(chefContext, "chefContext");
       this.api = checkNotNull(api, "api");
       this.cleanupStaleNodesAndClients = checkNotNull(cleanupStaleNodesAndClients, "cleanupStaleNodesAndClients");
@@ -123,7 +123,7 @@ public class BaseChefService implements ChefService {
       this.bootstrapConfigForGroup = checkNotNull(bootstrapConfigForGroup, "bootstrapConfigForGroup");
       this.runListForGroup = checkNotNull(runListForGroup, "runListForGroup");
       this.listEnvironments = checkNotNull(listEnvironments, "listEnvironments");
-      this.listEnvironmentNodes = checkNotNull(listEnvironmentNodes, "listEnvironmentNodes");
+      this.listNodesInEnvironment = checkNotNull(listNodesInEnvironment, "listNodesInEnvironment");
       this.json = checkNotNull(json, "json");
    }
 
@@ -244,7 +244,7 @@ public class BaseChefService implements ChefService {
 
    @Override
    public Iterable<? extends Node> listNodesInEnvironment(String environmentName) {
-      return listEnvironmentNodes.execute(environmentName);
+      return listNodesInEnvironment.execute(environmentName);
    }
 
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/10261f74/apis/chef/src/main/java/org/jclouds/chef/strategy/ListEnvironmentNodes.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListEnvironmentNodes.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListEnvironmentNodes.java
deleted file mode 100644
index 6414994..0000000
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListEnvironmentNodes.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.chef.strategy;
-
-import org.jclouds.chef.domain.Node;
-import org.jclouds.chef.strategy.internal.ListEnvironmentNodesImpl;
-
-import com.google.common.base.Predicate;
-import com.google.common.util.concurrent.ListeningExecutorService;
-import com.google.inject.ImplementedBy;
-
-/**
- * 
- * 
- * @author Noorul Islam K M
- */
-@ImplementedBy(ListEnvironmentNodesImpl.class)
-public interface ListEnvironmentNodes {
-
-   public Iterable<? extends Node> execute(String environmentName);
-
-   public Iterable<? extends Node> execute(String environmentName, Predicate<String> nodeNameSelector);
-
-   public Iterable<? extends Node> execute(String environmentName, Iterable<String> toGet);
-
-   public Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName);
-
-   public Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName, Predicate<String> nodeNameSelector);
-
-   public Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName, Iterable<String> toGet);
-}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/10261f74/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
new file mode 100644
index 0000000..c007d0e
--- /dev/null
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.chef.strategy;
+
+import org.jclouds.chef.domain.Node;
+import org.jclouds.chef.strategy.internal.ListNodesInEnvironmentImpl;
+
+import com.google.common.base.Predicate;
+import com.google.common.util.concurrent.ListeningExecutorService;
+import com.google.inject.ImplementedBy;
+
+/**
+ * 
+ * 
+ * @author Noorul Islam K M
+ */
+@ImplementedBy(ListNodesInEnvironmentImpl.class)
+public interface ListNodesInEnvironment {
+
+   public Iterable<? extends Node> execute(String environmentName);
+
+   public Iterable<? extends Node> execute(String environmentName, Predicate<String> nodeNameSelector);
+
+   public Iterable<? extends Node> execute(String environmentName, Iterable<String> toGet);
+
+   public Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName);
+
+   public Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName, Predicate<String> nodeNameSelector);
+
+   public Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName, Iterable<String> toGet);
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/10261f74/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListEnvironmentNodesImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListEnvironmentNodesImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListEnvironmentNodesImpl.java
deleted file mode 100644
index c017828..0000000
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListEnvironmentNodesImpl.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.chef.strategy.internal;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.collect.Iterables.filter;
-import static com.google.common.collect.Iterables.transform;
-import static com.google.common.util.concurrent.Futures.allAsList;
-import static com.google.common.util.concurrent.Futures.getUnchecked;
-
-import java.util.List;
-import java.util.concurrent.Callable;
-
-import javax.annotation.Resource;
-import javax.inject.Named;
-import javax.inject.Singleton;
-
-import org.jclouds.Constants;
-import org.jclouds.chef.ChefApi;
-import org.jclouds.chef.config.ChefProperties;
-import org.jclouds.chef.domain.Node;
-import org.jclouds.chef.strategy.ListEnvironmentNodes;
-import org.jclouds.logging.Logger;
-
-import com.google.common.base.Function;
-import com.google.common.base.Joiner;
-import com.google.common.base.Predicate;
-import com.google.common.util.concurrent.ListenableFuture;
-import com.google.common.util.concurrent.ListeningExecutorService;
-import com.google.inject.Inject;
-
-/**
- * 
- * 
- * @author Noorul Islam K M
- */
-@Singleton
-public class ListEnvironmentNodesImpl implements ListEnvironmentNodes {
-
-   protected final ChefApi api;
-   protected final ListeningExecutorService userExecutor;
-   @Resource
-   @Named(ChefProperties.CHEF_LOGGER)
-   protected Logger logger = Logger.NULL;
-
-   @Inject
-   ListEnvironmentNodesImpl(@Named(Constants.PROPERTY_USER_THREADS) ListeningExecutorService userExecutor, ChefApi api) {
-      this.userExecutor = checkNotNull(userExecutor, "userExecuor");
-      this.api = checkNotNull(api, "api");
-   }
-
-   @Override
-   public Iterable<? extends Node> execute(String environmentName) {
-      return execute(userExecutor, environmentName);
-   }
-
-   @Override
-   public Iterable<? extends Node> execute(String environmentName, Predicate<String> nodeNameSelector) {
-      return execute(userExecutor, environmentName, nodeNameSelector);
-   }
-
-   @Override
-   public Iterable<? extends Node> execute(String environmentName, Iterable<String> toGet) {
-      return execute(userExecutor, environmentName, toGet);
-   }
-
-   @Override
-   public Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName) {
-      return execute(executor, environmentName, api.listNodesInEnvironment(environmentName));
-   }
-
-   @Override
-   public Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName, Predicate<String> nodeNameSelector) {
-      return execute(executor, environmentName, filter(api.listNodesInEnvironment(environmentName), nodeNameSelector));
-   }
-
-   @Override
-   public Iterable<? extends Node> execute(final ListeningExecutorService executor, String environmentName, Iterable<String> toGet) {
-      ListenableFuture<List<Node>> futures = allAsList(transform(toGet, new Function<String, ListenableFuture<Node>>() {
-         @Override
-         public ListenableFuture<Node> apply(final String input) {
-            return executor.submit(new Callable<Node>() {
-               @Override
-               public Node call() throws Exception {
-                  return api.getNode(input);
-               }
-            });
-         }
-      }));
-
-      logger.trace(String.format("getting nodes in environment %s: %s", environmentName, Joiner.on(',').join(toGet)));
-      return getUnchecked(futures);
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/10261f74/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImpl.java
new file mode 100644
index 0000000..c430b95
--- /dev/null
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImpl.java
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.chef.strategy.internal;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.common.collect.Iterables.filter;
+import static com.google.common.collect.Iterables.transform;
+import static com.google.common.util.concurrent.Futures.allAsList;
+import static com.google.common.util.concurrent.Futures.getUnchecked;
+
+import java.util.List;
+import java.util.concurrent.Callable;
+
+import javax.annotation.Resource;
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import org.jclouds.Constants;
+import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.config.ChefProperties;
+import org.jclouds.chef.domain.Node;
+import org.jclouds.chef.strategy.ListNodesInEnvironment;
+import org.jclouds.logging.Logger;
+
+import com.google.common.base.Function;
+import com.google.common.base.Joiner;
+import com.google.common.base.Predicate;
+import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.ListeningExecutorService;
+import com.google.inject.Inject;
+
+/**
+ * 
+ * 
+ * @author Noorul Islam K M
+ */
+@Singleton
+public class ListNodesInEnvironmentImpl implements ListNodesInEnvironment {
+
+   protected final ChefApi api;
+   protected final ListeningExecutorService userExecutor;
+   @Resource
+   @Named(ChefProperties.CHEF_LOGGER)
+   protected Logger logger = Logger.NULL;
+
+   @Inject
+   ListNodesInEnvironmentImpl(@Named(Constants.PROPERTY_USER_THREADS) ListeningExecutorService userExecutor, ChefApi api) {
+      this.userExecutor = checkNotNull(userExecutor, "userExecuor");
+      this.api = checkNotNull(api, "api");
+   }
+
+   @Override
+   public Iterable<? extends Node> execute(String environmentName) {
+      return execute(userExecutor, environmentName);
+   }
+
+   @Override
+   public Iterable<? extends Node> execute(String environmentName, Predicate<String> nodeNameSelector) {
+      return execute(userExecutor, environmentName, nodeNameSelector);
+   }
+
+   @Override
+   public Iterable<? extends Node> execute(String environmentName, Iterable<String> toGet) {
+      return execute(userExecutor, environmentName, toGet);
+   }
+
+   @Override
+   public Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName) {
+      return execute(executor, environmentName, api.listNodesInEnvironment(environmentName));
+   }
+
+   @Override
+   public Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName, Predicate<String> nodeNameSelector) {
+      return execute(executor, environmentName, filter(api.listNodesInEnvironment(environmentName), nodeNameSelector));
+   }
+
+   @Override
+   public Iterable<? extends Node> execute(final ListeningExecutorService executor, String environmentName, Iterable<String> toGet) {
+      ListenableFuture<List<Node>> futures = allAsList(transform(toGet, new Function<String, ListenableFuture<Node>>() {
+         @Override
+         public ListenableFuture<Node> apply(final String input) {
+            return executor.submit(new Callable<Node>() {
+               @Override
+               public Node call() throws Exception {
+                  return api.getNode(input);
+               }
+            });
+         }
+      }));
+
+      logger.trace(String.format("getting nodes in environment %s: %s", environmentName, Joiner.on(',').join(toGet)));
+      return getUnchecked(futures);
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/10261f74/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/GetEnvironmentNodesImplLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/GetEnvironmentNodesImplLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/GetEnvironmentNodesImplLiveTest.java
deleted file mode 100644
index 706f275..0000000
--- a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/GetEnvironmentNodesImplLiveTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.chef.strategy.internal;
-
-import static com.google.common.collect.Iterables.size;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import org.jclouds.chef.ChefApi;
-import org.jclouds.chef.internal.BaseChefLiveTest;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.ImmutableSet;
-
-/**
- * Tests behavior of {@code GetEnvironmentNodesImpl} strategies
- *
- * @author Noorul Islam K M
- */
-@Test(groups = "live", testName = "GetEnvironmentNodesImplLiveTest")
-public class GetEnvironmentNodesImplLiveTest extends BaseChefLiveTest<ChefApi> {
-
-   private ListEnvironmentNodesImpl strategy;
-   private CreateNodeAndPopulateAutomaticAttributesImpl creator;
-
-   @Override
-   protected void initialize() {
-      super.initialize();
-      this.creator = injector.getInstance(CreateNodeAndPopulateAutomaticAttributesImpl.class);
-      this.strategy = injector.getInstance(ListEnvironmentNodesImpl.class);
-      creator.execute(prefix, ImmutableSet.<String> of());
-      creator.execute(prefix + 1, ImmutableSet.<String> of());
-   }
-
-   @AfterClass(groups = { "integration", "live" })
-   @Override
-   protected void tearDown() {
-      api.deleteNode(prefix);
-      api.deleteNode(prefix + 1);
-      super.tearDown();
-   }
-
-   @Test
-   public void testExecute() {
-      assertTrue(size(strategy.execute("_default")) > 0, "Expected one or more elements");
-   }
-
-   @Test
-   public void testExecutePredicateOfString() {
-      assertEquals(size(strategy.execute("_default", new Predicate<String>() {
-
-         @Override
-         public boolean apply(String input) {
-            return input.startsWith(prefix);
-         }
-
-      })), 2);
-   }
-
-   @Test
-   public void testExecuteIterableOfString() {
-      assertEquals(size(strategy.execute("_default", ImmutableSet.of(prefix, prefix + 1))), 2);
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/10261f74/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/GetNodesImplLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/GetNodesImplLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/GetNodesImplLiveTest.java
deleted file mode 100644
index 1b36471..0000000
--- a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/GetNodesImplLiveTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.chef.strategy.internal;
-
-import static com.google.common.collect.Iterables.size;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import org.jclouds.chef.ChefApi;
-import org.jclouds.chef.internal.BaseChefLiveTest;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.Test;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.ImmutableSet;
-
-/**
- * Tests behavior of {@code GetNodesImpl} strategies
- * 
- * @author Adrian Cole
- */
-@Test(groups = "live", testName = "GetNodesImplLiveTest")
-public class GetNodesImplLiveTest extends BaseChefLiveTest<ChefApi> {
-
-   private ListNodesImpl strategy;
-   private CreateNodeAndPopulateAutomaticAttributesImpl creator;
-
-   @Override
-   protected void initialize() {
-      super.initialize();
-      this.creator = injector.getInstance(CreateNodeAndPopulateAutomaticAttributesImpl.class);
-      this.strategy = injector.getInstance(ListNodesImpl.class);
-      creator.execute(prefix, ImmutableSet.<String> of());
-      creator.execute(prefix + 1, ImmutableSet.<String> of());
-   }
-
-   @AfterClass(groups = { "integration", "live" })
-   @Override
-   protected void tearDown() {
-      api.deleteNode(prefix);
-      api.deleteNode(prefix + 1);
-      super.tearDown();
-   }
-
-   @Test
-   public void testExecute() {
-      assertTrue(size(strategy.execute()) > 0, "Expected one or more elements");
-   }
-
-   @Test
-   public void testExecutePredicateOfString() {
-      assertEquals(size(strategy.execute(new Predicate<String>() {
-
-         @Override
-         public boolean apply(String input) {
-            return input.startsWith(prefix);
-         }
-
-      })), 2);
-   }
-
-   @Test
-   public void testExecuteIterableOfString() {
-      assertEquals(size(strategy.execute(ImmutableSet.of(prefix, prefix + 1))), 2);
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/10261f74/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesImplLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesImplLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesImplLiveTest.java
new file mode 100644
index 0000000..80b9678
--- /dev/null
+++ b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesImplLiveTest.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.chef.strategy.internal;
+
+import static com.google.common.collect.Iterables.size;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.internal.BaseChefLiveTest;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.Test;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.ImmutableSet;
+
+/**
+ * Tests behavior of {@code ListNodesImpl} strategies
+ * 
+ * @author Adrian Cole
+ */
+@Test(groups = "live", testName = "ListNodesImplLiveTest")
+public class ListNodesImplLiveTest extends BaseChefLiveTest<ChefApi> {
+
+   private ListNodesImpl strategy;
+   private CreateNodeAndPopulateAutomaticAttributesImpl creator;
+
+   @Override
+   protected void initialize() {
+      super.initialize();
+      this.creator = injector.getInstance(CreateNodeAndPopulateAutomaticAttributesImpl.class);
+      this.strategy = injector.getInstance(ListNodesImpl.class);
+      creator.execute(prefix, ImmutableSet.<String> of());
+      creator.execute(prefix + 1, ImmutableSet.<String> of());
+   }
+
+   @AfterClass(groups = { "integration", "live" })
+   @Override
+   protected void tearDown() {
+      api.deleteNode(prefix);
+      api.deleteNode(prefix + 1);
+      super.tearDown();
+   }
+
+   @Test
+   public void testExecute() {
+      assertTrue(size(strategy.execute()) > 0, "Expected one or more elements");
+   }
+
+   @Test
+   public void testExecutePredicateOfString() {
+      assertEquals(size(strategy.execute(new Predicate<String>() {
+
+         @Override
+         public boolean apply(String input) {
+            return input.startsWith(prefix);
+         }
+
+      })), 2);
+   }
+
+   @Test
+   public void testExecuteIterableOfString() {
+      assertEquals(size(strategy.execute(ImmutableSet.of(prefix, prefix + 1))), 2);
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/10261f74/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImplLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImplLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImplLiveTest.java
new file mode 100644
index 0000000..0d19c12
--- /dev/null
+++ b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImplLiveTest.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.chef.strategy.internal;
+
+import static com.google.common.collect.Iterables.size;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.internal.BaseChefLiveTest;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.Test;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.ImmutableSet;
+
+/**
+ * Tests behavior of {@code ListNodesInEnvironmentImpl} strategies
+ *
+ * @author Noorul Islam K M
+ */
+@Test(groups = "live", testName = "ListNodesInEnvironmentImplLiveTest")
+public class ListNodesInEnvironmentImplLiveTest extends BaseChefLiveTest<ChefApi> {
+
+   private ListNodesInEnvironmentImpl strategy;
+   private CreateNodeAndPopulateAutomaticAttributesImpl creator;
+
+   @Override
+   protected void initialize() {
+      super.initialize();
+      this.creator = injector.getInstance(CreateNodeAndPopulateAutomaticAttributesImpl.class);
+      this.strategy = injector.getInstance(ListNodesInEnvironmentImpl.class);
+      creator.execute(prefix, ImmutableSet.<String> of());
+      creator.execute(prefix + 1, ImmutableSet.<String> of());
+   }
+
+   @AfterClass(groups = { "integration", "live" })
+   @Override
+   protected void tearDown() {
+      api.deleteNode(prefix);
+      api.deleteNode(prefix + 1);
+      super.tearDown();
+   }
+
+   @Test
+   public void testExecute() {
+      assertTrue(size(strategy.execute("_default")) > 0, "Expected one or more elements");
+   }
+
+   @Test
+   public void testExecutePredicateOfString() {
+      assertEquals(size(strategy.execute("_default", new Predicate<String>() {
+
+         @Override
+         public boolean apply(String input) {
+            return input.startsWith(prefix);
+         }
+
+      })), 2);
+   }
+
+   @Test
+   public void testExecuteIterableOfString() {
+      assertEquals(size(strategy.execute("_default", ImmutableSet.of(prefix, prefix + 1))), 2);
+   }
+
+}


[48/50] [abbrv] git commit: Promoted jclouds-chef/enterprise to providers/chef

Posted by na...@apache.org.
Promoted jclouds-chef/enterprise to providers/chef


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/8a2de9a5
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/8a2de9a5
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/8a2de9a5

Branch: refs/heads/master
Commit: 8a2de9a5c7c0a63d51b473cbdaec997f92bc397d
Parents: aa17a4f 3123f8d
Author: Ignasi Barrera <na...@apache.org>
Authored: Fri Oct 10 15:11:08 2014 +0200
Committer: Ignasi Barrera <na...@apache.org>
Committed: Fri Oct 10 15:11:08 2014 +0200

----------------------------------------------------------------------
 providers/enterprisechef/pom.xml                | 110 ++++++++++
 .../enterprisechef/EnterpriseChefApi.java       | 124 +++++++++++
 .../EnterpriseChefApiMetadata.java              |  82 +++++++
 .../EnterpriseChefProviderMetadata.java         |  86 ++++++++
 .../BindGroupToUpdateRequestJsonPayload.java    |  79 +++++++
 .../enterprisechef/binders/GroupName.java       |  38 ++++
 .../config/EnterpriseChefHttpApiModule.java     |  36 +++
 .../jclouds/enterprisechef/domain/Group.java    | 211 ++++++++++++++++++
 .../org/jclouds/enterprisechef/domain/User.java | 220 +++++++++++++++++++
 .../org.jclouds.providers.ProviderMetadata      |   1 +
 .../EnterpriseChefApiExpectTest.java            | 209 ++++++++++++++++++
 .../EnterpriseChefApiLiveTest.java              | 122 ++++++++++
 .../EnterpriseChefProviderMetadataTest.java     |  31 +++
 ...BindGroupToUpdateRequestJsonPayloadTest.java |  82 +++++++
 .../enterprisechef/binders/GroupNameTest.java   |  40 ++++
 .../src/test/resources/group-update.json        |   1 +
 .../src/test/resources/group.json               |  14 ++
 .../src/test/resources/groups.json              |   7 +
 .../enterprisechef/src/test/resources/user.json |   9 +
 19 files changed, 1502 insertions(+)
----------------------------------------------------------------------



[45/50] [abbrv] git commit: Fix drift due to unasyncing

Posted by na...@apache.org.
Fix drift due to unasyncing


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/3883ff5b
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/3883ff5b
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/3883ff5b

Branch: refs/heads/master
Commit: 3883ff5bb167b29266304059bc759b2c03329b98
Parents: 8d9850d
Author: Adrian Cole <ad...@gmail.com>
Authored: Sun Oct 5 20:12:46 2014 -0700
Committer: Adrian Cole <ad...@gmail.com>
Committed: Sun Oct 5 20:22:19 2014 -0700

----------------------------------------------------------------------
 .../chef/test/config/TransientChefApiModule.java        |  2 --
 .../test/java/org/jclouds/chef/ChefApiExpectTest.java   |  8 ++++----
 .../src/test/java/org/jclouds/chef/ChefApiTest.java     | 12 ++++++------
 3 files changed, 10 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/3883ff5b/apis/chef/src/main/java/org/jclouds/chef/test/config/TransientChefApiModule.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/test/config/TransientChefApiModule.java b/apis/chef/src/main/java/org/jclouds/chef/test/config/TransientChefApiModule.java
index d9eab4d..bab35d0 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/test/config/TransientChefApiModule.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/test/config/TransientChefApiModule.java
@@ -40,7 +40,6 @@ import org.jclouds.crypto.Crypto;
 import org.jclouds.domain.JsonBall;
 import org.jclouds.rest.ConfiguresHttpApi;
 import org.jclouds.rest.config.RestModule;
-import org.jclouds.rest.config.SyncToAsyncHttpInvocationModule;
 
 import com.google.common.base.Optional;
 import com.google.common.base.Supplier;
@@ -58,7 +57,6 @@ public class TransientChefApiModule extends AbstractModule {
    @Override
    protected void configure() {
       install(new RestModule());
-      install(new SyncToAsyncHttpInvocationModule());
       bind(ChefApi.class).to(TransientChefApi.class);
       bind(LocalBlobStore.class).annotatedWith(Names.named("databags"))
             .toInstance(

http://git-wip-us.apache.org/repos/asf/jclouds/blob/3883ff5b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
index ea4070d..478959b 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
@@ -31,7 +31,7 @@ import org.jclouds.chef.options.SearchOptions;
 import org.jclouds.date.TimeStamp;
 import org.jclouds.http.HttpRequest;
 import org.jclouds.http.HttpResponse;
-import org.jclouds.rest.ConfiguresRestClient;
+import org.jclouds.rest.ConfiguresHttpApi;
 import org.testng.annotations.Test;
 
 import com.google.common.base.Supplier;
@@ -260,11 +260,11 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
 
    @Override
    protected Module createModule() {
-      return new TestChefRestClientModule();
+      return new TestChefHttpApiModule();
    }
 
-   @ConfiguresRestClient
-   static class TestChefRestClientModule extends ChefHttpApiModule {
+   @ConfiguresHttpApi
+   static class TestChefHttpApiModule extends ChefHttpApiModule {
       @Override
       protected String provideTimeStamp(@TimeStamp Supplier<String> cache) {
          return "timestamp";

http://git-wip-us.apache.org/repos/asf/jclouds/blob/3883ff5b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
index 434c22c..f998a95 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java
@@ -56,8 +56,8 @@ import org.jclouds.http.functions.ReturnInputStream;
 import org.jclouds.io.Payload;
 import org.jclouds.io.payloads.StringPayload;
 import org.jclouds.reflect.Invocation;
-import org.jclouds.rest.ConfiguresRestClient;
-import org.jclouds.rest.internal.BaseAsyncApiTest;
+import org.jclouds.rest.ConfiguresHttpApi;
+import org.jclouds.rest.internal.BaseRestAnnotationProcessingTest;
 import org.jclouds.rest.internal.GeneratedHttpRequest;
 import org.testng.annotations.Test;
 
@@ -71,7 +71,7 @@ import com.google.inject.Module;
  * Tests annotation parsing of {@code ChefApi}.
  */
 @Test(groups = { "unit" })
-public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
+public class ChefApiTest extends BaseRestAnnotationProcessingTest<ChefApi> {
 
    public void testCommitSandbox() throws SecurityException, NoSuchMethodException, IOException {
 
@@ -713,7 +713,7 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
 
    @Override
    protected Module createModule() {
-      return new TestChefRestClientModule();
+      return new TestChefHttpApiModule();
    }
 
    @Override
@@ -723,8 +723,8 @@ public class ChefApiTest extends BaseAsyncApiTest<ChefApi> {
       return props;
    }
 
-   @ConfiguresRestClient
-   static class TestChefRestClientModule extends ChefHttpApiModule {
+   @ConfiguresHttpApi
+   static class TestChefHttpApiModule extends ChefHttpApiModule {
       @Override
       protected String provideTimeStamp(@TimeStamp Supplier<String> cache) {
          return "timestamp";


[22/50] [abbrv] git commit: Fix checkstyle warnings

Posted by na...@apache.org.
Fix checkstyle warnings


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/6697e0ae
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/6697e0ae
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/6697e0ae

Branch: refs/heads/master
Commit: 6697e0ae9096026ed965f402eb7ee2957e4cefab
Parents: 6182a7e
Author: Noorul Islam K M <no...@noorul.com>
Authored: Thu Oct 31 09:50:20 2013 +0530
Committer: Ignasi Barrera <na...@apache.org>
Committed: Mon Nov 4 11:30:16 2013 +0100

----------------------------------------------------------------------
 .../main/java/org/jclouds/chef/config/ChefParserModule.java    | 6 +++---
 apis/chef/src/main/java/org/jclouds/chef/domain/Attribute.java | 2 +-
 .../src/main/java/org/jclouds/chef/domain/ChecksumStatus.java  | 2 +-
 apis/chef/src/main/java/org/jclouds/chef/domain/Client.java    | 2 +-
 apis/chef/src/main/java/org/jclouds/chef/domain/Resource.java  | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/6697e0ae/apis/chef/src/main/java/org/jclouds/chef/config/ChefParserModule.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/config/ChefParserModule.java b/apis/chef/src/main/java/org/jclouds/chef/config/ChefParserModule.java
index 67dd35a..3e3f13e 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/config/ChefParserModule.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/config/ChefParserModule.java
@@ -77,7 +77,7 @@ import com.google.inject.Provides;
  */
 public class ChefParserModule extends AbstractModule {
    @ImplementedBy(PrivateKeyAdapterImpl.class)
-   public static interface PrivateKeyAdapter extends JsonDeserializer<PrivateKey> {
+   public interface PrivateKeyAdapter extends JsonDeserializer<PrivateKey> {
 
    }
 
@@ -111,7 +111,7 @@ public class ChefParserModule extends AbstractModule {
    }
 
    @ImplementedBy(PublicKeyAdapterImpl.class)
-   public static interface PublicKeyAdapter extends JsonDeserializer<PublicKey> {
+   public interface PublicKeyAdapter extends JsonDeserializer<PublicKey> {
 
    }
 
@@ -145,7 +145,7 @@ public class ChefParserModule extends AbstractModule {
    }
 
    @ImplementedBy(X509CertificateAdapterImpl.class)
-   public static interface X509CertificateAdapter extends JsonDeserializer<X509Certificate> {
+   public interface X509CertificateAdapter extends JsonDeserializer<X509Certificate> {
 
    }
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/6697e0ae/apis/chef/src/main/java/org/jclouds/chef/domain/Attribute.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/Attribute.java b/apis/chef/src/main/java/org/jclouds/chef/domain/Attribute.java
index a5fb25d..c863af2 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/Attribute.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/Attribute.java
@@ -16,7 +16,7 @@
  */
 package org.jclouds.chef.domain;
 
-import static org.jclouds.chef.util.CollectionUtils.*;
+import static org.jclouds.chef.util.CollectionUtils.copyOfOrEmpty;
 import static com.google.common.base.Preconditions.checkNotNull;
 
 import java.beans.ConstructorProperties;

http://git-wip-us.apache.org/repos/asf/jclouds/blob/6697e0ae/apis/chef/src/main/java/org/jclouds/chef/domain/ChecksumStatus.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/ChecksumStatus.java b/apis/chef/src/main/java/org/jclouds/chef/domain/ChecksumStatus.java
index e1c77e9..fde8bd6 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/ChecksumStatus.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/ChecksumStatus.java
@@ -16,7 +16,7 @@
  */
 package org.jclouds.chef.domain;
 
-import static com.google.common.base.Preconditions.*;
+import static com.google.common.base.Preconditions.checkNotNull;
 import java.beans.ConstructorProperties;
 import java.net.URI;
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/6697e0ae/apis/chef/src/main/java/org/jclouds/chef/domain/Client.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/Client.java b/apis/chef/src/main/java/org/jclouds/chef/domain/Client.java
index 101638c..9586787 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/Client.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/Client.java
@@ -16,7 +16,7 @@
  */
 package org.jclouds.chef.domain;
 
-import static com.google.common.base.Preconditions.*;
+import static com.google.common.base.Preconditions.checkNotNull;
 
 import java.beans.ConstructorProperties;
 import java.security.PrivateKey;

http://git-wip-us.apache.org/repos/asf/jclouds/blob/6697e0ae/apis/chef/src/main/java/org/jclouds/chef/domain/Resource.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/Resource.java b/apis/chef/src/main/java/org/jclouds/chef/domain/Resource.java
index 15ac613..aa4e71c 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/Resource.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/Resource.java
@@ -16,7 +16,7 @@
  */
 package org.jclouds.chef.domain;
 
-import static com.google.common.base.Preconditions.*;
+import static com.google.common.base.Preconditions.checkNotNull;
 
 import java.beans.ConstructorProperties;
 import java.net.URI;


[04/50] [abbrv] git commit: Improved javadoc and parameter naming

Posted by na...@apache.org.
Improved javadoc and parameter naming


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/ec1f2375
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/ec1f2375
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/ec1f2375

Branch: refs/heads/master
Commit: ec1f2375f8e47c8015eafdceffaf9405b10b573a
Parents: ef7b7f7
Author: Ignasi Barrera <na...@apache.org>
Authored: Mon Sep 16 09:52:46 2013 +0200
Committer: Ignasi Barrera <na...@apache.org>
Committed: Mon Sep 16 09:52:46 2013 +0200

----------------------------------------------------------------------
 .../EnterpriseChefApiMetadata.java              |  2 +-
 .../EnterpriseChefApiExpectTest.java            | 20 ++++++++++----------
 ...BindGroupToUpdateRequestJsonPayloadTest.java |  2 +-
 3 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/ec1f2375/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java
index c2867a2..a0a6d08 100644
--- a/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java
+++ b/providers/enterprisechef/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java
@@ -62,7 +62,7 @@ public class EnterpriseChefApiMetadata extends BaseHttpApiMetadata<EnterpriseChe
                .name("Enterprise Chef Api")
                .identityName("User")
                .credentialName("Certificate")
-               .version(ChefApiMetadata.DEFAULT_VERSION)
+               .version(ChefApiMetadata.DEFAULT_API_VERSION)
                .documentation(URI.create("http://www.opscode.com/support"))
                .defaultEndpoint("https://api.opscode.com")
                .view(ChefContext.class)

http://git-wip-us.apache.org/repos/asf/jclouds/blob/ec1f2375/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java
index 98528c7..2a58dd0 100644
--- a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java
+++ b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java
@@ -56,7 +56,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
             signed(HttpRequest.builder() //
                   .method("GET") //
                   .endpoint("https://api.opscode.com/users/nacx") //
-                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
                   .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
             HttpResponse.builder().statusCode(200)
                   .payload(payloadFromResourceWithContentType("/user.json", MediaType.APPLICATION_JSON)) //
@@ -71,7 +71,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
       EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
             .method("GET") //
             .endpoint("https://api.opscode.com/users/foo") //
-            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
+            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
             .addHeader("Accept", MediaType.APPLICATION_JSON) //
             .build()), //
             HttpResponse.builder().statusCode(404).build());
@@ -84,7 +84,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
             signed(HttpRequest.builder() //
                   .method("GET") //
                   .endpoint("https://api.opscode.com/groups") //
-                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
                   .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
             HttpResponse.builder().statusCode(200)
                   .payload(payloadFromResourceWithContentType("/groups.json", MediaType.APPLICATION_JSON)) //
@@ -100,7 +100,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
             signed(HttpRequest.builder() //
                   .method("GET") //
                   .endpoint("https://api.opscode.com/groups/admins") //
-                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
                   .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
             HttpResponse.builder().statusCode(200)
                   .payload(payloadFromResourceWithContentType("/group.json", MediaType.APPLICATION_JSON)) //
@@ -115,7 +115,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
       EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
             .method("GET") //
             .endpoint("https://api.opscode.com/groups/foo") //
-            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
+            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
             .addHeader("Accept", MediaType.APPLICATION_JSON) //
             .build()), //
             HttpResponse.builder().statusCode(404).build());
@@ -127,7 +127,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
       EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
             .method("POST") //
             .endpoint("https://api.opscode.com/groups") //
-            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
+            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
             .addHeader("Accept", MediaType.APPLICATION_JSON) //
             .payload(payloadFromStringWithContentType("{\"groupname\":\"foo\"}", MediaType.APPLICATION_JSON)) //
             .build()), //
@@ -140,7 +140,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
       EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
             .method("DELETE") //
             .endpoint("https://api.opscode.com/groups/foo") //
-            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
+            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
             .addHeader("Accept", MediaType.APPLICATION_JSON) //
             .build()), //
             HttpResponse.builder().statusCode(200).build());
@@ -153,7 +153,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
       EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
             .method("DELETE") //
             .endpoint("https://api.opscode.com/groups/foo") //
-            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
+            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
             .addHeader("Accept", MediaType.APPLICATION_JSON) //
             .build()), //
             HttpResponse.builder().statusCode(404).build());
@@ -165,7 +165,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
       EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
             .method("PUT") //
             .endpoint("https://api.opscode.com/groups/admins") //
-            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
+            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
             .addHeader("Accept", MediaType.APPLICATION_JSON) //
             .payload(payloadFromResourceWithContentType("/group-update.json", MediaType.APPLICATION_JSON)) //
             .build()), //
@@ -180,7 +180,7 @@ public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<Enterpris
       EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
             .method("PUT") //
             .endpoint("https://api.opscode.com/groups/admins") //
-            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_VERSION) //
+            .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
             .addHeader("Accept", MediaType.APPLICATION_JSON) //
             .payload(payloadFromResourceWithContentType("/group-update.json", MediaType.APPLICATION_JSON)) //
             .build()), //

http://git-wip-us.apache.org/repos/asf/jclouds/blob/ec1f2375/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayloadTest.java
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayloadTest.java b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayloadTest.java
index 478235b..26a599d 100644
--- a/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayloadTest.java
+++ b/providers/enterprisechef/src/test/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayloadTest.java
@@ -45,7 +45,7 @@ public class BindGroupToUpdateRequestJsonPayloadTest {
    private Injector injector = Guice.createInjector(new AbstractModule() {
       @Override
       protected void configure() {
-         bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_VERSION);
+         bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
       }
    }, new ChefParserModule(), new GsonModule());
 


[12/50] [abbrv] git commit: JCLOUDS-285: Add name field in CookbookDefinition domain

Posted by na...@apache.org.
JCLOUDS-285: Add name field in CookbookDefinition domain


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/65b64b0f
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/65b64b0f
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/65b64b0f

Branch: refs/heads/master
Commit: 65b64b0f283ac151ee43ee605af4c4a7b1fbe5af
Parents: e780bf2
Author: Noorul Islam K M <no...@noorul.com>
Authored: Tue Sep 17 23:03:50 2013 +0530
Committer: Ignasi Barrera <na...@apache.org>
Committed: Thu Sep 19 15:13:25 2013 +0200

----------------------------------------------------------------------
 .../jclouds/chef/domain/CookbookDefinition.java | 33 +++++++++++++++++---
 .../ParseCookbookDefinitionFromJsonv10.java     |  8 ++++-
 .../ParseCookbookDefinitionListFromJsonv10.java | 17 ++++++++--
 .../org/jclouds/chef/ChefApiExpectTest.java     | 15 +++++++++
 .../ParseCookbookDefinitionFromJsonv10Test.java |  2 +-
 ...seCookbookDefinitionListFromJsonv10Test.java |  6 ++--
 .../chef/internal/BaseChefApiLiveTest.java      | 14 +++++++++
 apis/chef/src/test/resources/env_cookbooks.json | 20 ++++++++++++
 8 files changed, 104 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/65b64b0f/apis/chef/src/main/java/org/jclouds/chef/domain/CookbookDefinition.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/CookbookDefinition.java b/apis/chef/src/main/java/org/jclouds/chef/domain/CookbookDefinition.java
index 6531f03..b2f071a 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/CookbookDefinition.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/CookbookDefinition.java
@@ -38,9 +38,15 @@ public class CookbookDefinition {
    }
 
    public static class Builder {
+      private String name;
       private URI url;
       private ImmutableSet.Builder<Version> versions = ImmutableSet.builder();
 
+      public Builder name(String name) {
+         this.name = checkNotNull(name, "name");
+         return this;
+      }
+
       public Builder url(URI url) {
          this.url = checkNotNull(url, "url");
          return this;
@@ -56,20 +62,33 @@ public class CookbookDefinition {
          return this;
       }
 
+      public Builder from(CookbookDefinition def) {
+         this.url = checkNotNull(def.getUrl(), "url");
+         this.versions.addAll(checkNotNull(def.getVersions(), "versions"));
+         this.name = def.getName();
+         return this;
+      }
+
       public CookbookDefinition build() {
-         return new CookbookDefinition(url, versions.build());
+         return new CookbookDefinition(name, url, versions.build());
       }
    }
 
+   private final String name;
    private final URI url;
    private final Set<Version> versions;
 
-   @ConstructorProperties({ "url", "versions" })
-   protected CookbookDefinition(URI url, @Nullable Set<Version> versions) {
+   @ConstructorProperties({"name", "url", "versions" })
+   protected CookbookDefinition(String name, URI url, @Nullable Set<Version> versions) {
+      this.name = name;
       this.url = url;
       this.versions = copyOfOrEmpty(versions);
    }
 
+   public String getName() {
+      return name;
+   }
+
    public URI getUrl() {
       return url;
    }
@@ -82,6 +101,7 @@ public class CookbookDefinition {
    public int hashCode() {
       final int prime = 31;
       int result = 1;
+      result = prime * result + ((name == null) ? 0 : name.hashCode());
       result = prime * result + ((url == null) ? 0 : url.hashCode());
       result = prime * result + ((versions == null) ? 0 : versions.hashCode());
       return result;
@@ -96,6 +116,11 @@ public class CookbookDefinition {
       if (getClass() != obj.getClass())
          return false;
       CookbookDefinition other = (CookbookDefinition) obj;
+      if (name == null) {
+         if (other.name != null)
+            return false;
+      } else if (!name.equals(other.name))
+         return false;
       if (url == null) {
          if (other.url != null)
             return false;
@@ -111,7 +136,7 @@ public class CookbookDefinition {
 
    @Override
    public String toString() {
-      return "CookbookDefinition [url=" + url + ", versions=" + versions + "]";
+      return "CookbookDefinition [name=" + name + ", url=" + url + ", versions=" + versions + "]";
    }
 
    public static class Version {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/65b64b0f/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10.java
index 562a00a..80ba9af 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10.java
@@ -43,6 +43,12 @@ public class ParseCookbookDefinitionFromJsonv10 implements Function<HttpResponse
 
    @Override
    public CookbookDefinition apply(HttpResponse response) {
-      return parser.apply(response).values().iterator().next();
+      Map<String, CookbookDefinition> result = parser.apply(response);
+      String cookbookName = result.keySet().iterator().next();
+      CookbookDefinition def = result.values().iterator().next();
+      return CookbookDefinition.builder() //
+             .from(def) //
+             .name(cookbookName) //
+             .build();
    }
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/65b64b0f/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10.java
index 311e44b..019ed0d 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10.java
@@ -17,7 +17,6 @@
 package org.jclouds.chef.functions;
 
 import com.google.common.base.Function;
-import com.google.common.collect.Sets;
 import org.jclouds.chef.domain.CookbookDefinition;
 import org.jclouds.http.HttpResponse;
 import org.jclouds.http.functions.ParseJson;
@@ -27,6 +26,9 @@ import javax.inject.Singleton;
 import java.util.Map;
 import java.util.Set;
 
+import static com.google.common.collect.Iterables.transform;
+import static com.google.common.collect.Sets.newLinkedHashSet;
+
 /**
  * Parses the cookbook versions in a Chef Server >= 0.10.8.
  *
@@ -47,6 +49,17 @@ public class ParseCookbookDefinitionListFromJsonv10 implements Function<HttpResp
 
    @Override
    public Set<CookbookDefinition> apply(HttpResponse response) {
-      return Sets.newLinkedHashSet(parser.apply(response).values());
+      Set<Map.Entry<String, CookbookDefinition>> result = parser.apply(response).entrySet();
+      return newLinkedHashSet(transform(result, new Function<Map.Entry<String, CookbookDefinition>, CookbookDefinition>() {
+         @Override
+         public CookbookDefinition apply(Map.Entry<String, CookbookDefinition> input) {
+            String cookbookName = input.getKey();
+            CookbookDefinition def = input.getValue();
+            return CookbookDefinition.builder() //
+                   .from(def) //              
+                   .name(cookbookName) //
+                   .build();
+         }
+      }));
    }
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/65b64b0f/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
index 7706609..65344ef 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java
@@ -24,6 +24,7 @@ import java.util.Set;
 import javax.ws.rs.core.MediaType;
 
 import org.jclouds.chef.config.ChefHttpApiModule;
+import org.jclouds.chef.domain.CookbookDefinition;
 import org.jclouds.date.TimeStamp;
 import org.jclouds.http.HttpRequest;
 import org.jclouds.http.HttpResponse;
@@ -156,6 +157,20 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest<ChefApi> {
       assertTrue(nodes.isEmpty(), String.format("Expected nodes to be empty but was: %s", nodes));
    }
 
+   public void testListCookbooksInEnvironmentReturnsValidSet() {
+      ChefApi api = requestSendsResponse(
+            signed(HttpRequest.builder() //
+                  .method("GET") //
+                  .endpoint("http://localhost:4000/environments/dev/cookbooks") //
+                  .addHeader("X-Chef-Version", ChefApiMetadata.DEFAULT_API_VERSION) //
+                  .addHeader("Accept", MediaType.APPLICATION_JSON).build()), //
+            HttpResponse.builder().statusCode(200)
+                  .payload(payloadFromResourceWithContentType("/env_cookbooks.json", MediaType.APPLICATION_JSON)) //
+                  .build());
+      Set<CookbookDefinition> cookbooks = api.listCookbooksInEnvironment("dev");
+      assertEquals(cookbooks.size(), 2);
+   }
+
    @Override
    protected Module createModule() {
       return new TestChefRestClientModule();

http://git-wip-us.apache.org/repos/asf/jclouds/blob/65b64b0f/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10Test.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10Test.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10Test.java
index 0df9d64..b5d8a8b 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10Test.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10Test.java
@@ -58,7 +58,7 @@ public class ParseCookbookDefinitionFromJsonv10Test {
       CookbookDefinition.Version v420 = CookbookDefinition.Version.builder()
             .url(new URI("http://localhost:4000/cookbooks/apache2/4.2.0")).version("4.2.0").build();
       CookbookDefinition definition = CookbookDefinition.builder()
-            .url(new URI("http://localhost:4000/cookbooks/apache2")).version(v510).version(v420).build();
+            .name("apache2").url(new URI("http://localhost:4000/cookbooks/apache2")).version(v510).version(v420).build();
 
       assertEquals(handler.apply(HttpResponse
             .builder()

http://git-wip-us.apache.org/repos/asf/jclouds/blob/65b64b0f/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10Test.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10Test.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10Test.java
index b39343d..04f8e35 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10Test.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10Test.java
@@ -59,14 +59,14 @@ public class ParseCookbookDefinitionListFromJsonv10Test {
       CookbookDefinition.Version v420 = CookbookDefinition.Version.builder()
             .url(new URI("http://localhost:4000/cookbooks/apache2/4.2.0")).version("4.2.0").build();
       CookbookDefinition apache2 = CookbookDefinition.builder()
-            .url(new URI("http://localhost:4000/cookbooks/apache2")).version(v510).version(v420).build();
+            .name("apache2").url(new URI("http://localhost:4000/cookbooks/apache2")).version(v510).version(v420).build();
       
       CookbookDefinition.Version v100 = CookbookDefinition.Version.builder()
             .url(new URI("http://localhost:4000/cookbooks/nginx/1.0.0")).version("1.0.0").build();
-      CookbookDefinition.Version v130 = CookbookDefinition.Version.builder()
+      CookbookDefinition.Version v030 = CookbookDefinition.Version.builder()
             .url(new URI("http://localhost:4000/cookbooks/nginx/0.3.0")).version("0.3.0").build();
       CookbookDefinition nginx = CookbookDefinition.builder()
-            .url(new URI("http://localhost:4000/cookbooks/nginx")).version(v100).version(v130).build();
+            .name("nginx").url(new URI("http://localhost:4000/cookbooks/nginx")).version(v100).version(v030).build();
       
       assertEquals(handler.apply(HttpResponse
             .builder()

http://git-wip-us.apache.org/repos/asf/jclouds/blob/65b64b0f/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
index a742bd1..6d5f075 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java
@@ -39,6 +39,7 @@ import java.util.Set;
 import org.jclouds.chef.ChefApi;
 import org.jclouds.chef.domain.ChecksumStatus;
 import org.jclouds.chef.domain.Client;
+import org.jclouds.chef.domain.CookbookDefinition;
 import org.jclouds.chef.domain.CookbookVersion;
 import org.jclouds.chef.domain.DatabagItem;
 import org.jclouds.chef.domain.Environment;
@@ -64,6 +65,9 @@ import com.google.common.collect.ImmutableSet;
 import com.google.common.io.Closeables;
 import com.google.common.primitives.Bytes;
 
+import static com.google.common.collect.Iterables.any;
+import static com.google.common.collect.Iterables.all;
+
 /**
  * Tests behavior of {@code ChefApi}
  * 
@@ -483,6 +487,16 @@ public abstract class BaseChefApiLiveTest<A extends ChefApi> extends BaseChefLiv
       assertTrue(!nodeList.isEmpty());
    }
 
+   @Test(dependsOnMethods = "testCreateNewCookbook")
+   public void testListCookbooksInEnvironment() throws Exception {
+      Set<CookbookDefinition> cookbooks = api.listCookbooksInEnvironment("_default");
+      assertTrue(any(cookbooks, new Predicate<CookbookDefinition>() {
+         @Override
+         public boolean apply(CookbookDefinition input) {
+            return PREFIX.equals(input.getName());
+         }}), String.format("Cookbook %s not in %s", PREFIX, cookbooks));
+   }
+
    @AfterClass(groups = { "live", "integration" })
    @Override
    public void tearDown() {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/65b64b0f/apis/chef/src/test/resources/env_cookbooks.json
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/env_cookbooks.json b/apis/chef/src/test/resources/env_cookbooks.json
new file mode 100644
index 0000000..ee7114f
--- /dev/null
+++ b/apis/chef/src/test/resources/env_cookbooks.json
@@ -0,0 +1,20 @@
+{
+  "apache2" => {
+    "url" => "http://localhost:4000/cookbooks/apache2",
+    "versions" => [
+      {"url" => "http://localhost:4000/cookbooks/apache2/5.1.0",
+       "version" => "5.1.0"},
+      {"url" => "http://localhost:4000/cookbooks/apache2/4.2.0",
+       "version" => "4.2.0"}
+    ]
+  },
+  "nginx" => {
+    "url" => "http://localhost:4000/cookbooks/nginx",
+    "versions" => [
+      {"url" => "http://localhost:4000/cookbooks/nginx/1.0.0",
+       "version" => "1.0.0"},
+      {"url" => "http://localhost:4000/cookbooks/nginx/0.3.0",
+       "version" => "0.3.0"}
+    ]
+  }
+}


[44/50] [abbrv] git commit: Correct Checkstyle violations

Posted by na...@apache.org.
Correct Checkstyle violations


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/8d9850d8
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/8d9850d8
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/8d9850d8

Branch: refs/heads/master
Commit: 8d9850d8da84744257df8f5d9241885a08ed253c
Parents: cd4ce6b
Author: Andrew Gaul <ga...@apache.org>
Authored: Sun Aug 31 20:03:49 2014 -0700
Committer: Andrew Gaul <ga...@apache.org>
Committed: Sun Aug 31 20:04:03 2014 -0700

----------------------------------------------------------------------
 .../src/main/java/org/jclouds/chef/config/ChefProperties.java   | 5 ++++-
 .../main/java/org/jclouds/chef/internal/BaseChefService.java    | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/8d9850d8/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java b/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java
index 211b5d6..affc9a3 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java
@@ -20,7 +20,7 @@ package org.jclouds.chef.config;
 /**
  * Configuration properties and constants used in Chef connections.
  */
-public interface ChefProperties {
+public final class ChefProperties {
 
    /**
     * The name of the Chef logger.
@@ -107,4 +107,7 @@ public interface ChefProperties {
     */
    public static final String CHEF_USE_OMNIBUS = "chef.use-omnibus";
 
+   private ChefProperties() {
+      throw new AssertionError("intentionally unimplemented");
+   }
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/8d9850d8/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java b/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
index 1a3b153..3e5769b 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
@@ -128,7 +128,7 @@ public class BaseChefService implements ChefService {
       this.runListForGroup = checkNotNull(runListForGroup, "runListForGroup");
       this.listEnvironments = checkNotNull(listEnvironments, "listEnvironments");
       this.listNodesInEnvironment = checkNotNull(listNodesInEnvironment, "listNodesInEnvironment");
-      this.listCookbookVersionsInEnvironment = checkNotNull(listCookbookVersionsInEnvironment,"listCookbookVersionsInEnvironment");
+      this.listCookbookVersionsInEnvironment = checkNotNull(listCookbookVersionsInEnvironment, "listCookbookVersionsInEnvironment");
       this.json = checkNotNull(json, "json");
       this.crypto = checkNotNull(crypto, "crypto");
    }


[30/50] [abbrv] git commit: Migrate InputSupplier callers to ByteSource

Posted by na...@apache.org.
Migrate InputSupplier callers to ByteSource

A future version of Guava will remove InputSupplier.


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/58021604
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/58021604
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/58021604

Branch: refs/heads/master
Commit: 58021604a96d1ceae4f83aac567f7c15129acb1d
Parents: 3b7d657
Author: Andrew Gaul <ga...@apache.org>
Authored: Sat May 17 00:42:21 2014 -0700
Committer: Andrew Gaul <ga...@apache.org>
Committed: Sat May 17 00:44:17 2014 -0700

----------------------------------------------------------------------
 .../java/org/jclouds/chef/config/BaseChefHttpApiModule.java  | 6 +++---
 .../main/java/org/jclouds/chef/config/ChefParserModule.java  | 8 ++++----
 .../org/jclouds/chef/functions/ParseClientFromJsonTest.java  | 6 ++++--
 3 files changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/58021604/apis/chef/src/main/java/org/jclouds/chef/config/BaseChefHttpApiModule.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/config/BaseChefHttpApiModule.java b/apis/chef/src/main/java/org/jclouds/chef/config/BaseChefHttpApiModule.java
index c7816cb..83a9e29 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/config/BaseChefHttpApiModule.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/config/BaseChefHttpApiModule.java
@@ -62,7 +62,7 @@ import com.google.common.base.Supplier;
 import com.google.common.cache.CacheBuilder;
 import com.google.common.cache.CacheLoader;
 import com.google.common.cache.LoadingCache;
-import com.google.common.io.ByteStreams;
+import com.google.common.io.ByteSource;
 import com.google.inject.ConfigurationException;
 import com.google.inject.Injector;
 import com.google.inject.Key;
@@ -137,7 +137,7 @@ public abstract class BaseChefHttpApiModule<S> extends HttpApiModule<S> {
       public PrivateKey load(Credentials in) {
          try {
             return crypto.rsaKeyFactory().generatePrivate(
-                  privateKeySpec(ByteStreams.newInputStreamSupplier(in.credential.getBytes(Charsets.UTF_8))));
+                  privateKeySpec(ByteSource.wrap(in.credential.getBytes(Charsets.UTF_8))));
          } catch (InvalidKeySpecException e) {
             throw propagate(e);
          } catch (IOException e) {
@@ -171,7 +171,7 @@ public abstract class BaseChefHttpApiModule<S> extends HttpApiModule<S> {
       try {
          String validatorCredential = injector.getInstance(key);
          PrivateKey validatorKey = crypto.rsaKeyFactory().generatePrivate(
-               Pems.privateKeySpec(ByteStreams.newInputStreamSupplier(validatorCredential.getBytes(Charsets.UTF_8))));
+               Pems.privateKeySpec(ByteSource.wrap(validatorCredential.getBytes(Charsets.UTF_8))));
          return Optional.<PrivateKey> of(validatorKey);
       } catch (ConfigurationException ex) {
          return Optional.<PrivateKey> absent();

http://git-wip-us.apache.org/repos/asf/jclouds/blob/58021604/apis/chef/src/main/java/org/jclouds/chef/config/ChefParserModule.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/config/ChefParserModule.java b/apis/chef/src/main/java/org/jclouds/chef/config/ChefParserModule.java
index 3e3f13e..baca929 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/config/ChefParserModule.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/config/ChefParserModule.java
@@ -55,7 +55,7 @@ import com.google.common.base.Objects;
 import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Maps;
-import com.google.common.io.ByteStreams;
+import com.google.common.io.ByteSource;
 import com.google.gson.Gson;
 import com.google.gson.JsonDeserializationContext;
 import com.google.gson.JsonDeserializer;
@@ -96,7 +96,7 @@ public class ChefParserModule extends AbstractModule {
          String keyText = json.getAsString().replaceAll("\\n", "\n");
          try {
             return crypto.rsaKeyFactory().generatePrivate(
-                  Pems.privateKeySpec(ByteStreams.newInputStreamSupplier(keyText.getBytes(Charsets.UTF_8))));
+                  Pems.privateKeySpec(ByteSource.wrap(keyText.getBytes(Charsets.UTF_8))));
          } catch (UnsupportedEncodingException e) {
             Throwables.propagate(e);
             return null;
@@ -130,7 +130,7 @@ public class ChefParserModule extends AbstractModule {
          String keyText = json.getAsString().replaceAll("\\n", "\n");
          try {
             return crypto.rsaKeyFactory().generatePublic(
-                  Pems.publicKeySpec(ByteStreams.newInputStreamSupplier(keyText.getBytes(Charsets.UTF_8))));
+                  Pems.publicKeySpec(ByteSource.wrap(keyText.getBytes(Charsets.UTF_8))));
          } catch (UnsupportedEncodingException e) {
             Throwables.propagate(e);
             return null;
@@ -163,7 +163,7 @@ public class ChefParserModule extends AbstractModule {
             throws JsonParseException {
          String keyText = json.getAsString().replaceAll("\\n", "\n");
          try {
-            return Pems.x509Certificate(ByteStreams.newInputStreamSupplier(keyText.getBytes(Charsets.UTF_8)),
+            return Pems.x509Certificate(ByteSource.wrap(keyText.getBytes(Charsets.UTF_8)),
                   crypto.certFactory());
          } catch (UnsupportedEncodingException e) {
             Throwables.propagate(e);

http://git-wip-us.apache.org/repos/asf/jclouds/blob/58021604/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
index 7685a95..e21fb15 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java
@@ -39,6 +39,8 @@ import org.jclouds.rest.annotations.ApiVersion;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
+import com.google.common.base.Charsets;
+import com.google.common.io.ByteSource;
 import com.google.common.io.ByteStreams;
 import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
@@ -73,8 +75,8 @@ public class ParseClientFromJsonTest {
       handler = injector.getInstance(Key.get(new TypeLiteral<ParseJson<Client>>() {
       }));
       crypto = injector.getInstance(Crypto.class);
-      certificate = Pems.x509Certificate(Payloads.newStringPayload(CERTIFICATE), null);
-      privateKey = crypto.rsaKeyFactory().generatePrivate(Pems.privateKeySpec(Payloads.newStringPayload(PRIVATE_KEY)));
+      certificate = Pems.x509Certificate(ByteSource.wrap(CERTIFICATE.getBytes(Charsets.UTF_8)), null);
+      privateKey = crypto.rsaKeyFactory().generatePrivate(Pems.privateKeySpec(ByteSource.wrap(PRIVATE_KEY.getBytes(Charsets.UTF_8))));
    }
 
    public void test() throws IOException {


[47/50] [abbrv] git commit: Promoted jclouds-chef/core to apis/chef

Posted by na...@apache.org.
Promoted jclouds-chef/core to apis/chef


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/aa17a4f9
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/aa17a4f9
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/aa17a4f9

Branch: refs/heads/master
Commit: aa17a4f9f976a14deb71ced2c2c27b0b34eadd4b
Parents: 34663f3 3883ff5
Author: Ignasi Barrera <na...@apache.org>
Authored: Fri Oct 10 15:10:44 2014 +0200
Committer: Ignasi Barrera <na...@apache.org>
Committed: Fri Oct 10 15:10:44 2014 +0200

----------------------------------------------------------------------
 apis/chef/pom.xml                               | 134 +++
 apis/chef/src/main/clojure/org/jclouds/chef.clj | 261 ++++++
 .../src/main/java/org/jclouds/chef/ChefApi.java | 853 +++++++++++++++++++
 .../java/org/jclouds/chef/ChefApiMetadata.java  | 110 +++
 .../main/java/org/jclouds/chef/ChefContext.java |  37 +
 .../main/java/org/jclouds/chef/ChefService.java | 263 ++++++
 .../binders/BindChecksumsToJsonPayload.java     |  54 ++
 .../BindCreateClientOptionsToJsonPayload.java   |  71 ++
 .../BindGenerateKeyForClientToJsonPayload.java  |  35 +
 .../org/jclouds/chef/binders/DatabagItemId.java |  32 +
 .../jclouds/chef/binders/EnvironmentName.java   |  31 +
 .../java/org/jclouds/chef/binders/NodeName.java |  32 +
 .../java/org/jclouds/chef/binders/RoleName.java |  32 +
 .../chef/config/BaseChefHttpApiModule.java      | 208 +++++
 .../chef/config/ChefBootstrapModule.java        | 121 +++
 .../jclouds/chef/config/ChefHttpApiModule.java  |  28 +
 .../jclouds/chef/config/ChefParserModule.java   | 321 +++++++
 .../org/jclouds/chef/config/ChefProperties.java | 113 +++
 .../org/jclouds/chef/config/CookbookParser.java |  41 +
 .../chef/config/CookbookVersionsParser.java     |  41 +
 .../org/jclouds/chef/config/InstallChef.java    |  37 +
 .../java/org/jclouds/chef/config/Validator.java |  40 +
 .../java/org/jclouds/chef/domain/Attribute.java | 235 +++++
 .../jclouds/chef/domain/BootstrapConfig.java    |  95 +++
 .../org/jclouds/chef/domain/ChecksumStatus.java | 102 +++
 .../java/org/jclouds/chef/domain/Client.java    | 182 ++++
 .../jclouds/chef/domain/CookbookDefinition.java | 217 +++++
 .../jclouds/chef/domain/CookbookVersion.java    | 369 ++++++++
 .../org/jclouds/chef/domain/DatabagItem.java    |  63 ++
 .../org/jclouds/chef/domain/Environment.java    | 178 ++++
 .../java/org/jclouds/chef/domain/Metadata.java  | 447 ++++++++++
 .../main/java/org/jclouds/chef/domain/Node.java | 263 ++++++
 .../java/org/jclouds/chef/domain/Resource.java  | 169 ++++
 .../main/java/org/jclouds/chef/domain/Role.java | 205 +++++
 .../java/org/jclouds/chef/domain/Sandbox.java   | 195 +++++
 .../org/jclouds/chef/domain/SearchResult.java   |  46 +
 .../org/jclouds/chef/domain/UploadSandbox.java  | 136 +++
 .../jclouds/chef/filters/SignedHeaderAuth.java  | 199 +++++
 .../chef/functions/BootstrapConfigForGroup.java |  61 ++
 .../jclouds/chef/functions/ClientForGroup.java  |  69 ++
 .../chef/functions/GroupToBootScript.java       | 130 +++
 ...seCookbookDefinitionCheckingChefVersion.java |  49 ++
 .../ParseCookbookDefinitionFromJson.java        |  50 ++
 .../ParseCookbookDefinitionFromJsonv10.java     |  52 ++
 .../ParseCookbookDefinitionListFromJsonv10.java |  63 ++
 ...arseCookbookVersionsCheckingChefVersion.java |  49 ++
 .../ParseCookbookVersionsV09FromJson.java       |  49 ++
 .../ParseCookbookVersionsV10FromJson.java       |  59 ++
 .../ParseErrorFromJsonOrReturnBody.java         |  55 ++
 .../chef/functions/ParseKeySetFromJson.java     |  45 +
 .../functions/ParseSearchClientsFromJson.java   |  35 +
 .../functions/ParseSearchDatabagFromJson.java   |  77 ++
 .../ParseSearchEnvironmentsFromJson.java        |  35 +
 .../functions/ParseSearchNodesFromJson.java     |  35 +
 .../functions/ParseSearchResultFromJson.java    |  50 ++
 .../functions/ParseSearchRolesFromJson.java     |  35 +
 .../jclouds/chef/functions/RunListForGroup.java |  61 ++
 .../jclouds/chef/functions/UriForResource.java  |  42 +
 .../chef/handlers/ChefApiErrorRetryHandler.java |  67 ++
 .../jclouds/chef/handlers/ChefErrorHandler.java |  81 ++
 .../jclouds/chef/internal/BaseChefService.java  | 299 +++++++
 .../jclouds/chef/internal/ChefContextImpl.java  |  55 ++
 .../chef/options/CreateClientOptions.java       |  64 ++
 .../org/jclouds/chef/options/SearchOptions.java |  95 +++
 .../predicates/CookbookVersionPredicates.java   |  93 ++
 .../strategy/CleanupStaleNodesAndClients.java   |  32 +
 ...reateNodeAndPopulateAutomaticAttributes.java |  33 +
 .../chef/strategy/DeleteAllClientsInList.java   |  34 +
 .../chef/strategy/DeleteAllNodesInList.java     |  31 +
 .../org/jclouds/chef/strategy/ListClients.java  |  32 +
 .../chef/strategy/ListCookbookVersions.java     |  32 +
 .../ListCookbookVersionsInEnvironment.java      |  37 +
 .../jclouds/chef/strategy/ListEnvironments.java |  31 +
 .../org/jclouds/chef/strategy/ListNodes.java    |  32 +
 .../chef/strategy/ListNodesInEnvironment.java   |  32 +
 .../UpdateAutomaticAttributesOnNode.java        |  31 +
 .../internal/BaseListCookbookVersionsImpl.java  |  97 +++
 .../strategy/internal/BaseListNodesImpl.java    |  77 ++
 .../CleanupStaleNodesAndClientsImpl.java        | 102 +++
 ...eNodeAndPopulateAutomaticAttributesImpl.java |  83 ++
 .../internal/DeleteAllClientsInListImpl.java    |  85 ++
 .../internal/DeleteAllNodesInListImpl.java      |  81 ++
 .../chef/strategy/internal/ListClientsImpl.java | 109 +++
 .../internal/ListCookbookVersionsImpl.java      |  60 ++
 .../ListCookbookVersionsInEnvironmentImpl.java  | 117 +++
 .../strategy/internal/ListEnvironmentsImpl.java |  96 +++
 .../chef/strategy/internal/ListNodesImpl.java   |  62 ++
 .../internal/ListNodesInEnvironmentImpl.java    |  62 ++
 .../UpdateAutomaticAttributesOnNodeImpl.java    |  75 ++
 .../chef/suppliers/ChefVersionSupplier.java     |  73 ++
 .../org/jclouds/chef/test/TransientChefApi.java | 387 +++++++++
 .../chef/test/TransientChefApiMetadata.java     |  75 ++
 .../test/config/TransientChefApiModule.java     | 114 +++
 .../java/org/jclouds/chef/util/ChefUtils.java   |  71 ++
 .../org/jclouds/chef/util/CollectionUtils.java  |  69 ++
 .../org/jclouds/chef/util/RunListBuilder.java   |  83 ++
 .../main/java/org/jclouds/ohai/Automatic.java   |  33 +
 .../org/jclouds/ohai/AutomaticSupplier.java     |  48 ++
 .../org/jclouds/ohai/config/ConfiguresOhai.java |  28 +
 .../org/jclouds/ohai/config/JMXOhaiModule.java  |  48 ++
 .../org/jclouds/ohai/config/OhaiModule.java     | 183 ++++
 .../ohai/functions/ByteArrayToMacAddress.java   |  51 ++
 .../ohai/functions/MapSetToMultimap.java        |  42 +
 .../jclouds/ohai/functions/NestSlashKeys.java   | 156 ++++
 .../ohai/suppliers/UptimeSecondsSupplier.java   |  44 +
 .../services/org.jclouds.apis.ApiMetadata       |   2 +
 .../src/test/clojure/org/jclouds/chef_test.clj  |  70 ++
 .../org/jclouds/chef/BaseChefApiExpectTest.java |  44 +
 .../org/jclouds/chef/ChefApiExpectTest.java     | 279 ++++++
 .../java/org/jclouds/chef/ChefApiLiveTest.java  |  32 +
 .../org/jclouds/chef/ChefApiMetadataTest.java   |  33 +
 .../test/java/org/jclouds/chef/ChefApiTest.java | 741 ++++++++++++++++
 .../BindHexEncodedMD5sToJsonPayloadTest.java    |  70 ++
 .../chef/config/ChefParserModuleTest.java       |  93 ++
 .../chef/filters/SignedHeaderAuthTest.java      | 213 +++++
 .../functions/BootstrapConfigForGroupTest.java  |  74 ++
 .../chef/functions/ClientForGroupTest.java      | 106 +++
 .../chef/functions/GroupToBootScriptTest.java   | 230 +++++
 .../chef/functions/ParseClientFromJsonTest.java |  98 +++
 ...okbookDefinitionCheckingChefVersionTest.java |  62 ++
 .../ParseCookbookDefinitionFromJsonTest.java    |  72 ++
 .../ParseCookbookDefinitionFromJsonv10Test.java |  74 ++
 ...seCookbookDefinitionListFromJsonv10Test.java |  92 ++
 .../ParseCookbookVersionFromJsonTest.java       | 129 +++
 ...CookbookVersionsCheckingChefVersionTest.java |  62 ++
 .../ParseCookbookVersionsV09FromJsonTest.java   |  61 ++
 .../ParseCookbookVersionsV10FromJsonTest.java   |  68 ++
 .../functions/ParseDataBagItemFromJsonTest.java |  65 ++
 .../ParseErrorFromJsonOrReturnBodyTest.java     |  42 +
 .../chef/functions/ParseKeySetFromJsonTest.java |  66 ++
 .../chef/functions/ParseNodeFromJsonTest.java   |  73 ++
 .../functions/ParseSandboxFromJsonTest.java     |  71 ++
 .../ParseSearchDataBagItemFromJsonTest.java     |  62 ++
 .../ParseUploadSandboxFromJsonTest.java         |  87 ++
 .../chef/functions/RunListForGroupTest.java     |  92 ++
 .../chef/functions/UriForResourceTest.java      |  54 ++
 .../handlers/ChefApiErrorRetryHandlerTest.java  | 115 +++
 .../chef/internal/BaseChefApiLiveTest.java      | 542 ++++++++++++
 .../jclouds/chef/internal/BaseChefLiveTest.java |  96 +++
 .../chef/internal/BaseChefServiceTest.java      |  99 +++
 .../chef/internal/BaseStubbedOhaiLiveTest.java  |  60 ++
 ...CleanupStaleNodesAndClientsImplLiveTest.java |  61 ++
 ...PopulateAutomaticAttributesImplLiveTest.java |  62 ++
 ...eAndPopulateAutomaticAttributesImplTest.java |  61 ++
 ...DeleteAllApisAndNodesInListImplLiveTest.java |  64 ++
 ...okbookVersionsInEnvironmentImplLiveTest.java | 217 +++++
 .../internal/ListNodesImplLiveTest.java         |  82 ++
 .../ListNodesInEnvironmentImplLiveTest.java     |  86 ++
 ...teAutomaticAttributesOnNodeImplLiveTest.java |  61 ++
 ...UpdateAutomaticAttributesOnNodeImplTest.java |  63 ++
 .../chef/suppliers/ChefVersionSupplierTest.java |  47 +
 .../test/TransientChefApiIntegrationTest.java   |  69 ++
 .../chef/test/TransientChefApiMetadataTest.java |  33 +
 .../org/jclouds/chef/util/ChefUtilsTest.java    |  57 ++
 .../jclouds/chef/util/RunListBuilderTest.java   |  71 ++
 .../java/org/jclouds/ohai/config/JMXTest.java   |  82 ++
 .../org/jclouds/ohai/config/OhaiModuleTest.java | 147 ++++
 .../functions/ByteArrayToMacAddressTest.java    |  33 +
 .../ohai/functions/NestSlashKeysTest.java       | 117 +++
 .../resources/apache-chef-demo-cookbook.json    |  46 +
 apis/chef/src/test/resources/bootstrap-env.sh   |  56 ++
 apis/chef/src/test/resources/bootstrap.sh       |  56 ++
 apis/chef/src/test/resources/brew-cookbook.json |  48 ++
 apis/chef/src/test/resources/client.json        |   8 +
 apis/chef/src/test/resources/clients_list.json  |   5 +
 apis/chef/src/test/resources/data_list.json     |   4 +
 apis/chef/src/test/resources/env_cookbooks.json |  20 +
 .../src/test/resources/environment_recipes.json |   6 +
 apis/chef/src/test/resources/logback.xml        |  33 +
 .../chef/src/test/resources/mysql-cookbook.json | 268 ++++++
 apis/chef/src/test/resources/node.json          |  10 +
 apis/chef/src/test/resources/nodes_list.json    |   5 +
 apis/chef/src/test/resources/privkey.txt        |  27 +
 apis/chef/src/test/resources/pubkey.txt         |   9 +
 apis/chef/src/test/resources/roles_list.json    |   4 +
 apis/chef/src/test/resources/sandbox.json       |  12 +
 apis/chef/src/test/resources/search_role.json   |  34 +
 .../src/test/resources/search_role_empty.json   |   5 +
 .../src/test/resources/tomcat-cookbook.json     | 121 +++
 apis/chef/src/test/resources/upload-site.json   |  13 +
 180 files changed, 17251 insertions(+)
----------------------------------------------------------------------



[33/50] [abbrv] git commit: JCLOUDS-546: Remove Javadoc @author annotations

Posted by na...@apache.org.
JCLOUDS-546: Remove Javadoc @author annotations

Annotations removed with:

find -name \*.java | xargs sed -i /@author/d

Empty Javadoc removed with multiple iterations of:

find -name \*.java | xargs sed -i -z 's/ \*\n \*\// \*\//'
find -name \*.java | xargs sed -i -z 's/ \* \n \*\// \*\//'
find -name \*.java | xargs sed -i -z 's/\/\*\*\n \*\/\n//'


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/88a6a26b
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/88a6a26b
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/88a6a26b

Branch: refs/heads/master
Commit: 88a6a26b80ad22873919f83b18bdf48a77152833
Parents: 5802160
Author: Andrew Gaul <ga...@apache.org>
Authored: Fri Jun 6 22:25:04 2014 -0700
Committer: Andrew Gaul <ga...@apache.org>
Committed: Sat Jun 7 21:09:23 2014 -0700

----------------------------------------------------------------------
 apis/chef/src/main/java/org/jclouds/chef/ChefApi.java           | 3 ---
 apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java   | 3 ---
 apis/chef/src/main/java/org/jclouds/chef/ChefContext.java       | 2 --
 apis/chef/src/main/java/org/jclouds/chef/ChefService.java       | 2 --
 .../org/jclouds/chef/binders/BindChecksumsToJsonPayload.java    | 5 -----
 .../chef/binders/BindCreateClientOptionsToJsonPayload.java      | 2 --
 .../chef/binders/BindGenerateKeyForClientToJsonPayload.java     | 5 -----
 .../src/main/java/org/jclouds/chef/binders/DatabagItemId.java   | 4 ----
 apis/chef/src/main/java/org/jclouds/chef/binders/NodeName.java  | 4 ----
 apis/chef/src/main/java/org/jclouds/chef/binders/RoleName.java  | 4 ----
 .../java/org/jclouds/chef/config/BaseChefHttpApiModule.java     | 3 ---
 .../main/java/org/jclouds/chef/config/ChefBootstrapModule.java  | 2 --
 .../main/java/org/jclouds/chef/config/ChefHttpApiModule.java    | 3 ---
 .../src/main/java/org/jclouds/chef/config/ChefParserModule.java | 5 -----
 .../src/main/java/org/jclouds/chef/config/ChefProperties.java   | 2 --
 .../src/main/java/org/jclouds/chef/config/CookbookParser.java   | 2 --
 .../java/org/jclouds/chef/config/CookbookVersionsParser.java    | 2 --
 .../chef/src/main/java/org/jclouds/chef/config/InstallChef.java | 2 --
 apis/chef/src/main/java/org/jclouds/chef/config/Validator.java  | 2 --
 apis/chef/src/main/java/org/jclouds/chef/domain/Attribute.java  | 3 ---
 .../src/main/java/org/jclouds/chef/domain/BootstrapConfig.java  | 1 -
 .../src/main/java/org/jclouds/chef/domain/ChecksumStatus.java   | 3 ---
 apis/chef/src/main/java/org/jclouds/chef/domain/Client.java     | 3 ---
 .../main/java/org/jclouds/chef/domain/CookbookDefinition.java   | 2 --
 .../src/main/java/org/jclouds/chef/domain/CookbookVersion.java  | 3 ---
 .../chef/src/main/java/org/jclouds/chef/domain/DatabagItem.java | 3 ---
 .../chef/src/main/java/org/jclouds/chef/domain/Environment.java | 2 --
 apis/chef/src/main/java/org/jclouds/chef/domain/Metadata.java   | 3 ---
 apis/chef/src/main/java/org/jclouds/chef/domain/Node.java       | 3 ---
 apis/chef/src/main/java/org/jclouds/chef/domain/Resource.java   | 3 ---
 apis/chef/src/main/java/org/jclouds/chef/domain/Role.java       | 3 ---
 apis/chef/src/main/java/org/jclouds/chef/domain/Sandbox.java    | 3 ---
 .../src/main/java/org/jclouds/chef/domain/SearchResult.java     | 3 ---
 .../src/main/java/org/jclouds/chef/domain/UploadSandbox.java    | 3 ---
 .../main/java/org/jclouds/chef/filters/SignedHeaderAuth.java    | 2 --
 .../org/jclouds/chef/functions/BootstrapConfigForGroup.java     | 3 ---
 .../main/java/org/jclouds/chef/functions/ClientForGroup.java    | 2 --
 .../main/java/org/jclouds/chef/functions/GroupToBootScript.java | 2 --
 .../functions/ParseCookbookDefinitionCheckingChefVersion.java   | 2 --
 .../jclouds/chef/functions/ParseCookbookDefinitionFromJson.java | 2 --
 .../chef/functions/ParseCookbookDefinitionFromJsonv10.java      | 2 --
 .../chef/functions/ParseCookbookDefinitionListFromJsonv10.java  | 2 --
 .../functions/ParseCookbookVersionsCheckingChefVersion.java     | 2 --
 .../chef/functions/ParseCookbookVersionsV09FromJson.java        | 2 --
 .../chef/functions/ParseCookbookVersionsV10FromJson.java        | 2 --
 .../jclouds/chef/functions/ParseErrorFromJsonOrReturnBody.java  | 5 -----
 .../java/org/jclouds/chef/functions/ParseKeySetFromJson.java    | 3 ---
 .../org/jclouds/chef/functions/ParseSearchClientsFromJson.java  | 4 ----
 .../org/jclouds/chef/functions/ParseSearchDatabagFromJson.java  | 2 --
 .../jclouds/chef/functions/ParseSearchEnvironmentsFromJson.java | 3 ---
 .../org/jclouds/chef/functions/ParseSearchNodesFromJson.java    | 4 ----
 .../org/jclouds/chef/functions/ParseSearchResultFromJson.java   | 3 ---
 .../org/jclouds/chef/functions/ParseSearchRolesFromJson.java    | 4 ----
 .../main/java/org/jclouds/chef/functions/RunListForGroup.java   | 3 ---
 .../main/java/org/jclouds/chef/functions/UriForResource.java    | 2 --
 .../org/jclouds/chef/handlers/ChefApiErrorRetryHandler.java     | 2 --
 .../main/java/org/jclouds/chef/handlers/ChefErrorHandler.java   | 3 ---
 .../main/java/org/jclouds/chef/internal/BaseChefService.java    | 3 ---
 .../main/java/org/jclouds/chef/internal/ChefContextImpl.java    | 4 ----
 .../main/java/org/jclouds/chef/options/CreateClientOptions.java | 2 --
 .../src/main/java/org/jclouds/chef/options/SearchOptions.java   | 2 --
 .../org/jclouds/chef/predicates/CookbookVersionPredicates.java  | 2 --
 .../org/jclouds/chef/strategy/CleanupStaleNodesAndClients.java  | 2 --
 .../chef/strategy/CreateNodeAndPopulateAutomaticAttributes.java | 2 --
 .../java/org/jclouds/chef/strategy/DeleteAllClientsInList.java  | 3 ---
 .../java/org/jclouds/chef/strategy/DeleteAllNodesInList.java    | 5 -----
 .../src/main/java/org/jclouds/chef/strategy/ListClients.java    | 4 ----
 .../java/org/jclouds/chef/strategy/ListCookbookVersions.java    | 4 ----
 .../chef/strategy/ListCookbookVersionsInEnvironment.java        | 4 ----
 .../chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java | 4 ----
 .../java/org/jclouds/chef/strategy/ListNodesInEnvironment.java  | 4 ----
 .../jclouds/chef/strategy/UpdateAutomaticAttributesOnNode.java  | 2 --
 .../chef/strategy/internal/CleanupStaleNodesAndClientsImpl.java | 2 --
 .../internal/CreateNodeAndPopulateAutomaticAttributesImpl.java  | 2 --
 .../chef/strategy/internal/DeleteAllClientsInListImpl.java      | 3 ---
 .../chef/strategy/internal/DeleteAllNodesInListImpl.java        | 5 -----
 .../org/jclouds/chef/strategy/internal/ListClientsImpl.java     | 4 ----
 .../chef/strategy/internal/ListCookbookVersionsImpl.java        | 4 ----
 .../internal/ListCookbookVersionsInEnvironmentImpl.java         | 4 ----
 .../java/org/jclouds/chef/strategy/internal/ListNodesImpl.java  | 4 ----
 .../chef/strategy/internal/ListNodesInEnvironmentImpl.java      | 4 ----
 .../strategy/internal/UpdateAutomaticAttributesOnNodeImpl.java  | 2 --
 .../java/org/jclouds/chef/suppliers/ChefVersionSupplier.java    | 2 --
 .../src/main/java/org/jclouds/chef/test/TransientChefApi.java   | 2 --
 .../java/org/jclouds/chef/test/TransientChefApiMetadata.java    | 2 --
 .../org/jclouds/chef/test/config/TransientChefApiModule.java    | 4 ----
 apis/chef/src/main/java/org/jclouds/chef/util/ChefUtils.java    | 5 -----
 .../src/main/java/org/jclouds/chef/util/CollectionUtils.java    | 2 --
 .../src/main/java/org/jclouds/chef/util/RunListBuilder.java     | 2 --
 apis/chef/src/main/java/org/jclouds/ohai/Automatic.java         | 4 ----
 apis/chef/src/main/java/org/jclouds/ohai/AutomaticSupplier.java | 5 -----
 .../src/main/java/org/jclouds/ohai/config/ConfiguresOhai.java   | 4 ----
 .../src/main/java/org/jclouds/ohai/config/JMXOhaiModule.java    | 2 --
 apis/chef/src/main/java/org/jclouds/ohai/config/OhaiModule.java | 2 --
 .../java/org/jclouds/ohai/functions/ByteArrayToMacAddress.java  | 2 --
 .../main/java/org/jclouds/ohai/functions/MapSetToMultimap.java  | 4 ----
 .../src/main/java/org/jclouds/ohai/functions/NestSlashKeys.java | 5 -----
 .../java/org/jclouds/ohai/suppliers/UptimeSecondsSupplier.java  | 4 ----
 .../src/test/java/org/jclouds/chef/BaseChefApiExpectTest.java   | 2 --
 apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java | 2 --
 apis/chef/src/test/java/org/jclouds/chef/ChefApiLiveTest.java   | 2 --
 .../src/test/java/org/jclouds/chef/ChefApiMetadataTest.java     | 4 ----
 apis/chef/src/test/java/org/jclouds/chef/ChefApiTest.java       | 2 --
 .../chef/binders/BindHexEncodedMD5sToJsonPayloadTest.java       | 3 ---
 .../test/java/org/jclouds/chef/config/ChefParserModuleTest.java | 2 --
 .../java/org/jclouds/chef/filters/SignedHeaderAuthTest.java     | 4 ----
 .../org/jclouds/chef/functions/BootstrapConfigForGroupTest.java | 4 ----
 .../java/org/jclouds/chef/functions/ClientForGroupTest.java     | 3 ---
 .../java/org/jclouds/chef/functions/GroupToBootScriptTest.java  | 3 ---
 .../org/jclouds/chef/functions/ParseClientFromJsonTest.java     | 2 --
 .../ParseCookbookDefinitionCheckingChefVersionTest.java         | 2 --
 .../chef/functions/ParseCookbookDefinitionFromJsonTest.java     | 2 --
 .../chef/functions/ParseCookbookVersionFromJsonTest.java        | 3 ---
 .../functions/ParseCookbookVersionsCheckingChefVersionTest.java | 2 --
 .../chef/functions/ParseCookbookVersionsV09FromJsonTest.java    | 2 --
 .../chef/functions/ParseCookbookVersionsV10FromJsonTest.java    | 2 --
 .../jclouds/chef/functions/ParseDataBagItemFromJsonTest.java    | 3 ---
 .../chef/functions/ParseErrorFromJsonOrReturnBodyTest.java      | 3 ---
 .../org/jclouds/chef/functions/ParseKeySetFromJsonTest.java     | 2 --
 .../java/org/jclouds/chef/functions/ParseNodeFromJsonTest.java  | 2 --
 .../org/jclouds/chef/functions/ParseSandboxFromJsonTest.java    | 2 --
 .../chef/functions/ParseSearchDataBagItemFromJsonTest.java      | 3 ---
 .../jclouds/chef/functions/ParseUploadSandboxFromJsonTest.java  | 2 --
 .../java/org/jclouds/chef/functions/RunListForGroupTest.java    | 4 ----
 .../java/org/jclouds/chef/functions/UriForResourceTest.java     | 2 --
 .../org/jclouds/chef/handlers/ChefApiErrorRetryHandlerTest.java | 2 --
 .../java/org/jclouds/chef/internal/BaseChefApiLiveTest.java     | 2 --
 .../test/java/org/jclouds/chef/internal/BaseChefLiveTest.java   | 4 ----
 .../java/org/jclouds/chef/internal/BaseChefServiceTest.java     | 2 --
 .../java/org/jclouds/chef/internal/BaseStubbedOhaiLiveTest.java | 4 ----
 .../internal/CleanupStaleNodesAndClientsImplLiveTest.java       | 2 --
 .../CreateNodeAndPopulateAutomaticAttributesImplLiveTest.java   | 2 --
 .../CreateNodeAndPopulateAutomaticAttributesImplTest.java       | 2 --
 .../internal/DeleteAllApisAndNodesInListImplLiveTest.java       | 2 --
 .../internal/ListCookbookVersionsInEnvironmentImplLiveTest.java | 2 --
 .../jclouds/chef/strategy/internal/ListNodesImplLiveTest.java   | 2 --
 .../strategy/internal/ListNodesInEnvironmentImplLiveTest.java   | 2 --
 .../internal/UpdateAutomaticAttributesOnNodeImplLiveTest.java   | 2 --
 .../internal/UpdateAutomaticAttributesOnNodeImplTest.java       | 2 --
 .../org/jclouds/chef/suppliers/ChefVersionSupplierTest.java     | 2 --
 .../org/jclouds/chef/test/TransientChefApiIntegrationTest.java  | 2 --
 .../org/jclouds/chef/test/TransientChefApiMetadataTest.java     | 4 ----
 .../chef/src/test/java/org/jclouds/chef/util/ChefUtilsTest.java | 2 --
 .../src/test/java/org/jclouds/chef/util/RunListBuilderTest.java | 2 --
 apis/chef/src/test/java/org/jclouds/ohai/config/JMXTest.java    | 2 --
 .../src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java   | 2 --
 .../org/jclouds/ohai/functions/ByteArrayToMacAddressTest.java   | 2 --
 .../test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java | 2 --
 148 files changed, 412 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java b/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
index 1b1ca2a..13f4971 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/ChefApi.java
@@ -87,9 +87,6 @@ import org.jclouds.rest.binders.BindToJsonPayload;
 
 /**
  * Provides synchronous access to Chef.
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 @RequestFilters(SignedHeaderAuth.class)
 @Headers(keys = "X-Chef-Version", values = "{" + Constants.PROPERTY_API_VERSION + "}")

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java b/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
index 614d58d..ede03e9 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/ChefApiMetadata.java
@@ -39,9 +39,6 @@ import com.google.inject.Module;
 
 /**
  * Implementation of {@link ApiMetadata} for OpsCode's Chef api.
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 public class ChefApiMetadata extends BaseHttpApiMetadata<ChefApi> {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/ChefContext.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/ChefContext.java b/apis/chef/src/main/java/org/jclouds/chef/ChefContext.java
index a3d9d98..7809634 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/ChefContext.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/ChefContext.java
@@ -25,8 +25,6 @@ import com.google.inject.ImplementedBy;
 
 /**
  * Provides an entry point to Chef features.
- * 
- * @author Ignasi Barrera
  */
 @ImplementedBy(ChefContextImpl.class)
 public interface ChefContext extends View, Closeable {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/ChefService.java b/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
index 1fe9814..bae2e1b 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
@@ -35,8 +35,6 @@ import com.google.inject.ImplementedBy;
 
 /**
  * Provides high level Chef operations.
- * 
- * @author Adrian Cole
  */
 @ImplementedBy(BaseChefService.class)
 public interface ChefService {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/binders/BindChecksumsToJsonPayload.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/binders/BindChecksumsToJsonPayload.java b/apis/chef/src/main/java/org/jclouds/chef/binders/BindChecksumsToJsonPayload.java
index 21aca39..9a744a3 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/binders/BindChecksumsToJsonPayload.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/binders/BindChecksumsToJsonPayload.java
@@ -30,11 +30,6 @@ import javax.ws.rs.core.MediaType;
 import org.jclouds.http.HttpRequest;
 import org.jclouds.rest.binders.BindToStringPayload;
 
-/**
- * 
- * 
- * @author Adrian Cole
- */
 @Singleton
 public class BindChecksumsToJsonPayload extends BindToStringPayload {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/binders/BindCreateClientOptionsToJsonPayload.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/binders/BindCreateClientOptionsToJsonPayload.java b/apis/chef/src/main/java/org/jclouds/chef/binders/BindCreateClientOptionsToJsonPayload.java
index 043b6be..b719c66 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/binders/BindCreateClientOptionsToJsonPayload.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/binders/BindCreateClientOptionsToJsonPayload.java
@@ -35,8 +35,6 @@ import com.google.common.collect.Iterables;
 
 /**
  * Bind the parameters of a {@link CreateClientOptions} to the payload.
- * 
- * @author Ignasi Barrera
  */
 public class BindCreateClientOptionsToJsonPayload extends BindToJsonPayload {
    @Inject

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/binders/BindGenerateKeyForClientToJsonPayload.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/binders/BindGenerateKeyForClientToJsonPayload.java b/apis/chef/src/main/java/org/jclouds/chef/binders/BindGenerateKeyForClientToJsonPayload.java
index 691587f..4bd5821 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/binders/BindGenerateKeyForClientToJsonPayload.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/binders/BindGenerateKeyForClientToJsonPayload.java
@@ -22,11 +22,6 @@ import javax.ws.rs.core.MediaType;
 import org.jclouds.http.HttpRequest;
 import org.jclouds.rest.binders.BindToStringPayload;
 
-/**
- * 
- * @author Adrian Cole
- * 
- */
 @Singleton
 public class BindGenerateKeyForClientToJsonPayload extends BindToStringPayload {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/binders/DatabagItemId.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/binders/DatabagItemId.java b/apis/chef/src/main/java/org/jclouds/chef/binders/DatabagItemId.java
index 5abe592..5dd5a62 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/binders/DatabagItemId.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/binders/DatabagItemId.java
@@ -22,10 +22,6 @@ import org.jclouds.chef.domain.DatabagItem;
 
 import com.google.common.base.Function;
 
-/**
- * 
- * @author Adrian Cole
- */
 @Singleton
 public class DatabagItemId implements Function<Object, String> {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/binders/NodeName.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/binders/NodeName.java b/apis/chef/src/main/java/org/jclouds/chef/binders/NodeName.java
index affaf74..5277895 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/binders/NodeName.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/binders/NodeName.java
@@ -22,10 +22,6 @@ import org.jclouds.chef.domain.Node;
 
 import com.google.common.base.Function;
 
-/**
- * 
- * @author Adrian Cole
- */
 @Singleton
 public class NodeName implements Function<Object, String> {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/binders/RoleName.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/binders/RoleName.java b/apis/chef/src/main/java/org/jclouds/chef/binders/RoleName.java
index b2401c8..aa78a06 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/binders/RoleName.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/binders/RoleName.java
@@ -22,10 +22,6 @@ import org.jclouds.chef.domain.Role;
 
 import com.google.common.base.Function;
 
-/**
- * 
- * @author Adrian Cole
- */
 @Singleton
 public class RoleName implements Function<Object, String> {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/config/BaseChefHttpApiModule.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/config/BaseChefHttpApiModule.java b/apis/chef/src/main/java/org/jclouds/chef/config/BaseChefHttpApiModule.java
index 83a9e29..2fc4201 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/config/BaseChefHttpApiModule.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/config/BaseChefHttpApiModule.java
@@ -71,9 +71,6 @@ import com.google.inject.name.Names;
 
 /**
  * Configures the Chef connection.
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 @ConfiguresHttpApi
 public abstract class BaseChefHttpApiModule<S> extends HttpApiModule<S> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/config/ChefBootstrapModule.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/config/ChefBootstrapModule.java b/apis/chef/src/main/java/org/jclouds/chef/config/ChefBootstrapModule.java
index 65d1422..a5fd231 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/config/ChefBootstrapModule.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/config/ChefBootstrapModule.java
@@ -39,8 +39,6 @@ import com.google.inject.Provides;
 
 /**
  * Provides bootstrap configuration for nodes.
- * 
- * @author Ignasi Barrera
  */
 public class ChefBootstrapModule extends AbstractModule {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/config/ChefHttpApiModule.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/config/ChefHttpApiModule.java b/apis/chef/src/main/java/org/jclouds/chef/config/ChefHttpApiModule.java
index b8c068f..ffd3b0b 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/config/ChefHttpApiModule.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/config/ChefHttpApiModule.java
@@ -21,9 +21,6 @@ import org.jclouds.rest.ConfiguresHttpApi;
 
 /**
  * Configures the Chef connection.
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 @ConfiguresHttpApi
 public class ChefHttpApiModule extends BaseChefHttpApiModule<ChefApi> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/config/ChefParserModule.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/config/ChefParserModule.java b/apis/chef/src/main/java/org/jclouds/chef/config/ChefParserModule.java
index baca929..c214236 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/config/ChefParserModule.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/config/ChefParserModule.java
@@ -70,11 +70,6 @@ import com.google.inject.AbstractModule;
 import com.google.inject.ImplementedBy;
 import com.google.inject.Provides;
 
-/**
- * 
- * 
- * @author Adrian Cole
- */
 public class ChefParserModule extends AbstractModule {
    @ImplementedBy(PrivateKeyAdapterImpl.class)
    public interface PrivateKeyAdapter extends JsonDeserializer<PrivateKey> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java b/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java
index c366ee9..211b5d6 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/config/ChefProperties.java
@@ -19,8 +19,6 @@ package org.jclouds.chef.config;
 
 /**
  * Configuration properties and constants used in Chef connections.
- * 
- * @author Adrian Cole
  */
 public interface ChefProperties {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/config/CookbookParser.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/config/CookbookParser.java b/apis/chef/src/main/java/org/jclouds/chef/config/CookbookParser.java
index 22a3dea..34eedde 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/config/CookbookParser.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/config/CookbookParser.java
@@ -32,8 +32,6 @@ import javax.inject.Qualifier;
  * Chef Server version 0.9 and 0.10 return a different Json when rquesting the
  * cookbook definitions. This annotation can be used to setup the cookbook
  * parser.
- * 
- * @author Ignasi Barrera
  */
 @Target({ METHOD, PARAMETER, FIELD })
 @Retention(RUNTIME)

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/config/CookbookVersionsParser.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/config/CookbookVersionsParser.java b/apis/chef/src/main/java/org/jclouds/chef/config/CookbookVersionsParser.java
index 6e4f5a1..c946917 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/config/CookbookVersionsParser.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/config/CookbookVersionsParser.java
@@ -32,8 +32,6 @@ import javax.inject.Qualifier;
  * Chef Server version 0.9 and 0.10 return a different Json when rquesting the
  * cookbook versions. This annotation can be used to setup the cookbook versions
  * parser.
- * 
- * @author Ignasi Barrera
  */
 @Target({ METHOD, PARAMETER, FIELD })
 @Retention(RUNTIME)

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/config/InstallChef.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/config/InstallChef.java b/apis/chef/src/main/java/org/jclouds/chef/config/InstallChef.java
index 909b99a..d40ae91 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/config/InstallChef.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/config/InstallChef.java
@@ -28,8 +28,6 @@ import javax.inject.Qualifier;
 
 /**
  * Used to configure the Chef install script.
- * 
- * @author Ignasi Barrera
  */
 @Target({ METHOD, PARAMETER, FIELD })
 @Retention(RUNTIME)

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/config/Validator.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/config/Validator.java b/apis/chef/src/main/java/org/jclouds/chef/config/Validator.java
index 677b170..99825d8 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/config/Validator.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/config/Validator.java
@@ -31,8 +31,6 @@ import javax.inject.Qualifier;
  * <p>
  * In a Chef server it must be only one validator client. This client is used by
  * new nodes to autoregister themselves in the Chef server.
- * 
- * @author Ignasi Barrera
  */
 @Target({ METHOD, PARAMETER, FIELD })
 @Retention(RUNTIME)

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/domain/Attribute.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/Attribute.java b/apis/chef/src/main/java/org/jclouds/chef/domain/Attribute.java
index c863af2..34be6b7 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/Attribute.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/Attribute.java
@@ -32,9 +32,6 @@ import com.google.gson.annotations.SerializedName;
 
 /**
  * An attribute in a cookbook metadata.
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 public class Attribute {
    public static Builder builder() {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/domain/BootstrapConfig.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/BootstrapConfig.java b/apis/chef/src/main/java/org/jclouds/chef/domain/BootstrapConfig.java
index 22d8f36..c10c150 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/BootstrapConfig.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/BootstrapConfig.java
@@ -28,7 +28,6 @@ import com.google.common.collect.ImmutableList;
 /**
  * Configures how the nodes in a group will bootstrap.
  * 
- * @author Ignasi Barrera
  * @since 1.7
  */
 public class BootstrapConfig {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/domain/ChecksumStatus.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/ChecksumStatus.java b/apis/chef/src/main/java/org/jclouds/chef/domain/ChecksumStatus.java
index fde8bd6..e5a48ca 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/ChecksumStatus.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/ChecksumStatus.java
@@ -24,9 +24,6 @@ import com.google.gson.annotations.SerializedName;
 
 /**
  * The checksum of an uploaded resource.
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 public class ChecksumStatus {
    public static Builder builder() {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/domain/Client.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/Client.java b/apis/chef/src/main/java/org/jclouds/chef/domain/Client.java
index 9586787..7335609 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/Client.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/Client.java
@@ -28,9 +28,6 @@ import com.google.gson.annotations.SerializedName;
 
 /**
  * Client object.
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 public class Client {
    public static Builder builder() {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/domain/CookbookDefinition.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/CookbookDefinition.java b/apis/chef/src/main/java/org/jclouds/chef/domain/CookbookDefinition.java
index b2f071a..17db702 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/CookbookDefinition.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/CookbookDefinition.java
@@ -29,8 +29,6 @@ import com.google.common.collect.ImmutableSet;
 
 /**
  * Cookbook definition as returned by the Chef server >= 0.10.8.
- * 
- * @author Ignasi Barrera
  */
 public class CookbookDefinition {
    public static Builder builder() {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/domain/CookbookVersion.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/CookbookVersion.java b/apis/chef/src/main/java/org/jclouds/chef/domain/CookbookVersion.java
index 5af929e..df9bd82 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/CookbookVersion.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/CookbookVersion.java
@@ -29,9 +29,6 @@ import com.google.gson.annotations.SerializedName;
 
 /**
  * Cookbook object.
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 public class CookbookVersion {
    public static Builder builder(String name, String version) {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/domain/DatabagItem.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/DatabagItem.java b/apis/chef/src/main/java/org/jclouds/chef/domain/DatabagItem.java
index 9138b9f..ec68d99 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/DatabagItem.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/DatabagItem.java
@@ -22,9 +22,6 @@ import org.jclouds.domain.JsonBall;
 
 /**
  * An item in a data bag.
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 public class DatabagItem extends JsonBall {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/domain/Environment.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/Environment.java b/apis/chef/src/main/java/org/jclouds/chef/domain/Environment.java
index f54208e..48e6efa 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/Environment.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/Environment.java
@@ -30,8 +30,6 @@ import com.google.gson.annotations.SerializedName;
 
 /**
  * An environment.
- * 
- * @author Ignasi Barrera
  */
 public class Environment {
    public static Builder builder() {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/domain/Metadata.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/Metadata.java b/apis/chef/src/main/java/org/jclouds/chef/domain/Metadata.java
index 0cfb66f..33f8dfb 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/Metadata.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/Metadata.java
@@ -29,9 +29,6 @@ import com.google.gson.annotations.SerializedName;
 
 /**
  * A metadata object.
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 public class Metadata {
    public static Builder builder() {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/domain/Node.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/Node.java b/apis/chef/src/main/java/org/jclouds/chef/domain/Node.java
index 4d4fa0f..ec83f4c 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/Node.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/Node.java
@@ -32,9 +32,6 @@ import com.google.gson.annotations.SerializedName;
 
 /**
  * Node object.
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 public class Node {
    public static Builder builder() {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/domain/Resource.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/Resource.java b/apis/chef/src/main/java/org/jclouds/chef/domain/Resource.java
index aa4e71c..94b5471 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/Resource.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/Resource.java
@@ -28,9 +28,6 @@ import com.google.common.primitives.Bytes;
 
 /**
  * Resource object.
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 public class Resource {
    public static Builder builder() {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/domain/Role.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/Role.java b/apis/chef/src/main/java/org/jclouds/chef/domain/Role.java
index 1b73609..d51dc1e 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/Role.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/Role.java
@@ -32,9 +32,6 @@ import com.google.gson.annotations.SerializedName;
 
 /**
  * Role object.
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 public class Role {
    public static Builder builder() {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/domain/Sandbox.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/Sandbox.java b/apis/chef/src/main/java/org/jclouds/chef/domain/Sandbox.java
index 774aa4a..c58d02d 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/Sandbox.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/Sandbox.java
@@ -30,9 +30,6 @@ import com.google.gson.annotations.SerializedName;
 
 /**
  * Sandbox object.
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 public class Sandbox {
    public static Builder builder() {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/domain/SearchResult.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/SearchResult.java b/apis/chef/src/main/java/org/jclouds/chef/domain/SearchResult.java
index 1e2cced..7e406c1 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/SearchResult.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/SearchResult.java
@@ -22,9 +22,6 @@ import com.google.common.collect.Iterables;
 
 /**
  * A result of a search.
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 public class SearchResult<T> extends LinkedHashSet<T> {
    private static final long serialVersionUID = 4000610660948065287L;

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/domain/UploadSandbox.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/domain/UploadSandbox.java b/apis/chef/src/main/java/org/jclouds/chef/domain/UploadSandbox.java
index 868c147..9ca4c0f 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/domain/UploadSandbox.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/domain/UploadSandbox.java
@@ -31,9 +31,6 @@ import com.google.gson.annotations.SerializedName;
 
 /**
  * An upload sandbox.
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 public class UploadSandbox {
    public static Builder builder() {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java b/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
index 50b58df..30b26c0 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/filters/SignedHeaderAuth.java
@@ -63,8 +63,6 @@ import com.google.common.io.ByteSource;
  * Ported from mixlib-authentication in order to sign Chef requests.
  * 
  * @see <a href= "http://github.com/opscode/mixlib-authentication" />
- * @author Adrian Cole
- * 
  */
 @Singleton
 public class SignedHeaderAuth implements HttpRequestFilter {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/BootstrapConfigForGroup.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/BootstrapConfigForGroup.java b/apis/chef/src/main/java/org/jclouds/chef/functions/BootstrapConfigForGroup.java
index 43060ee..ec75e47 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/BootstrapConfigForGroup.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/BootstrapConfigForGroup.java
@@ -37,9 +37,6 @@ import com.google.inject.TypeLiteral;
 /**
  * 
  * Retrieves the bootstrap configuration for a specific group
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 @Singleton
 public class BootstrapConfigForGroup implements Function<String, DatabagItem> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/ClientForGroup.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ClientForGroup.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ClientForGroup.java
index a9c1c33..d1a9250 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ClientForGroup.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ClientForGroup.java
@@ -32,8 +32,6 @@ import com.google.common.base.Function;
 /**
  * 
  * Generates a client relevant for a particular group
- * 
- * @author Adrian Cole
  */
 @Singleton
 public class ClientForGroup implements Function<String, Client> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/GroupToBootScript.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/GroupToBootScript.java b/apis/chef/src/main/java/org/jclouds/chef/functions/GroupToBootScript.java
index 1472d19..516d9f9 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/GroupToBootScript.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/GroupToBootScript.java
@@ -56,8 +56,6 @@ import com.google.inject.TypeLiteral;
 /**
  * 
  * Generates a bootstrap script relevant for a particular group
- * 
- * @author Adrian Cole
  */
 @Singleton
 public class GroupToBootScript implements Function<String, Statement> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionCheckingChefVersion.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionCheckingChefVersion.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionCheckingChefVersion.java
index cb1ee98..ffb4201 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionCheckingChefVersion.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionCheckingChefVersion.java
@@ -30,8 +30,6 @@ import com.google.common.base.Function;
 /**
  * Parses a cookbook definition from a Json response, taking care of using the
  * appropriate parser.
- * 
- * @author Ignasi Barrera
  */
 @Singleton
 public class ParseCookbookDefinitionCheckingChefVersion implements Function<HttpResponse, Set<String>> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJson.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJson.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJson.java
index 0156d46..3e172e4 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJson.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJson.java
@@ -31,8 +31,6 @@ import com.google.common.base.Function;
 /**
  * Parses a cookbook definition from a Json response, assuming a Chef Server >=
  * 0.10.8.
- * 
- * @author Ignasi Barrera
  */
 @Singleton
 public class ParseCookbookDefinitionFromJson implements Function<HttpResponse, Set<String>> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10.java
index 80ba9af..692d969 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionFromJsonv10.java
@@ -27,8 +27,6 @@ import java.util.Map;
 
 /**
  * Parses the cookbook versions in a Chef Server >= 0.10.8.
- * 
- * @author Alexandr Kulik
  */
 @Singleton
 public class ParseCookbookDefinitionFromJsonv10 implements Function<HttpResponse, CookbookDefinition> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10.java
index 019ed0d..5da0797 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookDefinitionListFromJsonv10.java
@@ -31,8 +31,6 @@ import static com.google.common.collect.Sets.newLinkedHashSet;
 
 /**
  * Parses the cookbook versions in a Chef Server >= 0.10.8.
- *
- * @author Alexandr Kulik
  */
 @Singleton
 public class ParseCookbookDefinitionListFromJsonv10 implements Function<HttpResponse, Set<CookbookDefinition>> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsCheckingChefVersion.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsCheckingChefVersion.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsCheckingChefVersion.java
index e8f9124..f82a900 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsCheckingChefVersion.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsCheckingChefVersion.java
@@ -30,8 +30,6 @@ import com.google.common.base.Function;
 /**
  * Parses a cookbook versions from a Json response, taking care of using the
  * appropriate parser.
- * 
- * @author Ignasi Barrera
  */
 @Singleton
 public class ParseCookbookVersionsCheckingChefVersion implements Function<HttpResponse, Set<String>> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJson.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJson.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJson.java
index 5c94e41..4421b3e 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJson.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV09FromJson.java
@@ -30,8 +30,6 @@ import static com.google.common.collect.Iterables.getFirst;
 
 /**
  * Parses the cookbook versions in a Chef Server <= 0.9.8.
- * 
- * @author Ignasi Barrera
  */
 @Singleton
 public class ParseCookbookVersionsV09FromJson implements Function<HttpResponse, Set<String>> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJson.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJson.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJson.java
index 955fe8e..1a25ac0 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJson.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseCookbookVersionsV10FromJson.java
@@ -34,8 +34,6 @@ import static com.google.common.collect.Sets.newLinkedHashSet;
 
 /**
  * Parses the cookbook versions in a Chef Server >= 0.10.8.
- * 
- * @author Ignasi Barrera
  */
 @Singleton
 public class ParseCookbookVersionsV10FromJson implements Function<HttpResponse, Set<String>> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseErrorFromJsonOrReturnBody.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseErrorFromJsonOrReturnBody.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseErrorFromJsonOrReturnBody.java
index 2136674..6440409 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseErrorFromJsonOrReturnBody.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseErrorFromJsonOrReturnBody.java
@@ -27,11 +27,6 @@ import org.jclouds.http.functions.ReturnStringIf2xx;
 
 import com.google.common.base.Function;
 
-/**
- * 
- * 
- * @author Adrian Cole
- */
 @Singleton
 public class ParseErrorFromJsonOrReturnBody implements Function<HttpResponse, String> {
    Pattern pattern = Pattern.compile(".*\\[\"([^\"]+)\"\\].*");

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseKeySetFromJson.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseKeySetFromJson.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseKeySetFromJson.java
index 06714aa..963c19b 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseKeySetFromJson.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseKeySetFromJson.java
@@ -27,9 +27,6 @@ import org.jclouds.http.functions.ParseJson;
 
 import com.google.common.base.Function;
 
-/**
- * @author Adrian Cole
- */
 @Singleton
 public class ParseKeySetFromJson implements Function<HttpResponse, Set<String>> {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchClientsFromJson.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchClientsFromJson.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchClientsFromJson.java
index 28ee572..18ecbfa 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchClientsFromJson.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchClientsFromJson.java
@@ -22,10 +22,6 @@ import javax.inject.Singleton;
 import org.jclouds.chef.domain.Client;
 import org.jclouds.http.functions.ParseJson;
 
-/**
- * 
- * @author Adrian Cole
- */
 @Singleton
 public class ParseSearchClientsFromJson extends ParseSearchResultFromJson<Client> {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchDatabagFromJson.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchDatabagFromJson.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchDatabagFromJson.java
index 4826b38..c2c58ef 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchDatabagFromJson.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchDatabagFromJson.java
@@ -37,8 +37,6 @@ import static com.google.common.collect.Iterables.transform;
  * <p>
  * When searching databags, the items are contained inside the
  * <code>raw_data</code> list.
- * 
- * @author Adrian Cole
  */
 @Singleton
 public class ParseSearchDatabagFromJson implements Function<HttpResponse, SearchResult<DatabagItem>> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchEnvironmentsFromJson.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchEnvironmentsFromJson.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchEnvironmentsFromJson.java
index d60ef43..852e0f3 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchEnvironmentsFromJson.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchEnvironmentsFromJson.java
@@ -22,9 +22,6 @@ import org.jclouds.http.functions.ParseJson;
 import javax.inject.Inject;
 import javax.inject.Singleton;
 
-/**
- * @author Alex Kulik
- */
 @Singleton
 public class ParseSearchEnvironmentsFromJson extends ParseSearchResultFromJson<Environment> {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchNodesFromJson.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchNodesFromJson.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchNodesFromJson.java
index bacbb25..6d34575 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchNodesFromJson.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchNodesFromJson.java
@@ -22,10 +22,6 @@ import javax.inject.Singleton;
 import org.jclouds.chef.domain.Node;
 import org.jclouds.http.functions.ParseJson;
 
-/**
- * 
- * @author Adrian Cole
- */
 @Singleton
 public class ParseSearchNodesFromJson extends ParseSearchResultFromJson<Node> {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchResultFromJson.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchResultFromJson.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchResultFromJson.java
index 983ce8f..6c9bd84 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchResultFromJson.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchResultFromJson.java
@@ -27,9 +27,6 @@ import org.jclouds.http.functions.ParseJson;
 
 import com.google.common.base.Function;
 
-/**
- * @author Adrian Cole
- */
 @Singleton
 public class ParseSearchResultFromJson<T> implements Function<HttpResponse, SearchResult<T>> {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchRolesFromJson.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchRolesFromJson.java b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchRolesFromJson.java
index f656b9c..42ba797 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchRolesFromJson.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/ParseSearchRolesFromJson.java
@@ -22,10 +22,6 @@ import javax.inject.Singleton;
 import org.jclouds.chef.domain.Role;
 import org.jclouds.http.functions.ParseJson;
 
-/**
- * 
- * @author Adrian Cole
- */
 @Singleton
 public class ParseSearchRolesFromJson extends ParseSearchResultFromJson<Role> {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/RunListForGroup.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/RunListForGroup.java b/apis/chef/src/main/java/org/jclouds/chef/functions/RunListForGroup.java
index 0495905..b14ae71 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/RunListForGroup.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/RunListForGroup.java
@@ -34,9 +34,6 @@ import com.google.inject.TypeLiteral;
 
 /**
  * Retrieves the run-list for a specific group
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 @Singleton
 public class RunListForGroup implements Function<String, List<String>> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/functions/UriForResource.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/functions/UriForResource.java b/apis/chef/src/main/java/org/jclouds/chef/functions/UriForResource.java
index fce5ae2..d5d0810 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/functions/UriForResource.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/functions/UriForResource.java
@@ -29,8 +29,6 @@ import com.google.common.base.Function;
 
 /**
  * Extracts the uri field of the given {@link Resource}.
- * 
- * @author Ignasi Barrera
  */
 @Singleton
 public class UriForResource implements Function<Object, URI> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/handlers/ChefApiErrorRetryHandler.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/handlers/ChefApiErrorRetryHandler.java b/apis/chef/src/main/java/org/jclouds/chef/handlers/ChefApiErrorRetryHandler.java
index 6d1232e..3b4da4a 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/handlers/ChefApiErrorRetryHandler.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/handlers/ChefApiErrorRetryHandler.java
@@ -32,8 +32,6 @@ import com.google.inject.Inject;
 
 /**
  * Allow for eventual consistency on sandbox requests.
- * 
- * @author Adrian Cole
  */
 public class ChefApiErrorRetryHandler implements HttpRetryHandler {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/handlers/ChefErrorHandler.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/handlers/ChefErrorHandler.java b/apis/chef/src/main/java/org/jclouds/chef/handlers/ChefErrorHandler.java
index 10a122f..3376219 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/handlers/ChefErrorHandler.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/handlers/ChefErrorHandler.java
@@ -37,9 +37,6 @@ import com.google.common.io.Closeables;
 
 /**
  * This will parse and set an appropriate exception on the command object.
- * 
- * @author Adrian Cole
- * 
  */
 @Singleton
 public class ChefErrorHandler implements HttpErrorHandler {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java b/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
index a841922..9619b44 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
@@ -68,9 +68,6 @@ import com.google.common.collect.Maps;
 import com.google.common.io.ByteStreams;
 import com.google.common.io.InputSupplier;
 
-/**
- * @author Adrian Cole
- */
 @Singleton
 public class BaseChefService implements ChefService {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/internal/ChefContextImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/internal/ChefContextImpl.java b/apis/chef/src/main/java/org/jclouds/chef/internal/ChefContextImpl.java
index e641e70..8aef880 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/internal/ChefContextImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/internal/ChefContextImpl.java
@@ -31,10 +31,6 @@ import org.jclouds.location.Provider;
 
 import com.google.common.reflect.TypeToken;
 
-/**
- * @author Adrian Cole
- * @author Ignasi Barrera
- */
 @Singleton
 public class ChefContextImpl extends BaseView implements ChefContext {
    private final ChefService chefService;

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/options/CreateClientOptions.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/options/CreateClientOptions.java b/apis/chef/src/main/java/org/jclouds/chef/options/CreateClientOptions.java
index 86783ad..776d7bb 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/options/CreateClientOptions.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/options/CreateClientOptions.java
@@ -18,8 +18,6 @@ package org.jclouds.chef.options;
 
 /**
  * Options for the create client method.
- * 
- * @author Ignasi Barrera
  */
 public class CreateClientOptions implements Cloneable {
    /** Administrator flag. This flag will be ignored in Opscode Hosted Chef. */

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/options/SearchOptions.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/options/SearchOptions.java b/apis/chef/src/main/java/org/jclouds/chef/options/SearchOptions.java
index a2fda95..cbc1d54 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/options/SearchOptions.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/options/SearchOptions.java
@@ -22,8 +22,6 @@ import org.jclouds.http.options.BaseHttpRequestOptions;
 
 /**
  * Options for the search api.
- * 
- * @author Ignasi Barrera
  */
 public class SearchOptions extends BaseHttpRequestOptions {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/predicates/CookbookVersionPredicates.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/predicates/CookbookVersionPredicates.java b/apis/chef/src/main/java/org/jclouds/chef/predicates/CookbookVersionPredicates.java
index 49b04dc..7edbcae 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/predicates/CookbookVersionPredicates.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/predicates/CookbookVersionPredicates.java
@@ -33,8 +33,6 @@ import com.google.common.collect.Multimap;
  * 
  * This class has static methods that create customized predicates to use with
  * {@link org.jclouds.chef.ChefService}.
- * 
- * @author Adrian Cole
  */
 public class CookbookVersionPredicates {
    /**

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/CleanupStaleNodesAndClients.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/CleanupStaleNodesAndClients.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/CleanupStaleNodesAndClients.java
index 077da30..8519450 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/CleanupStaleNodesAndClients.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/CleanupStaleNodesAndClients.java
@@ -23,8 +23,6 @@ import com.google.inject.ImplementedBy;
 /**
  * 
  * Cleans up nodes and clients who have been hanging around too long.
- * 
- * @author Adrian Cole
  */
 @ImplementedBy(CleanupStaleNodesAndClientsImpl.class)
 public interface CleanupStaleNodesAndClients {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/CreateNodeAndPopulateAutomaticAttributes.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/CreateNodeAndPopulateAutomaticAttributes.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/CreateNodeAndPopulateAutomaticAttributes.java
index 070aaa3..249be48 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/CreateNodeAndPopulateAutomaticAttributes.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/CreateNodeAndPopulateAutomaticAttributes.java
@@ -24,8 +24,6 @@ import com.google.inject.ImplementedBy;
 /**
  * 
  * Creates a new node with automatic attributes.
- * 
- * @author Adrian Cole
  */
 @ImplementedBy(CreateNodeAndPopulateAutomaticAttributesImpl.class)
 public interface CreateNodeAndPopulateAutomaticAttributes {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllClientsInList.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllClientsInList.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllClientsInList.java
index 0fa54c0..7dd7b89 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllClientsInList.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllClientsInList.java
@@ -23,9 +23,6 @@ import com.google.inject.ImplementedBy;
 
 /**
  * Deletes all clients in a given list.
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 @ImplementedBy(DeleteAllClientsInListImpl.class)
 public interface DeleteAllClientsInList {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllNodesInList.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllNodesInList.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllNodesInList.java
index 16a196e..8867e49 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllNodesInList.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllNodesInList.java
@@ -21,11 +21,6 @@ import org.jclouds.chef.strategy.internal.DeleteAllNodesInListImpl;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.ImplementedBy;
 
-/**
- * 
- * 
- * @author Adrian Cole
- */
 @ImplementedBy(DeleteAllNodesInListImpl.class)
 public interface DeleteAllNodesInList {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java
index 5d6b8a0..f531a32 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java
@@ -22,10 +22,6 @@ import org.jclouds.chef.strategy.internal.ListClientsImpl;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.ImplementedBy;
 
-/**
- * 
- * @author Adrian Cole
- */
 @ImplementedBy(ListClientsImpl.class)
 public interface ListClients {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java
index 01bcd33..4409e4e 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java
@@ -22,10 +22,6 @@ import org.jclouds.chef.strategy.internal.ListCookbookVersionsImpl;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.ImplementedBy;
 
-/**
- * 
- * @author Adrian Cole
- */
 @ImplementedBy(ListCookbookVersionsImpl.class)
 public interface ListCookbookVersions {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java
index 1c1186e..b0e1c54 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java
@@ -22,10 +22,6 @@ import org.jclouds.chef.strategy.internal.ListCookbookVersionsInEnvironmentImpl;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.ImplementedBy;
 
-/**
- *
- * @author Noorul Islam K M
- */
 @ImplementedBy(ListCookbookVersionsInEnvironmentImpl.class)
 public interface ListCookbookVersionsInEnvironment {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java
index 92b451b..a1a4093 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java
@@ -22,10 +22,6 @@ import org.jclouds.chef.strategy.internal.ListNodesImpl;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.ImplementedBy;
 
-/**
- * 
- * @author Adrian Cole
- */
 @ImplementedBy(ListNodesImpl.class)
 public interface ListNodes {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
index 6308747..6a46fab 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
@@ -22,10 +22,6 @@ import org.jclouds.chef.strategy.internal.ListNodesInEnvironmentImpl;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.ImplementedBy;
 
-/**
- * 
- * @author Noorul Islam K M
- */
 @ImplementedBy(ListNodesInEnvironmentImpl.class)
 public interface ListNodesInEnvironment {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/UpdateAutomaticAttributesOnNode.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/UpdateAutomaticAttributesOnNode.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/UpdateAutomaticAttributesOnNode.java
index c4b6220..0dcb81e 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/UpdateAutomaticAttributesOnNode.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/UpdateAutomaticAttributesOnNode.java
@@ -23,8 +23,6 @@ import com.google.inject.ImplementedBy;
 /**
  * 
  * Updates node with new automatic attributes.
- * 
- * @author Adrian Cole
  */
 @ImplementedBy(UpdateAutomaticAttributesOnNodeImpl.class)
 public interface UpdateAutomaticAttributesOnNode {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/CleanupStaleNodesAndClientsImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/CleanupStaleNodesAndClientsImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/CleanupStaleNodesAndClientsImpl.java
index a9dbaa8..46c765b 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/CleanupStaleNodesAndClientsImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/CleanupStaleNodesAndClientsImpl.java
@@ -46,8 +46,6 @@ import com.google.common.base.Predicate;
 /**
  * 
  * Cleans up nodes and apis who have been hanging around too long.
- * 
- * @author Adrian Cole
  */
 @Singleton
 public class CleanupStaleNodesAndClientsImpl implements CleanupStaleNodesAndClients {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/CreateNodeAndPopulateAutomaticAttributesImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/CreateNodeAndPopulateAutomaticAttributesImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/CreateNodeAndPopulateAutomaticAttributesImpl.java
index d6336b2..7dabd06 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/CreateNodeAndPopulateAutomaticAttributesImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/CreateNodeAndPopulateAutomaticAttributesImpl.java
@@ -38,8 +38,6 @@ import com.google.common.base.Supplier;
 /**
  * 
  * Updates node with new automatic attributes.
- * 
- * @author Adrian Cole
  */
 @Singleton
 public class CreateNodeAndPopulateAutomaticAttributesImpl implements CreateNodeAndPopulateAutomaticAttributes {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/DeleteAllClientsInListImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/DeleteAllClientsInListImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/DeleteAllClientsInListImpl.java
index 561471b..ffdd3ec 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/DeleteAllClientsInListImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/DeleteAllClientsInListImpl.java
@@ -43,9 +43,6 @@ import com.google.inject.Inject;
 
 /**
  * Concurrently delete all given clients.
- * 
- * @author Adrian Cole
- * @author Ignasi Barrera
  */
 @Singleton
 public class DeleteAllClientsInListImpl implements DeleteAllClientsInList {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/DeleteAllNodesInListImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/DeleteAllNodesInListImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/DeleteAllNodesInListImpl.java
index de5e922..212d8b7 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/DeleteAllNodesInListImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/DeleteAllNodesInListImpl.java
@@ -41,11 +41,6 @@ import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.Inject;
 
-/**
- * 
- * 
- * @author Adrian Cole
- */
 @Singleton
 public class DeleteAllNodesInListImpl implements DeleteAllNodesInList {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListClientsImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListClientsImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListClientsImpl.java
index 63c2484..6acda30 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListClientsImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListClientsImpl.java
@@ -41,10 +41,6 @@ import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.Inject;
 
-/**
- * 
- * @author Adrian Cole
- */
 @Singleton
 public class ListClientsImpl implements ListClients {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java
index cdd71c4..75794d9 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java
@@ -42,10 +42,6 @@ import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.Inject;
 
-/**
- * 
- * @author Adrian Cole
- */
 @Singleton
 public class ListCookbookVersionsImpl implements ListCookbookVersions {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImpl.java
index 881f251..ccc2992 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImpl.java
@@ -43,10 +43,6 @@ import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.Inject;
 
-/**
- *
- * @author Noorul Islam K M
- */
 @Singleton
 public class ListCookbookVersionsInEnvironmentImpl implements ListCookbookVersionsInEnvironment {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesImpl.java
index 3af264b..be9b652 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesImpl.java
@@ -41,10 +41,6 @@ import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.Inject;
 
-/**
- * 
- * @author Adrian Cole
- */
 @Singleton
 public class ListNodesImpl implements ListNodes {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImpl.java
index a2b2244..8ae747e 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImpl.java
@@ -41,10 +41,6 @@ import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.Inject;
 
-/**
- * 
- * @author Noorul Islam K M
- */
 @Singleton
 public class ListNodesInEnvironmentImpl implements ListNodesInEnvironment {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/UpdateAutomaticAttributesOnNodeImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/UpdateAutomaticAttributesOnNodeImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/UpdateAutomaticAttributesOnNodeImpl.java
index 4d9bea4..a6dcac2 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/UpdateAutomaticAttributesOnNodeImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/UpdateAutomaticAttributesOnNodeImpl.java
@@ -38,8 +38,6 @@ import com.google.common.base.Supplier;
 /**
  * 
  * Updates node with new automatic attributes.
- * 
- * @author Adrian Cole
  */
 @Singleton
 public class UpdateAutomaticAttributesOnNodeImpl implements UpdateAutomaticAttributesOnNode {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/suppliers/ChefVersionSupplier.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/suppliers/ChefVersionSupplier.java b/apis/chef/src/main/java/org/jclouds/chef/suppliers/ChefVersionSupplier.java
index 7f7f4e9..a0d8b04 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/suppliers/ChefVersionSupplier.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/suppliers/ChefVersionSupplier.java
@@ -35,8 +35,6 @@ import com.google.common.base.Supplier;
 
 /**
  * Properly supply the version of the Chef Server.
- * 
- * @author Ignasi Barrera
  */
 @Singleton
 public class ChefVersionSupplier implements Supplier<Integer> {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApi.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApi.java b/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApi.java
index 812fd29..c2c5f10 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApi.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApi.java
@@ -57,8 +57,6 @@ import com.google.common.base.Function;
 
 /**
  * In-memory chef simulator.
- * 
- * @author Adrian Cole
  */
 public class TransientChefApi implements ChefApi {
    @Singleton

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApiMetadata.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApiMetadata.java b/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApiMetadata.java
index 88f7a8d..c485080 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApiMetadata.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/test/TransientChefApiMetadata.java
@@ -30,8 +30,6 @@ import com.google.inject.Module;
 
 /**
  * Implementation of {@link ApiMetadata} for the Amazon-specific Chef API
- * 
- * @author Adrian Cole
  */
 public class TransientChefApiMetadata extends BaseHttpApiMetadata<TransientChefApi> {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/test/config/TransientChefApiModule.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/test/config/TransientChefApiModule.java b/apis/chef/src/main/java/org/jclouds/chef/test/config/TransientChefApiModule.java
index 648c917..d9eab4d 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/test/config/TransientChefApiModule.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/test/config/TransientChefApiModule.java
@@ -52,10 +52,6 @@ import com.google.inject.Module;
 import com.google.inject.Provides;
 import com.google.inject.name.Names;
 
-/**
- * 
- * @author Adrian Cole
- */
 @ConfiguresHttpApi
 public class TransientChefApiModule extends AbstractModule {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/util/ChefUtils.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/util/ChefUtils.java b/apis/chef/src/main/java/org/jclouds/chef/util/ChefUtils.java
index aff08d3..3ba0c59 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/util/ChefUtils.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/util/ChefUtils.java
@@ -33,11 +33,6 @@ import com.google.inject.Binder;
 import com.google.inject.TypeLiteral;
 import com.google.inject.multibindings.MapBinder;
 
-/**
- * 
- * 
- * @author Adrian Cole
- */
 public class ChefUtils {
 
    public static Date fromOhaiTime(JsonBall ohaiDate) {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/util/CollectionUtils.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/util/CollectionUtils.java b/apis/chef/src/main/java/org/jclouds/chef/util/CollectionUtils.java
index 0e62804..cabfbde 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/util/CollectionUtils.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/util/CollectionUtils.java
@@ -28,8 +28,6 @@ import com.google.common.collect.ImmutableSet;
 
 /**
  * Utility methods to work with collections.
- * 
- * @author Ignasi Barrera
  */
 public class CollectionUtils {
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/chef/util/RunListBuilder.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/util/RunListBuilder.java b/apis/chef/src/main/java/org/jclouds/chef/util/RunListBuilder.java
index 619a0e0..27cc377 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/util/RunListBuilder.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/util/RunListBuilder.java
@@ -29,8 +29,6 @@ import com.google.common.collect.ImmutableList;
 
 /**
  * builds a run list in the correct syntax for chef.
- * 
- * @author Adrian Cole
  */
 public class RunListBuilder {
    private List<String> list = newArrayList();

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/ohai/Automatic.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/ohai/Automatic.java b/apis/chef/src/main/java/org/jclouds/ohai/Automatic.java
index de6e373d..9b3d134 100644
--- a/apis/chef/src/main/java/org/jclouds/ohai/Automatic.java
+++ b/apis/chef/src/main/java/org/jclouds/ohai/Automatic.java
@@ -26,10 +26,6 @@ import java.lang.annotation.Target;
 
 import javax.inject.Qualifier;
 
-/**
- * 
- * @author Adrian Cole
- */
 @Retention(RUNTIME)
 @Target({ TYPE, METHOD, PARAMETER })
 @Qualifier

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/ohai/AutomaticSupplier.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/ohai/AutomaticSupplier.java b/apis/chef/src/main/java/org/jclouds/ohai/AutomaticSupplier.java
index e7c78d1..681558e 100644
--- a/apis/chef/src/main/java/org/jclouds/ohai/AutomaticSupplier.java
+++ b/apis/chef/src/main/java/org/jclouds/ohai/AutomaticSupplier.java
@@ -29,11 +29,6 @@ import org.jclouds.ohai.functions.NestSlashKeys;
 import com.google.common.base.Supplier;
 import com.google.common.collect.Multimap;
 
-/**
- * 
- * @author Adrian Cole
- * 
- */
 @Singleton
 public class AutomaticSupplier implements Supplier<Map<String, JsonBall>> {
    private final Multimap<String, Supplier<JsonBall>> autoAttrs;

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/ohai/config/ConfiguresOhai.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/ohai/config/ConfiguresOhai.java b/apis/chef/src/main/java/org/jclouds/ohai/config/ConfiguresOhai.java
index d1d17a3..1ca0df4 100644
--- a/apis/chef/src/main/java/org/jclouds/ohai/config/ConfiguresOhai.java
+++ b/apis/chef/src/main/java/org/jclouds/ohai/config/ConfiguresOhai.java
@@ -22,10 +22,6 @@ import java.lang.annotation.Target;
 import static java.lang.annotation.ElementType.TYPE;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
-/**
- * 
- * @author Adrian Cole
- */
 @Retention(RUNTIME)
 @Target(TYPE)
 public @interface ConfiguresOhai {

http://git-wip-us.apache.org/repos/asf/jclouds/blob/88a6a26b/apis/chef/src/main/java/org/jclouds/ohai/config/JMXOhaiModule.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/ohai/config/JMXOhaiModule.java b/apis/chef/src/main/java/org/jclouds/ohai/config/JMXOhaiModule.java
index 1f106ec..a8d01f7 100644
--- a/apis/chef/src/main/java/org/jclouds/ohai/config/JMXOhaiModule.java
+++ b/apis/chef/src/main/java/org/jclouds/ohai/config/JMXOhaiModule.java
@@ -30,8 +30,6 @@ import com.google.inject.multibindings.MapBinder;
 
 /**
  * Wires the components needed to parse ohai data from a JVM
- * 
- * @author Adrian Cole
  */
 @ConfiguresOhai
 public class JMXOhaiModule extends OhaiModule {


[39/50] [abbrv] git commit: JCLOUDS-624 - Fixed bug in ListNodes

Posted by na...@apache.org.
JCLOUDS-624 - Fixed bug in ListNodes

To fix this bug, I used the approach debated in the above issue: create
new methods to do the operation using an ExecutorService provided by the
user.The the old methods are still working, but now the operations in
those methods are not concurrent anymore.


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/2e813432
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/2e813432
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/2e813432

Branch: refs/heads/master
Commit: 2e81343297aa1586f535c00dfb646ed55f52f995
Parents: 5c85094
Author: Luciano P. Sabenca(luciano.sabenca@movile.com) <lu...@movile.com>
Authored: Mon Jul 14 13:58:38 2014 -0300
Committer: Ignasi Barrera <na...@apache.org>
Committed: Mon Jul 28 15:31:11 2014 +0200

----------------------------------------------------------------------
 .../main/java/org/jclouds/chef/ChefService.java | 120 +++++++++++++------
 .../jclouds/chef/internal/BaseChefService.java  |  46 ++++++-
 .../org/jclouds/chef/strategy/ListClients.java  |   7 +-
 .../chef/strategy/ListCookbookVersions.java     |   7 +-
 .../ListCookbookVersionsInEnvironment.java      |  10 +-
 .../jclouds/chef/strategy/ListEnvironments.java |   6 +-
 .../org/jclouds/chef/strategy/ListNodes.java    |   7 +-
 .../chef/strategy/ListNodesInEnvironment.java   |   7 +-
 .../internal/BaseListCookbookVersionsImpl.java  |  97 +++++++++++++++
 .../strategy/internal/BaseListNodesImpl.java    |  77 ++++++++++++
 .../chef/strategy/internal/ListClientsImpl.java |  50 +++++---
 .../internal/ListCookbookVersionsImpl.java      |  68 +++--------
 .../ListCookbookVersionsInEnvironmentImpl.java  | 111 +++++++++--------
 .../strategy/internal/ListEnvironmentsImpl.java |  12 +-
 .../chef/strategy/internal/ListNodesImpl.java   |  50 ++------
 .../internal/ListNodesInEnvironmentImpl.java    |  50 ++------
 ...okbookVersionsInEnvironmentImplLiveTest.java |  49 ++++++++
 .../internal/ListNodesImplLiveTest.java         |  23 ++++
 .../ListNodesInEnvironmentImplLiveTest.java     |  31 ++++-
 19 files changed, 576 insertions(+), 252 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/2e813432/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/ChefService.java b/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
index bae2e1b..040107a 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/ChefService.java
@@ -16,10 +16,8 @@
  */
 package org.jclouds.chef;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
-
+import com.google.common.io.InputSupplier;
+import com.google.inject.ImplementedBy;
 import org.jclouds.chef.domain.BootstrapConfig;
 import org.jclouds.chef.domain.Client;
 import org.jclouds.chef.domain.CookbookVersion;
@@ -30,8 +28,10 @@ import org.jclouds.domain.JsonBall;
 import org.jclouds.rest.annotations.SinceApiVersion;
 import org.jclouds.scriptbuilder.domain.Statement;
 
-import com.google.common.io.InputSupplier;
-import com.google.inject.ImplementedBy;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+import java.util.concurrent.ExecutorService;
 
 /**
  * Provides high level Chef operations.
@@ -41,7 +41,7 @@ public interface ChefService {
 
    /**
     * Gets the context that created this service.
-    * 
+    *
     * @return The context that created the service.
     */
    ChefContext getContext();
@@ -50,7 +50,7 @@ public interface ChefService {
 
    /**
     * Encrypts the given input stream.
-    * 
+    *
     * @param supplier The input stream to encrypt.
     * @return The encrypted bytes for the given input stream.
     * @throws IOException If there is an error reading from the input stream.
@@ -59,7 +59,7 @@ public interface ChefService {
 
    /**
     * Decrypts the given input stream.
-    * 
+    *
     * @param supplier The input stream to decrypt.
     * @return The decrypted bytes for the given input stream.
     * @throws IOException If there is an error reading from the input stream.
@@ -70,27 +70,27 @@ public interface ChefService {
 
    /**
     * Creates all steps necessary to bootstrap the node.
-    * 
+    *
     * @param group corresponds to a configured
-    *        {@link ChefProperties#CHEF_BOOTSTRAP_DATABAG} data bag where
-    *        run_list and other information are stored.
+    *              {@link ChefProperties#CHEF_BOOTSTRAP_DATABAG} data bag where
+    *              run_list and other information are stored.
     * @return The script used to bootstrap the node.
     */
    Statement createBootstrapScriptForGroup(String group);
 
    /**
     * Configures how the nodes of a certain group will be bootstrapped
-    * 
-    * @param group The group where the given bootstrap configuration will be
-    *        applied.
+    *
+    * @param group           The group where the given bootstrap configuration will be
+    *                        applied.
     * @param bootstrapConfig The configuration to be applied to the nodes in the
-    *        group.
+    *                        group.
     */
    void updateBootstrapConfigForGroup(String group, BootstrapConfig bootstrapConfig);
 
    /**
     * Gets the run list for the given group.
-    * 
+    *
     * @param The group to get the configured run list for.
     * @return run list for all nodes bootstrapped with a certain group
     */
@@ -98,10 +98,10 @@ public interface ChefService {
 
    /**
     * Gets the bootstrap configuration for a given group.
-    * <p>
+    * <p/>
     * The bootstrap configuration is a Json object containing the run list and
     * the configured attributes.
-    * 
+    *
     * @param group The name of the group.
     * @return The bootstrap configuration for the given group.
     */
@@ -111,9 +111,9 @@ public interface ChefService {
 
    /**
     * Creates a new node and populates the automatic attributes.
-    * 
+    *
     * @param nodeName The name of the node to create.
-    * @param runList The run list for the created node.
+    * @param runList  The run list for the created node.
     * @return The created node with the automatic attributes populated.
     * @see OhaiModule
     * @see ChefUtils#ohaiAutomaticAttributeBinder(com.google.inject.Binder)
@@ -122,7 +122,7 @@ public interface ChefService {
 
    /**
     * Updates and populate the automatic attributes of the given node.
-    * 
+    *
     * @param nodeName The node to update.
     */
    void updateAutomaticAttributesOnNode(String nodeName);
@@ -130,37 +130,44 @@ public interface ChefService {
    /**
     * Removes the nodes and clients that have been inactive for a given amount of
     * time.
-    * 
-    * @param prefix The prefix for the nodes and clients to delete.
+    *
+    * @param prefix       The prefix for the nodes and clients to delete.
     * @param secondsStale The seconds of inactivity to consider a node and
-    *        client obsolete.
+    *                     client obsolete.
     */
    void cleanupStaleNodesAndClients(String prefix, int secondsStale);
 
    /**
     * Deletes the given nodes.
-    * 
+    *
     * @param names The names of the nodes to delete.
     */
    void deleteAllNodesInList(Iterable<String> names);
 
    /**
     * Deletes the given clients.
-    * 
+    *
     * @param names The names of the client to delete.
     */
    void deleteAllClientsInList(Iterable<String> names);
 
    /**
     * Lists the details of all existing nodes.
-    * 
+    *
     * @return The details of all existing nodes.
     */
    Iterable<? extends Node> listNodes();
 
    /**
+    * Lists the details of all existing nodes, executing concurrently using the executorService.
+    *
+    * @return The details of all existing nodes.
+    */
+   Iterable<? extends Node> listNodes(ExecutorService executorService);
+
+   /**
     * Lists the details of all existing nodes in the given environment.
-    * 
+    *
     * @param environmentName The name fo the environment.
     * @return The details of all existing nodes in the given environment.
     */
@@ -168,20 +175,44 @@ public interface ChefService {
    Iterable<? extends Node> listNodesInEnvironment(String environmentName);
 
    /**
+    * Lists the details of all existing nodes in the given environment, using the ExecutorService to paralleling the execution.
+    *
+    * @param executorService The thread pool used in this operation
+    * @param environmentName The name fo the environment.
+    * @return The details of all existing nodes in the given environment.
+    */
+   @SinceApiVersion("0.10.0")
+   Iterable<? extends Node> listNodesInEnvironment(String environmentName, ExecutorService executorService);
+
+   /**
     * Lists the details of all existing clients.
-    * 
+    *
     * @return The details of all existing clients.
     */
    Iterable<? extends Client> listClients();
 
    /**
+    * Lists the details of all existing clients, but executing concurrently using the threads available in the ExecutorService.
+    *
+    * @return The details of all existing clients.
+    */
+   Iterable<? extends Client> listClients(ExecutorService executorService);
+
+   /**
     * Lists the details of all existing cookbooks.
-    * 
+    *
     * @return The details of all existing cookbooks.
     */
    Iterable<? extends CookbookVersion> listCookbookVersions();
 
    /**
+    * Lists the details of all existing cookbooks. This method is executed concurrently, using the threads available in the ExecutorService.
+    *
+    * @return The details of all existing cookbooks.
+    */
+   Iterable<? extends CookbookVersion> listCookbookVersions(ExecutorService executorService);
+
+   /**
     * Lists the details of all existing cookbooks in an environment.
     *
     * @param environmentName The environment name.
@@ -190,19 +221,40 @@ public interface ChefService {
    Iterable<? extends CookbookVersion> listCookbookVersionsInEnvironment(String environmentName);
 
    /**
+    * Lists the details of all existing cookbooks in an environment.
+
+    * @param executorService The thread pool to do the concurrent execution.
+    * @param environmentName The environment name.
+    * @return The details of all existing cookbooks in an environment.
+    */
+   Iterable<? extends CookbookVersion> listCookbookVersionsInEnvironment(String environmentName, ExecutorService executorService);
+
+   /**
     * Lists the details of all existing cookbooks in an environment
     * limiting number of versions.
     *
     * @param environmentName The environment name.
-    * @param numVersions The number of cookbook versions to include.
-    *                    Use 'all' to return all cookbook versions.
+    * @param numVersions     The number of cookbook versions to include.
+    *                        Use 'all' to return all cookbook versions.
     * @return The details of all existing cookbooks in environment.
     */
    Iterable<? extends CookbookVersion> listCookbookVersionsInEnvironment(String environmentName, String numVersions);
 
    /**
+    * Lists the details of all existing cookbooks in an environment
+    * limiting number of versions.
+    *
+    * @param executorService The executorService used to do this operation concurrently.
+    * @param environmentName The environment name.
+    * @param numVersions     The number of cookbook versions to include.
+    *                        Use 'all' to return all cookbook versions.
+    * @return The details of all existing cookbooks in environment.
+    */
+   Iterable<? extends CookbookVersion> listCookbookVersionsInEnvironment(String environmentName, String numVersions, ExecutorService executorService);
+
+   /**
     * Lists the details of all existing environments.
-    * 
+    *
     * @return The details of all existing environments.
     */
    @SinceApiVersion("0.10.0")

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2e813432/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java b/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
index c22e697..d390555 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/internal/BaseChefService.java
@@ -24,6 +24,7 @@ import java.io.InputStream;
 import java.security.PrivateKey;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.ExecutorService;
 
 import javax.annotation.Resource;
 import javax.inject.Inject;
@@ -50,9 +51,9 @@ import org.jclouds.chef.strategy.DeleteAllNodesInList;
 import org.jclouds.chef.strategy.ListClients;
 import org.jclouds.chef.strategy.ListCookbookVersions;
 import org.jclouds.chef.strategy.ListCookbookVersionsInEnvironment;
-import org.jclouds.chef.strategy.ListNodesInEnvironment;
 import org.jclouds.chef.strategy.ListEnvironments;
 import org.jclouds.chef.strategy.ListNodes;
+import org.jclouds.chef.strategy.ListNodesInEnvironment;
 import org.jclouds.chef.strategy.UpdateAutomaticAttributesOnNode;
 import org.jclouds.crypto.Crypto;
 import org.jclouds.domain.JsonBall;
@@ -92,7 +93,7 @@ public class BaseChefService implements ChefService {
    private final ListNodesInEnvironment listNodesInEnvironment;
    private final Json json;
    private final Crypto crypto;
-   
+
    @Resource
    @Named(ChefProperties.CHEF_LOGGER)
    protected Logger logger = Logger.NULL;
@@ -127,7 +128,7 @@ public class BaseChefService implements ChefService {
       this.runListForGroup = checkNotNull(runListForGroup, "runListForGroup");
       this.listEnvironments = checkNotNull(listEnvironments, "listEnvironments");
       this.listNodesInEnvironment = checkNotNull(listNodesInEnvironment, "listNodesInEnvironment");
-      this.listCookbookVersionsInEnvironment = checkNotNull(listCookbookVersionsInEnvironment, "listCookbookVersionsInEnvironment");
+      this.listCookbookVersionsInEnvironment = checkNotNull(listCookbookVersionsInEnvironment,"listCookbookVersionsInEnvironment");
       this.json = checkNotNull(json, "json");
       this.crypto = checkNotNull(crypto, "crypto");
    }
@@ -140,13 +141,13 @@ public class BaseChefService implements ChefService {
    @Override
    public byte[] encrypt(InputSupplier<? extends InputStream> supplier) throws IOException {
       return ByteStreams.toByteArray(new RSAEncryptingPayload(crypto, Payloads.newPayload(supplier.getInput()), privateKey
-            .get()));
+                  .get()));
    }
 
    @Override
    public byte[] decrypt(InputSupplier<? extends InputStream> supplier) throws IOException {
       return ByteStreams.toByteArray(new RSADecryptingPayload(crypto, Payloads.newPayload(supplier.getInput()), privateKey
-            .get()));
+                  .get()));
    }
 
    @VisibleForTesting
@@ -233,26 +234,54 @@ public class BaseChefService implements ChefService {
    }
 
    @Override
+   public Iterable<? extends Node> listNodes(ExecutorService executorService) {
+      return listNodes.execute(executorService);
+   }
+
+   @Override
    public Iterable<? extends Client> listClients() {
       return listClients.execute();
    }
 
    @Override
+   public Iterable<? extends Client> listClients(ExecutorService executorService) {
+      return listClients.execute(executorService);
+   }
+
+   @Override
    public Iterable<? extends CookbookVersion> listCookbookVersions() {
       return listCookbookVersions.execute();
    }
 
+   @Override public Iterable<? extends CookbookVersion> listCookbookVersions(
+         ExecutorService executorService) {
+      return listCookbookVersions.execute(executorService);
+   }
+
    @Override
    public Iterable<? extends CookbookVersion> listCookbookVersionsInEnvironment(String environmentName) {
       return listCookbookVersionsInEnvironment.execute(environmentName);
    }
 
    @Override
-   public Iterable<? extends CookbookVersion> listCookbookVersionsInEnvironment(String environmentName, String numVersions) {
+   public Iterable<? extends CookbookVersion> listCookbookVersionsInEnvironment(String environmentName,
+         ExecutorService executorService) {
+      return listCookbookVersionsInEnvironment.execute(executorService, environmentName);
+   }
+
+   @Override
+   public Iterable<? extends CookbookVersion> listCookbookVersionsInEnvironment(String environmentName,
+         String numVersions) {
       return listCookbookVersionsInEnvironment.execute(environmentName, numVersions);
    }
 
    @Override
+   public Iterable<? extends CookbookVersion> listCookbookVersionsInEnvironment(String environmentName,
+         String numVersions, ExecutorService executorService) {
+      return listCookbookVersionsInEnvironment.execute(executorService, environmentName, numVersions);
+   }
+
+   @Override
    public Iterable<? extends Environment> listEnvironments() {
       return listEnvironments.execute();
    }
@@ -262,4 +291,9 @@ public class BaseChefService implements ChefService {
       return listNodesInEnvironment.execute(environmentName);
    }
 
+   @Override
+   public Iterable<? extends Node> listNodesInEnvironment(String environmentName, ExecutorService executorService) {
+      return listNodesInEnvironment.execute(executorService, environmentName);
+   }
+
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2e813432/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java
index f531a32..aa40c2a 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java
@@ -16,16 +16,17 @@
  */
 package org.jclouds.chef.strategy;
 
+import com.google.inject.ImplementedBy;
 import org.jclouds.chef.domain.Client;
 import org.jclouds.chef.strategy.internal.ListClientsImpl;
 
-import com.google.common.util.concurrent.ListeningExecutorService;
-import com.google.inject.ImplementedBy;
+import java.util.concurrent.ExecutorService;
 
 @ImplementedBy(ListClientsImpl.class)
 public interface ListClients {
 
    Iterable<? extends Client> execute();
 
-   Iterable<? extends Client> execute(ListeningExecutorService executor);
+   Iterable<? extends Client> execute(ExecutorService executor);
+
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2e813432/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java
index 4409e4e..45663a3 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java
@@ -16,16 +16,17 @@
  */
 package org.jclouds.chef.strategy;
 
+import com.google.inject.ImplementedBy;
 import org.jclouds.chef.domain.CookbookVersion;
 import org.jclouds.chef.strategy.internal.ListCookbookVersionsImpl;
 
-import com.google.common.util.concurrent.ListeningExecutorService;
-import com.google.inject.ImplementedBy;
+import java.util.concurrent.ExecutorService;
 
 @ImplementedBy(ListCookbookVersionsImpl.class)
 public interface ListCookbookVersions {
 
    Iterable<? extends CookbookVersion> execute();
 
-   Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor);
+   Iterable<? extends CookbookVersion> execute(ExecutorService executor);
+
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2e813432/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java
index b0e1c54..188d29f 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersionsInEnvironment.java
@@ -16,11 +16,11 @@
  */
 package org.jclouds.chef.strategy;
 
+import com.google.inject.ImplementedBy;
 import org.jclouds.chef.domain.CookbookVersion;
 import org.jclouds.chef.strategy.internal.ListCookbookVersionsInEnvironmentImpl;
 
-import com.google.common.util.concurrent.ListeningExecutorService;
-import com.google.inject.ImplementedBy;
+import java.util.concurrent.ExecutorService;
 
 @ImplementedBy(ListCookbookVersionsInEnvironmentImpl.class)
 public interface ListCookbookVersionsInEnvironment {
@@ -29,7 +29,9 @@ public interface ListCookbookVersionsInEnvironment {
 
    Iterable<? extends CookbookVersion> execute(String environmentName, String numVersions);
 
-   Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor, String environmentName);
+   Iterable<? extends CookbookVersion> execute(ExecutorService executor, String environmentName);
+
+   Iterable<? extends CookbookVersion> execute(ExecutorService executor, String environmentName, String numVersions);
+
 
-   Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor, String environmentName, String numVersions);
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2e813432/apis/chef/src/main/java/org/jclouds/chef/strategy/ListEnvironments.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListEnvironments.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListEnvironments.java
index 3e5b11f..553e8d4 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListEnvironments.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListEnvironments.java
@@ -16,16 +16,16 @@
  */
 package org.jclouds.chef.strategy;
 
+import com.google.inject.ImplementedBy;
 import org.jclouds.chef.domain.Environment;
 import org.jclouds.chef.strategy.internal.ListEnvironmentsImpl;
 
-import com.google.common.util.concurrent.ListeningExecutorService;
-import com.google.inject.ImplementedBy;
+import java.util.concurrent.ExecutorService;
 
 @ImplementedBy(ListEnvironmentsImpl.class)
 public interface ListEnvironments {
 
    Iterable<? extends Environment> execute();
 
-   Iterable<? extends Environment> execute(ListeningExecutorService executor);
+   Iterable<? extends Environment> execute(ExecutorService executor);
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2e813432/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java
index a1a4093..660eed0 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java
@@ -16,16 +16,17 @@
  */
 package org.jclouds.chef.strategy;
 
+import com.google.inject.ImplementedBy;
 import org.jclouds.chef.domain.Node;
 import org.jclouds.chef.strategy.internal.ListNodesImpl;
 
-import com.google.common.util.concurrent.ListeningExecutorService;
-import com.google.inject.ImplementedBy;
+import java.util.concurrent.ExecutorService;
 
 @ImplementedBy(ListNodesImpl.class)
 public interface ListNodes {
 
    Iterable<? extends Node> execute();
 
-   Iterable<? extends Node> execute(ListeningExecutorService executor);
+   Iterable<? extends Node> execute(ExecutorService executor);
+
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2e813432/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
index 6a46fab..efeffe6 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
@@ -16,16 +16,17 @@
  */
 package org.jclouds.chef.strategy;
 
+import com.google.inject.ImplementedBy;
 import org.jclouds.chef.domain.Node;
 import org.jclouds.chef.strategy.internal.ListNodesInEnvironmentImpl;
 
-import com.google.common.util.concurrent.ListeningExecutorService;
-import com.google.inject.ImplementedBy;
+import java.util.concurrent.ExecutorService;
 
 @ImplementedBy(ListNodesInEnvironmentImpl.class)
 public interface ListNodesInEnvironment {
 
    Iterable<? extends Node> execute(String environmentName);
 
-   Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName);
+   Iterable<? extends Node> execute(ExecutorService executor, String environmentName);
+
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2e813432/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/BaseListCookbookVersionsImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/BaseListCookbookVersionsImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/BaseListCookbookVersionsImpl.java
new file mode 100644
index 0000000..94cf79a
--- /dev/null
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/BaseListCookbookVersionsImpl.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.chef.strategy.internal;
+
+import com.google.common.base.Function;
+import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.ListeningExecutorService;
+import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.domain.CookbookVersion;
+import org.jclouds.logging.Logger;
+
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.Callable;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.common.collect.Iterables.concat;
+import static com.google.common.collect.Iterables.transform;
+import static com.google.common.util.concurrent.Futures.allAsList;
+import static com.google.common.util.concurrent.Futures.getUnchecked;
+
+public abstract class BaseListCookbookVersionsImpl {
+
+   protected final ChefApi api;
+
+   protected Logger logger = Logger.NULL;
+
+   BaseListCookbookVersionsImpl(ChefApi api) {
+      this.api = checkNotNull(api, "api");
+   }
+
+   protected Iterable<? extends CookbookVersion> execute(Iterable<String> toGet) {
+      return concat(transform(toGet, new Function<String, Iterable<? extends CookbookVersion>>() {
+
+         @Override
+         public Iterable<? extends CookbookVersion> apply(final String cookbook) {
+            // TODO getting each version could also go parallel
+            Set<String> cookbookVersions = api.listVersionsOfCookbook(cookbook);
+            Iterable<? extends CookbookVersion> cookbooksVersions = transform(cookbookVersions,
+                  new Function<String, CookbookVersion>() {
+                     @Override
+                     public CookbookVersion apply(final String version) {
+                        return api.getCookbook(cookbook, version);
+                     }
+                  }
+            );
+
+            logger.trace(String.format("getting versions of cookbook: %s", cookbook));
+            return cookbooksVersions;
+         }
+      }));
+
+   }
+
+   protected Iterable<? extends CookbookVersion> executeConcurrently(final ListeningExecutorService executor,
+         Iterable<String> cookbookNames) {
+      return concat(transform(cookbookNames, new Function<String, Iterable<? extends CookbookVersion>>() {
+
+         @Override
+         public Iterable<? extends CookbookVersion> apply(final String cookbook) {
+            // TODO getting each version could also go parallel
+            Set<String> cookbookVersions = api.listVersionsOfCookbook(cookbook);
+            ListenableFuture<List<CookbookVersion>> futures = allAsList(transform(cookbookVersions,
+                  new Function<String, ListenableFuture<CookbookVersion>>() {
+                     @Override
+                     public ListenableFuture<CookbookVersion> apply(final String version) {
+                        return executor.submit(new Callable<CookbookVersion>() {
+                           @Override
+                           public CookbookVersion call() throws Exception {
+                              return api.getCookbook(cookbook, version);
+                           }
+                        });
+                     }
+                  }
+            ));
+
+            logger.trace(String.format("getting versions of cookbook: %s", cookbook));
+            return getUnchecked(futures);
+         }
+      }));
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2e813432/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/BaseListNodesImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/BaseListNodesImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/BaseListNodesImpl.java
new file mode 100644
index 0000000..a426b8d
--- /dev/null
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/BaseListNodesImpl.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.chef.strategy.internal;
+
+import com.google.common.base.Function;
+import com.google.common.base.Joiner;
+import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.ListeningExecutorService;
+import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.domain.Node;
+import org.jclouds.logging.Logger;
+
+import java.util.List;
+import java.util.concurrent.Callable;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.common.collect.Iterables.transform;
+import static com.google.common.util.concurrent.Futures.allAsList;
+import static com.google.common.util.concurrent.Futures.getUnchecked;
+
+public abstract class BaseListNodesImpl {
+
+   protected final ChefApi api;
+
+   protected Logger logger = Logger.NULL;
+
+   BaseListNodesImpl(ChefApi api) {
+      this.api = checkNotNull(api, "api");
+   }
+
+   protected Iterable<? extends Node> execute(Iterable<String> toGet) {
+      Iterable<? extends Node> nodes = transform(toGet, new Function<String, Node>() {
+               @Override
+               public Node apply(final String input) {
+                  return api.getNode(input);
+               }
+            }
+      );
+
+      logger.trace(String.format("getting nodes: %s", Joiner.on(',').join(toGet)));
+      return nodes;
+
+   }
+
+   protected Iterable<? extends Node> executeConcurrently(final ListeningExecutorService executor,
+         Iterable<String> toGet) {
+      ListenableFuture<List<Node>> futures = allAsList(transform(toGet, new Function<String, ListenableFuture<Node>>() {
+         @Override
+         public ListenableFuture<Node> apply(final String input) {
+            return executor.submit(new Callable<Node>() {
+               @Override
+               public Node call() throws Exception {
+                  return api.getNode(input);
+               }
+            });
+         }
+      }));
+
+      logger.trace(String.format("getting nodes: %s", Joiner.on(',').join(toGet)));
+      return getUnchecked(futures);
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2e813432/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListClientsImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListClientsImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListClientsImpl.java
index 6acda30..105be2f 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListClientsImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListClientsImpl.java
@@ -28,45 +28,66 @@ import javax.annotation.Resource;
 import javax.inject.Named;
 import javax.inject.Singleton;
 
-import org.jclouds.Constants;
+import com.google.common.base.Function;
+import com.google.common.base.Joiner;
+import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.ListeningExecutorService;
+import com.google.common.util.concurrent.MoreExecutors;
+import com.google.inject.Inject;
 import org.jclouds.chef.ChefApi;
 import org.jclouds.chef.config.ChefProperties;
 import org.jclouds.chef.domain.Client;
 import org.jclouds.chef.strategy.ListClients;
 import org.jclouds.logging.Logger;
 
-import com.google.common.base.Function;
-import com.google.common.base.Joiner;
-import com.google.common.util.concurrent.ListenableFuture;
-import com.google.common.util.concurrent.ListeningExecutorService;
-import com.google.inject.Inject;
+import java.util.concurrent.ExecutorService;
+
 
 @Singleton
 public class ListClientsImpl implements ListClients {
 
    protected final ChefApi api;
-   protected final ListeningExecutorService userExecutor;
    @Resource
    @Named(ChefProperties.CHEF_LOGGER)
    protected Logger logger = Logger.NULL;
 
    @Inject
-   ListClientsImpl(@Named(Constants.PROPERTY_USER_THREADS) ListeningExecutorService userExecutor, ChefApi api) {
-      this.userExecutor = checkNotNull(userExecutor, "userExecuor");
+   ListClientsImpl(ChefApi api) {
       this.api = checkNotNull(api, "api");
    }
 
    @Override
    public Iterable<? extends Client> execute() {
-      return execute(userExecutor);
+
+      Iterable<String> toGet = api.listClients();
+      Iterable<? extends Client> clients = transform(toGet,
+            new Function<String, Client>() {
+               @Override
+               public Client apply(final String input) {
+
+                  return api.getClient(input);
+               }
+
+            }
+      );
+
+      logger.trace(String.format("getting clients: %s", Joiner.on(',').join(toGet)));
+      return clients;
+
    }
 
    @Override
-   public Iterable<? extends Client> execute(ListeningExecutorService executor) {
-      return execute(executor, api.listClients());
+   public Iterable<? extends Client> execute(ExecutorService executorService) {
+      return this.execute(MoreExecutors.listeningDecorator(executorService));
+   }
+
+
+   private Iterable<? extends Client> execute(ListeningExecutorService listeningExecutor) {
+      return executeConcurrently(listeningExecutor, api.listClients());
    }
 
-   private Iterable<? extends Client> execute(final ListeningExecutorService executor, Iterable<String> toGet) {
+   private Iterable<? extends Client> executeConcurrently(final ListeningExecutorService executor,
+         Iterable<String> toGet) {
       ListenableFuture<List<Client>> futures = allAsList(transform(toGet,
             new Function<String, ListenableFuture<Client>>() {
                @Override
@@ -78,7 +99,8 @@ public class ListClientsImpl implements ListClients {
                      }
                   });
                }
-            }));
+            }
+      ));
 
       logger.trace(String.format("getting clients: %s", Joiner.on(',').join(toGet)));
       return getUnchecked(futures);

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2e813432/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java
index 75794d9..d109038 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsImpl.java
@@ -16,81 +16,45 @@
  */
 package org.jclouds.chef.strategy.internal;
 
-import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.collect.Iterables.concat;
-import static com.google.common.collect.Iterables.transform;
-import static com.google.common.util.concurrent.Futures.allAsList;
-import static com.google.common.util.concurrent.Futures.getUnchecked;
-
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.Callable;
-
-import javax.annotation.Resource;
-import javax.inject.Named;
-import javax.inject.Singleton;
-
-import org.jclouds.Constants;
+import com.google.common.util.concurrent.ListeningExecutorService;
+import com.google.common.util.concurrent.MoreExecutors;
+import com.google.inject.Inject;
 import org.jclouds.chef.ChefApi;
 import org.jclouds.chef.config.ChefProperties;
 import org.jclouds.chef.domain.CookbookVersion;
 import org.jclouds.chef.strategy.ListCookbookVersions;
 import org.jclouds.logging.Logger;
 
-import com.google.common.base.Function;
-import com.google.common.util.concurrent.ListenableFuture;
-import com.google.common.util.concurrent.ListeningExecutorService;
-import com.google.inject.Inject;
+import javax.annotation.Resource;
+import javax.inject.Named;
+import javax.inject.Singleton;
+import java.util.concurrent.ExecutorService;
 
 @Singleton
-public class ListCookbookVersionsImpl implements ListCookbookVersions {
+public class ListCookbookVersionsImpl extends BaseListCookbookVersionsImpl implements ListCookbookVersions {
 
-   protected final ChefApi api;
-   protected final ListeningExecutorService userExecutor;
    @Resource
    @Named(ChefProperties.CHEF_LOGGER)
    protected Logger logger = Logger.NULL;
 
    @Inject
-   ListCookbookVersionsImpl(@Named(Constants.PROPERTY_USER_THREADS) ListeningExecutorService userExecutor, ChefApi api) {
-      this.userExecutor = checkNotNull(userExecutor, "userExecuor");
-      this.api = checkNotNull(api, "api");
+   ListCookbookVersionsImpl(ChefApi api) {
+      super(api);
    }
 
    @Override
    public Iterable<? extends CookbookVersion> execute() {
-      return execute(userExecutor);
+      return super.execute(api.listCookbooks());
    }
 
    @Override
-   public Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor) {
-      return execute(executor, api.listCookbooks());
+   public Iterable<? extends CookbookVersion> execute(ExecutorService executor) {
+      return this.executeConcurrently(MoreExecutors.listeningDecorator(executor));
    }
 
-   private Iterable<? extends CookbookVersion> execute(final ListeningExecutorService executor,
-         Iterable<String> cookbookNames) {
-      return concat(transform(cookbookNames, new Function<String, Iterable<? extends CookbookVersion>>() {
-
-         @Override
-         public Iterable<? extends CookbookVersion> apply(final String cookbook) {
-            // TODO getting each version could also go parallel
-            Set<String> cookbookVersions = api.listVersionsOfCookbook(cookbook);
-            ListenableFuture<List<CookbookVersion>> futures = allAsList(transform(cookbookVersions,
-                  new Function<String, ListenableFuture<CookbookVersion>>() {
-                     @Override
-                     public ListenableFuture<CookbookVersion> apply(final String version) {
-                        return executor.submit(new Callable<CookbookVersion>() {
-                           @Override
-                           public CookbookVersion call() throws Exception {
-                              return api.getCookbook(cookbook, version);
-                           }
-                        });
-                     }
-                  }));
 
-            logger.trace(String.format("getting versions of cookbook: %s", cookbook));
-            return getUnchecked(futures);
-         }
-      }));
+   private Iterable<? extends CookbookVersion> executeConcurrently(ListeningExecutorService executor) {
+      return super.executeConcurrently(executor, api.listCookbooks());
    }
+
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2e813432/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImpl.java
index ccc2992..a7142dc 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImpl.java
@@ -16,21 +16,16 @@
  */
 package org.jclouds.chef.strategy.internal;
 
-import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.collect.Iterables.concat;
 import static com.google.common.collect.Iterables.transform;
-import static com.google.common.util.concurrent.Futures.allAsList;
-import static com.google.common.util.concurrent.Futures.getUnchecked;
-
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.Callable;
 
 import javax.annotation.Resource;
 import javax.inject.Named;
 import javax.inject.Singleton;
 
-import org.jclouds.Constants;
+import com.google.common.base.Function;
+import com.google.common.util.concurrent.ListeningExecutorService;
+import com.google.common.util.concurrent.MoreExecutors;
+import com.google.inject.Inject;
 import org.jclouds.chef.ChefApi;
 import org.jclouds.chef.config.ChefProperties;
 import org.jclouds.chef.domain.CookbookDefinition;
@@ -38,69 +33,85 @@ import org.jclouds.chef.domain.CookbookVersion;
 import org.jclouds.chef.strategy.ListCookbookVersionsInEnvironment;
 import org.jclouds.logging.Logger;
 
-import com.google.common.base.Function;
-import com.google.common.util.concurrent.ListenableFuture;
-import com.google.common.util.concurrent.ListeningExecutorService;
-import com.google.inject.Inject;
+import java.util.concurrent.ExecutorService;
 
 @Singleton
-public class ListCookbookVersionsInEnvironmentImpl implements ListCookbookVersionsInEnvironment {
+public class ListCookbookVersionsInEnvironmentImpl extends BaseListCookbookVersionsImpl
+      implements ListCookbookVersionsInEnvironment {
 
-   protected final ChefApi api;
-   protected final ListeningExecutorService userExecutor;
    @Resource
    @Named(ChefProperties.CHEF_LOGGER)
    protected Logger logger = Logger.NULL;
 
    @Inject
-   ListCookbookVersionsInEnvironmentImpl(@Named(Constants.PROPERTY_USER_THREADS) ListeningExecutorService userExecutor, ChefApi api) {
-      this.userExecutor = checkNotNull(userExecutor, "userExecuor");
-      this.api = checkNotNull(api, "api");
+   ListCookbookVersionsInEnvironmentImpl(ChefApi api) {
+      super(api);
    }
 
    @Override
    public Iterable<? extends CookbookVersion> execute(String environmentName) {
-      return execute(userExecutor, environmentName);
+      return super.execute(transform(api.listCookbooksInEnvironment(environmentName),
+            new Function<CookbookDefinition, String>() {
+
+               @Override
+               public String apply(CookbookDefinition cookbookDefinition) {
+                  return cookbookDefinition.getName();
+               }
+            }
+      ));
    }
 
    @Override
    public Iterable<? extends CookbookVersion> execute(String environmentName, String numVersions) {
-      return execute(userExecutor, environmentName, numVersions);
+      return super.execute(transform(api.listCookbooksInEnvironment(environmentName, numVersions),
+            new Function<CookbookDefinition, String>() {
+
+               @Override
+               public String apply(CookbookDefinition cookbookDefinition) {
+                  return cookbookDefinition.getName();
+               }
+            }
+      ));
    }
 
-   public Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor, String environmentName) {
-      return execute(executor, api.listCookbooksInEnvironment(environmentName));
+   @Override
+   public Iterable<? extends CookbookVersion> execute(ExecutorService executor,
+         String environmentName) {
+      return this.executeConcurrently(MoreExecutors.listeningDecorator(executor), environmentName);
    }
 
    @Override
-   public Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor, String environmentName, String numVersions) {
-      return execute(executor, api.listCookbooksInEnvironment(environmentName, numVersions));
+   public Iterable<? extends CookbookVersion> execute(ExecutorService executor,
+         String environmentName, String numVersions) {
+      return this.executeConcurrently(MoreExecutors.listeningDecorator(executor), environmentName, numVersions);
+   }
+
+
+   private Iterable<? extends CookbookVersion> executeConcurrently(ListeningExecutorService executor,
+         String environmentName) {
+      return super.execute(
+            transform(api.listCookbooksInEnvironment(environmentName), new Function<CookbookDefinition, String>() {
+
+               @Override
+               public String apply(CookbookDefinition cookbookDefinition) {
+                  return cookbookDefinition.getName();
+               }
+            })
+      );
    }
 
-   private Iterable<? extends CookbookVersion> execute(final ListeningExecutorService executor,
-         Iterable<CookbookDefinition> cookbookDefs) {
-      return concat(transform(cookbookDefs, new Function<CookbookDefinition, Iterable<? extends CookbookVersion>>() {
-
-         @Override
-         public Iterable<? extends CookbookVersion> apply(final CookbookDefinition cookbookDef) {
-            // TODO getting each version could also go parallel
-            Set<CookbookDefinition.Version> cookbookVersions = cookbookDef.getVersions();
-            ListenableFuture<List<CookbookVersion>> futures = allAsList(transform(cookbookVersions,
-                  new Function<CookbookDefinition.Version, ListenableFuture<CookbookVersion>>() {
-                     @Override
-                     public ListenableFuture<CookbookVersion> apply(final CookbookDefinition.Version version) {
-                        return executor.submit(new Callable<CookbookVersion>() {
-                           @Override
-                           public CookbookVersion call() throws Exception {
-                              return api.getCookbook(cookbookDef.getName(), version.getVersion());
-                           }
-                        });
-                     }
-                  }));
-
-            logger.trace(String.format("getting versions of cookbook %s: ", cookbookDef.getName()));
-            return getUnchecked(futures);
-         }
-      }));
+
+   private Iterable<? extends CookbookVersion> executeConcurrently(ListeningExecutorService executor,
+         String environmentName, String numVersions) {
+      return super.execute(transform(api.listCookbooksInEnvironment(environmentName, numVersions),
+            new Function<CookbookDefinition, String>() {
+
+               @Override
+               public String apply(CookbookDefinition cookbookDefinition) {
+                  return cookbookDefinition.getName();
+               }
+            }
+      ));
    }
+
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2e813432/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListEnvironmentsImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListEnvironmentsImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListEnvironmentsImpl.java
index 9b79de2..0ed792e 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListEnvironmentsImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListEnvironmentsImpl.java
@@ -40,6 +40,12 @@ import com.google.common.base.Joiner;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.inject.Inject;
+import com.google.common.util.concurrent.MoreExecutors;
+
+
+import java.util.concurrent.ExecutorService;
+
+
 
 @Singleton
 public class ListEnvironmentsImpl implements ListEnvironments {
@@ -62,7 +68,11 @@ public class ListEnvironmentsImpl implements ListEnvironments {
    }
 
    @Override
-   public Iterable<? extends Environment> execute(ListeningExecutorService executor) {
+   public Iterable<? extends Environment> execute(ExecutorService executor) {
+      return this.execute(MoreExecutors.listeningDecorator(executor));
+   }
+
+   private Iterable<? extends Environment> execute(ListeningExecutorService executor) {
       return execute(executor, api.listEnvironments());
    }
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2e813432/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesImpl.java
index be9b652..8d95965 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesImpl.java
@@ -16,71 +16,47 @@
  */
 package org.jclouds.chef.strategy.internal;
 
-import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.collect.Iterables.transform;
-import static com.google.common.util.concurrent.Futures.allAsList;
-import static com.google.common.util.concurrent.Futures.getUnchecked;
-
-import java.util.List;
-import java.util.concurrent.Callable;
-
 import javax.annotation.Resource;
 import javax.inject.Named;
 import javax.inject.Singleton;
 
-import org.jclouds.Constants;
+import com.google.common.util.concurrent.ListeningExecutorService;
+import com.google.common.util.concurrent.MoreExecutors;
+import com.google.inject.Inject;
 import org.jclouds.chef.ChefApi;
 import org.jclouds.chef.config.ChefProperties;
 import org.jclouds.chef.domain.Node;
 import org.jclouds.chef.strategy.ListNodes;
 import org.jclouds.logging.Logger;
 
-import com.google.common.base.Function;
-import com.google.common.base.Joiner;
-import com.google.common.util.concurrent.ListenableFuture;
-import com.google.common.util.concurrent.ListeningExecutorService;
-import com.google.inject.Inject;
+import java.util.concurrent.ExecutorService;
 
 @Singleton
-public class ListNodesImpl implements ListNodes {
+public class ListNodesImpl extends BaseListNodesImpl implements ListNodes {
+
 
-   protected final ChefApi api;
-   protected final ListeningExecutorService userExecutor;
    @Resource
    @Named(ChefProperties.CHEF_LOGGER)
    protected Logger logger = Logger.NULL;
 
    @Inject
-   ListNodesImpl(@Named(Constants.PROPERTY_USER_THREADS) ListeningExecutorService userExecutor, ChefApi api) {
-      this.userExecutor = checkNotNull(userExecutor, "userExecuor");
-      this.api = checkNotNull(api, "api");
+   ListNodesImpl(ChefApi api) {
+      super(api);
    }
 
    @Override
    public Iterable<? extends Node> execute() {
-      return execute(userExecutor);
+      return super.execute(api.listNodes());
    }
 
    @Override
-   public Iterable<? extends Node> execute(ListeningExecutorService executor) {
-      return execute(executor, api.listNodes());
+   public Iterable<? extends Node> execute(ExecutorService executor) {
+      return this.executeConcurrently(MoreExecutors.listeningDecorator(executor));
    }
 
-   private Iterable<? extends Node> execute(final ListeningExecutorService executor, Iterable<String> toGet) {
-      ListenableFuture<List<Node>> futures = allAsList(transform(toGet, new Function<String, ListenableFuture<Node>>() {
-         @Override
-         public ListenableFuture<Node> apply(final String input) {
-            return executor.submit(new Callable<Node>() {
-               @Override
-               public Node call() throws Exception {
-                  return api.getNode(input);
-               }
-            });
-         }
-      }));
 
-      logger.trace(String.format("getting nodes: %s", Joiner.on(',').join(toGet)));
-      return getUnchecked(futures);
+   private Iterable<? extends Node> executeConcurrently(ListeningExecutorService executor) {
+      return super.executeConcurrently(executor, api.listNodes());
    }
 
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2e813432/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImpl.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImpl.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImpl.java
index 8ae747e..58ecaaa 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImpl.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImpl.java
@@ -16,71 +16,47 @@
  */
 package org.jclouds.chef.strategy.internal;
 
-import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.collect.Iterables.transform;
-import static com.google.common.util.concurrent.Futures.allAsList;
-import static com.google.common.util.concurrent.Futures.getUnchecked;
-
-import java.util.List;
-import java.util.concurrent.Callable;
-
 import javax.annotation.Resource;
 import javax.inject.Named;
 import javax.inject.Singleton;
 
-import org.jclouds.Constants;
+import com.google.common.util.concurrent.ListeningExecutorService;
+import com.google.common.util.concurrent.MoreExecutors;
+import com.google.inject.Inject;
 import org.jclouds.chef.ChefApi;
 import org.jclouds.chef.config.ChefProperties;
 import org.jclouds.chef.domain.Node;
 import org.jclouds.chef.strategy.ListNodesInEnvironment;
 import org.jclouds.logging.Logger;
 
-import com.google.common.base.Function;
-import com.google.common.base.Joiner;
-import com.google.common.util.concurrent.ListenableFuture;
-import com.google.common.util.concurrent.ListeningExecutorService;
-import com.google.inject.Inject;
+import java.util.concurrent.ExecutorService;
 
 @Singleton
-public class ListNodesInEnvironmentImpl implements ListNodesInEnvironment {
+public class ListNodesInEnvironmentImpl extends BaseListNodesImpl implements ListNodesInEnvironment {
 
-   protected final ChefApi api;
-   protected final ListeningExecutorService userExecutor;
    @Resource
    @Named(ChefProperties.CHEF_LOGGER)
    protected Logger logger = Logger.NULL;
 
    @Inject
-   ListNodesInEnvironmentImpl(@Named(Constants.PROPERTY_USER_THREADS) ListeningExecutorService userExecutor, ChefApi api) {
-      this.userExecutor = checkNotNull(userExecutor, "userExecuor");
-      this.api = checkNotNull(api, "api");
+   ListNodesInEnvironmentImpl(ChefApi api) {
+      super(api);
    }
 
    @Override
    public Iterable<? extends Node> execute(String environmentName) {
-      return execute(userExecutor, environmentName);
+      return super.execute(api.listNodesInEnvironment(environmentName));
    }
 
    @Override
-   public Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName) {
-      return execute(executor, environmentName, api.listNodesInEnvironment(environmentName));
+   public Iterable<? extends Node> execute(ExecutorService executor, String environmentName) {
+      return this.executeConcurrently(MoreExecutors.listeningDecorator(executor), environmentName);
    }
 
-   private Iterable<? extends Node> execute(final ListeningExecutorService executor, String environmentName, Iterable<String> toGet) {
-      ListenableFuture<List<Node>> futures = allAsList(transform(toGet, new Function<String, ListenableFuture<Node>>() {
-         @Override
-         public ListenableFuture<Node> apply(final String input) {
-            return executor.submit(new Callable<Node>() {
-               @Override
-               public Node call() throws Exception {
-                  return api.getNode(input);
-               }
-            });
-         }
-      }));
 
-      logger.trace(String.format("getting nodes in environment %s: %s", environmentName, Joiner.on(',').join(toGet)));
-      return getUnchecked(futures);
+   private Iterable<? extends Node> executeConcurrently(ListeningExecutorService executor,
+         String environmentName) {
+      return super.executeConcurrently(executor, api.listNodesInEnvironment(environmentName));
    }
 
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2e813432/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java
index a9b667d..5f68fcf 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListCookbookVersionsInEnvironmentImplLiveTest.java
@@ -22,7 +22,11 @@ import static org.testng.Assert.fail;
 
 import java.io.File;
 import java.util.List;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 
+import com.google.common.util.concurrent.ListeningExecutorService;
+import com.google.common.util.concurrent.MoreExecutors;
 import org.jclouds.chef.ChefApi;
 import org.jclouds.chef.domain.ChecksumStatus;
 import org.jclouds.chef.domain.CookbookVersion;
@@ -51,6 +55,9 @@ public class ListCookbookVersionsInEnvironmentImplLiveTest extends BaseChefLiveT
    private ListCookbookVersionsInEnvironmentImpl strategy;
    private CreateNodeAndPopulateAutomaticAttributesImpl creator;
 
+   private ExecutorService testExecutorService;
+   private ListeningExecutorService testListeningExecutorService;
+
    @Override
    protected void initialize() {
       super.initialize();
@@ -63,6 +70,8 @@ public class ListCookbookVersionsInEnvironmentImplLiveTest extends BaseChefLiveT
       }
 
       this.strategy = injector.getInstance(ListCookbookVersionsInEnvironmentImpl.class);
+      this.testExecutorService = Executors.newFixedThreadPool(5);
+      this.testListeningExecutorService = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(5));
    }
 
    @AfterClass(groups = { "integration", "live" })
@@ -72,6 +81,10 @@ public class ListCookbookVersionsInEnvironmentImplLiveTest extends BaseChefLiveT
       api.deleteCookbook(PREFIX, "1.0.0");
       api.deleteCookbook(PREFIX + 1, "0.0.0");
       api.deleteCookbook(PREFIX + 1, "1.0.0");
+
+      this.testExecutorService.shutdown();
+      this.testListeningExecutorService.shutdown();
+
       super.tearDown();
    }
 
@@ -81,15 +94,51 @@ public class ListCookbookVersionsInEnvironmentImplLiveTest extends BaseChefLiveT
    }
 
    @Test
+   public void testExecuteConcurrentlyWithExecutorService() {
+      assertTrue(size(strategy.execute(testExecutorService, "_default")) > 0,
+            "Expected one or more elements");
+   }
+
+   @Test
+   public void testExecuteConcurrentlyWithListeningExecutorService() {
+      assertTrue(size(strategy.execute(testListeningExecutorService, "_default")) > 0,
+            "Expected one or more elements");
+   }
+
+   @Test
    public void testExecuteWithNumVersions() {
       assertTrue(size(strategy.execute("_default", "2")) > 0, "Expected one or more elements");
    }
 
    @Test
+   public void testExecuteConcurrentlyWithNumVersionsAndExecutorService() {
+      assertTrue(size(strategy.execute(testExecutorService, "_default", "2")) > 0,
+            "Expected one or more elements");
+   }
+
+   @Test
+   public void testExecuteConcurrentlyWithNumVersionsAndListeningExecutorService() {
+      assertTrue(size(strategy.execute(testListeningExecutorService, "_default", "2")) > 0,
+            "Expected one or more elements");
+   }
+
+   @Test
    public void testExecuteWithNumVersionsAll() {
       assertTrue(size(strategy.execute("_default", "all")) > 0, "Expected one or more elements");
    }
 
+   @Test
+   public void testExecuteConcurrentlyWithNumVersionsAllAndExecutorService() {
+      assertTrue(size(strategy.execute(testExecutorService, "_default", "all")) > 0,
+            "Expected one or more elements");
+   }
+
+   @Test
+   public void testExecuteConcurrentlyWithNumVersionsAllAndListeningExecutorService() {
+      assertTrue(size(strategy.execute(testListeningExecutorService, "_default", "all")) > 0,
+            "Expected one or more elements");
+   }
+
    private FilePayload uploadContent(String fileName) throws Exception {
       // Define the file you want in the cookbook
       File file = new File(System.getProperty("user.dir"), fileName);

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2e813432/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesImplLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesImplLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesImplLiveTest.java
index b9de2b8..903b998 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesImplLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesImplLiveTest.java
@@ -19,6 +19,8 @@ package org.jclouds.chef.strategy.internal;
 import static com.google.common.collect.Iterables.size;
 import static org.testng.Assert.assertTrue;
 
+import com.google.common.util.concurrent.ListeningExecutorService;
+import com.google.common.util.concurrent.MoreExecutors;
 import org.jclouds.chef.ChefApi;
 import org.jclouds.chef.internal.BaseChefLiveTest;
 import org.testng.annotations.AfterClass;
@@ -26,6 +28,9 @@ import org.testng.annotations.Test;
 
 import com.google.common.collect.ImmutableSet;
 
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
 /**
  * Tests behavior of {@code ListNodesImpl} strategies
  */
@@ -35,6 +40,9 @@ public class ListNodesImplLiveTest extends BaseChefLiveTest<ChefApi> {
    private ListNodesImpl strategy;
    private CreateNodeAndPopulateAutomaticAttributesImpl creator;
 
+   private ExecutorService testExecutorService;
+   private ListeningExecutorService testListeningExecutorService;
+
    @Override
    protected void initialize() {
       super.initialize();
@@ -42,6 +50,9 @@ public class ListNodesImplLiveTest extends BaseChefLiveTest<ChefApi> {
       this.strategy = injector.getInstance(ListNodesImpl.class);
       creator.execute(prefix, ImmutableSet.<String> of());
       creator.execute(prefix + 1, ImmutableSet.<String> of());
+
+      this.testExecutorService = Executors.newFixedThreadPool(5);
+      this.testListeningExecutorService = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(5));
    }
 
    @AfterClass(groups = { "integration", "live" })
@@ -49,6 +60,10 @@ public class ListNodesImplLiveTest extends BaseChefLiveTest<ChefApi> {
    protected void tearDown() {
       api.deleteNode(prefix);
       api.deleteNode(prefix + 1);
+
+      this.testExecutorService.shutdown();
+      this.testListeningExecutorService.shutdown();
+
       super.tearDown();
    }
 
@@ -56,4 +71,12 @@ public class ListNodesImplLiveTest extends BaseChefLiveTest<ChefApi> {
    public void testExecute() {
       assertTrue(size(strategy.execute()) > 0, "Expected one or more elements");
    }
+
+   public void testExecuteConcurrentlyWithExecutorService() {
+      assertTrue(size(strategy.execute(testExecutorService)) > 0, "Expected one or more elements");
+   }
+
+   public void testExecuteConcurrentlyWithListeningExecutorService() {
+      assertTrue(size(strategy.execute(testListeningExecutorService)) > 0, "Expected one or more elements");
+   }
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/2e813432/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImplLiveTest.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImplLiveTest.java b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImplLiveTest.java
index 81dd6d8..f655d52 100644
--- a/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImplLiveTest.java
+++ b/apis/chef/src/test/java/org/jclouds/chef/strategy/internal/ListNodesInEnvironmentImplLiveTest.java
@@ -19,6 +19,8 @@ package org.jclouds.chef.strategy.internal;
 import static com.google.common.collect.Iterables.size;
 import static org.testng.Assert.assertTrue;
 
+import com.google.common.util.concurrent.ListeningExecutorService;
+import com.google.common.util.concurrent.MoreExecutors;
 import org.jclouds.chef.ChefApi;
 import org.jclouds.chef.internal.BaseChefLiveTest;
 import org.testng.annotations.AfterClass;
@@ -26,6 +28,9 @@ import org.testng.annotations.Test;
 
 import com.google.common.collect.ImmutableSet;
 
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
 /**
  * Tests behavior of {@code ListNodesInEnvironmentImpl} strategies
  */
@@ -35,13 +40,19 @@ public class ListNodesInEnvironmentImplLiveTest extends BaseChefLiveTest<ChefApi
    private ListNodesInEnvironmentImpl strategy;
    private CreateNodeAndPopulateAutomaticAttributesImpl creator;
 
+   private ExecutorService testExecutorService;
+   private ListeningExecutorService testListeningExecutorService;
+
    @Override
    protected void initialize() {
       super.initialize();
       this.creator = injector.getInstance(CreateNodeAndPopulateAutomaticAttributesImpl.class);
       this.strategy = injector.getInstance(ListNodesInEnvironmentImpl.class);
-      creator.execute(prefix, ImmutableSet.<String> of());
-      creator.execute(prefix + 1, ImmutableSet.<String> of());
+      creator.execute(prefix, ImmutableSet.<String>of());
+      creator.execute(prefix + 1, ImmutableSet.<String>of());
+
+      this.testExecutorService = Executors.newFixedThreadPool(5);
+      this.testListeningExecutorService = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(5));
    }
 
    @AfterClass(groups = { "integration", "live" })
@@ -49,6 +60,10 @@ public class ListNodesInEnvironmentImplLiveTest extends BaseChefLiveTest<ChefApi
    protected void tearDown() {
       api.deleteNode(prefix);
       api.deleteNode(prefix + 1);
+
+      this.testExecutorService.shutdown();
+      this.testListeningExecutorService.shutdown();
+
       super.tearDown();
    }
 
@@ -56,4 +71,16 @@ public class ListNodesInEnvironmentImplLiveTest extends BaseChefLiveTest<ChefApi
    public void testExecute() {
       assertTrue(size(strategy.execute("_default")) > 0, "Expected one or more elements");
    }
+
+   @Test
+   public void testExecuteConcurrentlyWithExecutorService() {
+      assertTrue(size(strategy.execute(testExecutorService, "_default")) > 0,
+            "Expected one or more elements");
+   }
+
+   @Test
+   public void testExecuteConcurrentlyWithListeningExecutorService() {
+      assertTrue(size(strategy.execute(testListeningExecutorService, "_default")) > 0,
+            "Expected one or more elements");
+   }
 }


[40/50] [abbrv] git commit: Updating project version to 2.0.0-SNAPSHOT

Posted by na...@apache.org.
Updating project version to 2.0.0-SNAPSHOT

Follow-up to 82b23fc


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/2ebcc399
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/2ebcc399
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/2ebcc399

Branch: refs/heads/master
Commit: 2ebcc3995d41a094a3e198ba73f9dc5df56bf1f8
Parents: b9b6f39
Author: Andrew Phillips <an...@apache.org>
Authored: Tue Aug 5 11:50:02 2014 +0200
Committer: Andrew Phillips <an...@apache.org>
Committed: Tue Aug 5 11:50:02 2014 +0200

----------------------------------------------------------------------
 providers/enterprisechef/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/2ebcc399/providers/enterprisechef/pom.xml
----------------------------------------------------------------------
diff --git a/providers/enterprisechef/pom.xml b/providers/enterprisechef/pom.xml
index b148e4c..adce960 100644
--- a/providers/enterprisechef/pom.xml
+++ b/providers/enterprisechef/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.jclouds.chef</groupId>
     <artifactId>chef-project</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
     <relativePath>../project/pom.xml</relativePath>
   </parent>
   <groupId>org.apache.jclouds.provider</groupId>


[20/50] [abbrv] git commit: Remove public keyword from interface methods.

Posted by na...@apache.org.
Remove public keyword from interface methods.


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/5354b680
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/5354b680
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/5354b680

Branch: refs/heads/master
Commit: 5354b680f8d8c53e59df5c18ee7c407b4b550950
Parents: b2c44b4
Author: Noorul Islam K M <no...@noorul.com>
Authored: Wed Oct 30 17:44:14 2013 +0530
Committer: Andrew Gaul <an...@gaul.org>
Committed: Wed Oct 30 08:31:34 2013 -0700

----------------------------------------------------------------------
 .../chef/strategy/CleanupStaleNodesAndClients.java     |  2 +-
 .../CreateNodeAndPopulateAutomaticAttributes.java      |  4 ++--
 .../jclouds/chef/strategy/DeleteAllClientsInList.java  |  4 ++--
 .../jclouds/chef/strategy/DeleteAllNodesInList.java    |  4 ++--
 .../java/org/jclouds/chef/strategy/ListClients.java    | 12 ++++++------
 .../jclouds/chef/strategy/ListCookbookVersions.java    | 13 ++++++-------
 .../org/jclouds/chef/strategy/ListEnvironments.java    | 13 ++++++-------
 .../main/java/org/jclouds/chef/strategy/ListNodes.java | 12 ++++++------
 .../jclouds/chef/strategy/ListNodesInEnvironment.java  | 12 ++++++------
 .../chef/strategy/UpdateAutomaticAttributesOnNode.java |  2 +-
 10 files changed, 38 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/5354b680/apis/chef/src/main/java/org/jclouds/chef/strategy/CleanupStaleNodesAndClients.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/CleanupStaleNodesAndClients.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/CleanupStaleNodesAndClients.java
index 3d32f83..077da30 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/CleanupStaleNodesAndClients.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/CleanupStaleNodesAndClients.java
@@ -29,6 +29,6 @@ import com.google.inject.ImplementedBy;
 @ImplementedBy(CleanupStaleNodesAndClientsImpl.class)
 public interface CleanupStaleNodesAndClients {
 
-   public void execute(String prefix, int secondsStale);
+   void execute(String prefix, int secondsStale);
 
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/5354b680/apis/chef/src/main/java/org/jclouds/chef/strategy/CreateNodeAndPopulateAutomaticAttributes.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/CreateNodeAndPopulateAutomaticAttributes.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/CreateNodeAndPopulateAutomaticAttributes.java
index 9d48ae9..070aaa3 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/CreateNodeAndPopulateAutomaticAttributes.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/CreateNodeAndPopulateAutomaticAttributes.java
@@ -29,7 +29,7 @@ import com.google.inject.ImplementedBy;
  */
 @ImplementedBy(CreateNodeAndPopulateAutomaticAttributesImpl.class)
 public interface CreateNodeAndPopulateAutomaticAttributes {
-   public Node execute(Node node);
+   Node execute(Node node);
 
-   public Node execute(String nodeName, Iterable<String> runList);
+   Node execute(String nodeName, Iterable<String> runList);
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/5354b680/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllClientsInList.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllClientsInList.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllClientsInList.java
index 3db24f8..0fa54c0 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllClientsInList.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllClientsInList.java
@@ -30,8 +30,8 @@ import com.google.inject.ImplementedBy;
 @ImplementedBy(DeleteAllClientsInListImpl.class)
 public interface DeleteAllClientsInList {
 
-   public void execute(Iterable<String> names);
+   void execute(Iterable<String> names);
 
-   public void execute(ListeningExecutorService executor, Iterable<String> names);
+   void execute(ListeningExecutorService executor, Iterable<String> names);
 
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/5354b680/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllNodesInList.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllNodesInList.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllNodesInList.java
index d1fc8cf..16a196e 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllNodesInList.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/DeleteAllNodesInList.java
@@ -29,8 +29,8 @@ import com.google.inject.ImplementedBy;
 @ImplementedBy(DeleteAllNodesInListImpl.class)
 public interface DeleteAllNodesInList {
 
-   public void execute(Iterable<String> names);
+   void execute(Iterable<String> names);
 
-   public void execute(ListeningExecutorService executor, Iterable<String> names);
+   void execute(ListeningExecutorService executor, Iterable<String> names);
 
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/5354b680/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java
index 0985f69..18b7c13 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListClients.java
@@ -31,15 +31,15 @@ import com.google.inject.ImplementedBy;
 @ImplementedBy(ListClientsImpl.class)
 public interface ListClients {
 
-   public Iterable<? extends Client> execute();
+   Iterable<? extends Client> execute();
 
-   public Iterable<? extends Client> execute(Predicate<String> clientNameSelector);
+   Iterable<? extends Client> execute(Predicate<String> clientNameSelector);
 
-   public Iterable<? extends Client> execute(Iterable<String> toGet);
+   Iterable<? extends Client> execute(Iterable<String> toGet);
 
-   public Iterable<? extends Client> execute(ListeningExecutorService executor);
+   Iterable<? extends Client> execute(ListeningExecutorService executor);
 
-   public Iterable<? extends Client> execute(ListeningExecutorService executor, Predicate<String> clientNameSelector);
+   Iterable<? extends Client> execute(ListeningExecutorService executor, Predicate<String> clientNameSelector);
 
-   public Iterable<? extends Client> execute(ListeningExecutorService executor, Iterable<String> toGet);
+   Iterable<? extends Client> execute(ListeningExecutorService executor, Iterable<String> toGet);
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/5354b680/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java
index f30e199..5987de0 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListCookbookVersions.java
@@ -31,16 +31,15 @@ import com.google.inject.ImplementedBy;
 @ImplementedBy(ListCookbookVersionsImpl.class)
 public interface ListCookbookVersions {
 
-   public Iterable<? extends CookbookVersion> execute();
+   Iterable<? extends CookbookVersion> execute();
 
-   public Iterable<? extends CookbookVersion> execute(Predicate<String> cookbookNameSelector);
+   Iterable<? extends CookbookVersion> execute(Predicate<String> cookbookNameSelector);
 
-   public Iterable<? extends CookbookVersion> execute(Iterable<String> cookbookNames);
+   Iterable<? extends CookbookVersion> execute(Iterable<String> cookbookNames);
 
-   public Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor);
+   Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor);
 
-   public Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor,
-         Predicate<String> cookbookNameSelector);
+   Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor, Predicate<String> cookbookNameSelector);
 
-   public Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor, Iterable<String> cookbookNames);
+   Iterable<? extends CookbookVersion> execute(ListeningExecutorService executor, Iterable<String> cookbookNames);
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/5354b680/apis/chef/src/main/java/org/jclouds/chef/strategy/ListEnvironments.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListEnvironments.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListEnvironments.java
index a3c9764..6dc4aa3 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListEnvironments.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListEnvironments.java
@@ -26,16 +26,15 @@ import com.google.inject.ImplementedBy;
 @ImplementedBy(ListEnvironmentsImpl.class)
 public interface ListEnvironments {
 
-   public Iterable<? extends Environment> execute();
+   Iterable<? extends Environment> execute();
 
-   public Iterable<? extends Environment> execute(Predicate<String> environmentNameSelector);
+   Iterable<? extends Environment> execute(Predicate<String> environmentNameSelector);
 
-   public Iterable<? extends Environment> execute(Iterable<String> toGet);
+   Iterable<? extends Environment> execute(Iterable<String> toGet);
 
-   public Iterable<? extends Environment> execute(ListeningExecutorService executor);
+   Iterable<? extends Environment> execute(ListeningExecutorService executor);
 
-   public Iterable<? extends Environment> execute(ListeningExecutorService executor,
-         Predicate<String> environmentNameSelector);
+   Iterable<? extends Environment> execute(ListeningExecutorService executor, Predicate<String> environmentNameSelector);
 
-   public Iterable<? extends Environment> execute(ListeningExecutorService executor, Iterable<String> toGet);
+   Iterable<? extends Environment> execute(ListeningExecutorService executor, Iterable<String> toGet);
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/5354b680/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java
index 15fda81..8790456 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodes.java
@@ -31,15 +31,15 @@ import com.google.inject.ImplementedBy;
 @ImplementedBy(ListNodesImpl.class)
 public interface ListNodes {
 
-   public Iterable<? extends Node> execute();
+   Iterable<? extends Node> execute();
 
-   public Iterable<? extends Node> execute(Predicate<String> nodeNameSelector);
+   Iterable<? extends Node> execute(Predicate<String> nodeNameSelector);
 
-   public Iterable<? extends Node> execute(Iterable<String> toGet);
+   Iterable<? extends Node> execute(Iterable<String> toGet);
 
-   public Iterable<? extends Node> execute(ListeningExecutorService executor);
+   Iterable<? extends Node> execute(ListeningExecutorService executor);
 
-   public Iterable<? extends Node> execute(ListeningExecutorService executor, Predicate<String> nodeNameSelector);
+   Iterable<? extends Node> execute(ListeningExecutorService executor, Predicate<String> nodeNameSelector);
 
-   public Iterable<? extends Node> execute(ListeningExecutorService executor, Iterable<String> toGet);
+   Iterable<? extends Node> execute(ListeningExecutorService executor, Iterable<String> toGet);
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/5354b680/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
index c007d0e..9f6b324 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
@@ -31,15 +31,15 @@ import com.google.inject.ImplementedBy;
 @ImplementedBy(ListNodesInEnvironmentImpl.class)
 public interface ListNodesInEnvironment {
 
-   public Iterable<? extends Node> execute(String environmentName);
+   Iterable<? extends Node> execute(String environmentName);
 
-   public Iterable<? extends Node> execute(String environmentName, Predicate<String> nodeNameSelector);
+   Iterable<? extends Node> execute(String environmentName, Predicate<String> nodeNameSelector);
 
-   public Iterable<? extends Node> execute(String environmentName, Iterable<String> toGet);
+   Iterable<? extends Node> execute(String environmentName, Iterable<String> toGet);
 
-   public Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName);
+   Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName);
 
-   public Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName, Predicate<String> nodeNameSelector);
+   Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName, Predicate<String> nodeNameSelector);
 
-   public Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName, Iterable<String> toGet);
+   Iterable<? extends Node> execute(ListeningExecutorService executor, String environmentName, Iterable<String> toGet);
 }

http://git-wip-us.apache.org/repos/asf/jclouds/blob/5354b680/apis/chef/src/main/java/org/jclouds/chef/strategy/UpdateAutomaticAttributesOnNode.java
----------------------------------------------------------------------
diff --git a/apis/chef/src/main/java/org/jclouds/chef/strategy/UpdateAutomaticAttributesOnNode.java b/apis/chef/src/main/java/org/jclouds/chef/strategy/UpdateAutomaticAttributesOnNode.java
index 90f8197..c4b6220 100644
--- a/apis/chef/src/main/java/org/jclouds/chef/strategy/UpdateAutomaticAttributesOnNode.java
+++ b/apis/chef/src/main/java/org/jclouds/chef/strategy/UpdateAutomaticAttributesOnNode.java
@@ -29,5 +29,5 @@ import com.google.inject.ImplementedBy;
 @ImplementedBy(UpdateAutomaticAttributesOnNodeImpl.class)
 public interface UpdateAutomaticAttributesOnNode {
 
-   public void execute(String nodeName);
+   void execute(String nodeName);
 }


[41/50] [abbrv] git commit: Updating project version to 2.0.0-SNAPSHOT

Posted by na...@apache.org.
Updating project version to 2.0.0-SNAPSHOT

Follow-up to 82b23fc


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/55e403d2
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/55e403d2
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/55e403d2

Branch: refs/heads/master
Commit: 55e403d222a852211de96f72a0b1cddcf43cf7b7
Parents: 2e81343
Author: Andrew Phillips <an...@apache.org>
Authored: Tue Aug 5 11:50:02 2014 +0200
Committer: Andrew Phillips <an...@apache.org>
Committed: Tue Aug 5 11:50:02 2014 +0200

----------------------------------------------------------------------
 apis/chef/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/55e403d2/apis/chef/pom.xml
----------------------------------------------------------------------
diff --git a/apis/chef/pom.xml b/apis/chef/pom.xml
index 74780d2..0744ba3 100644
--- a/apis/chef/pom.xml
+++ b/apis/chef/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.jclouds.chef</groupId>
     <artifactId>chef-project</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
     <relativePath>../project/pom.xml</relativePath>
   </parent>
   <groupId>org.apache.jclouds.api</groupId>