diff --git a/all/pom.xml b/all/pom.xml
index 8235fbb327..2e6577c690 100644
--- a/all/pom.xml
+++ b/all/pom.xml
@@ -44,15 +44,5 @@
jclouds-twitter
${project.version}
-
- ${project.groupId}
- jclouds-chef
- ${project.version}
-
-
- ${project.groupId}
- jclouds-opscodeplatform
- ${project.version}
-
diff --git a/chef/compute/pom.xml b/chef/compute/pom.xml
deleted file mode 100644
index f2a00803d4..0000000000
--- a/chef/compute/pom.xml
+++ /dev/null
@@ -1,185 +0,0 @@
-
-
-
- 4.0.0
-
- org.jclouds
- jclouds-chef-project
- 1.0-SNAPSHOT
- ../pom.xml
-
- org.jclouds
- jclouds-chef-compute
- jclouds chef compute integration
- provisions nodes with jclouds and kick's off chef to configure and integrate
-
-
- YOUR_PREFERRED_PROVIDER
-
-
- YOUR_ACCOUNT
- YOUR_CREDENTIAL
-
- jcloudschef
- YOUR_USER
- ${user.home}/.chef/${jclouds.chef.identity}.pem
- YOUR_ORG
- https://api.opscode.com/organizations/${jclouds.opscodeplatform.org}
-
-
-
-
-
- jclouds-googlecode-deploy
- http://jclouds.googlecode.com/svn/repo
-
-
- jclouds-rimu-snapshots-nexus
- https://oss.sonatype.org/content/repositories/snapshots
-
- true
-
-
-
-
-
-
- ${project.groupId}
- jclouds-chef
- ${project.version}
-
-
- ${project.groupId}
- jclouds-compute
- ${project.version}
-
-
- ${project.groupId}
- jclouds-jsch
- ${project.version}
- test
-
-
- ${project.groupId}
- jclouds-log4j
- ${project.version}
- test
-
-
- log4j
- log4j
- 1.2.14
- test
-
-
- ${project.groupId}
- jclouds-core
- ${project.version}
- test-jar
- test
-
-
- ${project.groupId}
- jclouds-compute
- ${project.version}
- test-jar
- test
-
-
- ${project.groupId}
- jclouds-allcompute
- ${project.version}
- test
- true
-
-
-
-
- live
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- integration
- integration-test
-
- test
-
-
-
- none
-
-
- **/*LiveTest.java
-
-
-
- jclouds.compute.provider
- ${jclouds.compute.provider}
-
-
- jclouds.compute.endpoint
- ${jclouds.compute.endpoint}
-
-
- jclouds.compute.identity
- ${jclouds.compute.identity}
-
-
- jclouds.compute.credential
- ${jclouds.compute.credential}
-
-
- jclouds.compute.tag
- ${jclouds.compute.tag}
-
-
- jclouds.compute.credential
- ${jclouds.compute.credential}
-
-
- jclouds.chef.credential.pem
- ${jclouds.chef.credential.pem}
-
-
- jclouds.chef.endpoint
- ${jclouds.chef.endpoint}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/chef/compute/src/test/java/org/jclouds/chef/compute/ChefComputeServiceLiveTest.java b/chef/compute/src/test/java/org/jclouds/chef/compute/ChefComputeServiceLiveTest.java
deleted file mode 100644
index bbeaf583e0..0000000000
--- a/chef/compute/src/test/java/org/jclouds/chef/compute/ChefComputeServiceLiveTest.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/**
- *
- * Copyright (C) 2010 Cloud Conscious, LLC.
- *
- * ====================================================================
- * Licensed 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.compute;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.collect.Iterables.any;
-import static com.google.common.collect.Iterables.concat;
-import static com.google.common.collect.Iterables.getLast;
-import static org.jclouds.chef.predicates.CookbookVersionPredicates.containsRecipe;
-import static org.jclouds.chef.predicates.CookbookVersionPredicates.containsRecipes;
-import static org.jclouds.compute.options.TemplateOptions.Builder.runScript;
-import static org.testng.Assert.assertEquals;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.util.List;
-import java.util.Properties;
-
-import org.jclouds.chef.ChefContext;
-import org.jclouds.chef.ChefContextFactory;
-import org.jclouds.chef.domain.CookbookVersion;
-import org.jclouds.chef.util.RunListBuilder;
-import org.jclouds.compute.ComputeServiceContext;
-import org.jclouds.compute.ComputeServiceContextFactory;
-import org.jclouds.compute.RunNodesException;
-import org.jclouds.compute.domain.NodeMetadata;
-import org.jclouds.compute.predicates.NodePredicates;
-import org.jclouds.io.Payload;
-import org.jclouds.logging.log4j.config.Log4JLoggingModule;
-import org.jclouds.ssh.jsch.config.JschSshClientModule;
-import org.jclouds.util.Utils;
-import org.testng.annotations.AfterGroups;
-import org.testng.annotations.BeforeGroups;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableSet;
-import com.google.inject.Module;
-
-/**
- *
- * @author Adrian Cole
- */
-@Test(groups = "live", testName = "chef.ChefComputeServiceLiveTest")
-public class ChefComputeServiceLiveTest {
-
- private ComputeServiceContext computeContext;
- private ChefContext chefContext;
- private String tag;
- private String clientName;
- private String chefEndpoint;
- private Iterable extends NodeMetadata> nodes;
-
- @BeforeGroups(groups = { "live" })
- public void setupAll() throws FileNotFoundException, IOException {
- tag = System.getProperty("jclouds.compute.tag") != null ? System.getProperty("jclouds.compute.tag")
- : "jcloudschef";
- String computeProvider = checkNotNull(System.getProperty("jclouds.compute.provider"), "jclouds.compute.provider");
- String computeEndpoint = System.getProperty("jclouds.compute.endpoint");
- String computeIdentity = checkNotNull(System.getProperty("jclouds.compute.identity"), "jclouds.compute.identity");
- String computeCredential = checkNotNull(System.getProperty("jclouds.compute.credential"),
- "jclouds.compute.credential");
- chefEndpoint = checkNotNull(System.getProperty("jclouds.chef.endpoint"), "jclouds.chef.endpoint");
- String chefIdentity = checkNotNull(System.getProperty("jclouds.chef.identity"), "jclouds.chef.identity");
- String chefCredentialFile = System.getProperty("jclouds.chef.credential.pem");
- if (chefCredentialFile == null || chefCredentialFile.equals(""))
- chefCredentialFile = System.getProperty("user.home") + "/.chef/" + chefIdentity + ".pem";
-
- Properties props = new Properties();
- props.setProperty(computeProvider + ".identity", computeIdentity);
- props.setProperty(computeProvider + ".credential", computeCredential);
- props.setProperty("chef.endpoint", chefEndpoint);
- props.setProperty("chef.identity", chefIdentity);
- props.setProperty("chef.credential.file", chefCredentialFile);
-
- if (computeEndpoint != null && !computeEndpoint.trim().equals(""))
- props.setProperty(computeProvider + ".endpoint", computeEndpoint);
-
- computeContext = new ComputeServiceContextFactory().createContext(computeProvider, ImmutableSet.of(
- new Log4JLoggingModule(), getSshModule()), props);
-
- chefContext = new ChefContextFactory().createContext(ImmutableSet. of(new Log4JLoggingModule()), props);
- }
-
- protected Module getSshModule() {
- return new JschSshClientModule();
- }
-
- @Test
- public void testCanUpdateRunList() throws IOException {
- String recipe = "apache2";
-
- Iterable extends CookbookVersion> cookbookVersions = chefContext.getChefService().listCookbookVersions();
-
- if (any(cookbookVersions, containsRecipe(recipe))) {
- List runList = new RunListBuilder().addRecipe(recipe).build();
- chefContext.getChefService().updateRunListForTag(runList, tag);
- assertEquals(chefContext.getChefService().getRunListForTag(tag), runList);
- } else {
- assert false : String.format("recipe %s not in %s", recipe, cookbookVersions);
- }
-
- // TODO move this to a unit test
- assert any(cookbookVersions, containsRecipe("apache2::mod_proxy"));
- assert any(cookbookVersions, containsRecipes("apache2", "apache2::mod_proxy", "apache2::mod_proxy_http"));
- assert !any(cookbookVersions, containsRecipe("apache2::bar"));
- assert !any(cookbookVersions, containsRecipe("foo::bar"));
- }
-
- @Test(dependsOnMethods = "testCanUpdateRunList")
- public void testRunNodesWithBootstrap() throws IOException {
-
- Payload bootstrap = chefContext.getChefService().createClientAndBootstrapScriptForTag(tag);
-
- try {
- nodes = computeContext.getComputeService().runNodesWithTag(tag, 1, runScript(bootstrap));
- } catch (RunNodesException e) {
- nodes = concat(e.getSuccessfulNodes(), e.getNodeErrors().keySet());
- }
-
- for (NodeMetadata node : nodes) {
- URI uri = URI.create("http://" + getLast(node.getPublicAddresses()));
- InputStream content = computeContext.utils().http().get(uri);
- String string = Utils.toStringAndClose(content);
- assert string.indexOf("It works!") >= 0 : string;
- }
-
- }
-
- @AfterGroups(groups = { "live" })
- public void teardownCompute() {
- if (computeContext != null) {
- computeContext.getComputeService().destroyNodesMatching(NodePredicates.withTag(tag));
- computeContext.close();
- }
- }
-
- @AfterGroups(groups = { "live" })
- public void teardownChef() {
- if (chefContext != null) {
- chefContext.getChefService().cleanupStaleNodesAndClients(tag + "-", 1);
- if (clientName != null && chefContext.getApi().clientExists(clientName))
- chefContext.getApi().deleteClient(clientName);
- chefContext.close();
- }
- }
-}
diff --git a/chef/compute/src/test/resources/log4j.xml b/chef/compute/src/test/resources/log4j.xml
deleted file mode 100755
index 66bf053d21..0000000000
--- a/chef/compute/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,203 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/chef/core/pom.xml b/chef/core/pom.xml
deleted file mode 100644
index a30bf22b18..0000000000
--- a/chef/core/pom.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
- 4.0.0
-
- org.jclouds
- jclouds-chef-project
- 1.0-SNAPSHOT
- ../pom.xml
-
- org.jclouds
- jclouds-chef
- jclouds Chef core
- jclouds components to access Chef
-
-
- scm:svn:http://jclouds.googlecode.com/svn/trunk/chef
- scm:svn:https://jclouds.googlecode.com/svn/trunk/chef
- http://jclouds.googlecode.com/svn/trunk/chef
-
-
-
-
-
- jclouds-googlecode-deploy
- http://jclouds.googlecode.com/svn/repo
-
- false
-
-
-
- jclouds-rimu-snapshots-nexus
- https://oss.sonatype.org/content/repositories/snapshots
-
- true
-
-
-
-
-
- chef-validator
- /etc/chef/validation.pem
- http://localhost:4000
- ${jclouds.chef.identity}
- ${jclouds.chef.rsa-key}
- ${jclouds.chef.endpoint}
-
-
-
-
- ${project.groupId}
- jclouds-core
- ${project.version}
-
-
-
- org.bouncycastle
- bcprov-jdk15
- 1.44
-
-
- ${project.groupId}
- jclouds-scriptbuilder
- ${project.version}
-
-
- ${project.groupId}
- jclouds-core
- ${project.version}
- test-jar
- test
-
-
- log4j
- log4j
- 1.2.14
- test
-
-
- ${project.groupId}
- jclouds-log4j
- ${project.version}
- test
-
-
- org.danlarkin
- clojure-json
- 1.1
- true
-
-
-
- ${project.groupId}
- jclouds-blobstore
- ${project.version}
- true
-
-
-
diff --git a/chef/core/src/main/clojure/org/jclouds/chef.clj b/chef/core/src/main/clojure/org/jclouds/chef.clj
deleted file mode 100644
index 6503e6d59c..0000000000
--- a/chef/core/src/main/clojure/org/jclouds/chef.clj
+++ /dev/null
@@ -1,261 +0,0 @@
-;
-;
-; Copyright (C) 2010 Cloud Conscious, LLC.
-;
-; ====================================================================
-; Licensed 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.
-; ====================================================================
-;
-
-(ns
- #^{:author "Adrian Cole"
- :doc "A clojure binding to the jclouds chef interface.
-
-Here's a quick example of how to manipulate a databag on the Opscode Platform,
-which is basically Chef Server as a Service.
-
-(use 'org.jclouds.chef)
-
-(def client \"YOUR_CLIENT\")
-;; load the rsa key from ~/.chef/CLIENT_NAME.pem
-(def credential (load-pem client))
-
-;; create a connection to the opscode platform
-(def chef (chef-service \"chef\" client credential :chef.endpoint \"https://api.opscode.com/organizations/YOUR_ORG\"))
-
-(with-chef-service [chef]
- (create-databag \"cluster-config\")
- (update-databag-item \"cluster-config\" {:id \"master\" :name \"myhost.com\"}))
-
-;; note that you can create your chef connection like this to do in-memory testing
-(def chef (chef-service \"transientchef\" \"\" \"\"))
-
-See http://code.google.com/p/jclouds for details."}
- org.jclouds.chef
- (:use [org.jclouds.core])
- (:require (org.danlarkin [json :as json]))
- (:import
- java.util.Properties
- [org.jclouds.chef ChefClient
- ChefService ChefContext ChefContextFactory]
- [org.jclouds.chef.domain DatabagItem]))
-(try
- (use '[clojure.contrib.reflect :only [get-field]])
- (catch Exception e
- (use '[clojure.contrib.java-utils
- :only [wall-hack-field]
- :rename {wall-hack-field get-field}])))
-
-(defn load-pem
- "get the pem associated with the supplied identity"
- ([#^String identity]
- (slurp (str (. System getProperty "user.home") "/.chef/" identity ".pem"))))
-
-;; TODO find a way to pass the chef provider by default
-
-(defn chef-service
- "Create a logged in context to a chef server.
-
-provider \"chef\" is a remote connection, and you can pass the option
- :chef.endpoint \"https://url\" to override the endpoint
-
-provider \"transientchef\" is for in-memory when you are looking to do
-unit testing"
- ([#^String provider #^String identity #^String credential & options]
- (let [module-keys (set (keys module-lookup))
- ext-modules (filter #(module-keys %) options)
- opts (apply hash-map (filter #(not (module-keys %)) options))]
- (.. (ChefContextFactory.)
- (createContext provider identity credential
- (apply modules (concat ext-modules (opts :extensions)))
- (reduce #(do (.put %1 (name (first %2)) (second %2)) %1)
- (Properties.) (dissoc opts :extensions)))
- (getChefService)))))
-
-(defn chef-context
- "Returns a chef context from a chef service."
- [#^ChefService chef]
- (.getContext chef))
-
-(defn chef-service?
- [object]
- (instance? ChefService object))
-
-(defn chef-context?
- [object]
- (instance? ChefContext object))
-
-(defn as-chef-service
- "Tries hard to produce a chef service from its input arguments"
- [& args]
- (cond
- (chef-service? (first args)) (first args)
- (chef-context? (first args)) (.getChefService (first args))
- :else (apply chef-service args)))
-
-(defn as-chef-api
- "Tries hard to produce a chef client from its input arguments"
- [& args]
- (cond
- (chef-service? (first args)) (.getApi (.getContext (first args)))
- (chef-context? (first args)) (.getApi (first args))
- :else (.getApi (.getContext (apply chef-service args)))))
-
-(def *chef*)
-
-(defmacro with-chef-service
- "Specify the default chef service"
- [[& chef-or-args] & body]
- `(binding [*chef* (as-chef-service ~@chef-or-args)]
- ~@body))
-
-(defn nodes
- "Retrieve the names of the existing nodes in your chef server."
- ([] (nodes *chef*))
- ([#^ChefService chef]
- (seq (.listNodes (as-chef-api chef)))))
-
-(defn nodes-with-details
- "Retrieve the existing nodes in your chef server including all details."
- ([] (nodes *chef*))
- ([#^ChefService chef]
- (seq (.listNodes chef))))
-
-(defn clients
- "Retrieve the names of the existing clients in your chef server."
- ([] (clients *chef*))
- ([#^ChefService chef]
- (seq (.listClients (as-chef-api chef)))))
-
-(defn clients-with-details
- "Retrieve the existing clients in your chef server including all details."
- ([] (clients *chef*))
- ([#^ChefService chef]
- (seq (.listClients chef))))
-
-(defn cookbooks
- "Retrieve the names of the existing cookbooks in your chef server."
- ([] (cookbooks *chef*))
- ([#^ChefService chef]
- (seq (.listCookbooks (as-chef-api chef)))))
-
-(defn cookbook-versions
- "Retrieve the versions of an existing cookbook in your chef server."
- ([name] (cookbook-versions *chef*))
- ([#^ChefService name chef]
- (seq (.getVersionsOfCookbook (as-chef-api chef) name))))
-
-(defn cookbook-versions-with-details
- "Retrieve the existing cookbook versions in your chef server including all details."
- ([] (cookbook-versions *chef*))
- ([#^ChefService chef]
- (seq (.listCookbookVersions chef))))
-
-(defn update-run-list
- "Updates the run-list associated with a tag"
- ([run-list tag] (update-run-list run-list tag *chef*))
- ([run-list tag #^ChefService chef]
- (.updateRunListForTag chef run-list tag)))
-
-(defn run-list
- "Retrieves the run-list associated with a tag"
- ([tag] (run-list tag *chef*))
- ([tag #^ChefService chef]
- (seq (.getRunListForTag chef tag))))
-
-(defn create-bootstrap
- "creates a client and bootstrap script associated with a tag"
- ([tag] (create-bootstrap tag *chef*))
- ([tag #^ChefService chef]
- (.createClientAndBootstrapScriptForTag chef tag)))
-
-(defn databags
- "Retrieve the names of the existing data bags in your chef server."
- ([] (databags *chef*))
- ([#^ChefService chef]
- (seq (.listDatabags (as-chef-api chef)))))
-
-(defn databag-exists?
- "Predicate to check presence of a databag"
- ([databag-name]
- (databag-exists? databag-name *chef*))
- ([databag-name #^ChefService chef]
- (.databagExists (as-chef-api chef) databag-name)))
-
-(defn delete-databag
- "Delete a data bag, including its items"
- ([databag]
- (delete-databag databag *chef*))
- ([databag chef]
- (.deleteDatabag (as-chef-api chef) databag)))
-
-(defn create-databag
- "create a data bag"
- ([databag]
- (create-databag databag *chef*))
- ([databag chef]
- (.createDatabag (as-chef-api chef) databag)))
-
-(defn databag-items
- "Retrieve the names of the existing items in a data bag in your chef server."
- ([databag]
- (databag-items databag *chef*))
- ([databag chef]
- (seq (.listDatabagItems (as-chef-api chef) databag))))
-
-(defn databag-item-exists?
- "Predicate to check presence of a databag item"
- ([databag-name item-id]
- (databag-item-exists? databag-name item-id *chef*))
- ([databag-name item-id #^ChefService chef]
- (.databagExists (as-chef-api chef) databag-name item-id)))
-
-(defn databag-item
- "Get an item from the data bag"
- ([databag item-id]
- (databag-item databag item-id *chef*))
- ([databag item-id chef]
- (json/decode-from-str (str (.getDatabagItem (as-chef-api chef) databag item-id)))))
-
-(defn delete-databag-item
- "delete an item from the data bag"
- ([databag item-id]
- (delete-databag-item databag item-id *chef*))
- ([databag item-id chef]
- (.deleteDatabagItem (as-chef-api chef) databag item-id)))
-
-(defn create-databag-item
- "put a new item in the data bag. Note the Map you pass must have an :id key:
-
-ex.
- (create-databag-item \"cluster-config\" {:id \"master\" :name \"myhost.com\"}))"
- ([databag value]
- (create-databag-item databag value *chef*))
- ([databag value chef]
- (let [value-str (json/encode-to-str value)]
- (let [value-json (json/decode-from-str value-str)]
- (.createDatabagItem (as-chef-api chef) databag
- (DatabagItem. (get value-json :id) value-str))))))
-
-(defn update-databag-item
- "updates an existing item in the data bag. Note the Map you pass must have an :id key:
-
-ex.
- (update-databag-item \"cluster-config\" {:id \"master\" :name \"myhost.com\"}))"
- ([databag value]
- (update-databag-item databag value *chef*))
- ([databag value chef]
- (let [value-str (json/encode-to-str value)]
- (let [value-json (json/decode-from-str value-str)]
- (.updateDatabagItem (as-chef-api chef) databag
- (DatabagItem. (get value-json :id) value-str))))))
diff --git a/chef/core/src/main/java/org/jclouds/chef/ChefAsyncClient.java b/chef/core/src/main/java/org/jclouds/chef/ChefAsyncClient.java
deleted file mode 100644
index 25749777d3..0000000000
--- a/chef/core/src/main/java/org/jclouds/chef/ChefAsyncClient.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/**
- *
- * Copyright (C) 2010 Cloud Conscious, LLC.
- *
- * ====================================================================
- * Licensed 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;
-
-import java.util.List;
-import java.util.Set;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.HEAD;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.chef.binders.BindChecksumsToJsonPayload;
-import org.jclouds.chef.binders.BindClientnameToJsonPayload;
-import org.jclouds.chef.binders.BindGenerateKeyForClientToJsonPayload;
-import org.jclouds.chef.binders.BindIsCompletedToJsonPayload;
-import org.jclouds.chef.binders.BindNameToJsonPayload;
-import org.jclouds.chef.binders.DatabagItemId;
-import org.jclouds.chef.binders.NodeName;
-import org.jclouds.chef.binders.RoleName;
-import org.jclouds.chef.domain.Client;
-import org.jclouds.chef.domain.CookbookVersion;
-import org.jclouds.chef.domain.DatabagItem;
-import org.jclouds.chef.domain.Node;
-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.filters.SignedHeaderAuth;
-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.rest.annotations.BinderParam;
-import org.jclouds.rest.annotations.ExceptionParser;
-import org.jclouds.rest.annotations.Headers;
-import org.jclouds.rest.annotations.ParamParser;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.Unwrap;
-import org.jclouds.rest.binders.BindToJsonPayload;
-import org.jclouds.rest.functions.ReturnEmptySetOnNotFoundOr404;
-import org.jclouds.rest.functions.ReturnFalseOnNotFoundOr404;
-import org.jclouds.rest.functions.ReturnNullOnNotFoundOr404;
-import org.jclouds.rest.functions.ReturnVoidOnNotFoundOr404;
-
-import com.google.common.util.concurrent.ListenableFuture;
-
-/**
- * Provides asynchronous access to Chef via their REST API.
- *
- *
- * @see ChefClient
- * @see
- * @author Adrian Cole
- */
-@RequestFilters(SignedHeaderAuth.class)
-@Headers(keys = "X-Chef-Version", values = ChefAsyncClient.VERSION)
-@Consumes(MediaType.APPLICATION_JSON)
-public interface ChefAsyncClient {
- public static final String VERSION = "0.9.8";
-
- /**
- * @see ChefClient#getUploadSandboxForChecksums
- */
- @POST
- @Path("/sandboxes")
- ListenableFuture getUploadSandboxForChecksums(
- @BinderParam(BindChecksumsToJsonPayload.class) Set> md5s);
-
- @PUT
- @Path("")
- ListenableFuture uploadContent(@BinderParam(BindChecksumsToJsonPayload.class) Set> md5s);
-
- /**
- * @see ChefClient#commitSandbox
- */
- @PUT
- @Path("/sandboxes/{id}")
- ListenableFuture commitSandbox(@PathParam("id") String id,
- @BinderParam(BindIsCompletedToJsonPayload.class) boolean isCompleted);
-
- /**
- * @see ChefCookbooks#listCookbooks
- */
- @GET
- @Path("/cookbooks")
- @ResponseParser(ParseKeySetFromJson.class)
- @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
- ListenableFuture> listCookbooks();
-
- /**
- * @see ChefClient#updateCookbook
- */
- @PUT
- @Path("/cookbooks/{cookbookname}/{version}")
- ListenableFuture updateCookbook(@PathParam("cookbookname") String cookbookName,
- @PathParam("version") String version, @BinderParam(BindToJsonPayload.class) CookbookVersion cookbook);
-
- /**
- * @see ChefCookbook#deleteCookbook(String)
- */
- @DELETE
- @Path("/cookbooks/{cookbookname}/{version}")
- @ExceptionParser(ReturnNullOnNotFoundOr404.class)
- ListenableFuture deleteCookbook(@PathParam("cookbookname") String cookbookName,
- @PathParam("version") String version);
-
- /**
- * @see ChefCookbook#getVersionsOfCookbook
- */
- @GET
- @Path("/cookbooks/{cookbookname}")
- @Unwrap
- @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
- ListenableFuture> getVersionsOfCookbook(@PathParam("cookbookname") String cookbookName);
-
- /**
- * @see ChefCookbook#getCookbook
- */
- @GET
- @Path("/cookbooks/{cookbookname}/{version}")
- @ExceptionParser(ReturnNullOnNotFoundOr404.class)
- ListenableFuture getCookbook(@PathParam("cookbookname") String cookbookName,
- @PathParam("version") String version);
-
- /**
- * @see ChefClient#createClient
- */
- @POST
- @Path("/clients")
- ListenableFuture createClient(@BinderParam(BindClientnameToJsonPayload.class) String clientname);
-
- /**
- * @see ChefClient#generateKeyForClient
- */
- @PUT
- @Path("/clients/{clientname}")
- ListenableFuture generateKeyForClient(
- @PathParam("clientname") @BinderParam(BindGenerateKeyForClientToJsonPayload.class) String clientname);
-
- /**
- * @see ChefClient#clientExists
- */
- @HEAD
- @Path("/clients/{clientname}")
- @ExceptionParser(ReturnFalseOnNotFoundOr404.class)
- ListenableFuture clientExists(@PathParam("clientname") String clientname);
-
- /**
- * @see ChefClient#getClient
- */
- @GET
- @Path("/clients/{clientname}")
- @ExceptionParser(ReturnNullOnNotFoundOr404.class)
- ListenableFuture getClient(@PathParam("clientname") String clientname);
-
- /**
- * @see ChefClient#deleteClient
- */
- @DELETE
- @Path("/clients/{clientname}")
- @ExceptionParser(ReturnNullOnNotFoundOr404.class)
- ListenableFuture deleteClient(@PathParam("clientname") String clientname);
-
- /**
- * @see ChefClient#listClients
- */
- @GET
- @Path("/clients")
- @ResponseParser(ParseKeySetFromJson.class)
- @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
- ListenableFuture> listClients();
-
- /**
- * @see ChefClient#createNode
- */
- @POST
- @Path("/nodes")
- ListenableFuture createNode(@BinderParam(BindToJsonPayload.class) Node node);
-
- /**
- * @see ChefClient#updateNode
- */
- @PUT
- @Path("/nodes/{nodename}")
- ListenableFuture updateNode(
- @PathParam("nodename") @ParamParser(NodeName.class) @BinderParam(BindToJsonPayload.class) Node node);
-
- /**
- * @see ChefNode#nodeExists
- */
- @HEAD
- @Path("/nodes/{nodename}")
- @ExceptionParser(ReturnFalseOnNotFoundOr404.class)
- ListenableFuture nodeExists(@PathParam("nodename") String nodename);
-
- /**
- * @see ChefNode#getNode
- */
- @GET
- @Path("/nodes/{nodename}")
- @ExceptionParser(ReturnNullOnNotFoundOr404.class)
- ListenableFuture getNode(@PathParam("nodename") String nodename);
-
- /**
- * @see ChefNode#deleteNode
- */
- @DELETE
- @Path("/nodes/{nodename}")
- @ExceptionParser(ReturnNullOnNotFoundOr404.class)
- ListenableFuture deleteNode(@PathParam("nodename") String nodename);
-
- /**
- * @see ChefNode#listNodes
- */
- @GET
- @Path("/nodes")
- @ResponseParser(ParseKeySetFromJson.class)
- @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
- ListenableFuture> listNodes();
-
- /**
- * @see ChefClient#createRole
- */
- @POST
- @Path("/roles")
- ListenableFuture createRole(@BinderParam(BindToJsonPayload.class) Role role);
-
- /**
- * @see ChefClient#updateRole
- */
- @PUT
- @Path("/roles/{rolename}")
- ListenableFuture updateRole(
- @PathParam("rolename") @ParamParser(RoleName.class) @BinderParam(BindToJsonPayload.class) Role role);
-
- /**
- * @see ChefRole#roleExists
- */
- @HEAD
- @Path("/roles/{rolename}")
- @ExceptionParser(ReturnFalseOnNotFoundOr404.class)
- ListenableFuture roleExists(@PathParam("rolename") String rolename);
-
- /**
- * @see ChefRole#getRole
- */
- @GET
- @Path("/roles/{rolename}")
- @ExceptionParser(ReturnNullOnNotFoundOr404.class)
- ListenableFuture getRole(@PathParam("rolename") String rolename);
-
- /**
- * @see ChefRole#deleteRole
- */
- @DELETE
- @Path("/roles/{rolename}")
- @ExceptionParser(ReturnNullOnNotFoundOr404.class)
- ListenableFuture deleteRole(@PathParam("rolename") String rolename);
-
- /**
- * @see ChefRole#listRoles
- */
- @GET
- @Path("/roles")
- @ResponseParser(ParseKeySetFromJson.class)
- @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
- ListenableFuture> listRoles();
-
- /**
- * @see ChefClient#listDatabags
- */
- @GET
- @Path("/data")
- @ResponseParser(ParseKeySetFromJson.class)
- @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
- ListenableFuture> listDatabags();
-
- /**
- * @see ChefClient#createDatabag
- */
- @POST
- @Path("/data")
- ListenableFuture createDatabag(@BinderParam(BindNameToJsonPayload.class) String databagName);
-
- /**
- * @see ChefClient#databagExists
- */
- @HEAD
- @Path("/data/{name}")
- @ExceptionParser(ReturnFalseOnNotFoundOr404.class)
- ListenableFuture databagExists(@PathParam("name") String databagName);
-
- /**
- * @see ChefClient#deleteDatabag
- */
- @DELETE
- @Path("/data/{name}")
- @ExceptionParser(ReturnVoidOnNotFoundOr404.class)
- ListenableFuture deleteDatabag(@PathParam("name") String databagName);
-
- /**
- * @see ChefClient#listDatabagItems
- */
- @GET
- @Path("/data/{name}")
- @ResponseParser(ParseKeySetFromJson.class)
- @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
- ListenableFuture> listDatabagItems(@PathParam("name") String databagName);
-
- /**
- * @see ChefClient#createDatabagItem
- */
- @POST
- @Path("/data/{databagName}")
- ListenableFuture createDatabagItem(@PathParam("databagName") String databagName,
- @BinderParam(BindToJsonPayload.class) DatabagItem databagItem);
-
- /**
- * @see ChefClient#updateDatabagItem
- */
- @PUT
- @Path("/data/{databagName}/{databagItemId}")
- ListenableFuture updateDatabagItem(
- @PathParam("databagName") String databagName,
- @PathParam("databagItemId") @ParamParser(DatabagItemId.class) @BinderParam(BindToJsonPayload.class) DatabagItem item);
-
- /**
- * @see ChefClient#databagItemExists
- */
- @HEAD
- @Path("/data/{databagName}/{databagItemId}")
- @ExceptionParser(ReturnFalseOnNotFoundOr404.class)
- ListenableFuture databagItemExists(@PathParam("databagName") String databagName,
- @PathParam("databagItemId") String databagItemId);
-
- /**
- * @see ChefClient#getDatabagItem
- */
- @GET
- @Path("/data/{databagName}/{databagItemId}")
- @ExceptionParser(ReturnNullOnNotFoundOr404.class)
- ListenableFuture getDatabagItem(@PathParam("databagName") String databagName,
- @PathParam("databagItemId") String databagItemId);
-
- /**
- * @see ChefClient#deleteDatabagItem
- */
- @DELETE
- @Path("/data/{databagName}/{databagItemId}")
- @ExceptionParser(ReturnNullOnNotFoundOr404.class)
- ListenableFuture deleteDatabagItem(@PathParam("databagName") String databagName,
- @PathParam("databagItemId") String databagItemId);
-
- /**
- * @see ChefClient#listSearchIndexes
- */
- @GET
- @Path("/search")
- @ResponseParser(ParseKeySetFromJson.class)
- @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
- ListenableFuture> listSearchIndexes();
-
- /**
- * @see ChefClient#searchRoles
- */
- @GET
- @Path("/search/role")
- @ResponseParser(ParseSearchRolesFromJson.class)
- ListenableFuture extends SearchResult extends Role>> searchRoles();
-
- /**
- * @see ChefClient#searchClients
- */
- @GET
- @Path("/search/client")
- @ResponseParser(ParseSearchClientsFromJson.class)
- ListenableFuture extends SearchResult extends Client>> searchClients();
-
- /**
- * @see ChefClient#searchNodes
- */
- @GET
- @Path("/search/node")
- @ResponseParser(ParseSearchNodesFromJson.class)
- ListenableFuture extends SearchResult extends Node>> searchNodes();
-
- /**
- * @see ChefClient#searchDatabag
- */
- @GET
- @Path("/search/{databagName}")
- @ResponseParser(ParseSearchDatabagFromJson.class)
- ListenableFuture extends SearchResult extends DatabagItem>> searchDatabag(
- @PathParam("databagName") String databagName);
-}
diff --git a/chef/core/src/main/java/org/jclouds/chef/ChefClient.java b/chef/core/src/main/java/org/jclouds/chef/ChefClient.java
deleted file mode 100644
index 6ffd44128a..0000000000
--- a/chef/core/src/main/java/org/jclouds/chef/ChefClient.java
+++ /dev/null
@@ -1,533 +0,0 @@
-/**
- *
- * Copyright (C) 2010 Cloud Conscious, LLC.
- *
- * ====================================================================
- * Licensed 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;
-
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-
-import org.jclouds.chef.domain.Client;
-import org.jclouds.chef.domain.CookbookVersion;
-import org.jclouds.chef.domain.DatabagItem;
-import org.jclouds.chef.domain.Node;
-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.concurrent.Timeout;
-import org.jclouds.http.HttpResponseException;
-import org.jclouds.rest.AuthorizationException;
-import org.jclouds.rest.annotations.BinderParam;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-/**
- * Provides synchronous access to Chef.
- *
- *
- * @see ChefAsyncClient
- * @see
- * @author Adrian Cole
- */
-@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS)
-public interface ChefClient {
- /**
- *
- * FIXME Comment this
- *
- * @param md5s
- * raw md5s; uses {@code Bytes.asList()} and {@code
- * Bytes.toByteArray()} as necessary
- * @return
- */
- UploadSandbox getUploadSandboxForChecksums(Set> md5s);
-
- Sandbox commitSandbox(String id, boolean isCompleted);
-
- /**
- *
- * @return a list of all the cookbook names
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if the caller is not a recognized user.
- *
- * "403 Forbidden" if you do not have permission to see the
- * cookbook list.
- */
- Set listCookbooks();
-
- /**
- * Creates or updates (uploads) a cookbook //TODO document
- *
- * @param cookbookName
- * @throws HttpResponseException
- * "409 Conflict" if the cookbook already exists
- */
- @Timeout(duration = 10, timeUnit = TimeUnit.MINUTES)
- CookbookVersion updateCookbook(String cookbookName, String version, CookbookVersion cookbook);
-
- /**
- * deletes an existing cookbook.
- *
- * @return last state of the client you deleted or null, if not found
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have Delete rights on the
- * cookbook.
- */
- CookbookVersion deleteCookbook(String cookbookName, String version);
-
- /**
- *
- * @return the versions of a cookbook or null, if not found
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if the caller is not a recognized user.
- *
- * "403 Forbidden" if the caller is not authorized to view the
- * cookbook.
- */
- Set getVersionsOfCookbook(String cookbookName);
-
- /**
- * Returns a description of the cookbook, with links to all of its component
- * parts, and the metadata.
- *
- * @return the cookbook or null, if not found
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if the caller is not a recognized user.
- *
- * "403 Forbidden" if the caller is not authorized to view the
- * cookbook.
- */
- CookbookVersion getCookbook(String cookbookName, String version);
-
- /**
- * 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
- *
- * "401 Unauthorized" if the caller is not a recognized user.
- *
- * "403 Forbidden" if the caller is not authorized to create a
- * client.
- * @throws HttpResponseException
- * "409 Conflict" if the client already exists
- */
- @Timeout(duration = 120, timeUnit = TimeUnit.SECONDS)
- Client createClient(String name);
-
- /**
- * 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
- *
- * "401 Unauthorized" if the caller is not a recognized user.
- *
- * "403 Forbidden" if the caller is not authorized to modify the
- * client.
- */
- @Timeout(duration = 120, timeUnit = TimeUnit.SECONDS)
- Client generateKeyForClient(String name);
-
- /**
- * @return list of client names.
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have rights to list clients.
- */
- Set listClients();
-
- /**
- *
- * @return true if the specified client name exists.
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have rights to view the client.
- */
- boolean clientExists(String name);
-
- /**
- * deletes an existing client.
- *
- * @return last state of the client you deleted or null, if not found
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have Delete rights on the client.
- */
- Client deleteClient(String name);
-
- /**
- * gets an existing client.
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have view rights on the client.
- */
- Client getClient(String name);
-
- /**
- * creates a new node
- *
- * @return //TODO
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if the caller is not a recognized user.
- *
- * "403 Forbidden" if the caller is not authorized to create a
- * node.
- * @throws HttpResponseException
- * "409 Conflict" if the node already exists
- */
- @Timeout(duration = 120, timeUnit = TimeUnit.SECONDS)
- void createNode(Node node);
-
- /**
- * Creates or updates (uploads) a node //TODO document
- *
- * @param nodeName
- * @throws HttpResponseException
- * "409 Conflict" if the node already exists
- */
- @Timeout(duration = 10, timeUnit = TimeUnit.MINUTES)
- Node updateNode(Node node);
-
- /**
- * @return list of node names.
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have rights to list nodes.
- */
- Set listNodes();
-
- /**
- *
- * @return true if the specified node name exists.
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have rights to view the node.
- */
- boolean nodeExists(String name);
-
- /**
- * deletes an existing node.
- *
- * @return last state of the node you deleted or null, if not found
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have Delete rights on the node.
- */
- Node deleteNode(String name);
-
- /**
- * gets an existing node.
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have view rights on the node.
- */
- Node getNode(String name);
-
- /**
- * creates a new role
- *
- * @return //TODO
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if the caller is not a recognized user.
- *
- * "403 Forbidden" if the caller is not authorized to create a
- * role.
- * @throws HttpResponseException
- * "409 Conflict" if the role already exists
- */
- @Timeout(duration = 120, timeUnit = TimeUnit.SECONDS)
- void createRole(Role role);
-
- /**
- * Creates or updates (uploads) a role //TODO document
- *
- * @param roleName
- * @throws HttpResponseException
- * "409 Conflict" if the role already exists
- */
- @Timeout(duration = 10, timeUnit = TimeUnit.MINUTES)
- Role updateRole(Role role);
-
- /**
- * @return list of role names.
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have rights to list roles.
- */
- Set listRoles();
-
- /**
- *
- * @return true if the specified role name exists.
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have rights to view the role.
- */
- boolean roleExists(String name);
-
- /**
- * deletes an existing role.
- *
- * @return last state of the role you deleted or null, if not found
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have Delete rights on the role.
- */
- Role deleteRole(String name);
-
- /**
- * gets an existing role.
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have view rights on the role.
- */
- Role getRole(String name);
-
- /**
- * lists databags available to the client
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have view rights on the databag.
- */
- Set listDatabags();
-
- /**
- * creates a databag.
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have view rights on the databag.
- */
- void createDatabag(String databagName);
-
- /**
- * true is a databag exists
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have view rights on the databag.
- */
- boolean databagExists(String databagName);
-
- /**
- * Delete a data bag, including its items
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have view rights on the databag.
- */
- void deleteDatabag(String databagName);
-
- /**
- * Show the items in a data bag.
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have view rights on the databag.
- */
- Set listDatabagItems(String databagName);
-
- /**
- * Create a data bag item in the data bag
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have view rights on the databag.
- *
- * @throws IllegalStateException
- * if the item already exists
- *
- */
- DatabagItem createDatabagItem(String databagName, @BinderParam(BindToJsonPayload.class) DatabagItem node);
-
- /**
- * Update (or create if not exists) a data bag item
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have view rights on the databag.
- */
- DatabagItem updateDatabagItem(String databagName, DatabagItem item);
-
- /**
- * determines if a databag item exists
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have view rights on the databag.
- */
- boolean databagItemExists(String databagName, String databagItemId);
-
- /**
- * gets an existing databag item.
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have view rights on the databag.
- */
- DatabagItem getDatabagItem(String databagName, String databagItemId);
-
- /**
- * Delete a data bag item
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have view rights on the databag.
- */
- DatabagItem deleteDatabagItem(String databagName, String databagItemId);
-
- /**
- * Show indexes you can search on
- *
- * By default, the "role", "node" and "client" indexes will always be
- * available.
- *
- * 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.)
- *
- * @throws AuthorizationException
- *
- * "401 Unauthorized" if you are not a recognized user.
- *
- * "403 Forbidden" if you do not have view rights on the databag.
- */
- Set listSearchIndexes();
-
- /**
- * search all roles.
- *
- * 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 your
- * request, the position this result set returns (useful for paging)
- * and the rows themselves.
- */
- SearchResult extends Role> searchRoles();
-
- /**
- * search all clients.
- *
- * 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 your
- * request, the position this result set returns (useful for paging)
- * and the rows themselves.
- */
- SearchResult extends Client> searchClients();
-
- /**
- * search all nodes.
- *
- * 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 your
- * request, the position this result set returns (useful for paging)
- * and the rows themselves.
- */
- SearchResult extends Node> searchNodes();
-
- /**
- * search all items in a databag.
- *
- * 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 your
- * request, the position this result set returns (useful for paging)
- * and the rows themselves.
- */
- SearchResult extends DatabagItem> searchDatabag(String databagName);
-
-}
diff --git a/chef/core/src/main/java/org/jclouds/chef/ChefContext.java b/chef/core/src/main/java/org/jclouds/chef/ChefContext.java
deleted file mode 100644
index 5954a25f82..0000000000
--- a/chef/core/src/main/java/org/jclouds/chef/ChefContext.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- *
- * Copyright (C) 2010 Cloud Conscious, LLC.
- *
- * ====================================================================
- * Licensed 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;
-
-import org.jclouds.chef.internal.ChefContextImpl;
-import org.jclouds.rest.RestContext;
-
-import com.google.inject.ImplementedBy;
-
-/**
- *
- *
- * @author Adrian Cole
- *
- */
-@ImplementedBy(ChefContextImpl.class)
-public interface ChefContext extends RestContext{
-
- ChefService getChefService();
-
-}
\ No newline at end of file
diff --git a/chef/core/src/main/java/org/jclouds/chef/ChefContextBuilder.java b/chef/core/src/main/java/org/jclouds/chef/ChefContextBuilder.java
deleted file mode 100644
index 00963a25fb..0000000000
--- a/chef/core/src/main/java/org/jclouds/chef/ChefContextBuilder.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- *
- * Copyright (C) 2010 Cloud Conscious, LLC.
- *
- * ====================================================================
- * Licensed 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;
-
-import java.util.List;
-import java.util.Properties;
-
-import org.jclouds.chef.config.ChefRestClientModule;
-import org.jclouds.ohai.OhaiContextBuilder;
-
-import com.google.inject.Injector;
-import com.google.inject.Module;
-
-/**
- * @author Adrian Cole
- */
-public class ChefContextBuilder extends OhaiContextBuilder {
-
- public ChefContextBuilder(Properties props) {
- super(ChefClient.class, ChefAsyncClient.class, props);
- }
-
- @Override
- protected void addClientModule(List modules) {
- modules.add(new ChefRestClientModule());
- }
-
- @Override
- public Injector buildInjector() {
- addOhaiModuleIfNotPresent();
- return super.buildInjector();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public ChefContextBuilder withModules(Iterable modules) {
- return (ChefContextBuilder) super.withModules(modules);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public ChefContext buildContext() {
- Injector injector = buildInjector();
- return injector.getInstance(ChefContext.class);
- }
-}
\ No newline at end of file
diff --git a/chef/core/src/main/java/org/jclouds/chef/ChefContextFactory.java b/chef/core/src/main/java/org/jclouds/chef/ChefContextFactory.java
deleted file mode 100644
index 919437c1bc..0000000000
--- a/chef/core/src/main/java/org/jclouds/chef/ChefContextFactory.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- *
- * Copyright (C) 2010 Cloud Conscious, LLC.
- *
- * ====================================================================
- * Licensed 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;
-
-import static org.jclouds.rest.RestContextFactory.createContextBuilder;
-import static org.jclouds.util.Utils.propagateAuthorizationOrOriginalException;
-
-import java.util.Properties;
-
-import javax.annotation.Nullable;
-
-import org.jclouds.rest.RestContextBuilder;
-import org.jclouds.rest.RestContextFactory;
-import org.jclouds.rest.RestContextFactory.ContextSpec;
-
-import com.google.inject.Module;
-
-/**
- * Helper class to instantiate {@code ChefContext} instances.
- *
- * @author Adrian Cole
- */
-public class ChefContextFactory {
-
- private final RestContextFactory contextFactory;
-
- /**
- * Initializes with the default properties built-in to jclouds. This is
- * typically stored in the classpath resource {@code rest.properties}
- *
- * @see RestContextFactory#getPropertiesFromResource
- */
- public ChefContextFactory() {
- this(new RestContextFactory());
- }
-
- /**
- * Finds definitions in the specified properties.
- */
- public ChefContextFactory(Properties properties) {
- this(new RestContextFactory(properties));
- }
-
- /**
- *
- * Uses the supplied RestContextFactory to create {@link ChefContext}s
- */
- public ChefContextFactory(RestContextFactory restContextFactory) {
- this.contextFactory = restContextFactory;
- }
-
- public static ChefContext buildContextUnwrappingExceptions(RestContextBuilder builder) {
- try {
- return (ChefContext) builder.buildContext();
- } catch (Exception e) {
- return propagateAuthorizationOrOriginalException(e);
- }
- }
-
- /**
- * @see #createContext(String, String, String)
- */
- public ChefContext createContext(String identity, String credential) {
- return createContext("chef", identity, credential);
- }
-
- /**
- * @see RestContextFactory#createContextBuilder(String, String, String)
- */
- public ChefContext createContext(String provider, String identity, String credential) {
- RestContextBuilder, ?> builder = RestContextBuilder.class.cast(contextFactory.createContextBuilder(provider,
- identity, credential));
- return buildContextUnwrappingExceptions(builder);
- }
-
- /**
- * @see #createContext(String, Properties)
- */
- public ChefContext createContext(Properties overrides) {
- return createContext("chef", overrides);
- }
-
- /**
- * @see RestContextFactory#createContextBuilder(String, Properties)
- */
- public ChefContext createContext(String provider, Properties overrides) {
- RestContextBuilder, ?> builder = RestContextBuilder.class.cast(contextFactory.createContextBuilder(provider,
- overrides));
- return buildContextUnwrappingExceptions(builder);
- }
-
- /**
- * @see #createContext(String, Iterable, Properties)
- */
- public ChefContext createContext(Iterable extends Module> modules, Properties overrides) {
- return createContext("chef", modules, overrides);
- }
-
- /**
- * @see RestContextFactory#createContextBuilder(String, Iterable, Properties)
- */
- public ChefContext createContext(String provider, Iterable extends Module> modules, Properties overrides) {
- RestContextBuilder, ?> builder = RestContextBuilder.class.cast(contextFactory.createContextBuilder(provider,
- modules, overrides));
- return buildContextUnwrappingExceptions(builder);
- }
-
- /**
- * @see #createContext(String,String,String,Iterable)
- */
- public ChefContext createContext(@Nullable String identity, @Nullable String credential,
- Iterable extends Module> modules) {
- return createContext("chef", identity, credential, modules);
- }
-
- /**
- * @see RestContextFactory#createContextBuilder(String,String String,
- * Iterable)
- */
- public ChefContext createContext(String provider, @Nullable String identity, @Nullable String credential,
- Iterable extends Module> modules) {
- RestContextBuilder, ?> builder = RestContextBuilder.class.cast(contextFactory.createContextBuilder(provider,
- identity, credential, modules));
- return buildContextUnwrappingExceptions(builder);
- }
-
- /**
- * @see #createContext(String,String, String, Iterable, Properties)
- */
- public ChefContext createContext(@Nullable String identity, @Nullable String credential,
- Iterable extends Module> modules, Properties overrides) {
- return createContext("chef", identity, credential, modules, overrides);
- }
-
- /**
- * @see RestContextFactory#createContextBuilder(String,String,String,
- * Iterable, Properties)
- */
- public ChefContext createContext(String provider, @Nullable String identity, @Nullable String credential,
- Iterable extends Module> modules, Properties overrides) {
- RestContextBuilder, ?> builder = RestContextBuilder.class.cast(contextFactory.createContextBuilder(provider,
- identity, credential, modules, overrides));
- return buildContextUnwrappingExceptions(builder);
- }
-
- /**
- * @see RestContextFactory#createContextBuilder(ContextSpec)
- */
- public ChefContext createContext(ContextSpec contextSpec) {
- RestContextBuilder, ?> builder = RestContextBuilder.class.cast(createContextBuilder(contextSpec));
- return buildContextUnwrappingExceptions(builder);
-
- }
-
- /**
- * @see RestContextFactory#createContextBuilder(ContextSpec, Properties)
- */
- public ChefContext createContext(ContextSpec contextSpec, Properties overrides) {
- RestContextBuilder, ?> builder = RestContextBuilder.class.cast(createContextBuilder(contextSpec, overrides));
- return buildContextUnwrappingExceptions(builder);
- }
-
-}
\ No newline at end of file
diff --git a/chef/core/src/main/java/org/jclouds/chef/ChefPropertiesBuilder.java b/chef/core/src/main/java/org/jclouds/chef/ChefPropertiesBuilder.java
deleted file mode 100644
index 644842704a..0000000000
--- a/chef/core/src/main/java/org/jclouds/chef/ChefPropertiesBuilder.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- *
- * Copyright (C) 2010 Cloud Conscious, LLC.
- *
- * ====================================================================
- * Licensed 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;
-
-import static org.jclouds.Constants.PROPERTY_ENDPOINT;
-
-import java.util.Properties;
-
-import org.jclouds.chef.internal.BaseChefPropertiesBuilder;
-
-/**
- * Builds properties used in Chef Clients
- *
- * @author Adrian Cole
- */
-public class ChefPropertiesBuilder extends BaseChefPropertiesBuilder {
- @Override
- protected Properties defaultProperties() {
- Properties properties = super.defaultProperties();
- properties.setProperty(PROPERTY_ENDPOINT, "http://localhost:4000");
- return properties;
- }
-
- public ChefPropertiesBuilder(Properties properties) {
- super(properties);
- }
-
-}
diff --git a/chef/core/src/main/java/org/jclouds/chef/ChefService.java b/chef/core/src/main/java/org/jclouds/chef/ChefService.java
deleted file mode 100644
index 12c968daec..0000000000
--- a/chef/core/src/main/java/org/jclouds/chef/ChefService.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- *
- * Copyright (C) 2010 Cloud Conscious, LLC.
- *
- * ====================================================================
- * Licensed 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;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
-
-import org.jclouds.chef.domain.Client;
-import org.jclouds.chef.domain.CookbookVersion;
-import org.jclouds.chef.domain.Node;
-import org.jclouds.chef.internal.BaseChefService;
-import org.jclouds.io.Payload;
-
-import com.google.common.base.Predicate;
-import com.google.common.io.InputSupplier;
-import com.google.inject.ImplementedBy;
-
-/**
- * Provides high level chef operations
- *
- * @author Adrian Cole
- */
-@ImplementedBy(BaseChefService.class)
-public interface ChefService {
- /**
- * @return a reference to the context that created this.
- */
- ChefContext getContext();
-
- byte[] encrypt(InputSupplier extends InputStream> supplier) throws IOException;
-
- byte[] decrypt(InputSupplier extends InputStream> supplier) throws IOException;
-
- void cleanupStaleNodesAndClients(String prefix, int secondsStale);
-
- /**
- *
- * @param nodeName
- * @param runList
- * @return node sent to the server containing the automatic attributes
- */
- Node createNodeAndPopulateAutomaticAttributes(String nodeName, Iterable runList);
-
- /**
- * Creates all steps necessary to bootstrap and run the chef client.
- *
- * @param tag
- * corresponds to a configured
- * {@link org.jclouds.chef.reference.ChefConstants#CHEF_BOOTSTRAP_DATABAG databag}
- * where run_list and other information are stored
- * @return boot script
- * @see #updateRunListForTag
- */
- Payload createClientAndBootstrapScriptForTag(String tag);
-
- /**
- * assigns a run list to all nodes bootstrapped with a certain tag
- *
- * @param runList
- * list of recipes or roles to assign. syntax is {@code recipe[name]} and {@code
- * role[name]}
- *
- * @param tag
- * corresponds to a configured
- * {@link org.jclouds.chef.reference.ChefConstants#CHEF_BOOTSTRAP_DATABAG databag}
- * where run_list and other information are stored
- * @see #makeChefClientBootstrapScriptForTag
- */
- void updateRunListForTag(Iterable runList, String tag);
-
- /**
- * @param tag
- * corresponds to a configured
- * {@link org.jclouds.chef.reference.ChefConstants#CHEF_BOOTSTRAP_DATABAG databag}
- * where run_list and other information are stored
- * @return run list for all nodes bootstrapped with a certain tag
- * @see #updateRunListForTag
- */
- List getRunListForTag(String tag);
-
- void deleteAllNodesInList(Iterable names);
-
- Iterable extends Node> listNodes();
-
- Iterable extends Node> listNodesMatching(Predicate nodeNameSelector);
-
- Iterable extends Node> listNodesNamed(Iterable names);
-
- void deleteAllClientsInList(Iterable names);
-
- Iterable extends Client> listClientsDetails();
-
- Iterable extends Client> listClientsDetailsMatching(Predicate clientNameSelector);
-
- Iterable extends Client> listClientsNamed(Iterable names);
-
- Iterable extends CookbookVersion> listCookbookVersions();
-
- Iterable extends CookbookVersion> listCookbookVersionsMatching(Predicate cookbookNameSelector);
-
- Iterable extends CookbookVersion> listCookbookVersionsNamed(Iterable cookbookNames);
-
- void updateAutomaticAttributesOnNode(String nodeName);
-}
diff --git a/chef/core/src/main/java/org/jclouds/chef/binders/BindChecksumsToJsonPayload.java b/chef/core/src/main/java/org/jclouds/chef/binders/BindChecksumsToJsonPayload.java
deleted file mode 100644
index 6952bb2e1b..0000000000
--- a/chef/core/src/main/java/org/jclouds/chef/binders/BindChecksumsToJsonPayload.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- *
- * Copyright (C) 2010 Cloud Conscious, LLC.
- *
- * ====================================================================
- * Licensed 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.binders;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.util.List;
-import java.util.Set;
-
-import javax.inject.Singleton;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.crypto.CryptoStreams;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.rest.binders.BindToStringPayload;
-
-import com.google.common.primitives.Bytes;
-
-/**
- *
- *
- * @author Adrian Cole
- */
-@Singleton
-public class BindChecksumsToJsonPayload extends BindToStringPayload {
-
- @SuppressWarnings("unchecked")
- public void bindToRequest(HttpRequest request, Object input) {
- checkArgument(checkNotNull(input, "input") instanceof Set, "this binder is only valid for Set!");
-
- Set> md5s = (Set>) input;
-
- StringBuilder builder = new StringBuilder();
- builder.append("{\"checksums\":{");
-
- for (List md5 : md5s)
- builder.append(String.format("\"%s\":null,", CryptoStreams.hex(Bytes.toArray(md5))));
- builder.deleteCharAt(builder.length() - 1);
- builder.append("}}");
- super.bindToRequest(request, builder.toString());
- request.getPayload().setContentType(MediaType.APPLICATION_JSON);
- }
-
-}
\ No newline at end of file
diff --git a/chef/core/src/main/java/org/jclouds/chef/binders/BindClientnameToJsonPayload.java b/chef/core/src/main/java/org/jclouds/chef/binders/BindClientnameToJsonPayload.java
deleted file mode 100644
index 9588585117..0000000000
--- a/chef/core/src/main/java/org/jclouds/chef/binders/BindClientnameToJsonPayload.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- *
- * Copyright (C) 2010 Cloud Conscious, LLC.
- *
- * ====================================================================
- * Licensed 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.binders;
-
-import javax.inject.Singleton;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.http.HttpRequest;
-import org.jclouds.rest.binders.BindToStringPayload;
-
-/**
- *
- * @author Adrian Cole
- *
- */
-@Singleton
-public class BindClientnameToJsonPayload extends BindToStringPayload {
-
- @Override
- public void bindToRequest(HttpRequest request, Object payload) {
- super.bindToRequest(request, String.format("{\"clientname\":\"%s\"}", payload));
- request.getPayload().setContentType(MediaType.APPLICATION_JSON);
- }
-
-}
diff --git a/chef/core/src/main/java/org/jclouds/chef/binders/BindGenerateKeyForClientToJsonPayload.java b/chef/core/src/main/java/org/jclouds/chef/binders/BindGenerateKeyForClientToJsonPayload.java
deleted file mode 100644
index 349813051a..0000000000
--- a/chef/core/src/main/java/org/jclouds/chef/binders/BindGenerateKeyForClientToJsonPayload.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- *
- * Copyright (C) 2010 Cloud Conscious, LLC.
- *
- * ====================================================================
- * Licensed 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.binders;
-
-import javax.inject.Singleton;
-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 {
-
- @Override
- public void bindToRequest(HttpRequest request, Object payload) {
- super.bindToRequest(request, String.format("{\"clientname\":\"%s\", \"private_key\": true}",
- payload));
- request.getPayload().setContentType(MediaType.APPLICATION_JSON);
- }
-
-}
diff --git a/chef/core/src/main/java/org/jclouds/chef/binders/BindIsCompletedToJsonPayload.java b/chef/core/src/main/java/org/jclouds/chef/binders/BindIsCompletedToJsonPayload.java
deleted file mode 100644
index 7a15928040..0000000000
--- a/chef/core/src/main/java/org/jclouds/chef/binders/BindIsCompletedToJsonPayload.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- *
- * Copyright (C) 2010 Cloud Conscious, LLC.
- *
- * ====================================================================
- * Licensed 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.binders;
-
-import javax.inject.Singleton;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.http.HttpRequest;
-import org.jclouds.rest.binders.BindToStringPayload;
-
-/**
- *
- * @author Adrian Cole
- *
- */
-@Singleton
-public class BindIsCompletedToJsonPayload extends BindToStringPayload {
-
- @Override
- public void bindToRequest(HttpRequest request, Object value) {
- super.bindToRequest(request, String.format("{\"is_completed\":\"%s\"}", value));
- request.getPayload().setContentType(MediaType.APPLICATION_JSON);
- }
-
-}
diff --git a/chef/core/src/main/java/org/jclouds/chef/binders/BindNameToJsonPayload.java b/chef/core/src/main/java/org/jclouds/chef/binders/BindNameToJsonPayload.java
deleted file mode 100644
index 6d05e520dc..0000000000
--- a/chef/core/src/main/java/org/jclouds/chef/binders/BindNameToJsonPayload.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- *
- * Copyright (C) 2010 Cloud Conscious, LLC.
- *
- * ====================================================================
- * Licensed 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.binders;
-
-import javax.inject.Singleton;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.http.HttpRequest;
-import org.jclouds.rest.binders.BindToStringPayload;
-
-/**
- *
- * @author Adrian Cole
- *
- */
-@Singleton
-public class BindNameToJsonPayload extends BindToStringPayload {
-
- @Override
- public void bindToRequest(HttpRequest request, Object payload) {
- super.bindToRequest(request, String.format("{\"name\":\"%s\"}", payload));
- request.getPayload().setContentType(MediaType.APPLICATION_JSON);
- }
-
-}
diff --git a/chef/core/src/main/java/org/jclouds/chef/binders/DatabagItemId.java b/chef/core/src/main/java/org/jclouds/chef/binders/DatabagItemId.java
deleted file mode 100644
index 3f4383a530..0000000000
--- a/chef/core/src/main/java/org/jclouds/chef/binders/DatabagItemId.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- *
- * Copyright (C) 2010 Cloud Conscious, LLC.
- *
- * ====================================================================
- * Licensed 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.binders;
-
-import javax.inject.Singleton;
-
-import org.jclouds.chef.domain.DatabagItem;
-
-import com.google.common.base.Function;
-
-/**
- *
- * @author Adrian Cole
- */
-@Singleton
-public class DatabagItemId implements Function