santricity-java-client

The NetApp SANtricity WebAPI - Java SDK client library is a open source SDK that facilitate access to the NetApp E-Series storage system for automation and integration into third-party web or script-based management tools.

License

License

Categories

Categories

Java Languages Ant Build Tools Net CLI User Interface
GroupId

GroupId

com.netapp.santricity
ArtifactId

ArtifactId

santricity-java-client
Last Version

Last Version

1.1
Release Date

Release Date

Type

Type

jar
Description

Description

santricity-java-client
The NetApp SANtricity WebAPI - Java SDK client library is a open source SDK that facilitate access to the NetApp E-Series storage system for automation and integration into third-party web or script-based management tools.
Project URL

Project URL

https://github.com/NetApp/santricity-webapi-javasdk
Source Code Management

Source Code Management

https://github.com/NetApp/santricity-webapi-javasdk

Download santricity-java-client

How to add to project

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

Dependencies

compile (10)

Group / Artifact Type Version
io.swagger : swagger-annotations jar 1.5.8
org.glassfish.jersey.core : jersey-client jar 2.23
org.glassfish.jersey.media : jersey-media-multipart jar 2.23
org.glassfish.jersey.media : jersey-media-json-jackson jar 2.23
org.glassfish.jersey.core : jersey-common jar 2.23
com.fasterxml.jackson.core : jackson-annotations jar 2.7.0
com.fasterxml.jackson.core : jackson-databind jar 2.7.0
com.fasterxml.jackson.datatype : jackson-datatype-joda jar 2.1.5
javax.ws.rs : javax.ws.rs-api jar 2.0.1
com.brsanthu : migbase64 jar 2.2

Project Modules

There are no modules declared in this project.

NetApp SANtricity WebAPI - Java SDK

Build Status

##Installation

Our build scripts requires Apache Maven for pulling down the dependencies from Maven Central and compiling the source. Instead, if you would like to use a different build system please check the Dependency List below to download the appropriate ones.

The NetApp SANtricity WebAPI - Java SDK client library must be installed to your local Maven repository.

To install the NetApp SANtricity WebAPI - Java SDK, perform the following command: mvn install

Optionally, you can deploy the NetApp SANtricity WebAPI - Java SDK installation to a remote Maven repository.

To deploy the NetApp SANtricity WebAPI - Java SDK installation remotely, configure the settings of the repository and perform the following command: mvn deploy

###Dependencies

####DependencyList Used and declared dependencies

**GroupId** **ArtifactId** **Version** **Scope** **Type** **Optional**
io.swagger swagger-annotations 1.5.8 compile jar false
org.glassfish.jersey.core jersey-client 2.23 compile jar false
org.glassfish.jersey.media jersey-media-multipart 2.23 compile jar false
org.glassfish.jersey.media jersey-media-json-jackson 2.23 compile jar false
org.glassfish.jersey.core jersey-common 2.23 compile jar false
com.fasterxml.jackson.core jackson-annotations 2.7.0 compile jar false
com.fasterxml.jackson.core jackson-databind 2.7.0 compile jar false
com.fasterxml.jackson.datatype jackson-datatype-joda 2.1.5 compile jar false
javax.ws.rs javax.ws.rs-api 2.0.1 compile jar false
com.brsanthu migbase64 2.2 compile jar false

####Maven Users

The following dependency must be added to your project's POM:

<dependency>
	<groupId>com.netapp.santricity</groupId>
	<artifactId>santricity-java-client</artifactId>
	<version>1.0</version>
	<scope>compile</scope>
</dependency>

####Gradle Users

The following groovy dependency must be added to your project's build file:

compile "com.netapp.santricity:santricity-java-client:1.0"

####All Other Users

First, enter the following command to generate the JAR file: mvn package

Next, manually install the following JAR files:

  • target/santricity-java-client-1.0.jar
  • target/lib/*.jar

###Getting started

Here's an example for using the NetApp SANtricity WebAPI - Java SDK:

import com.netapp.santricity.ApiClient;
import com.netapp.santricity.ApiException;
import com.netapp.santricity.api.v2.StorageSystemsApi;
import com.netapp.santricity.models.v2.*;
import com.netapp.santricity.api.v2.DiagnosticsApi;

import java.util.ArrayList;
import java.util.List;

import static java.lang.Thread.currentThread;
import static java.lang.Thread.sleep;

/**
 * Sample code illustrates SDK usage for gathering failure list
 */
public class FailureList {
	public static void main(String[] args) {
		ApiClient apiClient = new ApiClient();
		/**
		 * Configure the ApiClient with the Santricity proxy URL & set proper credentials
		 */
		 apiClient.setBasePath("http://localhost:8080/devmgr/v2");
		 apiClient.setUsername("rw");
		 apiClient.setPassword("rw");

		/**
		 * Add a storage system to the proxy
		 */
		 String sysId = "config1";
		 StorageSystemsApi ssApi = new StorageSystemsApi(apiClient);
		 StorageSystemCreateRequest ssCreatReq = new StorageSystemCreateRequest();
		 List<String> ctrlAddrs = new ArrayList<String>();
		 ctrlAddrs.add("<Ctrl A IP Address>");
		 ctrlAddrs.add("<Ctrl B IP Address>");
		 ssCreatReq.setControllerAddresses(ctrlAddrs);
		 ssCreatReq.setId(sysId);

		 try {
			 ssApi.newStorageSystem(ssCreatReq);
			 sleep(1000);                 // one second
			 /**
			  * Get List of failure events
			  */
			 DiagnosticsApi diag = new DiagnosticsApi(apiClient);
			 sleep(1000);                 // one second
			 List<FailureData> failureList = diag.getFailures(sysId, false);
			 for (FailureData failData : failureList) {
				 System.out.println("Failure name: " + failData.getFailureType().name());
	         }
		 } catch (ApiException apiExp) {
			 System.out.println("An exception occurred. Please check error: \n " + apiExp.getMessage());
		 } catch (InterruptedException ex) {
			 currentThread().interrupt();
	     }
	}
}
com.netapp.santricity

NetApp

We unlock the best of cloud.

Versions

Version
1.1
1.0