Barista

A Java 8 Chef client written using Inversoft Restify REST Client.

License

License

GroupId

GroupId

com.inversoft
ArtifactId

ArtifactId

barista
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Barista
A Java 8 Chef client written using Inversoft Restify REST Client.
Project URL

Project URL

http://www.inversoft.org
Source Code Management

Source Code Management

https://github.com/inversoft/barista

Download barista

How to add to project

<!-- https://jarcasting.com/artifacts/com.inversoft/barista/ -->
<dependency>
    <groupId>com.inversoft</groupId>
    <artifactId>barista</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.inversoft/barista/
implementation 'com.inversoft:barista:1.0.0'
// https://jarcasting.com/artifacts/com.inversoft/barista/
implementation ("com.inversoft:barista:1.0.0")
'com.inversoft:barista:jar:1.0.0'
<dependency org="com.inversoft" name="barista" rev="1.0.0">
  <artifact name="barista" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.inversoft', module='barista', version='1.0.0')
)
libraryDependencies += "com.inversoft" % "barista" % "1.0.0"
[com.inversoft/barista "1.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
com.fasterxml.jackson.core : jackson-annotations jar 2.10.1
com.inversoft : restify jar 3.3.0

test (1)

Group / Artifact Type Version
org.testng : testng jar 6.8.7

Project Modules

There are no modules declared in this project.

Barista - Chef Java Client semver 2.0.0 compliant

Java 8 Chef Java Client written using 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

// 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<Void, Void> response = client.deleteNode("node-name");

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

// Retrieve All Nodes
ClientResponse<Nodes, Void> response = client.retrieveNodes();

// Retrieve a Node by Name, print the node name if successful, else print the status code.
ClientResponse<Node, Void> 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

<dependency>
  <groupId>com.inversoft</groupId>
  <artifactId>barista</artifactId>
  <version>1.0.0</version>
</dependency>

Building in Maven

$ mvn install

Building in Savant

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

$ 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:

$ sb int

Downloading from Savant

Released versions can be downloaded from the Savant Repository.

For more information, checkout savantbuild.org.

com.inversoft

Inversoft

Versions

Version
1.0.0
0.6.0
0.5.0
0.4.0