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/07/28 22:02:53 UTC

[02/10] Move jclouds-chef to the main jclouds repo

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/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
new file mode 100644
index 0000000..915f5cf
--- /dev/null
+++ b/apis/chef/src/test/java/org/jclouds/chef/suppliers/ChefVersionSupplierTest.java
@@ -0,0 +1,47 @@
+/*
+ * 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.suppliers;
+
+import static org.jclouds.chef.suppliers.ChefVersionSupplier.FALLBACK_VERSION;
+import static org.testng.Assert.assertEquals;
+
+import org.testng.annotations.Test;
+
+/**
+ * Unit tests for the {@link ChefVersionSupplier} class.
+ */
+@Test(groups = "unit", testName = "ChefVersionSupplierTest")
+public class ChefVersionSupplierTest {
+
+   public void testReturnsDefaultVersion() {
+      assertEquals(new ChefVersionSupplier("15").get(), FALLBACK_VERSION);
+      assertEquals(new ChefVersionSupplier("0").get(), FALLBACK_VERSION);
+      assertEquals(new ChefVersionSupplier("0.").get(), FALLBACK_VERSION);
+   }
+
+   public void testReturnsMajorVersionIfNotZero() {
+      assertEquals(new ChefVersionSupplier("11.6").get().intValue(), 11);
+      assertEquals(new ChefVersionSupplier("11.6.0").get().intValue(), 11);
+      assertEquals(new ChefVersionSupplier("11.6.0.1").get().intValue(), 11);
+   }
+
+   public void testReturnsMinorVersionIfMajorIsZero() {
+      assertEquals(new ChefVersionSupplier("0.9").get().intValue(), 9);
+      assertEquals(new ChefVersionSupplier("0.9.8").get().intValue(), 9);
+      assertEquals(new ChefVersionSupplier("0.9.8.2").get().intValue(), 9);
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/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
new file mode 100644
index 0000000..ecd5d16
--- /dev/null
+++ b/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiIntegrationTest.java
@@ -0,0 +1,69 @@
+/*
+ * 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/867c7a40/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
new file mode 100644
index 0000000..eac33f3
--- /dev/null
+++ b/apis/chef/src/test/java/org/jclouds/chef/test/TransientChefApiMetadataTest.java
@@ -0,0 +1,33 @@
+/*
+ * 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());
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/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
new file mode 100644
index 0000000..40645e7
--- /dev/null
+++ b/apis/chef/src/test/java/org/jclouds/chef/util/ChefUtilsTest.java
@@ -0,0 +1,57 @@
+/*
+ * 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.util;
+
+import static org.testng.Assert.assertEquals;
+
+import java.util.Date;
+import java.util.NoSuchElementException;
+
+import org.jclouds.domain.JsonBall;
+import org.testng.annotations.Test;
+
+import com.google.common.collect.ImmutableList;
+
+/**
+ * Tests behavior of {@code ChefUtils}
+ */
+@Test(groups = { "unit" }, sequential = true)
+public class ChefUtilsTest {
+   public static long millis = 1280251180727l;
+   public static String millisString = "1280251180727";
+   public static Date now = new Date(1280251180727l);
+
+   public void testToOhaiTime() {
+      assertEquals(ChefUtils.toOhaiTime(millis).toString(), millisString);
+   }
+
+   public void testFromOhaiTime() {
+      assertEquals(ChefUtils.fromOhaiTime(new JsonBall(millisString)), now);
+
+   }
+
+   @Test(expectedExceptions = NoSuchElementException.class)
+   public void testFindRoleInRunListThrowsNoSuchElementOnRecipe() {
+      ChefUtils.findRoleInRunList(ImmutableList.of("recipe[java]"));
+   }
+
+   public void testFindRoleInRunList() {
+      assertEquals(ChefUtils.findRoleInRunList(ImmutableList.of("role[prod]")), "prod");
+
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/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
new file mode 100644
index 0000000..674be80
--- /dev/null
+++ b/apis/chef/src/test/java/org/jclouds/chef/util/RunListBuilderTest.java
@@ -0,0 +1,71 @@
+/*
+ * 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.util;
+
+import static org.testng.Assert.assertEquals;
+
+import org.testng.annotations.Test;
+
+import com.google.common.collect.ImmutableList;
+
+/**
+ * Tests possible uses of RunListBuilder
+ */
+public class RunListBuilderTest {
+
+   @Test
+   public void testRecipeAndRole() {
+      RunListBuilder options = new RunListBuilder();
+      options.addRecipe("recipe").addRole("role");
+      assertEquals(options.build(), ImmutableList.of("recipe[recipe]", "role[role]"));
+   }
+
+   @Test
+   public void testRecipe() {
+      RunListBuilder options = new RunListBuilder();
+      options.addRecipe("test");
+      assertEquals(options.build(), ImmutableList.of("recipe[test]"));
+   }
+
+   @Test
+   public void testRecipes() {
+      RunListBuilder options = new RunListBuilder();
+      options.addRecipes("test", "test2");
+      assertEquals(options.build(), ImmutableList.of("recipe[test]", "recipe[test2]"));
+   }
+
+   @Test
+   public void testRole() {
+      RunListBuilder options = new RunListBuilder();
+      options.addRole("test");
+      assertEquals(options.build(), ImmutableList.of("role[test]"));
+   }
+
+   @Test
+   public void testRoles() {
+      RunListBuilder options = new RunListBuilder();
+      options.addRoles("test", "test2");
+      assertEquals(options.build(), ImmutableList.of("role[test]", "role[test2]"));
+   }
+
+   @Test
+   public void testNoneRecipe() {
+      RunListBuilder options = new RunListBuilder();
+      assertEquals(options.build(), ImmutableList.<String> of());
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/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
new file mode 100644
index 0000000..bcda2e9
--- /dev/null
+++ b/apis/chef/src/test/java/org/jclouds/ohai/config/JMXTest.java
@@ -0,0 +1,82 @@
+/*
+ * 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.ohai.config;
+
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.testng.Assert.assertEquals;
+
+import java.lang.management.RuntimeMXBean;
+import java.util.Map;
+
+import javax.inject.Inject;
+
+import org.jclouds.chef.ChefApiMetadata;
+import org.jclouds.chef.config.ChefParserModule;
+import org.jclouds.domain.JsonBall;
+import org.jclouds.json.Json;
+import org.jclouds.json.config.GsonModule;
+import org.jclouds.ohai.Automatic;
+import org.jclouds.rest.annotations.ApiVersion;
+import org.testng.annotations.Test;
+
+import com.google.common.base.Supplier;
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+/**
+ * Tests behavior of {@code JMX}
+ */
+@Test(groups = { "unit" })
+public class JMXTest {
+
+   @Test
+   public void test() {
+
+      final RuntimeMXBean runtime = createMock(RuntimeMXBean.class);
+
+      expect(runtime.getUptime()).andReturn(69876000l);
+
+      replay(runtime);
+
+      Injector injector = Guice.createInjector(new AbstractModule() {
+         @Override
+         protected void configure() {
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
+         }
+      }, new ChefParserModule(), new GsonModule(), new JMXOhaiModule() {
+         @Override
+         protected RuntimeMXBean provideRuntimeMXBean() {
+            return runtime;
+         }
+      });
+      Json json = injector.getInstance(Json.class);
+      Ohai ohai = injector.getInstance(Ohai.class);
+      assertEquals(json.toJson(ohai.ohai.get().get("uptime_seconds")), "69876");
+   }
+
+   static class Ohai {
+      private Supplier<Map<String, JsonBall>> ohai;
+
+      @Inject
+      public Ohai(@Automatic Supplier<Map<String, JsonBall>> ohai) {
+         this.ohai = ohai;
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/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
new file mode 100644
index 0000000..ecc4562
--- /dev/null
+++ b/apis/chef/src/test/java/org/jclouds/ohai/config/OhaiModuleTest.java
@@ -0,0 +1,147 @@
+/*
+ * 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.ohai.config;
+
+import static org.jclouds.chef.util.ChefUtils.ohaiAutomaticAttributeBinder;
+import static org.testng.Assert.assertEquals;
+
+import java.net.SocketException;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.inject.Inject;
+
+import org.jclouds.chef.ChefApiMetadata;
+import org.jclouds.chef.config.ChefParserModule;
+import org.jclouds.domain.JsonBall;
+import org.jclouds.json.Json;
+import org.jclouds.json.config.GsonModule;
+import org.jclouds.ohai.Automatic;
+import org.jclouds.rest.annotations.ApiVersion;
+import org.testng.annotations.Test;
+
+import com.google.common.base.Supplier;
+import com.google.common.base.Suppliers;
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.TypeLiteral;
+import com.google.inject.multibindings.MapBinder;
+import com.google.inject.util.Providers;
+
+/**
+ * Tests behavior of {@code OhaiModule}
+ */
+@Test(groups = { "unit" })
+public class OhaiModuleTest {
+
+   @Test
+   public void test() throws SocketException {
+
+      final Properties sysProperties = new Properties();
+
+      sysProperties.setProperty("os.name", "Mac OS X");
+      sysProperties.setProperty("os.version", "10.3.0");
+      sysProperties.setProperty("user.name", "user");
+
+      Injector injector = Guice.createInjector(new AbstractModule() {
+         @Override
+         protected void configure() {
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
+         }
+      }, new ChefParserModule(), new GsonModule(), new OhaiModule() {
+         @Override
+         protected Long millis() {
+            return 127999291932529l;
+         }
+
+         @Override
+         protected Properties systemProperties() {
+            return sysProperties;
+         }
+
+      });
+      Ohai ohai = injector.getInstance(Ohai.class);
+      Json json = injector.getInstance(Json.class);
+
+      assertEquals(
+            json.toJson(ohai.ohai.get(), new TypeLiteral<Map<String, JsonBall>>() {
+            }.getType()),
+            "{\"ohai_time\":127999291932529,\"platform\":\"macosx\",\"platform_version\":\"10.3.0\",\"current_user\":\"user\",\"jvm\":{\"system\":{\"user.name\":\"user\",\"os.version\":\"10.3.0\",\"os.name\":\"Mac OS X\"}}}");
+   }
+
+   public void test2modules() throws SocketException {
+
+      final Properties sysProperties = new Properties();
+
+      sysProperties.setProperty("os.name", "Mac OS X");
+      sysProperties.setProperty("os.version", "10.3.0");
+      sysProperties.setProperty("user.name", "user");
+
+      Injector injector = Guice.createInjector(new AbstractModule() {
+         @Override
+         protected void configure() {
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
+         }
+      }, new ChefParserModule(), new GsonModule(), new OhaiModule() {
+         @Override
+         protected Long millis() {
+            return 1279992919l;
+         }
+
+         @Override
+         protected Properties systemProperties() {
+            return sysProperties;
+         }
+
+      }, new AbstractModule() {
+
+         @Override
+         protected void configure() {
+            MapBinder<String, Supplier<JsonBall>> mapbinder = ohaiAutomaticAttributeBinder(binder());
+            mapbinder.addBinding("test").toProvider(
+                  Providers.of(Suppliers.ofInstance(new JsonBall("{\"prop1\":\"test1\"}"))));
+         }
+
+      }, new AbstractModule() {
+
+         @Override
+         protected void configure() {
+            MapBinder<String, Supplier<JsonBall>> mapbinder = ohaiAutomaticAttributeBinder(binder());
+            mapbinder.addBinding("test").toProvider(
+                  Providers.of(Suppliers.ofInstance(new JsonBall("{\"prop2\":\"test2\"}"))));
+         }
+
+      });
+      Ohai ohai = injector.getInstance(Ohai.class);
+      Json json = injector.getInstance(Json.class);
+
+      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\"}}}");
+   }
+
+   static class Ohai {
+      private Supplier<Map<String, JsonBall>> ohai;
+
+      @Inject
+      public Ohai(@Automatic Supplier<Map<String, JsonBall>> ohai) {
+         this.ohai = ohai;
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/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
new file mode 100644
index 0000000..f736dad
--- /dev/null
+++ b/apis/chef/src/test/java/org/jclouds/ohai/functions/ByteArrayToMacAddressTest.java
@@ -0,0 +1,33 @@
+/*
+ * 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.ohai.functions;
+
+import static com.google.common.io.BaseEncoding.base16;
+import static org.testng.Assert.assertEquals;
+
+import org.testng.annotations.Test;
+
+/**
+ * Tests behavior of {@code ByteArrayToMacAddress}
+ */
+@Test(groups = { "unit" }, sequential = true)
+public class ByteArrayToMacAddressTest {
+
+   public void test() {
+      assertEquals(new ByteArrayToMacAddress().apply(base16().lowerCase().decode("0026bb09e6c4")), "00:26:bb:09:e6:c4");
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/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
new file mode 100644
index 0000000..594ab58
--- /dev/null
+++ b/apis/chef/src/test/java/org/jclouds/ohai/functions/NestSlashKeysTest.java
@@ -0,0 +1,117 @@
+/*
+ * 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.ohai.functions;
+
+import static org.testng.Assert.assertEquals;
+
+import java.io.IOException;
+
+import org.jclouds.chef.ChefApiMetadata;
+import org.jclouds.chef.config.ChefParserModule;
+import org.jclouds.domain.JsonBall;
+import org.jclouds.json.Json;
+import org.jclouds.json.config.GsonModule;
+import org.jclouds.rest.annotations.ApiVersion;
+import org.testng.annotations.BeforeTest;
+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.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+/**
+ * Tests behavior of {@code NestSlashKeys}
+ */
+@Test(groups = { "unit" }, sequential = true)
+public class NestSlashKeysTest {
+
+   private NestSlashKeys converter;
+   private Json json;
+
+   @BeforeTest
+   protected void setUpInjector() throws IOException {
+      Injector injector = Guice.createInjector(new AbstractModule() {
+         @Override
+         protected void configure() {
+            bind(String.class).annotatedWith(ApiVersion.class).toInstance(ChefApiMetadata.DEFAULT_API_VERSION);
+         }
+      }, new ChefParserModule(), new GsonModule());
+      converter = injector.getInstance(NestSlashKeys.class);
+      json = injector.getInstance(Json.class);
+   }
+
+   @Test
+   public void testBase() {
+      assertEquals(
+            json.toJson(converter.apply(ImmutableMultimap.<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",
+            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",
+                  Suppliers.ofInstance(new JsonBall("{\"time\":\"time\"}")), "java/system",
+                  Suppliers.ofInstance(new JsonBall("system"))))),
+            "{\"java\":{\"system\":\"system\",\"time\":\"time\"}}");
+   }
+
+   @Test
+   public void testOneDuplicate() {
+      assertEquals(
+            json.toJson(converter.apply(ImmutableMultimap.<String, Supplier<JsonBall>> of("java",
+                  Suppliers.ofInstance(new JsonBall("{\"time\":\"time\"}")), "java",
+                  Suppliers.ofInstance(new JsonBall("{\"system\":\"system\"}"))))),
+            "{\"java\":{\"system\":\"system\",\"time\":\"time\"}}");
+   }
+
+   @Test
+   public void testMerge() {
+      assertEquals(
+            json.toJson(converter.apply(ImmutableMultimap.<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\"}}}");
+   }
+
+   @Test
+   public void testMergeNestedTwice() {
+      assertEquals(
+            json.toJson(converter.apply(ImmutableMultimap.<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\"}}}");
+   }
+
+   @Test
+   public void testReplaceList() {
+      assertEquals(
+            json.toJson(converter.apply(ImmutableMultimap.<String, Supplier<JsonBall>> of("java",
+                  Suppliers.ofInstance(new JsonBall("{\"time\":{\"1\":[\"hello\"]}}")), "java/time",
+                  Suppliers.ofInstance(new JsonBall("{\"1\":[\"goodbye\"]}"))))),
+            "{\"java\":{\"time\":{\"1\":[\"goodbye\"]}}}");
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/apis/chef/src/test/resources/apache-chef-demo-cookbook.json
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/apache-chef-demo-cookbook.json b/apis/chef/src/test/resources/apache-chef-demo-cookbook.json
new file mode 100644
index 0000000..228a3c0
--- /dev/null
+++ b/apis/chef/src/test/resources/apache-chef-demo-cookbook.json
@@ -0,0 +1,46 @@
+{
+    "definitions": [],
+    "name": "apache-chef-demo-0.0.0",
+    "attributes": [],
+    "files": [],
+    "json_class": "Chef::CookbookVersion",
+    "providers": [],
+    "metadata": {
+        "dependencies": {},
+        "name": "apache-chef-demo",
+        "maintainer_email": "youremail@example.com",
+        "attributes": {},
+        "license": "Apache v2.0",
+        "maintainer": "Your Name",
+        "suggestions": {},
+        "platforms": {},
+        "long_description": "",
+        "recommendations": {},
+        "version": "0.0.0",
+        "groupings": {},
+        "recipes": {},
+        "conflicting": {},
+        "description": "A fabulous new cookbook",
+        "replacing": {},
+        "providing": {}
+    }, "libraries": [],
+    "resources": [],
+    "templates": [],
+    "cookbook_name": "apache-chef-demo",
+    "version": "0.0.0",
+    "recipes": [],
+    "root_files": [{
+        "name": "README",
+        "url": "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-11637f98942eafbf49c71b7f2f048b78?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277766181&Signature=zgpNl6wSxjTNovqZu2nJq0JztU8%3D",
+        "checksum": "11637f98942eafbf49c71b7f2f048b78",
+        "path": "README",
+        "specificity": "default"
+    }, {
+        "name": "Rakefile",
+        "url": "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-ebcf925a1651b4e04b9cd8aac2bc54eb?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277766181&Signature=EFzzDSKKytTl7b%2FxrCeNLh05zj4%3D",
+        "checksum": "ebcf925a1651b4e04b9cd8aac2bc54eb",
+        "path": "Rakefile",
+        "specificity": "default"
+    }],
+    "chef_type": "cookbook_version"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/apis/chef/src/test/resources/bootstrap-env.sh
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/bootstrap-env.sh b/apis/chef/src/test/resources/bootstrap-env.sh
new file mode 100755
index 0000000..315e248
--- /dev/null
+++ b/apis/chef/src/test/resources/bootstrap-env.sh
@@ -0,0 +1,56 @@
+mkdir -p /etc/chef
+cat >> /etc/chef/client.rb <<-'END_OF_JCLOUDS_FILE'
+	require 'rubygems'
+	require 'ohai'
+	o = Ohai::System.new
+	o.all_plugins
+	node_name "foo-" + o[:ipaddress]
+	log_level :info
+	log_location STDOUT
+	validation_client_name "chef-validator"
+	chef_server_url "http://localhost:4000"
+END_OF_JCLOUDS_FILE
+cat >> /etc/chef/validation.pem <<-'END_OF_JCLOUDS_FILE'
+	-----BEGIN PRIVATE KEY-----
+	LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcFFJQkFBS0NBUUVB
+	eWIyWkpKcUdtMEtLUis4bmZRSk5zU2QrRjl0WE5NVjdDZk9jVzZqc3FzOEVaZ2lW
+	ClIwOWhEMUlZT2o0WXFNMHFKT05sZ3lnNHhSV2V3ZFNHN1FUUGoxbEpwVkFpZGE5
+	c1h5MitrenlhZ1pBMUFtME8KWmNicWI1aG9lSURnY1grZURhNzlzMHUwRG9tamNm
+	TzlFS2h2SExCeit6TSszUXFQUmtQVjhuWVRiZnMrSGpWegp6T1U2RDFCMFhSMytJ
+	UFpabDJBbldzMmQwcWhuU3RIY0RVdm5SVlEwUDQ4Mll3TjlWZ2NlT1p0cFB6MERD
+	S0VKCjVUeDVTVHViOGswL3p0L1ZBTUhRYWZMU3VRTUxkMnM0Wkx1T1pwdE4vL3VB
+	c1RteGlyZXFkMzd6KzhaVGRCYkoKOExFcEoraUNYdVNmbTVhVWg3aXc2b3h2VG9Z
+	MkFMNTMraksyVVFJREFRQUJBb0lCQVFEQTg4QjNpL3hXbjB2WApCVnhGYW1DWW9l
+	Y3VOakd3WFhrU3laZXc2MTZBK0VPQ3U0N2JoNGFUdXJkRmJZTDBZRmFBdGFXdnps
+	YU4yZUhnCkRiK0hEdVRlZkUyOStXa2NHazZTc2hQbWl6NVQwWE9DQUlDV3c2d1NW
+	RGtIbUd3UzRqWnZiQUZtN1c4bndHazkKWWh4Z3hGaVJuZ3N3SlpGb3BPTG9GNVdY
+	czJ0ZDhndUlZTnNsTXBvN3R1NTBpRm5CSHdLTzJac1BBazh0OW5uUwp4bERhdkty
+	dXltRW1xSENyMytkdGlvNWVhZW5KY3AzZmpvWEJRT0tVazNpcElJMjlYUkI4TnFl
+	Q1ZWLzdLeHdxCmNrcU9CRWJSd0JjbGNreUliRCtSaUFnS3ZPZWxPUmpFaUU5UjQy
+	dnVxdnhSQTZrOWtkOW83dXRsWDBBVXRwRW4KM2daYzZMZXBBb0dCQVA5YWVsNVk3
+	NStzSzJKSlVOT09oTzhhZTQ1Y2RzaWxwMnlJMFgrVUJhU3VRczIrZHlQcAprcEVI
+	QXhkNHBtbVN2bi84YzlUbEVaaHIrcVliQUJYVlBsRG5jeHBJdXcyQWpiazdzL1M0
+	WGFTS3NScXBYTDU3CnpqL1FPcUxrUms4K09WVjlxNmxNZVFOcUx0RWoxdTZKUHZp
+	WDcwUm8rRlF0UnR0Tk9ZYmZkUC9mQW9HQkFNcEEKWGpSNXdvVjVzVWIrUkVnOXZF
+	dVlvOFJTeU9hcnhxS0ZDSVhWVU5zTE94KzIyK0FLNCtDUXBidWVXTjdqb3RybApZ
+	RDZ1VDZzdldpM0FBQzdraVkwVUkvZmpWUFJDVWk4dFZvUVVFMFRhVTVWTElUYVlP
+	QitXL2JCYURFNE05NTYwCjFOdURXTzkwYmFBNWRmVTQ0aXV6dmEwMnJHSlhLOStu
+	UzNvOG5rL1BBb0dCQUxPTDZkam5EZTRtd0FhRzZKY28KY2Q0eHI4amt5UHpDUlp1
+	eUJDU0Jid3BoSVVYTGM3aERwclBreTA2NG5jSkQxVURtd0lka1hkL2ZwTWtnMlFt
+	QQovQ1VrNkxFRmpNaXNxSG9qT2FDTDlnUVpKUGhMTjVRVU4yeDFQSldHanMxdlFo
+	OFRreDBpVVVDT2E4YlFQWE5SCiszNE9Uc1c2VFVuYTRDU1pBeWNMZmhmZkFvR0JB
+	SWdnVnNlZkJDdnVRa0YwTmVVaG1EQ1JaZmhuZDh5NTVSSFIKMUhDdnFLSWxwdity
+	aGNYL3pteUJMdXRlb3BZeVJKUnNPaUUyRlcwMGk4K3JJUFJ1NFozUTVueWJ4N3cz
+	UHpWOQpvSE41UjViYUU5T3lJNEtwWld6dHBZWWl0WkY2N05jbkF2VlVMSEhPdlZK
+	UUduS1lmTEhKWW1ySkY3R0Exb2pNCkF1TWRGYmpGQW9HQVB4VWh4d0Z5OGdhcUJh
+	aEtVRVpuNEY4MUhGUDVpaEdoa1Q0UUw2QUZQTzJlK0poSUdqdVIKMjcrODVoY0Zx
+	UStISFZ0RnNtODFiL2ErUjdQNFV1Q1JnYzhlQ2p4UU1vSjFYbDRuN1ZialBiSE1u
+	SU4wUnl2ZApPNFpwV0RXWW5DTzAyMUpUT1VVT0o0Si95MDQxNkJ2a3cwejU5eTdz
+	Tlg3d0RCQkhIYksvWENjPQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo=
+	-----END PRIVATE KEY-----
+	
+END_OF_JCLOUDS_FILE
+cat >> /etc/chef/first-boot.json <<-'END_OF_JCLOUDS_FILE'
+	{"tomcat6":{"ssl_port":8433},"environment":"env","run_list":["recipe[apache2]","role[webserver]"]}
+END_OF_JCLOUDS_FILE
+chef-client -j /etc/chef/first-boot.json -E "env"

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/apis/chef/src/test/resources/bootstrap.sh
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/bootstrap.sh b/apis/chef/src/test/resources/bootstrap.sh
new file mode 100755
index 0000000..0eb402e
--- /dev/null
+++ b/apis/chef/src/test/resources/bootstrap.sh
@@ -0,0 +1,56 @@
+mkdir -p /etc/chef
+cat >> /etc/chef/client.rb <<-'END_OF_JCLOUDS_FILE'
+	require 'rubygems'
+	require 'ohai'
+	o = Ohai::System.new
+	o.all_plugins
+	node_name "foo-" + o[:ipaddress]
+	log_level :info
+	log_location STDOUT
+	validation_client_name "chef-validator"
+	chef_server_url "http://localhost:4000"
+END_OF_JCLOUDS_FILE
+cat >> /etc/chef/validation.pem <<-'END_OF_JCLOUDS_FILE'
+	-----BEGIN PRIVATE KEY-----
+	LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcFFJQkFBS0NBUUVB
+	eWIyWkpKcUdtMEtLUis4bmZRSk5zU2QrRjl0WE5NVjdDZk9jVzZqc3FzOEVaZ2lW
+	ClIwOWhEMUlZT2o0WXFNMHFKT05sZ3lnNHhSV2V3ZFNHN1FUUGoxbEpwVkFpZGE5
+	c1h5MitrenlhZ1pBMUFtME8KWmNicWI1aG9lSURnY1grZURhNzlzMHUwRG9tamNm
+	TzlFS2h2SExCeit6TSszUXFQUmtQVjhuWVRiZnMrSGpWegp6T1U2RDFCMFhSMytJ
+	UFpabDJBbldzMmQwcWhuU3RIY0RVdm5SVlEwUDQ4Mll3TjlWZ2NlT1p0cFB6MERD
+	S0VKCjVUeDVTVHViOGswL3p0L1ZBTUhRYWZMU3VRTUxkMnM0Wkx1T1pwdE4vL3VB
+	c1RteGlyZXFkMzd6KzhaVGRCYkoKOExFcEoraUNYdVNmbTVhVWg3aXc2b3h2VG9Z
+	MkFMNTMraksyVVFJREFRQUJBb0lCQVFEQTg4QjNpL3hXbjB2WApCVnhGYW1DWW9l
+	Y3VOakd3WFhrU3laZXc2MTZBK0VPQ3U0N2JoNGFUdXJkRmJZTDBZRmFBdGFXdnps
+	YU4yZUhnCkRiK0hEdVRlZkUyOStXa2NHazZTc2hQbWl6NVQwWE9DQUlDV3c2d1NW
+	RGtIbUd3UzRqWnZiQUZtN1c4bndHazkKWWh4Z3hGaVJuZ3N3SlpGb3BPTG9GNVdY
+	czJ0ZDhndUlZTnNsTXBvN3R1NTBpRm5CSHdLTzJac1BBazh0OW5uUwp4bERhdkty
+	dXltRW1xSENyMytkdGlvNWVhZW5KY3AzZmpvWEJRT0tVazNpcElJMjlYUkI4TnFl
+	Q1ZWLzdLeHdxCmNrcU9CRWJSd0JjbGNreUliRCtSaUFnS3ZPZWxPUmpFaUU5UjQy
+	dnVxdnhSQTZrOWtkOW83dXRsWDBBVXRwRW4KM2daYzZMZXBBb0dCQVA5YWVsNVk3
+	NStzSzJKSlVOT09oTzhhZTQ1Y2RzaWxwMnlJMFgrVUJhU3VRczIrZHlQcAprcEVI
+	QXhkNHBtbVN2bi84YzlUbEVaaHIrcVliQUJYVlBsRG5jeHBJdXcyQWpiazdzL1M0
+	WGFTS3NScXBYTDU3CnpqL1FPcUxrUms4K09WVjlxNmxNZVFOcUx0RWoxdTZKUHZp
+	WDcwUm8rRlF0UnR0Tk9ZYmZkUC9mQW9HQkFNcEEKWGpSNXdvVjVzVWIrUkVnOXZF
+	dVlvOFJTeU9hcnhxS0ZDSVhWVU5zTE94KzIyK0FLNCtDUXBidWVXTjdqb3RybApZ
+	RDZ1VDZzdldpM0FBQzdraVkwVUkvZmpWUFJDVWk4dFZvUVVFMFRhVTVWTElUYVlP
+	QitXL2JCYURFNE05NTYwCjFOdURXTzkwYmFBNWRmVTQ0aXV6dmEwMnJHSlhLOStu
+	UzNvOG5rL1BBb0dCQUxPTDZkam5EZTRtd0FhRzZKY28KY2Q0eHI4amt5UHpDUlp1
+	eUJDU0Jid3BoSVVYTGM3aERwclBreTA2NG5jSkQxVURtd0lka1hkL2ZwTWtnMlFt
+	QQovQ1VrNkxFRmpNaXNxSG9qT2FDTDlnUVpKUGhMTjVRVU4yeDFQSldHanMxdlFo
+	OFRreDBpVVVDT2E4YlFQWE5SCiszNE9Uc1c2VFVuYTRDU1pBeWNMZmhmZkFvR0JB
+	SWdnVnNlZkJDdnVRa0YwTmVVaG1EQ1JaZmhuZDh5NTVSSFIKMUhDdnFLSWxwdity
+	aGNYL3pteUJMdXRlb3BZeVJKUnNPaUUyRlcwMGk4K3JJUFJ1NFozUTVueWJ4N3cz
+	UHpWOQpvSE41UjViYUU5T3lJNEtwWld6dHBZWWl0WkY2N05jbkF2VlVMSEhPdlZK
+	UUduS1lmTEhKWW1ySkY3R0Exb2pNCkF1TWRGYmpGQW9HQVB4VWh4d0Z5OGdhcUJh
+	aEtVRVpuNEY4MUhGUDVpaEdoa1Q0UUw2QUZQTzJlK0poSUdqdVIKMjcrODVoY0Zx
+	UStISFZ0RnNtODFiL2ErUjdQNFV1Q1JnYzhlQ2p4UU1vSjFYbDRuN1ZialBiSE1u
+	SU4wUnl2ZApPNFpwV0RXWW5DTzAyMUpUT1VVT0o0Si95MDQxNkJ2a3cwejU5eTdz
+	Tlg3d0RCQkhIYksvWENjPQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo=
+	-----END PRIVATE KEY-----
+	
+END_OF_JCLOUDS_FILE
+cat >> /etc/chef/first-boot.json <<-'END_OF_JCLOUDS_FILE'
+	{"tomcat6":{"ssl_port":8433},"run_list":["recipe[apache2]","role[webserver]"]}
+END_OF_JCLOUDS_FILE
+chef-client -j /etc/chef/first-boot.json

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/apis/chef/src/test/resources/brew-cookbook.json
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/brew-cookbook.json b/apis/chef/src/test/resources/brew-cookbook.json
new file mode 100644
index 0000000..dcf7aca
--- /dev/null
+++ b/apis/chef/src/test/resources/brew-cookbook.json
@@ -0,0 +1,48 @@
+{ "attributes" : [  ],
+  "chef_type" : "cookbook_version",
+  "cookbook_name" : "brew",
+  "definitions" : [  ],
+  "files" : [  ],
+  "json_class" : "Chef::CookbookVersion",
+  "libraries" : [  ],
+  "metadata" : { "attributes" : {  },
+      "conflicting" : {  },
+      "dependencies" : {  },
+      "description" : "A fabulous new cookbook",
+      "groupings" : {  },
+      "license" : "Apache v2.0",
+      "long_description" : "",
+      "maintainer" : "Your Name",
+      "maintainer_email" : "youremail@example.com",
+      "name" : "brew",
+      "platforms" : {  },
+      "providing" : { "brew" : "0.0.0" },
+      "recipes" : { "brew" : "" },
+      "recommendations" : {  },
+      "replacing" : {  },
+      "suggestions" : {  },
+      "version" : "0.0.0"
+    },
+  "name" : "brew-0.0.0",
+  "providers" : [ { "checksum" : "0c5ecd7788cf4f6c7de2a57193897a6c",
+        "name" : "brew.rb",
+        "path" : "providers/brew.rb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-0c5ecd7788cf4f6c7de2a57193897a6c?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774465&Signature=brTA3YkBF7iDnjPGCCHxgm7AHko%3D"
+      } ],
+  "recipes" : [ { "checksum" : "1dda05ed139664f1f89b9dec482b77c0",
+        "name" : "default.rb",
+        "path" : "recipes/default.rb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-1dda05ed139664f1f89b9dec482b77c0?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774465&Signature=dOzPk64at92zOfZlxt1suDpGuPs%3D"
+      } ],
+  "resources" : [ { "checksum" : "0189e76ccc476701d6b374e5a1a27347",
+        "name" : "brew.rb",
+        "path" : "resources/brew.rb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-0189e76ccc476701d6b374e5a1a27347?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774465&Signature=ufrI1k6pKJ1%2FBRMAaIGr6icJlpc%3D"
+      } ],
+  "root_files" : [  ],
+  "templates" : [  ],
+  "version" : "0.0.0"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/apis/chef/src/test/resources/client.json
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/client.json b/apis/chef/src/test/resources/client.json
new file mode 100644
index 0000000..eef7c71
--- /dev/null
+++ b/apis/chef/src/test/resources/client.json
@@ -0,0 +1,8 @@
+{ "certificate" : "-----BEGIN CERTIFICATE-----\nMIIClzCCAgCgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBnjELMAkGA1UEBhMCVVMx\nEzARBgNVBAgMCldhc2hpbmd0b24xEDAOBgNVBAcMB1NlYXR0bGUxFjAUBgNVBAoM\nDU9wc2NvZGUsIEluYy4xHDAaBgNVBAsME0NlcnRpZmljYXRlIFNlcnZpY2UxMjAw\nBgNVBAMMKW9wc2NvZGUuY29tL2VtYWlsQWRkcmVzcz1hdXRoQG9wc2NvZGUuY29t\nMB4XDTEwMDczMDIwNDEzMFoXDTIwMDcyNzIwNDEzMFowADCCASIwDQYJKoZIhvcN\nAQEBBQADggEPADCCAQoCggEBAMm9mSSahptCikfvJ30CTbEnfhfbVzTFewnznFuo\n7KrPBGYIlUdPYQ9SGDo+GKjNKiTjZYMoOMUVnsHUhu0Ez49ZSaVQInWvbF8tvpM8\nmoGQNQJtDmXG6m+YaHiA4HF/ng2u/bNLtA6Jo3HzvRCobxywc/szPt0Kj0ZD1fJ2\nE237Ph41c8zlOg9QdF0d/iD2WZdgJ1rNndKoZ0rR3A1L50VUND+PNmMDfVYHHjmb\naT89AwihCeU8eUk7m/JNP87f1QDB0Gny0rkDC3drOGS7jmabTf/7gLE5sYq3qnd+\n8/vGU3QWyfCxKSfogl7kn5uWlIe4sOqMb06GNgC+d/oytlECAwEAATANBgkqhkiG\n9w0BAQUFAAOBgQBftzSZxstWw60GqRTDNN/F2GnrdtnKBoXzHww3r6jtGEylYq20\n5KfKpEx+sPX0gyZuYJiXC2CkEjImAluWKcdN9ZF6VD541sheAjbiaU7q7ZsztTxF\nWUH2tCvHeDXYKPKek3QzL7bYpUhLnCN/XxEv6ibeMDwtI7f5qpk2Aspzcw==\n-----END CERTIFICATE-----\n",
+  "clientname" : "adriancole-jcloudstest",
+  "name" : "adriancole-jcloudstest",
+  "orgname" : "jclouds",
+  "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/fAoGBAMpA\nXjR5woV5sUb+REg9vEuYo
 8RSyOarxqKFCIXVUNsLOx+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",
+  "uri" : "https://api.opscode.com/organizations/jclouds/clients/adriancole-jcloudstest",
+  "validator" : false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/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/867c7a40/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/867c7a40/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"}
+    ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/apis/chef/src/test/resources/environment_recipes.json
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/environment_recipes.json b/apis/chef/src/test/resources/environment_recipes.json
new file mode 100644
index 0000000..cca3a11
--- /dev/null
+++ b/apis/chef/src/test/resources/environment_recipes.json
@@ -0,0 +1,6 @@
+[
+  "ant",
+  "apache2",
+  "apache2::mod_auth_openid"
+]
+ 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/apis/chef/src/test/resources/mysql-cookbook.json
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/mysql-cookbook.json b/apis/chef/src/test/resources/mysql-cookbook.json
new file mode 100644
index 0000000..b0450ae
--- /dev/null
+++ b/apis/chef/src/test/resources/mysql-cookbook.json
@@ -0,0 +1,268 @@
+{ "attributes" : [ { "checksum" : "548fa4bc548b8b59ac98fffee8e81f4a",
+        "name" : "server.rb",
+        "path" : "attributes/server.rb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-548fa4bc548b8b59ac98fffee8e81f4a?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=MsgggSKS0T1q1Lc72nJpHORBQX0%3D"
+      } ],
+  "chef_type" : "cookbook_version",
+  "cookbook_name" : "mysql",
+  "definitions" : [  ],
+  "files" : [  ],
+  "json_class" : "Chef::CookbookVersion",
+  "libraries" : [ { "checksum" : "b2eb0760c07734be9c637dcffc86175a",
+        "name" : "database.rb",
+        "path" : "libraries/database.rb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-b2eb0760c07734be9c637dcffc86175a?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=CvVbxzrA%2Fuxc59ZjLR5BsMozfxk%3D"
+      } ],
+  "metadata" : { "attributes" : { "mysql/bind_address" : { "calculated" : false,
+              "choice" : [  ],
+              "default" : "ipaddress",
+              "description" : "Address that mysqld should listen on",
+              "display_name" : "MySQL Bind Address",
+              "recipes" : [  ],
+              "required" : "optional",
+              "type" : "string"
+            },
+          "mysql/datadir" : { "calculated" : false,
+              "choice" : [  ],
+              "default" : "/var/lib/mysql",
+              "description" : "Location of mysql databases",
+              "display_name" : "MySQL Data Directory",
+              "recipes" : [  ],
+              "required" : "optional",
+              "type" : "string"
+            },
+          "mysql/ec2_path" : { "calculated" : false,
+              "choice" : [  ],
+              "default" : "/mnt/mysql",
+              "description" : "Location of mysql directory on EC2 instance EBS volumes",
+              "display_name" : "MySQL EC2 Path",
+              "recipes" : [  ],
+              "required" : "optional",
+              "type" : "string"
+            },
+          "mysql/server_root_password" : { "calculated" : false,
+              "choice" : [  ],
+              "default" : "randomly generated",
+              "description" : "Randomly generated password for the mysqld root user",
+              "display_name" : "MySQL Server Root Password",
+              "recipes" : [  ],
+              "required" : "optional",
+              "type" : "string"
+            },
+          "mysql/tunable" : { "calculated" : false,
+              "choice" : [  ],
+              "description" : "Hash of MySQL tunable attributes",
+              "display_name" : "MySQL Tunables",
+              "recipes" : [  ],
+              "required" : "optional",
+              "type" : "hash"
+            },
+          "mysql/tunable/back_log" : { "calculated" : false,
+              "choice" : [  ],
+              "default" : "128",
+              "display_name" : "MySQL Tunable Back Log",
+              "recipes" : [  ],
+              "required" : "optional",
+              "type" : "string"
+            },
+          "mysql/tunable/key_buffer" : { "calculated" : false,
+              "choice" : [  ],
+              "default" : "250M",
+              "display_name" : "MySQL Tuntable Key Buffer",
+              "recipes" : [  ],
+              "required" : "optional",
+              "type" : "string"
+            },
+          "mysql/tunable/max_connections" : { "calculated" : false,
+              "choice" : [  ],
+              "default" : "800",
+              "display_name" : "MySQL Tunable Max Connections",
+              "recipes" : [  ],
+              "required" : "optional",
+              "type" : "string"
+            },
+          "mysql/tunable/max_heap_table_size" : { "calculated" : false,
+              "choice" : [  ],
+              "default" : "32M",
+              "display_name" : "MySQL Tunable Max Heap Table Size",
+              "recipes" : [  ],
+              "required" : "optional",
+              "type" : "string"
+            },
+          "mysql/tunable/net_read_timeout" : { "calculated" : false,
+              "choice" : [  ],
+              "default" : "30",
+              "display_name" : "MySQL Tunable Net Read Timeout",
+              "recipes" : [  ],
+              "required" : "optional",
+              "type" : "string"
+            },
+          "mysql/tunable/net_write_timeout" : { "calculated" : false,
+              "choice" : [  ],
+              "default" : "30",
+              "display_name" : "MySQL Tunable Net Write Timeout",
+              "recipes" : [  ],
+              "required" : "optional",
+              "type" : "string"
+            },
+          "mysql/tunable/table_cache" : { "calculated" : false,
+              "choice" : [  ],
+              "default" : "128",
+              "display_name" : "MySQL Tunable Table Cache",
+              "recipes" : [  ],
+              "required" : "optional",
+              "type" : "string"
+            },
+          "mysql/tunable/wait_timeout" : { "calculated" : false,
+              "choice" : [  ],
+              "default" : "180",
+              "display_name" : "MySQL Tunable Wait Timeout",
+              "recipes" : [  ],
+              "required" : "optional",
+              "type" : "string"
+            }
+        },
+      "conflicting" : {  },
+      "dependencies" : { "openssl" : "" },
+      "description" : "Installs and configures mysql for client or server",
+      "groupings" : {  },
+      "license" : "Apache 2.0",
+      "long_description" : "= DESCRIPTION:\n\nInstalls and configures MySQL client or server.\n\n= REQUIREMENTS:\n\n== Platform:\n\nBest tested on Ubuntu 9.04,9.10. On EC2, requires platform that supports -o bind option for the 'mount' command.\n\n== Cookbooks:\n\nRequires Opscode's openssl cookbook for secure password generation.\n\n= ATTRIBUTES: \n\n* mysql[:server_root_password] - Set the server's root password with this, default is a randomly generated password with OpenSSL::Random.random_bytes.\n* mysql[:server_repl_password] - Set the replication user 'repl' password with this, default is a randomly generated password with OpenSSL::Random.random_bytes.\n* mysql[:server_debian_password] - Set the debian-sys-maint user password with this, default is a randomly generated password with OpenSSL::Random.random_bytes.\n* mysql[:bind_address] - Listen address for MySQLd, default is node's ipaddress.\n* mysql[:datadir] - Location for mysql data directory, default is \"/var/lib/mysql\" 
 \n* mysql[:ec2_path] - location of mysql datadir on EC2 nodes, default \"/mnt/mysql\" \n\nPerformance tuning attributes, each corresponds to the same-named parameter in my.cnf; default values listed\n\n* mysql[:tunable][:key_buffer]          = \"250M\"\n* mysql[:tunable][:max_connections]     = \"800\" \n* mysql[:tunable][:wait_timeout]        = \"180\" \n* mysql[:tunable][:net_write_timeout]   = \"30\" \n* mysql[:tunable][:net_write_timeout]   = \"30\" \n* mysql[:tunable][:back_log]            = \"128\" \n* mysql[:tunable][:table_cache]         = \"128\" \n* mysql[:tunable][:max_heap_table_size] = \"32M\" \n\n= USAGE:\n\nOn client nodes,\n\n  include_recipe \"mysql::client\"\n  \nAs the common use case is on systems with Ruby, we also install the MySQL RubyGem. Because we may want to be able to use the gem within another Chef recipe, we make sure the mysql development package and gem are installed first. The key is this:\n\n  r = package ... do\n    action :nothing\n  end\n  \n  r.
 run_action(:install)\n  \nThis creates a resource object for the package and does the installation before other recipes are parsed. You'll need to have the C compiler and such (ie, build-essential on Ubuntu) before running the recipes, but we already do that when installing Chef :-). If you want to be able to access a MySQL database via Ruby within another recipe, you could do so, like so:\n\n  Gem.clear_paths # needed for Chef to find the gem...\n  require 'mysql' # requires the mysql gem\n\n  execute \"create #{node[:railsapp][:db][:database]} database\" do\n    command \"/usr/bin/mysqladmin -u root -p#{node[:mysql][:server_root_password]} create #{node[:railsapp][:db][:database]}\"\n    not_if do\n      m = Mysql.new(\"localhost\", \"root\", @node[:mysql][:server_root_password])\n      m.list_dbs.include?(@node[:railsapp][:db][:database])\n    end\n  end\n\nOn server nodes, \n\n  include_recipe \"mysql::server\"\n  \nOn Debian/Ubuntu this will preseed the MySQL package with the r
 andomly generated root password. You can of course change the password afterward, but this makes sure that there's a good password set. You can view it in the node data in the Chef Server webui. Sets a new password for debian-sys-maint user as well.\n\nAlso sets up 'repl' user grants for replication slaves.\n\nOn EC2 nodes,\n\n  include_recipe \"mysql::server_ec2\"\n  \nWhen the ec2_path doesn't exist we look for a mounted filesystem (eg, EBS) and move the datadir there.\n\nThe client recipe is already included by server and 'default' recipes.\n\n= LICENSE and AUTHOR:\n      \nAuthor:: Joshua Timberman (<jo...@opscode.com>)\nAuthor:: AJ Christensen (<aj...@opscode.com>)\n\nCopyright:: 2009, Opscode, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing
 , software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
+      "maintainer" : "Opscode, Inc.",
+      "maintainer_email" : "cookbooks@opscode.com",
+      "name" : "mysql",
+      "platforms" : { "debian" : "",
+          "ubuntu" : ""
+        },
+      "providing" : {  },
+      "recipes" : { "mysql::client" : "Installs packages required for mysql clients using run_action magic",
+          "mysql::server" : "Installs packages required for mysql servers w/o manual intervention",
+          "mysql::server_ec2" : "Performs EC2-specific mountpoint manipulation"
+        },
+      "recommendations" : {  },
+      "replacing" : {  },
+      "suggestions" : {  },
+      "version" : "0.21.2"
+    },
+  "name" : "mysql-0.21.2",
+  "providers" : [ { "checksum" : "b994881a2aba60e32c4b6408ffba993d",
+        "name" : "database.rb",
+        "path" : "providers/database.rb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-b994881a2aba60e32c4b6408ffba993d?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=2XMRbryCmEqirCWLCvrXoenYubw%3D"
+      } ],
+  "recipes" : [ { "checksum" : "f51bd8122b7dccc9f4656319fef3252a",
+        "name" : "server_ec2.rb",
+        "path" : "recipes/server_ec2.rb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-f51bd8122b7dccc9f4656319fef3252a?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=BUR2mosCvmoOKq4Mkh3JUG0MY38%3D"
+      },
+      { "checksum" : "80daa897597560372d017c58c4df0e3c",
+        "name" : "server.rb",
+        "path" : "recipes/server.rb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-80daa897597560372d017c58c4df0e3c?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=bU3j9Nw%2BnuIroXKrlJZe7tjaugA%3D"
+      },
+      { "checksum" : "bd3ba2d05dea6a8cf0dc2a45f540cc32",
+        "name" : "default.rb",
+        "path" : "recipes/default.rb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-bd3ba2d05dea6a8cf0dc2a45f540cc32?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=7haumT5EtEM2h8l32efqV%2Fik%2BdY%3D"
+      },
+      { "checksum" : "a1d679c7480267cd9b69e3194c7e45ab",
+        "name" : "client.rb",
+        "path" : "recipes/client.rb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-a1d679c7480267cd9b69e3194c7e45ab?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=ZhfTiwv1aXC7HZMnW8A7i4vkMCM%3D"
+      }
+    ],
+  "resources" : [ { "checksum" : "8aa8e2cafe54c2932c7aa65d62ec2695",
+        "name" : "database.rb",
+        "path" : "resources/database.rb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-8aa8e2cafe54c2932c7aa65d62ec2695?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=6URS94f1HpRibHC%2FhBkr7Eg3dVA%3D"
+      } ],
+  "root_files" : [ { "checksum" : "e9278fc99fd668bdce33d72dc71fade9",
+        "name" : "README.rdoc",
+        "path" : "README.rdoc",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-e9278fc99fd668bdce33d72dc71fade9?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=KPgAGqShEO5SGzz8oRdwIInPUOc%3D"
+      },
+      { "checksum" : "8d2f9635f4817ff905a4124e09ec6c59",
+        "name" : "metadata.rb",
+        "path" : "metadata.rb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-8d2f9635f4817ff905a4124e09ec6c59?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=fPF2iY7tNrq%2FuNrCjRLImP9vRbA%3D"
+      },
+      { "checksum" : "e6804b8f3e6dfdbbece9d319537ffea1",
+        "name" : "metadata.json",
+        "path" : "metadata.json",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-e6804b8f3e6dfdbbece9d319537ffea1?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=EVsALLreeAA41%2BiPAfPt%2FxFEIYI%3D"
+      }
+    ],
+  "templates" : [ { "checksum" : "689c1b6fbb242b6c508384e56646341d",
+        "name" : "my.cnf.erb",
+        "path" : "templates/ubuntu-9.10/my.cnf.erb",
+        "specificity" : "ubuntu-9.10",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-689c1b6fbb242b6c508384e56646341d?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=2ugp0XVvvUktYdBxfC9bCZBjOs4%3D"
+      },
+      { "checksum" : "16b036a0bb31957a77e9b825cf616cc5",
+        "name" : "mysql-server.seed.erb",
+        "path" : "templates/default/mysql-server.seed.erb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-16b036a0bb31957a77e9b825cf616cc5?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=50bRvt6GQqFEcfYtaIsq1d4a4c8%3D"
+      },
+      { "checksum" : "932b51ddddcbd24ee10a76ecae33b8ba",
+        "name" : "grants.sql.erb",
+        "path" : "templates/default/grants.sql.erb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-932b51ddddcbd24ee10a76ecae33b8ba?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=RHR0obLFcsN1M9tL28IH4Tcur5g%3D"
+      },
+      { "checksum" : "7746560b37ac8d4a0cf68befbecbd8a3",
+        "name" : "my.cnf.erb",
+        "path" : "templates/default/my.cnf.erb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-7746560b37ac8d4a0cf68befbecbd8a3?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=W7Nqkvhw2TBrlDvcM2rlA4Oj5%2Bk%3D"
+      },
+      { "checksum" : "63bd67fae6d297e8f658e9c0ad01a411",
+        "name" : "my.cnf.erb",
+        "path" : "templates/centos/my.cnf.erb",
+        "specificity" : "centos",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-63bd67fae6d297e8f658e9c0ad01a411?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=oFcRya56f%2F4oJBGrIvk4XcWQFm4%3D"
+      },
+      { "checksum" : "689c1b6fbb242b6c508384e56646341d",
+        "name" : "my.cnf.erb",
+        "path" : "templates/ubuntu-10.04/my.cnf.erb",
+        "specificity" : "ubuntu-10.04",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-689c1b6fbb242b6c508384e56646341d?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=2ugp0XVvvUktYdBxfC9bCZBjOs4%3D"
+      },
+      { "checksum" : "63bd67fae6d297e8f658e9c0ad01a411",
+        "name" : "my.cnf.erb",
+        "path" : "templates/redhat/my.cnf.erb",
+        "specificity" : "redhat",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-63bd67fae6d297e8f658e9c0ad01a411?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=oFcRya56f%2F4oJBGrIvk4XcWQFm4%3D"
+      },
+      { "checksum" : "d2244150a145b3f658cd37c13269fafc",
+        "name" : "port_mysql.erb",
+        "path" : "templates/default/port_mysql.erb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-d2244150a145b3f658cd37c13269fafc?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=23iHcjwpNOvlNf%2BlrKcV2pkU7uo%3D"
+      },
+      { "checksum" : "2e08553db526f5f80c28b343f6a616cb",
+        "name" : "debian.cnf.erb",
+        "path" : "templates/default/debian.cnf.erb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-2e08553db526f5f80c28b343f6a616cb?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=VdcFYxnLUkj1tS3k8DovrzZEA7E%3D"
+      },
+      { "checksum" : "1e5068eec65b51f5a327580fb0af4677",
+        "name" : "my.cnf.erb",
+        "path" : "templates/ubuntu-8.04/my.cnf.erb",
+        "specificity" : "ubuntu-8.04",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-1e5068eec65b51f5a327580fb0af4677?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277774082&Signature=D5lPeu1UQvA9pEXZm5nVOwj3WIo%3D"
+      }
+    ],
+  "version" : "0.21.2"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/apis/chef/src/test/resources/node.json
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/node.json b/apis/chef/src/test/resources/node.json
new file mode 100644
index 0000000..c8ddaef
--- /dev/null
+++ b/apis/chef/src/test/resources/node.json
@@ -0,0 +1,10 @@
+{ "automatic" : {  },
+  "chef_environment" : "prod",
+  "chef_type" : "node",
+  "default" : {  },
+  "json_class" : "Chef::Node",
+  "name" : "adrian-jcloudstest",
+  "normal" : { "tomcat6" : { "ssl_port" : 8433 } },
+  "override" : {  },
+  "run_list" : [ "recipe[java]" ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/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"
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/apis/chef/src/test/resources/privkey.txt
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/privkey.txt b/apis/chef/src/test/resources/privkey.txt
new file mode 100644
index 0000000..43be3f7
--- /dev/null
+++ b/apis/chef/src/test/resources/privkey.txt
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEA0ueqo76MXuP6XqZBILFziH/9AI7C6PaN5W0dSvkr9yInyGHS
+z/IR1+4tqvP2qlfKVKI4CP6BFH251Ft9qMUBuAsnlAVQ1z0exDtIFFOyQCdR7iXm
+jBIWMSS4buBwRQXwDK7id1OxtU23qVJv+xwEV0IzaaSJmaGLIbvRBD+qatfUuQJB
+MU/04DdJIwvLtZBYdC2219m5dUBQaa4bimL+YN9EcsDzD9h9UxQo5ReK7b3cNMzJ
+BKJWLzFBcJuePMzAnLFktr/RufX4wpXe6XJxoVPaHo72GorLkwnQ0HYMTY8rehT4
+mDi1FI969LHCFFaFHSAaRnwdXaQkJmSfcxzCYQIDAQABAoIBAQCW3I4sKN5B9jOe
+xq/pkeWBq4OvhW8Ys1yW0zFT8t6nHbB1XrwscQygd8gE9BPqj3e0iIEqtdphbPmj
+VHqTYbC0FI6QDClifV7noTwTBjeIOlgZ0NSUN0/WgVzIOxUz2mZ2vBZUovKILPqG
+TOi7J7RXMoySMdcXpP1f+PgvYNcnKsT72UcWaSXEV8/zo+Zm/qdGPVWwJonri5Mp
+DVm5EQSENBiRyt028rU6ElXORNmoQpVjDVqZ1gipzXkifdjGyENw2rt4V/iKYD7V
+5iqXOsvP6Cemf4gbrjunAgDG08S00kiUgvVWcdXW+dlsR2nCvH4DOEe3AYYh/aH8
+DxEE7FbtAoGBAPcNO8fJ56mNw0ow4Qg38C+Zss/afhBOCfX4O/SZKv/roRn5+gRM
+KRJYSVXNnsjPI1plzqR4OCyOrjAhtuvL4a0DinDzf1+fiztyNohwYsW1vYmqn3ti
+EN0GhSgE7ppZjqvLQ3f3LUTxynhA0U+k9wflb4irIlViTUlCsOPkrNJDAoGBANqL
+Q+vvuGSsmRLU/Cenjy+Mjj6+QENg51dz34o8JKuVKIPKU8pNnyeLa5fat0qD2MHm
+OB9opeQOcw0dStodxr6DB3wi83bpjeU6BWUGITNiWEaZEBrQ0aiqNJJKrrHm8fAZ
+9o4l4oHc4hI0kYVYYDuxtKuVJrzZiEapTwoOcYiLAoGBAI/EWbeIHZIj9zOjgjEA
+LHvm25HtulLOtyk2jd1njQhlHNk7CW2azIPqcLLH99EwCYi/miNH+pijZ2aHGCXb
+/bZrSxM0ADmrZKDxdB6uGCyp+GS2sBxjEyEsfCyvwhJ8b3Q100tqwiNO+d5FCglp
+HICx2dgUjuRVUliBwOK93nx1AoGAUI8RhIEjOYkeDAESyhNMBr0LGjnLOosX+/as
+qiotYkpjWuFULbibOFp+WMW41vDvD9qrSXir3fstkeIAW5KqVkO6mJnRoT3Knnra
+zjiKOITCAZQeiaP8BO5o3pxE9TMqb9VCO3ffnPstIoTaN4syPg7tiGo8k1SklVeH
+2S8lzq0CgYAKG2fljIYWQvGH628rp4ZcXS4hWmYohOxsnl1YrszbJ+hzR+IQOhGl
+YlkUQYXhy9JixmUUKtH+NXkKX7Lyc8XYw5ETr7JBT3ifs+G7HruDjVG78EJVojbd
+8uLA+DdQm5mg4vd1GTiSK65q/3EeoBlUaVor3HhLFki+i9qpT8CBsg==
+-----END RSA PRIVATE KEY-----
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/apis/chef/src/test/resources/pubkey.txt
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/pubkey.txt b/apis/chef/src/test/resources/pubkey.txt
new file mode 100644
index 0000000..886a471
--- /dev/null
+++ b/apis/chef/src/test/resources/pubkey.txt
@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ueqo76MXuP6XqZBILFz
+iH/9AI7C6PaN5W0dSvkr9yInyGHSz/IR1+4tqvP2qlfKVKI4CP6BFH251Ft9qMUB
+uAsnlAVQ1z0exDtIFFOyQCdR7iXmjBIWMSS4buBwRQXwDK7id1OxtU23qVJv+xwE
+V0IzaaSJmaGLIbvRBD+qatfUuQJBMU/04DdJIwvLtZBYdC2219m5dUBQaa4bimL+
+YN9EcsDzD9h9UxQo5ReK7b3cNMzJBKJWLzFBcJuePMzAnLFktr/RufX4wpXe6XJx
+oVPaHo72GorLkwnQ0HYMTY8rehT4mDi1FI969LHCFFaFHSAaRnwdXaQkJmSfcxzC
+YQIDAQAB
+-----END PUBLIC KEY-----
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/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"
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/apis/chef/src/test/resources/sandbox.json
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/sandbox.json b/apis/chef/src/test/resources/sandbox.json
new file mode 100644
index 0000000..640f2a1
--- /dev/null
+++ b/apis/chef/src/test/resources/sandbox.json
@@ -0,0 +1,12 @@
+{
+         "_rev": "1-8c27b0ea4c2b7aaedbb44cfbdfcc11b2",
+         "json_class": "Chef::Sandbox",
+         "is_completed": false,
+         "create_time": "2010-07-07T03:36:00+00:00",
+         "chef_type": "sandbox",
+         "checksums": [],
+         "name": "f9d6d9b72bae465890aae87969f98a9c",
+         "guid": "f9d6d9b72bae465890aae87969f98a9c"
+     }
+
+

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/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/867c7a40/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": []
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/apis/chef/src/test/resources/tomcat-cookbook.json
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/tomcat-cookbook.json b/apis/chef/src/test/resources/tomcat-cookbook.json
new file mode 100644
index 0000000..992f401
--- /dev/null
+++ b/apis/chef/src/test/resources/tomcat-cookbook.json
@@ -0,0 +1,121 @@
+{ "attributes" : [ { "checksum" : "6e3fd0d16a87a55c569da108194ecb29",
+        "name" : "tomcat6.rb",
+        "path" : "attributes/tomcat6.rb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-6e3fd0d16a87a55c569da108194ecb29?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277771874&Signature=zvYjsgUXIC7Xj3MT8Wd93esDGJM%3D"
+      } ],
+  "chef_type" : "cookbook_version",
+  "cookbook_name" : "tomcat6",
+  "definitions" : [  ],
+  "files" : [ { "checksum" : "18e534a72652f3d53b197ca4e5027009",
+        "name" : "org.apache.tomcat.tomcat6.plist",
+        "path" : "files/default/org.apache.tomcat.tomcat6.plist",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-18e534a72652f3d53b197ca4e5027009?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277771874&Signature=M3fBL4t7uuYVXVah2PyZ8eL1QCc%3D"
+      },
+      { "checksum" : "6a35ce92050296862ea63b784529d2e0",
+        "name" : "logging.properties",
+        "path" : "files/default/logging.properties",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-6a35ce92050296862ea63b784529d2e0?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277771874&Signature=vRlKoye2%2Fwz8mdQI%2F3Ht916sllE%3D"
+      }
+    ],
+  "json_class" : "Chef::CookbookVersion",
+  "libraries" : [ { "checksum" : "2b6f7847142bb36823c570899669c54b",
+        "name" : "tomcat_manager.rb",
+        "path" : "libraries/tomcat_manager.rb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-2b6f7847142bb36823c570899669c54b?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277771874&Signature=zxIoUKcGYWo9ir6qf1tTy3wvKZ4%3D"
+      },
+      { "checksum" : "24db7b7dd6f04f8da5fa2b282910ac08",
+        "name" : "tomcat.rb",
+        "path" : "libraries/tomcat.rb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-24db7b7dd6f04f8da5fa2b282910ac08?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277771874&Signature=c4Gbn5kX0ZaPbWvk5LAcR77sITg%3D"
+      }
+    ],
+  "metadata" : { "attributes" : { "tomcat6/with_native" : { "calculated" : false,
+              "choice" : [  ],
+              "default" : "false",
+              "description" : "works for centos, install tomcat-native libraries",
+              "display_name" : "Tomcat native support",
+              "recipes" : [  ],
+              "required" : "optional",
+              "type" : "string"
+            } },
+      "conflicting" : {  },
+      "dependencies" : {  },
+      "description" : "Installs and configures all aspects of tomcat6 using custom local installation",
+      "groupings" : {  },
+      "license" : "Apache 2.0",
+      "long_description" : "= DESCRIPTION:\n\nInstalls Tomcat6\n\n= REQUIREMENTS:\n\n== Platform and Application Environment:\n\nTested on Centos 5.2 8.10. May work on other platforms, esp Redhat.\nNeeds Java at least Java 5\n\n== Cookbooks:\n\nOpscode cookbooks, http://github.com/opscode/cookbooks/tree/master:\n\n* java\n\n= ATTRIBUTES: \n\n= USAGE:\n\n\n= LICENSE and AUTHOR:\n      \nAuthor:: Edmund Haselwanter (<ed...@haselwanter.com>)\nCopyright:: 2009, Edmund Haselwanter\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimit
 ations under the License.\n",
+      "maintainer" : "Opscode, Inc.",
+      "maintainer_email" : "cookbooks@opscode.com",
+      "name" : "tomcat6",
+      "platforms" : { "centos" : "",
+          "debian" : "",
+          "redhat" : "",
+          "ubuntu" : ""
+        },
+      "providing" : {  },
+      "recipes" : { "tomcat6" : "Main Tomcat 6 configuration" },
+      "recommendations" : {  },
+      "replacing" : {  },
+      "suggestions" : {  },
+      "version" : "0.1.0"
+    },
+  "name" : "tomcat6-0.1.0",
+  "providers" : [  ],
+  "recipes" : [ { "checksum" : "d45661e4b50f9677de7b8684af26ff9d",
+        "name" : "default.rb",
+        "path" : "recipes/default.rb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-d45661e4b50f9677de7b8684af26ff9d?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277771874&Signature=r3CvyVe7dcOzB%2F0fNAun5ldGwr8%3D"
+      } ],
+  "resources" : [  ],
+  "root_files" : [ { "checksum" : "14f6977f68c3674484e8289e361fb5a4",
+        "name" : "README.rdoc",
+        "path" : "README.rdoc",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-14f6977f68c3674484e8289e361fb5a4?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277771874&Signature=VNZxN%2B7CxO7ZbDHJOS%2FaTtpkPaE%3D"
+      },
+      { "checksum" : "abc416ffba9ea64ca71635191cb87af6",
+        "name" : "metadata.rb",
+        "path" : "metadata.rb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-abc416ffba9ea64ca71635191cb87af6?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277771874&Signature=pemynt9Q1F%2BxlS26kLaz%2F4NDGO4%3D"
+      },
+      { "checksum" : "dd8473a8a7f2b446250ecdefb1882a5e",
+        "name" : "metadata.json",
+        "path" : "metadata.json",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-dd8473a8a7f2b446250ecdefb1882a5e?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277771874&Signature=sHpayqP%2Fe4Luv20EMa3q%2FaMN4ms%3D"
+      }
+    ],
+  "templates" : [ { "checksum" : "107263b81e4700cf0adad7af2a133bbd",
+        "name" : "tomcat-users.xml.erb",
+        "path" : "templates/default/tomcat-users.xml.erb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-107263b81e4700cf0adad7af2a133bbd?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277771874&Signature=QC7MNIauR2ox5MVlohf2i73uM1s%3D"
+      },
+      { "checksum" : "fa4432b353fa57b9da26a4bff44285f2",
+        "name" : "sv-tomcat6-run.erb",
+        "path" : "templates/default/sv-tomcat6-run.erb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-fa4432b353fa57b9da26a4bff44285f2?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277771874&Signature=q2rDeJFeh4oyhfv9ExMifGB0wxo%3D"
+      },
+      { "checksum" : "33fd6f63133e7ebe28bc62e58773c408",
+        "name" : "manager.xml.erb",
+        "path" : "templates/default/manager.xml.erb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-33fd6f63133e7ebe28bc62e58773c408?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277771874&Signature=rIijEhwLPf5PWTJOg%2BElbOquPBM%3D"
+      },
+      { "checksum" : "09f2bf988663175cd1b7973198dfb5eb",
+        "name" : "sv-tomcat6-log-run.erb",
+        "path" : "templates/default/sv-tomcat6-log-run.erb",
+        "specificity" : "default",
+        "url" : "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/checksum-09f2bf988663175cd1b7973198dfb5eb?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277771874&Signature=UnfNDP4pDzPM3PoLcLWyTnTa%2FKI%3D"
+      }
+    ],
+  "version" : "0.1.0"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/apis/chef/src/test/resources/upload-site.json
----------------------------------------------------------------------
diff --git a/apis/chef/src/test/resources/upload-site.json b/apis/chef/src/test/resources/upload-site.json
new file mode 100644
index 0000000..58bf165
--- /dev/null
+++ b/apis/chef/src/test/resources/upload-site.json
@@ -0,0 +1,13 @@
+{
+    "uri": "https://api.opscode.com/organizations/jclouds/sandboxes/d454f71e2a5f400c808d0c5d04c2c88c",
+    "checksums": {
+        "0c5ecd7788cf4f6c7de2a57193897a6c": {
+            "url": "https://s3.amazonaws.com/opscode-platform-production-data/organization-486ca3ac66264fea926aa0b4ff74341c/sandbox-d454f71e2a5f400c808d0c5d04c2c88c/checksum-0c5ecd7788cf4f6c7de2a57193897a6c?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1277344702&Signature=FtKyqvYEjhhEKmRY%2B0M8aGPMM7g%3D",
+            "needs_upload": true
+        }, "0189e76ccc476701d6b374e5a1a27347": {
+            "needs_upload": false
+        }, "1dda05ed139664f1f89b9dec482b77c0": {
+            "needs_upload": false
+        }
+    }, "sandbox_id": "d454f71e2a5f400c808d0c5d04c2c88c"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jclouds/blob/867c7a40/apis/pom.xml
----------------------------------------------------------------------
diff --git a/apis/pom.xml b/apis/pom.xml
index f467c3a..1b37a13 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/867c7a40/project/pom.xml
----------------------------------------------------------------------
diff --git a/project/pom.xml b/project/pom.xml
index 2279e7b..21a55db 100644
--- a/project/pom.xml
+++ b/project/pom.xml
@@ -494,9 +494,11 @@
             <ignoredResource>virtualhardwaresection.xml</ignoredResource>
             <ignoredResource>logback.xml</ignoredResource>
             <ignoredResource>amzn_images.xml</ignoredResource>
+            <ignoredResource>test</ignoredResource>
             <ignoredResource>test.jks</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>