JCLOUDS-246: Joined Hosted and Private Chef apis
Joined Hosted and Private Chef apis and renamed the provider
to Enterprise Chef.
diff --git a/README.md b/README.md
index bceec3e..ed2c40e 100644
--- a/README.md
+++ b/README.md
@@ -1,23 +1,18 @@
jclouds Chef
============
-[![Build Status](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-chef/badge/icon)](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-chef/)
+[![Build Status](https://jclouds.ci.cloudbees.com/buildStatus/icon?job=jclouds-chef)](https://jclouds.ci.cloudbees.com/job/jclouds-chef/)
This is the jclouds Chef api. It provides access to the different flavours of the Chef server api:
* [Chef community](http://www.opscode.com/chef/)
-* [Hosted Chef](http://www.opscode.com/hosted-chef/)
-* [Private Chef](http://www.opscode.com/private-chef/)
+* [Enterprise Chef](http://www.opscode.com/enterprise-chef/)
It currently supports versions **0.9** and **0.10** of the standard Chef server apis, and an initial
-and very basic (still in progress) implementation of the user and organization api of the Hosted and
-Private Chef flavours.
+and very basic (still in progress) implementation of the user and organization api of the Enterprise Chef.
Also provides a set of utility methods to combine Chef features with the jclouds Compute service, allowing
users to customize the bootstrap process and manage the configuration of the deployed nodes.
-Documentation
-=============
-
You will find all documentation in www.jclouds.org
diff --git a/labs/hostedchef/pom.xml b/enterprise/pom.xml
similarity index 66%
rename from labs/hostedchef/pom.xml
rename to enterprise/pom.xml
index 0bb6df4..849c9b6 100644
--- a/labs/hostedchef/pom.xml
+++ b/enterprise/pom.xml
@@ -23,21 +23,21 @@
<groupId>org.apache.jclouds.chef</groupId>
<artifactId>chef-project</artifactId>
<version>1.7.0-SNAPSHOT</version>
- <relativePath>../../project/pom.xml</relativePath>
+ <relativePath>../project/pom.xml</relativePath>
</parent>
- <groupId>org.apache.jclouds.labs</groupId>
- <artifactId>hostedchef</artifactId>
- <name>Apache jclouds Chef :: Hosted Chef</name>
- <description>jclouds components to access Hosted Chef</description>
+ <groupId>org.apache.jclouds.provider</groupId>
+ <artifactId>enterprisechef</artifactId>
+ <name>Apache jclouds Chef :: Enterprise</name>
+ <description>jclouds components to access Enterprise Chef</description>
<properties>
- <test.hostedchef.org>YOUR_ORG</test.hostedchef.org>
- <test.hostedchef.endpoint>https://api.opscode.com/organizations/${test.hostedchef.org}</test.hostedchef.endpoint>
- <test.hostedchef.api-version />
- <test.hostedchef.build-version />
- <test.hostedchef.identity>YOUR_USER</test.hostedchef.identity>
- <test.hostedchef.credential>${user.home}/.chef/${test.hostedchef.org}/${test.hostedchef.identity}.pem</test.hostedchef.credential>
- <jclouds.osgi.export>org.jclouds.hostedchef*;version="${project.version}"</jclouds.osgi.export>
+ <test.enterprisechef.org>YOUR_ORG</test.enterprisechef.org>
+ <test.enterprisechef.endpoint>https://api.opscode.com/organizations/${test.enterprisechef.org}</test.enterprisechef.endpoint>
+ <test.enterprisechef.api-version />
+ <test.enterprisechef.build-version />
+ <test.enterprisechef.identity>YOUR_USER</test.enterprisechef.identity>
+ <test.enterprisechef.credential>${user.home}/.chef/${test.enterprisechef.org}/${test.enterprisechef.identity}.pem</test.enterprisechef.credential>
+ <jclouds.osgi.export>org.jclouds.enterprisechef*;version="${project.version}"</jclouds.osgi.export>
<jclouds.osgi.import>org.jclouds*;version="${jclouds.version}",*</jclouds.osgi.import>
</properties>
@@ -92,12 +92,12 @@
</goals>
<configuration>
<systemPropertyVariables>
- <test.hostedchef.org>${test.hostedchef.org}</test.hostedchef.org>
- <test.hostedchef.endpoint>${test.hostedchef.endpoint}</test.hostedchef.endpoint>
- <test.hostedchef.api-version>${test.hostedchef.api-version}</test.hostedchef.api-version>
- <test.hostedchef.build-version>${test.hostedchef.build-version}</test.hostedchef.build-version>
- <test.hostedchef.identity>${test.hostedchef.identity}</test.hostedchef.identity>
- <test.hostedchef.credential>${test.hostedchef.credential}</test.hostedchef.credential>
+ <test.enterprisechef.org>${test.enterprisechef.org}</test.enterprisechef.org>
+ <test.enterprisechef.endpoint>${test.enterprisechef.endpoint}</test.enterprisechef.endpoint>
+ <test.enterprisechef.api-version>${test.enterprisechef.api-version}</test.enterprisechef.api-version>
+ <test.enterprisechef.build-version>${test.enterprisechef.build-version}</test.enterprisechef.build-version>
+ <test.enterprisechef.identity>${test.enterprisechef.identity}</test.enterprisechef.identity>
+ <test.enterprisechef.credential>${test.enterprisechef.credential}</test.enterprisechef.credential>
</systemPropertyVariables>
</configuration>
</execution>
diff --git a/enterprise/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApi.java b/enterprise/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApi.java
new file mode 100644
index 0000000..04a7dda
--- /dev/null
+++ b/enterprise/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApi.java
@@ -0,0 +1,141 @@
+/*
+ * 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.enterprisechef;
+
+import java.util.Set;
+
+import javax.inject.Named;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+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.Constants;
+import org.jclouds.Fallbacks.FalseOnNotFoundOr404;
+import org.jclouds.Fallbacks.NullOnNotFoundOr404;
+import org.jclouds.chef.ChefApi;
+import org.jclouds.chef.filters.SignedHeaderAuth;
+import org.jclouds.chef.functions.ParseKeySetFromJson;
+import org.jclouds.enterprisechef.binders.BindGroupNameToJsonPayload;
+import org.jclouds.enterprisechef.binders.BindGroupToUpdateRequestJsonPayload;
+import org.jclouds.enterprisechef.binders.GroupName;
+import org.jclouds.enterprisechef.domain.Group;
+import org.jclouds.enterprisechef.domain.User;
+import org.jclouds.rest.annotations.BinderParam;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.Headers;
+import org.jclouds.rest.annotations.ParamParser;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.ResponseParser;
+
+/**
+ * Provides synchronous access to the Enterprise Chef Api.
+ *
+ * @author Ignasi Barrera
+ */
+@RequestFilters(SignedHeaderAuth.class)
+@Consumes(MediaType.APPLICATION_JSON)
+@Headers(keys = "X-Chef-Version", values = "{" + Constants.PROPERTY_API_VERSION + "}")
+public interface EnterpriseChefApi extends ChefApi
+{
+
+ /**
+ * Check if there exists a node with the given name.
+ *
+ * @return <code>true</code> if the specified node name exists.
+ */
+ @Override
+ // Use get instead of HEAD
+ @Named("node:exists")
+ @GET
+ @Path("/nodes/{nodename}")
+ @Fallback(FalseOnNotFoundOr404.class)
+ boolean nodeExists(@PathParam("nodename") String nodename);
+
+ /**
+ * Retrieves an existing user.
+ *
+ * @param name The name of the user to get.
+ * @return The details of the user or <code>null</code> if not found.
+ */
+ @Named("user:get")
+ @GET
+ @Path("/users/{name}")
+ @Fallback(NullOnNotFoundOr404.class)
+ User getUser(@PathParam("name") String name);
+
+ /**
+ * List all existing groups.
+ *
+ * @return The list of groups.
+ */
+ @Named("group:list")
+ @GET
+ @Path("/groups")
+ @ResponseParser(ParseKeySetFromJson.class)
+ Set<String> listGroups();
+
+ /**
+ * Retrieves an existing group.
+ *
+ * @param name The name of the group to get.
+ * @return The details of the group or <code>null</code> if not found.
+ */
+ @Named("group:get")
+ @GET
+ @Path("/groups/{name}")
+ @Fallback(NullOnNotFoundOr404.class)
+ Group getGroup(@PathParam("name") String name);
+
+ /**
+ * Creates a new group.
+ *
+ * @param name The name of the group to create.
+ */
+ @Named("group:create")
+ @POST
+ @Path("/groups")
+ void createGroup(@BinderParam(BindGroupNameToJsonPayload.class) String name);
+
+ /**
+ * Updates a group.
+ * <p>
+ * This method can be used to add actors (clients, groups) to the group.
+ *
+ * @param group The group with the updated information.
+ */
+ @Named("group:update")
+ @PUT
+ @Path("/groups/{name}")
+ void updateGroup(
+ @PathParam("name") @ParamParser(GroupName.class) @BinderParam(BindGroupToUpdateRequestJsonPayload.class) Group group);
+
+ /**
+ * Deletes a group.
+ *
+ * @param name The name of the group to delete.
+ */
+ @Named("group:delete")
+ @DELETE
+ @Path("/groups/{name}")
+ void deleteGroup(@PathParam("name") String name);
+
+}
diff --git a/labs/hostedchef/src/main/java/org/jclouds/hostedchef/HostedChefApiMetadata.java b/enterprise/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java
similarity index 74%
rename from labs/hostedchef/src/main/java/org/jclouds/hostedchef/HostedChefApiMetadata.java
rename to enterprise/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java
index 50f0b1a..5251209 100644
--- a/labs/hostedchef/src/main/java/org/jclouds/hostedchef/HostedChefApiMetadata.java
+++ b/enterprise/src/main/java/org/jclouds/enterprisechef/EnterpriseChefApiMetadata.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.jclouds.hostedchef;
+package org.jclouds.enterprisechef;
import java.net.URI;
import java.util.Properties;
@@ -25,7 +25,7 @@
import org.jclouds.chef.ChefContext;
import org.jclouds.chef.config.ChefBootstrapModule;
import org.jclouds.chef.config.ChefParserModule;
-import org.jclouds.hostedchef.config.HostedChefHttpApiModule;
+import org.jclouds.enterprisechef.config.EnterpriseChefHttpApiModule;
import org.jclouds.ohai.config.JMXOhaiModule;
import org.jclouds.rest.internal.BaseHttpApiMetadata;
@@ -33,22 +33,22 @@
import com.google.inject.Module;
/**
- * Implementation of {@link ApiMetadata} for Hosted Chef api.
+ * Implementation of {@link ApiMetadata} for the Enterprise Chef api.
*
* @author Adrian Cole
*/
-public class HostedChefApiMetadata extends BaseHttpApiMetadata<HostedChefApi> {
+public class EnterpriseChefApiMetadata extends BaseHttpApiMetadata<EnterpriseChefApi> {
@Override
public Builder toBuilder() {
return new Builder().fromApiMetadata(this);
}
- public HostedChefApiMetadata() {
+ public EnterpriseChefApiMetadata() {
this(new Builder());
}
- protected HostedChefApiMetadata(Builder builder) {
+ protected EnterpriseChefApiMetadata(Builder builder) {
super(builder);
}
@@ -56,26 +56,26 @@
return ChefApiMetadata.defaultProperties();
}
- public static class Builder extends BaseHttpApiMetadata.Builder<HostedChefApi, Builder> {
+ public static class Builder extends BaseHttpApiMetadata.Builder<EnterpriseChefApi, Builder> {
protected Builder() {
- id("hostedchef")
- .name("Hosted Chef Api")
+ id("enterprisechef")
+ .name("Enterprise Chef Api")
.identityName("User")
.credentialName("Certificate")
.version(ChefApi.VERSION)
.documentation(URI.create("http://www.opscode.com/support"))
.defaultEndpoint("https://api.opscode.com")
.view(ChefContext.class)
- .defaultProperties(HostedChefApiMetadata.defaultProperties())
+ .defaultProperties(EnterpriseChefApiMetadata.defaultProperties())
.defaultModules(
- ImmutableSet.<Class<? extends Module>> of(HostedChefHttpApiModule.class,
+ ImmutableSet.<Class<? extends Module>> of(EnterpriseChefHttpApiModule.class,
ChefParserModule.class, ChefBootstrapModule.class, JMXOhaiModule.class));
}
@Override
- public HostedChefApiMetadata build() {
- return new HostedChefApiMetadata(this);
+ public EnterpriseChefApiMetadata build() {
+ return new EnterpriseChefApiMetadata(this);
}
@Override
diff --git a/enterprise/src/main/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadata.java b/enterprise/src/main/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadata.java
new file mode 100644
index 0000000..89c6db8
--- /dev/null
+++ b/enterprise/src/main/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadata.java
@@ -0,0 +1,88 @@
+/*
+ * 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.enterprisechef;
+
+import java.net.URI;
+import java.util.Properties;
+
+import org.jclouds.providers.ProviderMetadata;
+import org.jclouds.providers.internal.BaseProviderMetadata;
+
+/**
+ * Implementation of @ link org.jclouds.types.ProviderMetadata} for Enterprise Chef
+ *
+ * @author Adrian Cole
+ */
+public class EnterpriseChefProviderMetadata extends BaseProviderMetadata
+{
+
+ public static Builder builder()
+ {
+ return new Builder();
+ }
+
+ @Override
+ public Builder toBuilder()
+ {
+ return builder().fromProviderMetadata(this);
+ }
+
+ public EnterpriseChefProviderMetadata()
+ {
+ super(builder());
+ }
+
+ public EnterpriseChefProviderMetadata(Builder builder)
+ {
+ super(builder);
+ }
+
+ public static Properties defaultProperties()
+ {
+ Properties properties = new Properties();
+ return properties;
+ }
+
+ public static class Builder extends BaseProviderMetadata.Builder
+ {
+
+ protected Builder()
+ {
+ id("enterprisechef") //
+ .name("OpsCode Enterprise Chef") //
+ .endpoint("https://api.opscode.com") //
+ .homepage(URI.create("https://manage.opscode.com")) //
+ .console(URI.create("https://manage.opscode.com")) //
+ .apiMetadata(new EnterpriseChefApiMetadata()) //
+ .defaultProperties(EnterpriseChefProviderMetadata.defaultProperties());
+ }
+
+ @Override
+ public EnterpriseChefProviderMetadata build()
+ {
+ return new EnterpriseChefProviderMetadata(this);
+ }
+
+ @Override
+ public Builder fromProviderMetadata(ProviderMetadata in)
+ {
+ super.fromProviderMetadata(in);
+ return this;
+ }
+
+ }
+}
diff --git a/labs/hostedchef/src/main/java/org/jclouds/hostedchef/binders/BindGroupNameToJsonPayload.java b/enterprise/src/main/java/org/jclouds/enterprisechef/binders/BindGroupNameToJsonPayload.java
similarity index 96%
rename from labs/hostedchef/src/main/java/org/jclouds/hostedchef/binders/BindGroupNameToJsonPayload.java
rename to enterprise/src/main/java/org/jclouds/enterprisechef/binders/BindGroupNameToJsonPayload.java
index d8c25e8..47f1a9a 100644
--- a/labs/hostedchef/src/main/java/org/jclouds/hostedchef/binders/BindGroupNameToJsonPayload.java
+++ b/enterprise/src/main/java/org/jclouds/enterprisechef/binders/BindGroupNameToJsonPayload.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.jclouds.hostedchef.binders;
+package org.jclouds.enterprisechef.binders;
import static com.google.common.base.Preconditions.checkNotNull;
diff --git a/labs/hostedchef/src/main/java/org/jclouds/hostedchef/binders/BindGroupToUpdateRequestJsonPayload.java b/enterprise/src/main/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayload.java
similarity index 95%
rename from labs/hostedchef/src/main/java/org/jclouds/hostedchef/binders/BindGroupToUpdateRequestJsonPayload.java
rename to enterprise/src/main/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayload.java
index 8d832be..0b24341 100644
--- a/labs/hostedchef/src/main/java/org/jclouds/hostedchef/binders/BindGroupToUpdateRequestJsonPayload.java
+++ b/enterprise/src/main/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayload.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.jclouds.hostedchef.binders;
+package org.jclouds.enterprisechef.binders;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
@@ -24,13 +24,13 @@
import javax.inject.Inject;
import javax.inject.Singleton;
-import org.jclouds.hostedchef.domain.Group;
+import org.jclouds.enterprisechef.domain.Group;
import org.jclouds.http.HttpRequest;
import org.jclouds.json.Json;
import org.jclouds.rest.binders.BindToJsonPayload;
/**
- * Binds a group to the payload expected for the Put method in the Hosted Chef
+ * Binds a group to the payload expected for the Put method in the Enterprise Chef
* Api.
*
* @author Ignasi Barrera
diff --git a/labs/hostedchef/src/main/java/org/jclouds/hostedchef/binders/GroupName.java b/enterprise/src/main/java/org/jclouds/enterprisechef/binders/GroupName.java
similarity index 92%
rename from labs/hostedchef/src/main/java/org/jclouds/hostedchef/binders/GroupName.java
rename to enterprise/src/main/java/org/jclouds/enterprisechef/binders/GroupName.java
index a62ab86..ec79567 100644
--- a/labs/hostedchef/src/main/java/org/jclouds/hostedchef/binders/GroupName.java
+++ b/enterprise/src/main/java/org/jclouds/enterprisechef/binders/GroupName.java
@@ -14,13 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.jclouds.hostedchef.binders;
+package org.jclouds.enterprisechef.binders;
import static com.google.common.base.Preconditions.checkNotNull;
import javax.inject.Singleton;
-import org.jclouds.hostedchef.domain.Group;
+import org.jclouds.enterprisechef.domain.Group;
import com.google.common.base.Function;
diff --git a/labs/privatechef/src/main/java/org/jclouds/privatechef/config/PrivateChefHttpApiModule.java b/enterprise/src/main/java/org/jclouds/enterprisechef/config/EnterpriseChefHttpApiModule.java
similarity index 78%
rename from labs/privatechef/src/main/java/org/jclouds/privatechef/config/PrivateChefHttpApiModule.java
rename to enterprise/src/main/java/org/jclouds/enterprisechef/config/EnterpriseChefHttpApiModule.java
index 344a5ac..d1e16c7 100644
--- a/labs/privatechef/src/main/java/org/jclouds/privatechef/config/PrivateChefHttpApiModule.java
+++ b/enterprise/src/main/java/org/jclouds/enterprisechef/config/EnterpriseChefHttpApiModule.java
@@ -14,25 +14,25 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.jclouds.privatechef.config;
+package org.jclouds.enterprisechef.config;
import org.jclouds.chef.ChefApi;
import org.jclouds.chef.config.BaseChefHttpApiModule;
-import org.jclouds.privatechef.PrivateChefApi;
+import org.jclouds.enterprisechef.EnterpriseChefApi;
import org.jclouds.rest.ConfiguresHttpApi;
/**
- * Configures the Private Chef connection.
+ * Configures the Enterprise Chef connection.
*
* @author Ignasi Barrera
*/
@ConfiguresHttpApi
-public class PrivateChefHttpApiModule extends BaseChefHttpApiModule<PrivateChefApi> {
+public class EnterpriseChefHttpApiModule extends BaseChefHttpApiModule<EnterpriseChefApi> {
@Override
protected void configure() {
super.configure();
- bind(ChefApi.class).to(PrivateChefApi.class);
+ bind(ChefApi.class).to(EnterpriseChefApi.class);
}
}
diff --git a/labs/hostedchef/src/main/java/org/jclouds/hostedchef/domain/Group.java b/enterprise/src/main/java/org/jclouds/enterprisechef/domain/Group.java
similarity index 98%
rename from labs/hostedchef/src/main/java/org/jclouds/hostedchef/domain/Group.java
rename to enterprise/src/main/java/org/jclouds/enterprisechef/domain/Group.java
index 18f9983..056acf4 100644
--- a/labs/hostedchef/src/main/java/org/jclouds/hostedchef/domain/Group.java
+++ b/enterprise/src/main/java/org/jclouds/enterprisechef/domain/Group.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.jclouds.hostedchef.domain;
+package org.jclouds.enterprisechef.domain;
import static com.google.common.base.Preconditions.checkNotNull;
diff --git a/labs/hostedchef/src/main/java/org/jclouds/hostedchef/domain/User.java b/enterprise/src/main/java/org/jclouds/enterprisechef/domain/User.java
similarity index 96%
rename from labs/hostedchef/src/main/java/org/jclouds/hostedchef/domain/User.java
rename to enterprise/src/main/java/org/jclouds/enterprisechef/domain/User.java
index 6e87e6d..247d1a8 100644
--- a/labs/hostedchef/src/main/java/org/jclouds/hostedchef/domain/User.java
+++ b/enterprise/src/main/java/org/jclouds/enterprisechef/domain/User.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.jclouds.hostedchef.domain;
+package org.jclouds.enterprisechef.domain;
import java.security.PublicKey;
@@ -39,7 +39,7 @@
@SerializedName("public_key")
private PublicKey publicKey;
- // In Hosted Chef users cannot be manually created.
+ // TODO: Add a constructor to allow creating users. Need an Enterprise Chef instance!
// Only for deserialization
User() {
diff --git a/enterprise/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/enterprise/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata
new file mode 100644
index 0000000..7861cbb
--- /dev/null
+++ b/enterprise/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata
@@ -0,0 +1 @@
+org.jclouds.enterprisechef.EnterpriseChefProviderMetadata
diff --git a/labs/hostedchef/src/test/java/org/jclouds/hostedchef/HostedChefApiExpectTest.java b/enterprise/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java
similarity index 82%
rename from labs/hostedchef/src/test/java/org/jclouds/hostedchef/HostedChefApiExpectTest.java
rename to enterprise/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java
index d1d68ec..e859dc2 100644
--- a/labs/hostedchef/src/test/java/org/jclouds/hostedchef/HostedChefApiExpectTest.java
+++ b/enterprise/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiExpectTest.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.jclouds.hostedchef;
+package org.jclouds.enterprisechef;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNull;
@@ -27,9 +27,11 @@
import org.jclouds.chef.BaseChefApiExpectTest;
import org.jclouds.chef.ChefApi;
import org.jclouds.date.TimeStamp;
-import org.jclouds.hostedchef.config.HostedChefHttpApiModule;
-import org.jclouds.hostedchef.domain.Group;
-import org.jclouds.hostedchef.domain.User;
+import org.jclouds.enterprisechef.EnterpriseChefApi;
+import org.jclouds.enterprisechef.EnterpriseChefProviderMetadata;
+import org.jclouds.enterprisechef.config.EnterpriseChefHttpApiModule;
+import org.jclouds.enterprisechef.domain.Group;
+import org.jclouds.enterprisechef.domain.User;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.HttpResponse;
import org.jclouds.providers.ProviderMetadata;
@@ -42,18 +44,18 @@
import com.google.inject.Module;
/**
- * Expect tests for the {@link HostedChefApi} class.
+ * Expect tests for the {@link EnterpriseChefApi} class.
*
* @author Ignasi Barrera
*/
-@Test(groups = "unit", testName = "HostedChefApiExpectTest")
-public class HostedChefApiExpectTest extends BaseChefApiExpectTest<HostedChefApi> {
- public HostedChefApiExpectTest() {
- provider = "hostedchef";
+@Test(groups = "unit", testName = "EnterpriseChefApiExpectTest")
+public class EnterpriseChefApiExpectTest extends BaseChefApiExpectTest<EnterpriseChefApi> {
+ public EnterpriseChefApiExpectTest() {
+ provider = "enterprisechef";
}
public void testGetUserReturns2xx() {
- HostedChefApi api = requestSendsResponse(
+ EnterpriseChefApi api = requestSendsResponse(
signed(HttpRequest.builder() //
.method("GET") //
.endpoint("https://api.opscode.com/users/nacx") //
@@ -69,7 +71,7 @@
}
public void testGetUserReturns404() {
- HostedChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
+ EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
.method("GET") //
.endpoint("https://api.opscode.com/users/foo") //
.addHeader("X-Chef-Version", ChefApi.VERSION) //
@@ -81,7 +83,7 @@
}
public void testListGroups() {
- HostedChefApi api = requestSendsResponse(
+ EnterpriseChefApi api = requestSendsResponse(
signed(HttpRequest.builder() //
.method("GET") //
.endpoint("https://api.opscode.com/groups") //
@@ -97,7 +99,7 @@
}
public void testGetGroupReturns2xx() {
- HostedChefApi api = requestSendsResponse(
+ EnterpriseChefApi api = requestSendsResponse(
signed(HttpRequest.builder() //
.method("GET") //
.endpoint("https://api.opscode.com/groups/admins") //
@@ -113,7 +115,7 @@
}
public void testGetGroupReturns404() {
- HostedChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
+ EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
.method("GET") //
.endpoint("https://api.opscode.com/groups/foo") //
.addHeader("X-Chef-Version", ChefApi.VERSION) //
@@ -125,7 +127,7 @@
}
public void testCreateGroupReturns2xx() {
- HostedChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
+ EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
.method("POST") //
.endpoint("https://api.opscode.com/groups") //
.addHeader("X-Chef-Version", ChefApi.VERSION) //
@@ -138,7 +140,7 @@
}
public void testDeleteGroupReturns2xx() {
- HostedChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
+ EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
.method("DELETE") //
.endpoint("https://api.opscode.com/groups/foo") //
.addHeader("X-Chef-Version", ChefApi.VERSION) //
@@ -151,7 +153,7 @@
@Test(expectedExceptions = ResourceNotFoundException.class)
public void testDeleteGroupFailsOn404() {
- HostedChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
+ EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
.method("DELETE") //
.endpoint("https://api.opscode.com/groups/foo") //
.addHeader("X-Chef-Version", ChefApi.VERSION) //
@@ -163,7 +165,7 @@
}
public void testUpdateGroupReturns2xx() {
- HostedChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
+ EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
.method("PUT") //
.endpoint("https://api.opscode.com/groups/admins") //
.addHeader("X-Chef-Version", ChefApi.VERSION) //
@@ -182,7 +184,7 @@
@Test(expectedExceptions = ResourceNotFoundException.class)
public void testUpdateGroupFailsOn404() {
- HostedChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
+ EnterpriseChefApi api = requestSendsResponse(signed(HttpRequest.builder() //
.method("PUT") //
.endpoint("https://api.opscode.com/groups/admins") //
.addHeader("X-Chef-Version", ChefApi.VERSION) //
@@ -201,11 +203,11 @@
@Override
protected Module createModule() {
- return new TestHostedChefRestClientModule();
+ return new TestEnterpriseChefRestClientModule();
}
@ConfiguresRestClient
- static class TestHostedChefRestClientModule extends HostedChefHttpApiModule {
+ static class TestEnterpriseChefRestClientModule extends EnterpriseChefHttpApiModule {
@Override
protected String provideTimeStamp(@TimeStamp Supplier<String> cache) {
return "timestamp";
@@ -214,7 +216,7 @@
@Override
protected ProviderMetadata createProviderMetadata() {
- return new HostedChefProviderMetadata();
+ return new EnterpriseChefProviderMetadata();
}
}
diff --git a/labs/hostedchef/src/test/java/org/jclouds/hostedchef/HostedChefApiLiveTest.java b/enterprise/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiLiveTest.java
similarity index 84%
rename from labs/hostedchef/src/test/java/org/jclouds/hostedchef/HostedChefApiLiveTest.java
rename to enterprise/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiLiveTest.java
index d862943..576351a 100644
--- a/labs/hostedchef/src/test/java/org/jclouds/hostedchef/HostedChefApiLiveTest.java
+++ b/enterprise/src/test/java/org/jclouds/enterprisechef/EnterpriseChefApiLiveTest.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.jclouds.hostedchef;
+package org.jclouds.enterprisechef;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
@@ -26,33 +26,34 @@
import java.util.UUID;
import org.jclouds.chef.internal.BaseChefApiLiveTest;
-import org.jclouds.hostedchef.domain.Group;
-import org.jclouds.hostedchef.domain.User;
+import org.jclouds.enterprisechef.EnterpriseChefApi;
+import org.jclouds.enterprisechef.domain.Group;
+import org.jclouds.enterprisechef.domain.User;
import org.jclouds.rest.ResourceNotFoundException;
import org.testng.annotations.Test;
import com.google.common.collect.ImmutableSet;
/**
- * Tests behavior of the HostedChefApi.
+ * Tests behavior of the EnterpriseChefApi.
*
* @author Adrian Cole
*/
-@Test(groups = "live", singleThreaded = true, testName = "HostedChefApiLiveTest")
-public class HostedChefApiLiveTest extends BaseChefApiLiveTest<HostedChefApi> {
+@Test(groups = "live", singleThreaded = true, testName = "EnterpriseChefApiLiveTest")
+public class EnterpriseChefApiLiveTest extends BaseChefApiLiveTest<EnterpriseChefApi> {
private static final String GROUP_NAME = System.getProperty("user.name") + "-jcloudstest";
- private static final String ORG_NAME = System.getProperty("test.hostedchef.org");
+ private static final String ORG_NAME = System.getProperty("test.enterprisechef.org");
- public HostedChefApiLiveTest() {
- provider = "hostedchef";
+ public EnterpriseChefApiLiveTest() {
+ provider = "enterprisechef";
}
@Override
@Test
public void testSearchClientsWithOptions() throws Exception {
- // This test will fail because Hosted Chef does not index client name.
- // Once it is fixes, the test should suceed.
+ // This test will fail because Enterprise Chef does not index client name.
+ // Once it is fixes, the test should succeed.
// See: http://tickets.opscode.com/browse/CHEF-2477
super.testSearchClientsWithOptions();
}
diff --git a/labs/hostedchef/src/test/java/org/jclouds/hostedchef/HostedChefProviderMetadataTest.java b/enterprise/src/test/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadataTest.java
similarity index 64%
rename from labs/hostedchef/src/test/java/org/jclouds/hostedchef/HostedChefProviderMetadataTest.java
rename to enterprise/src/test/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadataTest.java
index c3653ab..0b7ddc3 100644
--- a/labs/hostedchef/src/test/java/org/jclouds/hostedchef/HostedChefProviderMetadataTest.java
+++ b/enterprise/src/test/java/org/jclouds/enterprisechef/EnterpriseChefProviderMetadataTest.java
@@ -14,21 +14,22 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.jclouds.hostedchef;
+package org.jclouds.enterprisechef;
+import org.jclouds.enterprisechef.EnterpriseChefApiMetadata;
+import org.jclouds.enterprisechef.EnterpriseChefProviderMetadata;
import org.jclouds.providers.internal.BaseProviderMetadataTest;
import org.testng.annotations.Test;
/**
- * The HostedChefProviderTest tests the org.jclouds.providers.HostedChefProvider
- * class.
+ * Unit tests for the {@link EnterpriseChefProviderMetadata} class.
*
* @author Adrian Cole
*/
-@Test(groups = "unit", testName = "HostedChefProviderTest")
-public class HostedChefProviderMetadataTest extends BaseProviderMetadataTest {
+@Test(groups = "unit", testName = "EnterpriseChefProviderTest")
+public class EnterpriseChefProviderMetadataTest extends BaseProviderMetadataTest {
- public HostedChefProviderMetadataTest() {
- super(new HostedChefProviderMetadata(), new HostedChefApiMetadata());
+ public EnterpriseChefProviderMetadataTest() {
+ super(new EnterpriseChefProviderMetadata(), new EnterpriseChefApiMetadata());
}
}
diff --git a/labs/hostedchef/src/test/java/org/jclouds/hostedchef/binders/BindGroupNameToJsonPayloadTest.java b/enterprise/src/test/java/org/jclouds/enterprisechef/binders/BindGroupNameToJsonPayloadTest.java
similarity index 94%
rename from labs/hostedchef/src/test/java/org/jclouds/hostedchef/binders/BindGroupNameToJsonPayloadTest.java
rename to enterprise/src/test/java/org/jclouds/enterprisechef/binders/BindGroupNameToJsonPayloadTest.java
index f810d75..4cb399f 100644
--- a/labs/hostedchef/src/test/java/org/jclouds/hostedchef/binders/BindGroupNameToJsonPayloadTest.java
+++ b/enterprise/src/test/java/org/jclouds/enterprisechef/binders/BindGroupNameToJsonPayloadTest.java
@@ -14,13 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.jclouds.hostedchef.binders;
+package org.jclouds.enterprisechef.binders;
import static org.testng.Assert.assertEquals;
import java.io.IOException;
import java.net.URI;
+import org.jclouds.enterprisechef.binders.BindGroupNameToJsonPayload;
import org.jclouds.http.HttpRequest;
import org.jclouds.util.Strings2;
import org.testng.annotations.Test;
diff --git a/labs/hostedchef/src/test/java/org/jclouds/hostedchef/binders/BindGroupToUpdateRequestJsonPayloadTest.java b/enterprise/src/test/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayloadTest.java
similarity index 95%
rename from labs/hostedchef/src/test/java/org/jclouds/hostedchef/binders/BindGroupToUpdateRequestJsonPayloadTest.java
rename to enterprise/src/test/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayloadTest.java
index 90bd846..90e84dd 100644
--- a/labs/hostedchef/src/test/java/org/jclouds/hostedchef/binders/BindGroupToUpdateRequestJsonPayloadTest.java
+++ b/enterprise/src/test/java/org/jclouds/enterprisechef/binders/BindGroupToUpdateRequestJsonPayloadTest.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.jclouds.hostedchef.binders;
+package org.jclouds.enterprisechef.binders;
import static org.testng.Assert.assertEquals;
@@ -23,7 +23,8 @@
import org.jclouds.chef.ChefApi;
import org.jclouds.chef.config.ChefParserModule;
-import org.jclouds.hostedchef.domain.Group;
+import org.jclouds.enterprisechef.binders.BindGroupToUpdateRequestJsonPayload;
+import org.jclouds.enterprisechef.domain.Group;
import org.jclouds.http.HttpRequest;
import org.jclouds.json.config.GsonModule;
import org.jclouds.rest.annotations.ApiVersion;
diff --git a/labs/hostedchef/src/test/java/org/jclouds/hostedchef/binders/GroupNameTest.java b/enterprise/src/test/java/org/jclouds/enterprisechef/binders/GroupNameTest.java
similarity index 89%
rename from labs/hostedchef/src/test/java/org/jclouds/hostedchef/binders/GroupNameTest.java
rename to enterprise/src/test/java/org/jclouds/enterprisechef/binders/GroupNameTest.java
index d457e3f..b93c68a 100644
--- a/labs/hostedchef/src/test/java/org/jclouds/hostedchef/binders/GroupNameTest.java
+++ b/enterprise/src/test/java/org/jclouds/enterprisechef/binders/GroupNameTest.java
@@ -14,13 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.jclouds.hostedchef.binders;
+package org.jclouds.enterprisechef.binders;
import static org.testng.Assert.assertEquals;
import java.io.IOException;
-import org.jclouds.hostedchef.domain.Group;
+import org.jclouds.enterprisechef.binders.GroupName;
+import org.jclouds.enterprisechef.domain.Group;
import org.testng.annotations.Test;
/**
diff --git a/labs/hostedchef/src/test/resources/group-update.json b/enterprise/src/test/resources/group-update.json
similarity index 100%
rename from labs/hostedchef/src/test/resources/group-update.json
rename to enterprise/src/test/resources/group-update.json
diff --git a/labs/hostedchef/src/test/resources/group.json b/enterprise/src/test/resources/group.json
similarity index 100%
rename from labs/hostedchef/src/test/resources/group.json
rename to enterprise/src/test/resources/group.json
diff --git a/labs/hostedchef/src/test/resources/groups.json b/enterprise/src/test/resources/groups.json
similarity index 100%
rename from labs/hostedchef/src/test/resources/groups.json
rename to enterprise/src/test/resources/groups.json
diff --git a/labs/hostedchef/src/test/resources/user.json b/enterprise/src/test/resources/user.json
similarity index 93%
rename from labs/hostedchef/src/test/resources/user.json
rename to enterprise/src/test/resources/user.json
index d8515b9..ee35a95 100644
--- a/labs/hostedchef/src/test/resources/user.json
+++ b/enterprise/src/test/resources/user.json
@@ -1,6 +1,6 @@
{
"display_name" : "Ignasi Barrera",
- "email" : "myemail@hostedchef.org",
+ "email" : "myemail@enterprisechef.org",
"first_name" : "Ignasi",
"last_name" : "Barrera",
"middle_name" : "",
diff --git a/labs/hostedchef/src/main/java/org/jclouds/hostedchef/HostedChefApi.java b/labs/hostedchef/src/main/java/org/jclouds/hostedchef/HostedChefApi.java
deleted file mode 100644
index 0f06750..0000000
--- a/labs/hostedchef/src/main/java/org/jclouds/hostedchef/HostedChefApi.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.hostedchef;
-
-import java.util.Set;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-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.Constants;
-import org.jclouds.Fallbacks.FalseOnNotFoundOr404;
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.chef.ChefApi;
-import org.jclouds.chef.filters.SignedHeaderAuth;
-import org.jclouds.chef.functions.ParseKeySetFromJson;
-import org.jclouds.hostedchef.binders.BindGroupNameToJsonPayload;
-import org.jclouds.hostedchef.binders.BindGroupToUpdateRequestJsonPayload;
-import org.jclouds.hostedchef.binders.GroupName;
-import org.jclouds.hostedchef.domain.Group;
-import org.jclouds.hostedchef.domain.User;
-import org.jclouds.rest.annotations.BinderParam;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.Headers;
-import org.jclouds.rest.annotations.ParamParser;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-
-/**
- * Provides synchronous access to the Hosted Chef Api.
- *
- * @author Ignasi Barrera
- */
-@RequestFilters(SignedHeaderAuth.class)
-@Consumes(MediaType.APPLICATION_JSON)
-@Headers(keys = "X-Chef-Version", values = "{" + Constants.PROPERTY_API_VERSION + "}")
-public interface HostedChefApi extends ChefApi {
-
- /**
- * Check if there exists a node with the given name.
- *
- * @return <code>true</code> if the specified node name exists.
- */
- @Override
- // Use get instead of HEAD
- @Named("node:exists")
- @GET
- @Path("/nodes/{nodename}")
- @Fallback(FalseOnNotFoundOr404.class)
- boolean nodeExists(@PathParam("nodename") String nodename);
-
- /**
- * Retrieves an existing user.
- *
- * @param name
- * The name of the user to get.
- * @return The details of the user or <code>null</code> if not found.
- */
- @Named("user:get")
- @GET
- @Path("/users/{name}")
- @Fallback(NullOnNotFoundOr404.class)
- User getUser(@PathParam("name") String name);
-
- /**
- * List all existing groups.
- *
- * @return The list of groups.
- */
- @Named("group:list")
- @GET
- @Path("/groups")
- @ResponseParser(ParseKeySetFromJson.class)
- Set<String> listGroups();
-
- /**
- * Retrieves an existing group.
- *
- * @param name
- * The name of the group to get.
- * @return The details of the group or <code>null</code> if not found.
- */
- @Named("group:get")
- @GET
- @Path("/groups/{name}")
- @Fallback(NullOnNotFoundOr404.class)
- Group getGroup(@PathParam("name") String name);
-
- /**
- * Creates a new group.
- *
- * @param name
- * The name of the group to create.
- */
- @Named("group:create")
- @POST
- @Path("/groups")
- void createGroup(@BinderParam(BindGroupNameToJsonPayload.class) String name);
-
- /**
- * Updates a group.
- * <p>
- * This method can be used to add actors (clients, groups) to the group.
- *
- * @param group
- * The group with the updated information.
- */
- @Named("group:update")
- @PUT
- @Path("/groups/{name}")
- void updateGroup(
- @PathParam("name") @ParamParser(GroupName.class) @BinderParam(BindGroupToUpdateRequestJsonPayload.class) Group group);
-
- /**
- * Deletes a group.
- *
- * @param name
- * The name of the group to delete.
- */
- @Named("group:delete")
- @DELETE
- @Path("/groups/{name}")
- void deleteGroup(@PathParam("name") String name);
-
-}
diff --git a/labs/hostedchef/src/main/java/org/jclouds/hostedchef/HostedChefProviderMetadata.java b/labs/hostedchef/src/main/java/org/jclouds/hostedchef/HostedChefProviderMetadata.java
deleted file mode 100644
index 6c62407..0000000
--- a/labs/hostedchef/src/main/java/org/jclouds/hostedchef/HostedChefProviderMetadata.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.hostedchef;
-
-import java.net.URI;
-import java.util.Properties;
-
-import org.jclouds.providers.ProviderMetadata;
-import org.jclouds.providers.internal.BaseProviderMetadata;
-
-/**
- * Implementation of @ link org.jclouds.types.ProviderMetadata} for Hosted Chef
- *
- * @author Adrian Cole
- */
-public class HostedChefProviderMetadata extends BaseProviderMetadata {
-
- public static Builder builder() {
- return new Builder();
- }
-
- @Override
- public Builder toBuilder() {
- return builder().fromProviderMetadata(this);
- }
-
- public HostedChefProviderMetadata() {
- super(builder());
- }
-
- public HostedChefProviderMetadata(Builder builder) {
- super(builder);
- }
-
- public static Properties defaultProperties() {
- Properties properties = new Properties();
- return properties;
- }
-
- public static class Builder extends BaseProviderMetadata.Builder {
-
- protected Builder() {
- id("hostedchef") //
- .name("OpsCode Hosted Chef") //
- .endpoint("https://api.opscode.com") //
- .homepage(URI.create("https://manage.opscode.com")) //
- .console(URI.create("https://manage.opscode.com")) //
- .apiMetadata(new HostedChefApiMetadata()) //
- .defaultProperties(HostedChefProviderMetadata.defaultProperties());
- }
-
- @Override
- public HostedChefProviderMetadata build() {
- return new HostedChefProviderMetadata(this);
- }
-
- @Override
- public Builder fromProviderMetadata(ProviderMetadata in) {
- super.fromProviderMetadata(in);
- return this;
- }
-
- }
-}
diff --git a/labs/hostedchef/src/main/java/org/jclouds/hostedchef/config/HostedChefHttpApiModule.java b/labs/hostedchef/src/main/java/org/jclouds/hostedchef/config/HostedChefHttpApiModule.java
deleted file mode 100644
index c9c9503..0000000
--- a/labs/hostedchef/src/main/java/org/jclouds/hostedchef/config/HostedChefHttpApiModule.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.hostedchef.config;
-
-import org.jclouds.chef.ChefApi;
-import org.jclouds.chef.config.BaseChefHttpApiModule;
-import org.jclouds.hostedchef.HostedChefApi;
-import org.jclouds.rest.ConfiguresHttpApi;
-
-/**
- * Configures the Hosted Chef connection.
- *
- * @author Ignasi Barrera
- */
-@ConfiguresHttpApi
-public class HostedChefHttpApiModule extends BaseChefHttpApiModule<HostedChefApi> {
-
- @Override
- protected void configure() {
- super.configure();
- bind(ChefApi.class).to(HostedChefApi.class);
- }
-
-}
diff --git a/labs/hostedchef/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/labs/hostedchef/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata
deleted file mode 100644
index 6d23c9a..0000000
--- a/labs/hostedchef/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata
+++ /dev/null
@@ -1 +0,0 @@
-org.jclouds.hostedchef.HostedChefProviderMetadata
diff --git a/labs/hostedchef/src/test/java/org/jclouds/hostedchef/HostedChefApiContextTest.java b/labs/hostedchef/src/test/java/org/jclouds/hostedchef/HostedChefApiContextTest.java
deleted file mode 100644
index ccdb53d..0000000
--- a/labs/hostedchef/src/test/java/org/jclouds/hostedchef/HostedChefApiContextTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.hostedchef;
-
-import static com.google.common.base.Throwables.propagate;
-import static org.testng.Assert.assertNotNull;
-
-import java.io.IOException;
-
-import org.jclouds.ContextBuilder;
-import org.jclouds.chef.ChefContext;
-import org.jclouds.chef.filters.SignedHeaderAuthTest;
-import org.jclouds.logging.config.NullLoggingModule;
-import org.jclouds.rest.internal.BaseRestApiTest.MockModule;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableSet;
-import com.google.inject.Module;
-
-/**
- * Tests the access to the underlying API from the context.
- *
- * @author Ignasi Barrera
- */
-@Test(groups = "unit", testName = "HostedChefContextApiTest")
-public class HostedChefApiContextTest {
-
- private ChefContext context;
-
- @BeforeClass
- public void setup() {
- context = ContextBuilder.newBuilder(new HostedChefProviderMetadata())
- .credentials(SignedHeaderAuthTest.USER_ID, SignedHeaderAuthTest.PRIVATE_KEY)
- .modules(ImmutableSet.<Module> of(new MockModule(), new NullLoggingModule())) //
- .buildView(ChefContext.class);
- }
-
- public void testCanAccessHostedChefApi() {
- HostedChefApi api = context.unwrapApi(HostedChefApi.class);
- assertNotNull(api);
- }
-
- @AfterClass
- public void tearDown() {
- try {
- context.close();
- } catch (IOException e) {
- throw propagate(e);
- }
- }
-}
diff --git a/labs/pom.xml b/labs/pom.xml
deleted file mode 100644
index fa362a2..0000000
--- a/labs/pom.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.jclouds.chef</groupId>
- <artifactId>chef-project</artifactId>
- <version>1.7.0-SNAPSHOT</version>
- <relativePath>../project/pom.xml</relativePath>
- </parent>
- <groupId>org.apache.jclouds.labs</groupId>
- <artifactId>chef-labs</artifactId>
- <packaging>pom</packaging>
- <name>Apache jclouds Chef :: Labs</name>
- <modules>
- <module>privatechef</module>
- <module>hostedchef</module>
- </modules>
-</project>
diff --git a/labs/privatechef/pom.xml b/labs/privatechef/pom.xml
deleted file mode 100644
index 0f3fc58..0000000
--- a/labs/privatechef/pom.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.jclouds.chef</groupId>
- <artifactId>chef-project</artifactId>
- <version>1.7.0-SNAPSHOT</version>
- <relativePath>../../project/pom.xml</relativePath>
- </parent>
- <groupId>org.apache.jclouds.labs</groupId>
- <artifactId>privatechef</artifactId>
- <name>Apache jclouds Chef :: Private Chef</name>
- <description>jclouds components to access Private Chef</description>
-
- <properties>
- <test.privatechef.org>YOUR_ORG</test.privatechef.org>
- <test.privatechef.endpoint>https://api.opscode.com/organizations/${test.privatechef.org}</test.privatechef.endpoint>
- <test.privatechef.api-version />
- <test.privatechef.build-version />
- <test.privatechef.identity>YOUR_USER</test.privatechef.identity>
- <test.privatechef.credential>${user.home}/.chef/${test.privatechef.org}/${jclouds.privatechef.identity}.pem</test.privatechef.credential>
- <jclouds.osgi.export>org.jclouds.privatechef*;version="${project.version}"</jclouds.osgi.export>
- <jclouds.osgi.import>org.jclouds*;version="${jclouds.version}",*</jclouds.osgi.import>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.jclouds.labs</groupId>
- <artifactId>hostedchef</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds.labs</groupId>
- <artifactId>hostedchef</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds.api</groupId>
- <artifactId>chef</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds.api</groupId>
- <artifactId>chef</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds</groupId>
- <artifactId>jclouds-core</artifactId>
- <version>${jclouds.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds.driver</groupId>
- <artifactId>jclouds-slf4j</artifactId>
- <version>${jclouds.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <version>1.0.9</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <profiles>
- <profile>
- <id>live</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <executions>
- <execution>
- <id>integration</id>
- <phase>integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <systemPropertyVariables>
- <test.privatechef.org>${test.privatechef.org}</test.privatechef.org>
- <test.privatechef.endpoint>${test.privatechef.endpoint}</test.privatechef.endpoint>
- <test.privatechef.api-version>${test.privatechef.api-version}</test.privatechef.api-version>
- <test.privatechef.build-version>${test.privatechef.build-version}</test.privatechef.build-version>
- <test.privatechef.identity>${test.privatechef.identity}</test.privatechef.identity>
- <test.privatechef.credential>${test.privatechef.credential}</test.privatechef.credential>
- </systemPropertyVariables>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
diff --git a/labs/privatechef/src/main/java/org/jclouds/privatechef/PrivateChefApi.java b/labs/privatechef/src/main/java/org/jclouds/privatechef/PrivateChefApi.java
deleted file mode 100644
index b57bd45..0000000
--- a/labs/privatechef/src/main/java/org/jclouds/privatechef/PrivateChefApi.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.privatechef;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Constants;
-import org.jclouds.chef.filters.SignedHeaderAuth;
-import org.jclouds.hostedchef.HostedChefApi;
-import org.jclouds.rest.annotations.Headers;
-import org.jclouds.rest.annotations.RequestFilters;
-
-/**
- * Provides synchronous access to the Private Chef Api.
- *
- * @see HostedChefApi
- * @author Ignasi Barrera
- */
-@RequestFilters(SignedHeaderAuth.class)
-@Consumes(MediaType.APPLICATION_JSON)
-@Headers(keys = "X-Chef-Version", values = "{" + Constants.PROPERTY_API_VERSION + "}")
-public interface PrivateChefApi extends HostedChefApi {
-
-}
diff --git a/labs/privatechef/src/main/java/org/jclouds/privatechef/PrivateChefApiMetadata.java b/labs/privatechef/src/main/java/org/jclouds/privatechef/PrivateChefApiMetadata.java
deleted file mode 100644
index f024a1b..0000000
--- a/labs/privatechef/src/main/java/org/jclouds/privatechef/PrivateChefApiMetadata.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.privatechef;
-
-import java.net.URI;
-import java.util.Properties;
-
-import org.jclouds.apis.ApiMetadata;
-import org.jclouds.chef.ChefApi;
-import org.jclouds.chef.ChefApiMetadata;
-import org.jclouds.chef.ChefContext;
-import org.jclouds.chef.config.ChefBootstrapModule;
-import org.jclouds.chef.config.ChefParserModule;
-import org.jclouds.ohai.config.JMXOhaiModule;
-import org.jclouds.privatechef.config.PrivateChefHttpApiModule;
-import org.jclouds.rest.internal.BaseHttpApiMetadata;
-
-import com.google.common.collect.ImmutableSet;
-import com.google.inject.Module;
-
-/**
- * Implementation of {@link ApiMetadata} for Private Chef api.
- *
- * @author Adrian Cole
- */
-public class PrivateChefApiMetadata extends BaseHttpApiMetadata<PrivateChefApi> {
-
- @Override
- public Builder toBuilder() {
- return new Builder().fromApiMetadata(this);
- }
-
- public PrivateChefApiMetadata() {
- this(new Builder());
- }
-
- protected PrivateChefApiMetadata(Builder builder) {
- super(builder);
- }
-
- public static Properties defaultProperties() {
- return ChefApiMetadata.defaultProperties();
- }
-
- public static class Builder extends BaseHttpApiMetadata.Builder<PrivateChefApi, Builder> {
-
- protected Builder() {
- id("privatechef")
- .name("Private Chef Api")
- .identityName("User")
- .credentialName("Certificate")
- .version(ChefApi.VERSION)
- .documentation(URI.create("http://www.opscode.com/support/"))
- .defaultEndpoint("https://api.opscode.com")
- .defaultProperties(PrivateChefApiMetadata.defaultProperties())
- .view(ChefContext.class)
- .defaultModules(
- ImmutableSet.<Class<? extends Module>> of(PrivateChefHttpApiModule.class, ChefParserModule.class,
- ChefBootstrapModule.class, JMXOhaiModule.class));
- }
-
- @Override
- public PrivateChefApiMetadata build() {
- return new PrivateChefApiMetadata(this);
- }
-
- @Override
- protected Builder self() {
- return this;
- }
- }
-}
diff --git a/labs/privatechef/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata b/labs/privatechef/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata
deleted file mode 100644
index 2844492..0000000
--- a/labs/privatechef/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata
+++ /dev/null
@@ -1 +0,0 @@
-org.jclouds.privatechef.PrivateChefApiMetadata
\ No newline at end of file
diff --git a/labs/privatechef/src/test/java/org/jclouds/privatechef/PrivateChefApiContextTest.java b/labs/privatechef/src/test/java/org/jclouds/privatechef/PrivateChefApiContextTest.java
deleted file mode 100644
index 98fe2b9..0000000
--- a/labs/privatechef/src/test/java/org/jclouds/privatechef/PrivateChefApiContextTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.privatechef;
-
-import static com.google.common.base.Throwables.propagate;
-import static org.testng.Assert.assertNotNull;
-
-import java.io.IOException;
-
-import org.jclouds.ContextBuilder;
-import org.jclouds.chef.ChefContext;
-import org.jclouds.chef.filters.SignedHeaderAuthTest;
-import org.jclouds.logging.config.NullLoggingModule;
-import org.jclouds.rest.internal.BaseRestApiTest.MockModule;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableSet;
-import com.google.inject.Module;
-
-/**
- * Tests the access to the underlying API from the context.
- *
- * @author Ignasi Barrera
- */
-@Test(groups = "unit", testName = "PrivateChefApiContextTest")
-public class PrivateChefApiContextTest {
-
- private ChefContext context;
-
- @BeforeClass
- public void setup() {
- context = ContextBuilder.newBuilder(new PrivateChefApiMetadata())
- .credentials(SignedHeaderAuthTest.USER_ID, SignedHeaderAuthTest.PRIVATE_KEY)
- .modules(ImmutableSet.<Module> of(new MockModule(), new NullLoggingModule())) //
- .buildView(ChefContext.class);
- }
-
- public void testCanAccessPrivateChefApi() {
- PrivateChefApi api = context.unwrapApi(PrivateChefApi.class);
- assertNotNull(api);
- }
-
- @AfterClass
- public void tearDown() {
- try {
- context.close();
- } catch (IOException e) {
- throw propagate(e);
- }
- }
-}
diff --git a/labs/privatechef/src/test/java/org/jclouds/privatechef/PrivateChefApiMetadataTest.java b/labs/privatechef/src/test/java/org/jclouds/privatechef/PrivateChefApiMetadataTest.java
deleted file mode 100644
index 7c75af7..0000000
--- a/labs/privatechef/src/test/java/org/jclouds/privatechef/PrivateChefApiMetadataTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.privatechef;
-
-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;
-
-/**
- * @author Adrian Cole
- */
-@Test(groups = "unit", testName = "PrivateChefApiMetadataTest")
-public class PrivateChefApiMetadataTest extends BaseHttpApiMetadataTest {
-
- public PrivateChefApiMetadataTest() {
- super(new PrivateChefApiMetadata(), ImmutableSet.<TypeToken<? extends View>> of());
- }
-}
diff --git a/labs/privatechef/src/test/resources/user.json b/labs/privatechef/src/test/resources/user.json
deleted file mode 100644
index 25c2e34..0000000
--- a/labs/privatechef/src/test/resources/user.json
+++ /dev/null
@@ -1 +0,0 @@
-{"public_key":"-----BEGIN RSA PUBLIC KEY-----\nMIIBCgKCAQEAvCKTqPdHv7GsHTjk02g91Aw3T6xQmdRaI70X6E6GGFxZtcH+tb1X\nqHxwhFydECVXhu0WVjTcWvxZ1aMFzn9BLHQYWzZxU/fIKVNR6ujyZ3jRxDXRFpX5\n/zvMdvNbdsJ+8foEbdoP1iujUMZuy6ZMvcbTDCgWjYVQ2omR9CkH/5Fwlbk3cSrF\n6qfGaM7340OGknKUfXdvhCq4vxydlOwfHJyNDWY0PW+8rDKHWxxNtYDDDeIMw2z/\nYC34f1bcAkR+/lyx5b25RwDomZNqXJqp1hjOVJVlo+UMvzWfXph5hgjcgtwzc5Iu\nmWWMUdxLcdw+/iQm6NW9cmU28bvHu0q7FwIDAQAB\n-----END RSA PUBLIC KEY-----\n","middle_name":"","certificate":"-----BEGIN CERTIFICATE-----\nMIIClzCCAgCgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBnjELMAkGA1UEBhMCVVMx\nEzARBgNVBAgMCldhc2hpbmd0b24xEDAOBgNVBAcMB1NlYXR0bGUxFjAUBgNVBAoM\nDU9wc2NvZGUsIEluYy4xHDAaBgNVBAsME0NlcnRpZmljYXRlIFNlcnZpY2UxMjAw\nBgNVBAMMKW9wc2NvZGUuY29tL2VtYWlsQWRkcmVzcz1hdXRoQG9wc2NvZGUuY29t\nMB4XDTEwMDgwMzA0MDUzNVoXDTIwMDczMTA0MDUzNVowADCCASIwDQYJKoZIhvcN\nAQEBBQADggEPADCCAQoCggEBALwik6j3R7+xrB045NNoPdQMN0+sUJnUWiO9F+hO\nhhhcWbXB/rW9V6h8cIRcnRAlV4btFlY03Fr8WdWjBc5/QSx0GFs2cVP3yClTUero\n8md40cQ10RaV+f87zHbzW3bCfvH6BG3aD9Yro1DGbsumTL3G0wwoFo2FUNqJkfQp\nB/+RcJW5N3EqxeqnxmjO9+NDhpJylH13b4QquL8cnZTsHxycjQ1mND1vvKwyh1sc\nTbWAww3iDMNs/2At+H9W3AJEfv5cseW9uUcA6JmTalyaqdYYzlSVZaPlDL81n16Y\neYYI3ILcM3OSLplljFHcS3HcPv4kJujVvXJlNvG7x7tKuxcCAwEAATANBgkqhkiG\n9w0BAQUFAAOBgQBcoSP/2tFhP8yjF/dRDRdDed0/Cg0xnpp2wvM38gBRgvhpZbQ3\nI2rqpw5THNzrzBVnrYxd57uAa+y2MMG57XnvNWOmyL6WIYXLfN1QI3nHdpHS/QVF\nCRWpDWxLM1TkqAD9xQZOpUDdByF2exiCDNTzSYYg/ISLlIEzicNJeoPNbA==\n-----END CERTIFICATE-----\n","city":null,"email":"adrian+dopey@opscode.com","country":null,"first_name":"Adrian","password":"abcdef","twitter_account":null,"salt":"xBOmipWikVEicS7tNOPdQzPsPmsROMgPme5O19ZHh6R7N9MQT7d5olDiGFpO","display_name":"Adrian Cole","last_name":"Cole","image_file_name":null,"username":"dopey"}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 3734c45..255edd0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,7 +34,7 @@
<module>project</module>
<module>core</module>
<module>compute</module>
- <module>labs</module>
+ <module>enterprise</module>
</modules>
<build>
<plugins>
diff --git a/project/pom.xml b/project/pom.xml
index 81f4a5e..a859a13 100644
--- a/project/pom.xml
+++ b/project/pom.xml
@@ -28,7 +28,7 @@
<artifactId>chef-project</artifactId>
<version>1.7.0-SNAPSHOT</version>
<packaging>pom</packaging>
- <name>Apache jclouds Chef :: Project POM</name>
+ <name>Apache jclouds Chef :: Project</name>
<description>jclouds Chef parent POM for Maven configuration</description>
<licenses>