Skip to content

Commit

Permalink
Merge branch 'release1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Haid committed Jan 25, 2017
2 parents 48afccc + 82050ea commit 3991fd9
Show file tree
Hide file tree
Showing 2,303 changed files with 787,214 additions and 22,916 deletions.
11 changes: 11 additions & 0 deletions .gitignore
@@ -1,3 +1,13 @@
<<<<<<< HEAD
*.iml
.idea/
_site
.sass-cache
.git/
target/
project/

=======
*~
:*.swp
*.orig
Expand All @@ -17,3 +27,4 @@ target
.history

.DS_Store
>>>>>>> release1.2
Binary file added Java-SDK-Icon-RGB-02.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added NetApp_SolidFire_Java_SDK_v1.2_Release_Notes.pdf
Binary file not shown.
119 changes: 53 additions & 66 deletions README.md
@@ -1,130 +1,115 @@
# <img src="https://raw.githubusercontent.com/solidfire/solidfire-sdk-java/gh-pages/Java-SDK-Icon-RGB-02.png" height="50" width="50" > SolidFire Java SDK
# SolidFire Java SDK

Java SDK library for interacting with SolidFire Element API
### Version 1.2 (github)

## Current Release

Version: 1.1.0.85
<img src="https://raw.githubusercontent.com/solidfire/solidfire-sdk-java/gh-pages/Java-SDK-Icon-RGB-02.png" height="50" width="50" >

## Description

The SolidFire Java SDK is a collection of software modules and libraries that facilitate integration and orchestration between proprietary systems and third-party applications. The Java SDK allows developers to deeply integrate SolidFire system API with the Java programming language. The SolidFire Java SDK reduces the amount of additional coding time required for integration.

## Compatibility

| Component | Version |
| ------------ | ------------------- |
| Java | 7.0 & 8.0 |
| SolidFire OS | Element 7.0 - 8.4\* |

\*<sub><sup>_**Note**: This version of the SDK will work with versions of Element OS greater then 8.4 but some features will not be supported in the API._</sup></sub>

## Getting Help

Contacting SolidFire SDK Support
If you have any questions or comments about this product, contact <ng-sf-host-integrations-sdk@netapp.com> or reach out to the developer community at [ThePub](http://netapp.io). Your feedback helps us focus our efforts on new features and capabilities.

## Download
## Installation

[Download](http://mvnrepository.com/artifact/com.solidfire) the latest JAR or grab via Maven:

~~~ xml

<dependency>
<groupId>com.solidfire</groupId>
<artifactId>solidfire-sdk-java</artifactId>
<version>1.1.0.85</version>
<version>1.2.0.172</version>
</dependency>

~~~

or SBT:

~~~ scala

libraryDependencies += "com.solidfire" % "solidfire-sdk-java" % "1.1.0.85"
libraryDependencies += "com.solidfire" % "solidfire-sdk-java" % "1.2.0.172"

~~~

or Gradle:

~~~ groovy
compile 'com.solidfire:solidfire-sdk-java:1.1.0.85'
compile 'com.solidfire:solidfire-sdk-java:1.2.0.172'
~~~

## Assembly Jar

The SolidFire Java SDK is also released as a Signed Assembly containing everything you need to quickly spin up a working client to interact with you SolidFire cluster. The assembly can be downloaded [here](https://github.com/solidfire/solidfire-sdk-java/releases/download/v1.1.0.85/solidfire-sdk-assembly-1.1.0.85.jar).
The SolidFire Java SDK is also released as a Signed Assembly containing everything you need to quickly spin up a working client to interact with you SolidFire cluster. The assembly can be downloaded [here](https://github.com/solidfire/solidfire-sdk-java/releases/download/v1.2/solidfire-sdk-assembly-1.2.0.172.jar).

___Dependencies___:

| Component | Version |
| ------------------- | ------- |
| jsvcgen-client-java | 0.3.0 |
| base64 | 2.3.9 |
| gson | 2.6.2 |
| solidfire.code.gson | 2.6.2 |
| joda-time | 2.9.3 |
| joda-convert | 1.8.1 |
| slf4j-api | 1.6.6 |

_**Note**: The SDK assembly should only be used in a standalone setting such as scripting or for prototyping. It should not be used in a production environment as the signed components might conflict with other components that are unsigned or signed with another certificate. See below._

### Limitations with a Certificate Signed Assembly Jar

The SDK assembly is signed with a certificate controlled by SolidFire, Inc, assuring the archive is official and legitimate. One caveat to having a set of components also signed with SolidFire's certificate, is no other version of these components can exist on the classpath. This will cause a security exception in the JVM.

If using the SDK with a restricted version of the above listed components, e.g. logback, or in developing an enterprise solution that runs in a web application container, etc., use the publicly [hosted versions](http://mvnrepository.com/artifact/com.solidfire) of the SDK.

## Compatibility

| Component | Version |
| ------------ | ------------------- |
| Java | 7.0 & 8.0 |
| SolidFire OS | Element 7.0 - 9.0 |

## Documentation

[Latest JavaDoc](https://solidfire.github.io/solidfire-sdk-java/latest/api/)

[1.1.0.85 JavaDoc](https://solidfire.github.io/solidfire-sdk-java/doc/v1.1/)
[Release Notes](https://github.com/solidfire/solidfire-sdk-java/raw/gh-pages/NetApp_SolidFire_Java_SDK_v1.2_Release_Notes.pdf)

[1.0.0.53 JavaDoc](https://solidfire.github.io/solidfire-sdk-java/doc/v1.0/)
## Getting Help

If you have any questions or comments about this product, open an issue on our [GitHub repo](https://github.com/solidfire/solidfire-sdk-java) or reach out to the online developer community at [ThePub](http://netapp.io). Your feedback helps us focus our efforts on new features and capabilities.

## Examples

Step 1 - Build a [SolidFireElement](https://solidfire.github.io/solidfire-sdk-java/doc/v1.1/com/solidfire/element/api/SolidFireElement.html) object using the factory
---
This is the preferred way to construct the [SolidFireElement](https://solidfire.github.io/solidfire-sdk-java/doc/v1.1/com/solidfire/element/api/SolidFireElement.html) object. The factory will make a call to the SolidFire cluster using the credentials supplied to test the connection. It will also set the version to communicate with based on the highest number supported by the
SDK and Element OS. Optionally, you can choose to set the version manually and whether or not to verify SSL. Read more about it in the [ElementFactory](https://solidfire.github.io/solidfire-sdk-java/doc/v1.1/com/solidfire/client/ElementFactory.html) documentation.
#### Step 1 - Build a SolidFireElement object using the factory

This is the preferred way to construct the SolidFireElement object. The factory will make a call to the SolidFire cluster using the credentials supplied to test the connection. It will also set the version to communicate with based on the highest number supported by the
SDK and Element OS. Optionally, you can choose to set the version manually and whether or not to verify SSL. Read more about it in the ElementFactory documentation.

#### Java:

~~~ java

import com.solidfire.client.ElementFactory;
import com.solidfire.element.api.*;
import com.solidfire.jsvcgen.javautil.Optional;
import com.solidfire.core.javautil.Optional;

// Import Optional common empty types (String, Long, & Map)
import static com.solidfire.jsvcgen.javautil.Optional.*;
import static com.solidfire.core.javautil.Optional.*;

...
// Use ElementFactory to get a SolidFireElement object.
SolidFireElement sfe = ElementFactory.create("mvip", "username", "password", "8.0");
SolidFireElement sfe = ElementFactory.create("mvip", "username", "password");

~~~

#### Scala:

~~~ scala

import com.solidfire.client.ElementFactory
import com.solidfire.element.api._
import com.solidfire.jsvcgen.javautil.Optional.{empty, of}
import com.solidfire.core.javautil.Optional.{empty, of}

...
// Use ElementFactory to get a SolidFireElement object.
val sf = ElementFactory.create( "mvip", "username", "password", "8.0" )
val sf = ElementFactory.create( "mvip", "username", "password" )

~~~

## Step 2 - Call the API method and retrieve the result
#### Step 2 - Call the API method and retrieve the result

All service methods in SolidFireElement call API endpoints and they all return result objects. The naming convention is <i>[methodName]Result</i>. For example, <i>listAccounts()</i> returns a <i>ListAccountsResult</i> object which has a property called <i>getAccounts()</i> returns an array of <i>Accounts</i> that can be iterated.

Expand All @@ -134,7 +119,6 @@ from the <i>AddAccountResult</i> object.
#### Java:

~~~ java

// Send the request and wait for the result then pull the Account
ListAccountsResult listAccountsResult = sfe.listAccounts(ListAccountsRequest.builder().build());
Account account = listAccountsResult.getAccounts()[0];
Expand All @@ -144,7 +128,6 @@ from the <i>AddAccountResult</i> object.
#### Scala:

~~~ scala

// Send the request and wait for the result then pull the first Account
val listAccountsResult = sfe.listAccounts(ListAccountsRequest.builder.build)
val account = listAccountsResult.getAccounts()(0)
Expand All @@ -154,13 +137,12 @@ from the <i>AddAccountResult</i> object.
### Examples of using the API (Java)

~~~ java

import com.solidfire.client.ElementFactory;
import com.solidfire.element.api.*;
import com.solidfire.jsvcgen.javautil.Optional;
import com.solidfire.core.javautil.Optional;

// Import Optional common empty types (String, Long, & Map)
import static com.solidfire.jsvcgen.javautil.Optional.*;
import static com.solidfire.core.javautil.Optional.*;
public class ReadmeJavaExample {
public static void main(String[] args) {
// Create Connection to SF Cluster
Expand Down Expand Up @@ -211,10 +193,9 @@ public class ReadmeJavaExample {
### Examples of using the API (Scala)

~~~ scala

import com.solidfire.client.ElementFactory
import com.solidfire.element.api._
import com.solidfire.jsvcgen.javautil.Optional.{empty, of}
import com.solidfire.core.javautil.Optional.{empty, of}

class ReadmeScalaExample {

Expand Down Expand Up @@ -267,7 +248,6 @@ Connection timeout (useful for failing fast when a host becomes unreachable):
#### Java:

~~~ java

import com.solidfire.client.ElementFactory;
import com.solidfire.element.api.*;
...
Expand All @@ -281,7 +261,6 @@ Read timeout (useful for extending time for a service call to return):
#### Java:

~~~ java

import com.solidfire.client.ElementFactory;
import com.solidfire.element.api.*;
...
Expand All @@ -290,10 +269,6 @@ Read timeout (useful for extending time for a service call to return):

~~~

## More Examples

More specific examples are available [here](examples/examples.md)

## Logging and Logback

The SDK and the Assembly leverage the [SLF4J API](http://www.slf4j.org/) for logging with the assembly also including [logback-classic](http://logback.qos.ch/reasonsToSwitch.html) implementation. An advantage to using the SLF4J interface is the availability of legacy logging framework [bridges](http://www.slf4j.org/legacy.html), for intercepting and consolidating all logging calls into a single log.
Expand All @@ -303,7 +278,6 @@ The SDK and the Assembly leverage the [SLF4J API](http://www.slf4j.org/) for log
An example logback.xml:

~~~ xml

<configuration debug="true">

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
Expand All @@ -314,26 +288,39 @@ An example logback.xml:
</encoder>
</appender>

<logger name="com.solidfire.element.api.SolidFireElement" level="DEBUG" />
<logger name="com.solidfire.core.client.ServiceBase" level="DEBUG" />

<root level="INFO">
<appender-ref ref="STDOUT" />
</root>
</configuration>
~~~

You also need to add the appropriate SLF4J dependency. Continuing with the logback example:

~~~ xml
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.3</version>
</dependency>
~~~

## Roadmap
## More Examples

More specific examples are available [here](https://github.com/solidfire/solidfire-sdk-java/blob/master/examples/examples.md)

## Release History

| Version | Release Date | Notes |
| ------- | ------------------ | ---------------------------------------------------------------- |
| 1.0 | November 20, 2015 | Accounts, Volumes, Access Groups, Snapshots, and Group Snapshots |
| 1.1 | September 20, 2016 | Additional Nitrogen & Oxygen API Coverage |
| 1.2 | ___TBD___ | Complete Nitrogen, Oxygen, & Fluorine API Coverage |
| Version | Release Date | Notes |
| ------- | --------------| ---------------------------------------------------------------- |
| 1.2 | Jan 25, 2017 | Complete Nitrogen, Oxygen, & Fluorine API Coverage |
| 1.1 | Sep 20, 2016 | Additional Nitrogen & Oxygen API Coverage |
| 1.0 | Nov 20, 2015 | Accounts, Volumes, Access Groups, Snapshots, and Group Snapshots |

## License

Copyright © 2016 NetApp, Inc. All rights reserved.
Copyright © 2016, 2017 NetApp, Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
9 changes: 9 additions & 0 deletions _config.yml
@@ -0,0 +1,9 @@
# Site settings

# Build settings
ghlighter: rouge
markdown: kramdown
kramdown:
input: GFM
auto_ids: true
syntax_highlighter: rouge
32 changes: 32 additions & 0 deletions _layouts/index.html
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>solidfire-sdk-java by NetApp, Inc.</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="stylesheets/normalize.css" media="screen">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen">
<link rel="shortcut icon" type="image/png" href="https://raw.githubusercontent.com/solidfire/solidfire-sdk-java/gh-pages/favicon.ico"/>
</head>
<body>
<section class="page-header">
<h1 class="project-name">SolidFire Java SDK</h1>
<h2 class="project-tagline">SolidFire Management API</h2>
<a href="https://github.com/solidfire/solidfire-sdk-java" class="btn">View on GitHub</a>
<a href="https://github.com/solidfire/solidfire-sdk-java/releases/download/v1.1.0.85/solidfire-sdk-assembly-1.1.0.85.jar" class="btn">Download Latest Assembly.jar</a>
<a href="https://solidfire.github.io/solidfire-sdk-java/latest/api/" class="btn">Latest JavaDoc</a>
<a href="http://www.solidfire.com/" class="btn">SolidFire.com</a>
</section>

<section class="main-content">
{{content}}
<footer class="site-footer">
<span class="site-footer-owner"><a href="https://github.com/solidfire/solidfire-sdk-java">solidfire-sdk-java</a> is maintained by <a href="http://netapp.com">NetApp, Inc.</a>.</span>
</footer>
</section>

</body>
</html>

4 changes: 2 additions & 2 deletions build.sh
Expand Up @@ -33,8 +33,8 @@ rm -f ../solidfire-sdk-java.gh-pages/**/*.md-e
# commit and push generated content to `master' branch
# since repository was cloned in write mode with token auth - we can push there
cd ../solidfire-sdk-java.gh-pages
git config user.email "jason.womack@solidfire.com"
git config user.name "Jason Ryan Womack"
git config user.email "adam.haid@solidfire.com"
git config user.name "Adam Haid"
git add -A .
git commit --allow-empty -a -m "Travis #$TRAVIS_BUILD_NUMBER"
git push --quiet origin gh-pages > /dev/null 2>&1

0 comments on commit 3991fd9

Please sign in to comment.