An open API service indexing awesome lists of open source software.

https://github.com/inversoft/barista

Java 8 Chef Client
https://github.com/inversoft/barista

chef chef-client chef-java-client java java-client java8

Last synced: about 2 months ago
JSON representation

Java 8 Chef Client

Awesome Lists containing this project

README

          

## Barista - Chef Java Client ![semver 2.0.0 compliant](http://img.shields.io/badge/semver-2.0.0-brightgreen.svg?style=flat-square)

Java 8 [Chef](https://www.chef.io/chef/) Java Client written using [Restify](https://github.com/inversoft/restify) REST Client

I've only added methods that I'm using, open an issue if you'd like a method added, or feel free to submit a pull request, the pattern should be very easy to follow.

### Code Examples
```java
// Construct a new Chef Client
ChefClient client = new ChefClient(
"vandelay", // userId used in header X-Ops-UserId
"https://chef.acme.com", // Server URL
"vandelayIndustries", // Organization Name
"/usr/local/acme/vandelay.pem"); // Path to PEM file

// Delete a Node by Name
ClientResponse response = client.deleteNode("node-name");

// Delete a Client by Name
ClientResponse response = client.deleteClient("client-name");

// Retrieve All Nodes
ClientResponse response = client.retrieveNodes();

// Retrieve a Node by Name, print the node name if successful, else print the status code.
ClientResponse response = client.retrieveNode("fooBar");
if (response.wasSuccessful()) {
System.out.println(response.successResponse.name); // --> fooBar
} else {
System.out.println("Request failed. Status code : [" + response.status + "]");
}
```

### Download from Maven
```xml

com.inversoft
barista
1.0.0

```

### Building in Maven

```bash
$ mvn install
```

### Building in Savant
**Note:** This project uses the Savant build tool. To compile using using Savant, follow these instructions:

```bash
$ mkdir ~/savant
$ cd ~/savant
$ wget http://savant.inversoft.org/org/savantbuild/savant-core/1.0.0/savant-1.0.0.tar.gz
$ tar xvfz savant-1.0.0.tar.gz
$ ln -s ./savant-1.0.0 current
$ export PATH=$PATH:~/savant/current/bin/
```

Then, perform an integration build of the project by running:
```bash
$ sb int
```

### Downloading from Savant
Released versions can be downloaded from the Savant Repository.

* http://savant.inversoft.org/com/inversoft/barista/

For more information, checkout [savantbuild.org](http://savantbuild.org/).