Sei sulla pagina 1di 204

OnCommand Insight 6.

3 Connect API Reference Guide

NetApp, Inc. 495 East Java Drive Sunnyvale, CA 94089 U.S.A. Telephone: +1 (408) 822-6000 Fax: +1 (408) 822-4501 Support telephone: +1 (888) 4-NETAPP Documentation comments: doccomments@netapp.com Information Web: www.netapp.com Part number 215-06639_A0 March 2012

Table of Contents | 3

Contents
What is OnCommand Insight Connect API? ............................................ 9
What can you do with OnCommand Insight Connect API? ....................................... 9 Integration of storage data into a centralized IT dashboard ............................ 9 Integration of storage monitoring into a Help Desk Network Operations Center (NOC) ............................................................................................ 9 Development of specialized reports .............................................................. 10 Integration into your custom applications ..................................................... 10 OnCommand Insight Connect API prerequisites ...................................................... 10 How is Connect API licensed? .................................................................................. 11 What are the main Connect API object types? .......................................................... 11 How is Connect API authentication performed? ....................................................... 11 Connect API sessions ................................................................................................ 11 Opening a Connect API session .................................................................... 12 Closing a Connect API session ..................................................................... 13 Importing annotation values using OnCommand Insight Connect API .................... 13 Where to find more information about OnCommand Insight ................................... 14 OnCommand Insight on the web ................................................................... 14 OnCommand Insight product documentation ............................................... 15 Videos for OnCommand Insight ............................................................................... 16

Connect API classes .................................................................................... 19


APIBadRequestException ......................................................................................... 19 Action ........................................................................................................................ 19 ActionResponse ......................................................................................................... 20 AnnotationType ......................................................................................................... 21 AnnotationValue ....................................................................................................... 22 APIException ............................................................................................................ 23 APISessionContext .................................................................................................... 24 Application ................................................................................................................ 25 ApplicationResponse ................................................................................................. 25 DeviceGroup ............................................................................................................. 26 DeviceGroupResponse .............................................................................................. 27 DRPath ...................................................................................................................... 28

4 | OnCommand Insight Connect API Reference Guide DRPathResponse ....................................................................................................... 30 FindObjectsResponse ................................................................................................ 31 Generic ...................................................................................................................... 32 GenericResponse ....................................................................................................... 33 Host ........................................................................................................................... 34 HostResponse ............................................................................................................ 35 InternalVolume .......................................................................................................... 36 InternalVolumeResponse .......................................................................................... 39 LogicalPort ................................................................................................................ 40 LogicalPortResponse ................................................................................................. 43 Node .......................................................................................................................... 44 NodeResponse ........................................................................................................... 46 Path ............................................................................................................................ 47 PathResponse ............................................................................................................ 48 Policy ......................................................................................................................... 49 PolicyResponse ......................................................................................................... 51 Port ............................................................................................................................ 52 PortResponse ............................................................................................................. 54 RequestIterator .......................................................................................................... 55 ReservationRequest ................................................................................................... 57 ReservationRequirement ........................................................................................... 59 StorageArray ............................................................................................................. 60 StorageArrayResponse .............................................................................................. 63 Switch ........................................................................................................................ 64 SwitchResponse ........................................................................................................ 66 SynchronizationResponse ......................................................................................... 67 Tape ........................................................................................................................... 68 TapeResponse ............................................................................................................ 70 Task ........................................................................................................................... 71 TaskResponse ............................................................................................................ 73 TaskViolationResponse ............................................................................................. 74 Violation .................................................................................................................... 75 ViolationResponse .................................................................................................... 77 VirtualMachine .......................................................................................................... 78 VirtualMachineResponse .......................................................................................... 80 Volume ...................................................................................................................... 81

Table of Contents | 5 VolumeMap ............................................................................................................... 84 VolumeMapResponse ............................................................................................... 86 VolumeMask ............................................................................................................. 88 VolumeMaskResponse .............................................................................................. 90 VolumeResponse ....................................................................................................... 91 VolumesSynchronizationState .................................................................................. 92 VolumesSynchronizationStateResponse ................................................................... 93

Connect API endpoint methods ................................................................ 95


closeSession .............................................................................................................. 95 dismissPathOutageViolations .................................................................................... 95 findObjectByWwn .................................................................................................... 96 findObjectsByIp ........................................................................................................ 96 addHostToApplication .............................................................................................. 97 addReservationRequests ............................................................................................ 98 addReservationRequirements .................................................................................... 98 getAllApplications .................................................................................................... 99 getAPIVersion ......................................................................................................... 100 getApplication ......................................................................................................... 100 getApplicationsOfHost ............................................................................................ 101 getClosedViolations ................................................................................................ 102 getConnectedPorts ................................................................................................... 103 getDeviceGroup ...................................................................................................... 103 getDeviceGroups ..................................................................................................... 104 getDeviceGroupsByStorage .................................................................................... 105 getDeviceGroupsByVolume ................................................................................... 106 getDeviceGroupVolumes ........................................................................................ 107 getDRPathsByVolume ............................................................................................ 107 getGeneric ............................................................................................................... 108 getGenerics .............................................................................................................. 109 getHost .................................................................................................................... 110 getHosts ................................................................................................................... 110 getHostsOfApplication ............................................................................................ 111 getHostPolicy .......................................................................................................... 112 getInternalVolume ................................................................................................... 113 getInternalVolumes ................................................................................................. 113 getInternalVolumesByStorageArray ....................................................................... 114

6 | OnCommand Insight Connect API Reference Guide getLogicalPortsByPhysicalPort ............................................................................... 115 getLogicalPortsByLogicalSwitch ............................................................................ 116 getLogicalPortsByPhysicalSwitch .......................................................................... 117 getLogicalSwitchesByPhysicalSwitch .................................................................... 118 getNodesOfDevice .................................................................................................. 119 getPathPolicy ........................................................................................................... 119 getPaths ................................................................................................................... 120 getPathsByHost ....................................................................................................... 121 getPhysicalPortByLogicalPort ................................................................................ 122 getPolicies ............................................................................................................... 123 getPort ..................................................................................................................... 124 getPorts .................................................................................................................... 124 getPortsOfDevice .................................................................................................... 125 getPortsOfNode ....................................................................................................... 126 getPortsOfDeviceType ............................................................................................ 127 getRecentDevice ...................................................................................................... 128 getRecentHost ......................................................................................................... 128 getRecentStorageArray ........................................................................................... 129 getRecentSwitch ...................................................................................................... 129 getRecentTape ......................................................................................................... 130 getRecentVolume .................................................................................................... 131 getReservationRequests .......................................................................................... 131 getReservationRequestsByStates ............................................................................ 132 getReservationRequirements ................................................................................... 132 getSANscreenVersion ............................................................................................. 133 getStorageArray ...................................................................................................... 133 getStorageArrays ..................................................................................................... 134 getSwitch ................................................................................................................. 135 getSwitches .............................................................................................................. 135 getTape .................................................................................................................... 136 getTapes .................................................................................................................. 137 getViolations ........................................................................................................... 137 getViolationsByHost ............................................................................................... 138 getVirtualMachine ................................................................................................... 139 getVirtualMachines ................................................................................................. 140 getVolume ............................................................................................................... 140

Table of Contents | 7 getVolumes .............................................................................................................. 141 getVolumesByStorageArray ................................................................................... 142 getVolumeMapsByStorageArray ............................................................................ 143 getVolumeMasksByStorageArray .......................................................................... 144 getVolumesSynchStatesByDRPath ......................................................................... 145 getVolumesSynchStatesBySourceVolume ............................................................. 145 openSession ............................................................................................................. 146 removeHostFromApplication .................................................................................. 146 removeHostPolicies ................................................................................................. 147 removePolicies ........................................................................................................ 148 removeReservationRequirements ............................................................................ 149 setAnnotationValues ............................................................................................... 149 setApplication .......................................................................................................... 150 setHostsPolicy ......................................................................................................... 151 updateReservationRequirements ............................................................................. 152 updateReservationRequests ..................................................................................... 152

OnCommand Insight Connect API code sample scripts and packages ................................................................................................ 155
Java .......................................................................................................................... 155 CSV Example in Java .................................................................................. 159 CSV Example .............................................................................................. 160 Perl .......................................................................................................................... 166 Sample Perl scripts ...................................................................................... 167 Sample Perl packages .................................................................................. 173

Connect API web services WSDL file ..................................................... 187 Web services WSDL specification ........................................................... 189 Copyright information ............................................................................. 191 Trademark information ........................................................................... 193 How to send your comments .................................................................... 195 Websites ..................................................................................................... 197 Index ........................................................................................................... 199

8 | OnCommand Insight Connect API Reference Guide

What is OnCommand Insight Connect API?


OnCommand Insight Connect API enables NetApp customers and independent software vendors (ISVs) to develop applications which perform tasks, such as generate reports, or integrate OnCommand Insight into existing management systems and procedures at their sites. The Connect API is based on SOAP and Web services. This provides the flexibility to use the API from almost any programming environment, including Java and Perl.
Note: Java is the only API supported by NetApp. Perl API and other examples are provided for reference only with no support.

Also see the examples provided in the OnCommand Insight portal.

What can you do with OnCommand Insight Connect API?


Using the OnCommand Insight Connect API, you can create many applications, such as integrate storage data into a dashboard, integrate storage monitoring into a Help Desk Operations Center, create specialized reports, and integrate Connect APIinto other applications. You can use the Connect API to initiate a session with the OnCommand Insight server, issue queries, retrieve data, and then close the session.

Integration of storage data into a centralized IT dashboard


You can use the OnCommand Insight Connect API to integrate storage data into a centralized IT dashboard to improve visibility and troubleshooting. IT dashboards often display information from a centralized database, sometimes referred to as a CMDB for IT assets, configurations, status and relationships. These dashboards can extend their reach to include storage information from the server to the data. The OnCommand Insight Connect API can help you provide: Consolidated reports including cost, utilization, and activity Consolidated chargeback and capacity planning Information for end-to-end troubleshooting

Integration of storage monitoring into a Help Desk Network Operations Center (NOC)
You can use the OnCommand Insight Connect API in the NOC to monitor the near real-time status of the storage environment. With the API, you can query outstanding violations and notify a

10 | OnCommand Insight Connect API Reference Guide monitoring framework system of any service violation such as outage, redundancy, or cluster sharing problem. OnCommand Insight includes alternative methods for violation alerting using SNMP and email notification. However, using the API provides the required flexibility to add organization-specific logic around the violation notification.

Development of specialized reports


You can use the OnCommand Insight Connect API to provide frequent reports on the allocation of storage to different servers, enabling chargeback to the storage users based on their actual usage of production and replicated capacity.

Integration into your custom applications


Software vendors can use the OnCommand Insight Connect API to build applications that retrieve storage information into their own IT management software to provide visibility from their own applications into storage services, problems, and root-cause analysis. Such vendors include IT management framework developers, database management systems, and others.

OnCommand Insight Connect API prerequisites


To use OnCommand Insight Connect API, some prerequisites are required. The following software requirements are necessary to develop programs that operate with the OnCommand Insight Connect API environment: Download and install the latest JDK. To use build.xml, which is part of the provided Java examples, download and install Apache ANT1. Configure the environment variables for ANT and JDK to run together. If you want quick access to Ant, you must set up java_home, path. To develop in Java or Perl, you must be able to configure environment variables.
Note: OnCommand Insight does not actively support languages other than Java for use with the

API. The following items are recommended: To use build.xml, which is part of the provided Java examples, download and install Apache ANT1. To use the Perl-based examples, install a Perl interpreter. ActivePerl is available for free download with registration. Perl examples have a readme.txt file that explains what Perl libraries must be downloaded and installed.

What is OnCommand Insight Connect API? | 11

How is Connect API licensed?


Using the OnCommand Insight Connect API requires a software license key and an API license agreement.

What are the main Connect API object types?


You can work with object types as available in Connect API Using the Connect API, the following objects are accessible: Devices: hosts, generic (HBA) devices, tapes, storage arrays, switches Device configuration: volumes, mapping, masking, zones, fabrics, VSAN Paths, policies, and violations Tasks, actions (ST)

How is Connect API authentication performed?


Authentication is based on HTTPS, which sends the user name and password over an encrypted communication channel. The user name and password must correlate with a user entered in the OnCommand Insight User Management views in the OnCommand Insight Administration portal. The user must have administration privileges. For security purposes, every action performed using the API is recorded in the OnCommand Insight audit table.

Connect API sessions


You can use the API to initiate a session with the OnCommand Insight server, issue queries, retrieve data, and then close the session. Opening a session provides a session context that is required for all queries. Designed to support large, ever-changing environments, the API requires the use of sessions and iterators. Sessions and iterators are used in the following ways: A session is used to maintain data consistency between multiple queries. To assure consistency, queries to the same session respond with data that is consistent with a specific point in time. Iterators are used to divide data when the data from a query returns larger than a user-defined maximum.

12 | OnCommand Insight Connect API Reference Guide

Opening a Connect API session


Using the OnCommand Insight Connect API requires that you connect to the server and open a session. Opening a session provides a session context that is a required argument for all other queries.
Steps

1. Connect to the server. Depending on the platform used, connecting to the server yields the SANscreenAPIEndPoint end point that you can use to call API methods. 2. Open a session by entering this method: openSession (String,int) A session is a snapshot of OnCommand Insight data at the time the session is created. So, any queries you make to a session after opening it will not reflect changes that might have occurred after opening the session. The session context variable is a required argument for every method that queries the OnCommand Insight server. The purpose of using a data snapshot rather than live data is to guarantee that multiple API queries provide a consistent view of OnCommand Insight data. 3. Issues queries by using any of the get* methods. The primary get*methods are listed in the SANscreenAPIEndPoint class.
Example getStorageArrays (APISessionContext sessionContext, RequestIterator requestIterator)

4. Retrieve the data. Queries for multiple values matching a given criterion return a response object encapsulating a subset of the values matching a given query. The number of values in the response is limited by the limit argument specified when a session is opened. Also, a response includes an iterator that is used for determining if there are more values to be queried. If the iterator indicates that further queries should be issued, a client should repeat querying and retrieving the data providing the iterator with every new request.
Example getStorageArrays (APISessionContext sessionContext, RequestIterator requestIterator)

What is OnCommand Insight Connect API? | 13

Closing a Connect API session


You can close a session at any time.
Step

1. Close the session by entering the following method: closeSession(APISessionContext


sessionContext)

Importing annotation values using OnCommand Insight Connect API


If you maintain annotations on SAN objects (such as storage, hosts, and virtual machines) in a CSV file, you can import that information into OnCommand Insight. You can import applications, business entities, or annotations such as tier and building.
About this task

The following rules apply: If an annotation value is empty, that annotation is removed from the object. When annotating volumes or internal volumes, the object name is a combination of storage name and volume name using the dash and arrow "->" separator. For example:
<storage_name>-><volume_name>

When storage, switches, or ports are annotated, the Application column is ignored. The columns of Tenant, Line_of_Business, Business_Unit, and Project make up a business entity. Any of the values can be left empty. If an application is already related with a business entity different from the input values, the application is assigned to the new business entity.

The following object types are supported in the import utility: Type Host VM Internal Volume Volume Storage Switch Port Name or Key
<Name> or <IP> <Name> <Storage_name>-> or <Internal_volume_name> <Storage_name>-> or <Volume_name> <Name> or <IP> <Name> or <IP> <WWN>

14 | OnCommand Insight Connect API Reference Guide The CSV file should use the following format:
, , <Annotation Type> [, <Annotation Type> ...] [, Application] [, Tenant] [, Line_Of_Business] [, Business_Unit] [, Project] <Object Type Value 1>, <Object Name or Key 1>, <Annotation Value> [, <Annotation Value> ...] [, <Application>] [, <Tenant>] [, <Line_Of_Business>] [, <Business_Unit>] [, <Project>] <Object Type Value 2>, <Object Name or Key 2>, <Annotation Value> [, <Annotation Value> ...] [, <Application>] [, <Tenant>] [, <Line_Of_Business>] [, <Business_Unit>] [, <Project>] <Object Type Value 3>, <Object Name or Key 3>, <Annotation Value> [, <Annotation Value> ...] [, <Application>] [, <Tenant>] [, <Line_Of_Business>] [, <Business_Unit>] [, <Project>] ... <Object Type Value N>, <Object Name or Key N>, <Annotation Value> [, <Annotation Value> ...] [, <Application>] [, <Tenant>] [, <Line_Of_Business>] [, <Business_Unit>] [, <Project>] Steps

1. From the OnCommand Insight web portal, select Insight Connect API. 2. From the Insight Connect API menu, select Annotation Import Utility. 3. Open the zip file. 4. Read the readme.txt file for additional information and samples. 5. In the command line window, enter the following:
java -jar import-utility.jar [-u<username>] [-p<password>] [-a<server name or IP address>] <csv filename>

Where to find more information about OnCommand Insight


You can find more information about OnCommand Insight on the NetApp web site and in other OnCommand Insight documentation.

OnCommand Insight on the web


For comprehensive, up-to-date information about OnCommand Insight, use these NetApp web site resources. OnCommand Insight product web site at:

http://www.netapp.com/us/products/management-software/oncommand-insight
The NetApp Support Site at: support.netapp.com

What is OnCommand Insight Connect API? | 15

OnCommand Insight product documentation


The OnCommand Insight products are accompanied by a set of guides. OnCommand Insight Helps new OnCommand Insight users set up and customize their installed Getting Started Guide system and begin using it for improved efficiency.
Note: The OnCommand Insight guides are available from the OnCommand Insight Client Help menu and from the OnCommand Insight Administration portal.

OnCommand Insight Provides an overview of suite architecture with instructions to get the system up and running, discover the logical and physical storage resources Installation and Administration Guide in your storage environment, and perform administrative tasks. Describes the configuration parameters and some installation procedures for data sources used by OnCommand Insight. Provides recommended methods of discovering your storage environment for the OnCommand Insight deployment. OnCommand Insight Provides information about the tools and features to help you gain visibility Inventory User Guide into your SAN or NAS inventory environment. The Inventory features are the foundation used by all other products in the OnCommand Insight suite. After looking at the OnCommand Insight Getting Started Guide, use this guide to learn about basic features common across all OnCommand Insight modules. OnCommand Insight Assurance User Guide OnCommand Insight Performance User Guide OnCommand Insight Planning User Guide Provides an overview of how to use OnCommand Insight to analyze and validate your storage network environment and to automate operational monitoring, as well as procedures for making safe changes without disrupting availability. Provides an overview of how to use OnCommand Insight to reclaim underutilized resources, manage tiers, identify multipath risks, and troubleshoot ongoing performance bottlenecks. Provides an overview of how to use OnCommand Insight to enable educated capacity management decisions by managing the end-to-end resource order and allocation process. Describes how system administrators can communicate storage capacity requirements to SAN managers using OnCommand Insight Connect Applications web access instead of the full OnCommand Insight feature set. OnCommand Insight Reporting Guide Describes reports from the centralized reports portal that support viewing critical inventory and capacity-related information from the data warehouse.

16 | OnCommand Insight Connect API Reference Guide

Note: This is distinct from the OnCommand Insight Report User Guide,

which describes how to use OnCommand Report. OnCommand Insight Describes a data warehouse repository that consolidates multiple Data Warehouse User OnCommand Insight operational databases in an easy-to-query format. Provides an overview of the Data Warehouse database schema. Guide Describes the metadata model upon which OnCommand Insight reports are based. OnCommand Insight Connect API Reference Provides an overview of how to use the API interface to enable integration with other applications, such as reporting and monitoring systems. Helps customers and Independent Software Vendors (ISVs) to develop applications on top of the OnCommand Insight repository and engine.

Videos for OnCommand Insight


You can access how-to videos that show you how to perform some actions in OnCommand Insight. The videos are located on the OnCommand Insight Customer Community, a private forum for customers.
Note: To see OnCommand Insight videos, use your web browser to access the Customer

Community at the following link: http://communities.netapp.com/community/ products_and_solutions/storage_management_software?view=video. You need a user name and password for this community. To obtain them, click the Become a Member link.

How to tell OnCommand Insight about your tiering

How to identify over utilized disks in OnCommand Insight

How to view orphaned storage

What is OnCommand Insight Connect API? | 17

How to set thresholds for storage efficiency

How to identify candidates for tiering

How to identify candidates for host virtualization

How to group violations

How to create tiers

How to set business entity annotations

18 | OnCommand Insight Connect API Reference Guide

19

Connect API classes


Connect API classes are included in alphabetical order.

APIBadRequestException
Thrown to indicate that a client application provided wrong or inconsistent information to an API method call. All the methods that can throw this type of exception are defined in the class SANscreenAPIEndPoint. Constructors To be used by WSAPI only (to deserialize an exception).
public APIBadRequestException()

Methods The following methods are available from this class: fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString, clone, equals, finalize, getClass, hashCode, notify, notifyAll

Action
Gets action for given action ID. Constructors
public Action()

Methods The following methods are available from this class: getOwner setOwner
public java.lang.String getOwner()

Should be used by the WSAPI.


public void setOwner(java.lang.String owner)

getTaskId

public java.lang.String getTaskId()

20 | OnCommand Insight Connect API Reference Guide

setTaskId

Should be used by the WSAPI.


public void setTaskId(java.lang.String taskId)

getType setType

public java.lang.String getType()

Should be used by the WSAPI.


public void setType(java.lang.String type)

getActionOrder setActionOrder

public int getActionOrder()

Should be used by the WSAPI.


public void setActionOrder(int actionOrder)

getState setState

public java.lang.String getState()

Should be used by the WSAPI.


public void setState(java.lang.String state)

getParameters setParameters

public ActionParam[] getParameters()

Should be used by the WSAPI.


public void setParameters(ActionParam[] parameters)

getErrors setErrors

public java.lang.String[] getErrors()

Should be used by the WSAPI.


public void setErrors(java.lang.String[] errors)

ActionResponse
Gets actions for given task. Constructors
public ActionResponse()

Initiates an ActionResponse object Methods The following methods are available from this class: getActions
public Action[] getActions()

Connect API classes | 21

setActions

Should be used by the WSAPI.


public void setActions(Action[] actions)Parameters public java.lang.String getWwn()

getRequestIterator Gets the iterator which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator Should be used by the WSAPI.


public void setRequestIterator(RequestIterator iterator)

iterator getSize

The iterator of this response.

Gets the number of objects contained in this response. Note that this is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

Should be used by the WSAPI.


public void setSize(int size)

size

Number of objects in this response.

AnnotationType
Gets annotation type by name (for example: Tier, Data Center, etc.). Constructors
public AnnotationType()

Methods The following methods are available from this class: getName
public java.lang.String getName()

Gets the name of this device (usually, this is the DNS alias of the IP address). setName
public void setName(java.lang.String name)

22 | OnCommand Insight Connect API Reference Guide

getDisplayName setDisplayName getDescription setDescription getDataType setDataType getOwner setOwner

public java.lang.String getDisplayName() public void setDisplayName(java.lang.String displayName) public java.lang.String getDescription() public void setDescription(java.lang.String description) public java.lang.String getDataType() public void setDataType(java.lang.String dataType) public java.lang.String getOwner() public void setOwner(java.lang.String owner)

getSupportedObjectTypes public java.lang.String[] getSupportedObjectTypes() setSupportedObjectTypes public void


setSupportedObjectTypes(java.lang.String[] supportedObjectTypes) public AnnotationEnumValue[] getEnumerationValues() public void setEnumerationValues(AnnotationEnumValue[] enumerationValues) public boolean isUserDefined() public void setUserDefined(boolean userDefined) public boolean isAllowMultipleValues() public void setAllowMultipleValues(boolean allowMultipleValues)

getEnumerationValues setEnumerationValues

isUserDefined setUserDefined isAllowMultipleValues setAllowMultipleValues

AnnotationValue
Gets annotation values for object references and annotation types. Constructors
public AnnotationValue()

Methods The following methods are available from this class:

Connect API classes | 23

getEnumId setEnumId getTypeId setTypeId

public java.lang.String getEnumId() public void setEnumId(java.lang.String enumId) public java.lang.String getTypeId() public void setTypeId(java.lang.String typeId)

getObjectReference public ObjectReference getObjectReference() setObjectReference public void setObjectReference(ObjectReference


objectReference)

getValue setValue getSetTime setSetTime

public java.lang.String getValue() public void setValue(java.lang.String value) public long getSetTime() public void setSetTime(long setTime)

APIException
Thrown to indicate a failure in the API server while processing a request from an API client application. All the methods that can throw this type of exception are defined in the class SANscreenAPIEndPoint. Constructors To be used by WSAPI only (for deserializing the exception).
public APIException()

Methods The following methods are available in this class:


fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString, clone, equals, finalize, getClass, hashCode, notify, notifyAll

24 | OnCommand Insight Connect API Reference Guide

APISessionContext
A session context is required with every query to the API server in order to provide a consistent view of the data. It is also used to enforce the API version being used by the client, as well as the maximum number of values returned in a single query. Each session context equates to a snapshot of the data that was available when the session was created. Therefore, queries to a session context do not reflect any data changes that may have occurred after a session was opened. A session context should only be instantiated using the SANscreenAPIEndPoint.openSession(String, int) method. Typically, the life cycle of a session context in a client program should be: Open a New Session Issue Queries Close the Session The server returns an instance of a session context that should be used for further queries. The client passes the session context to the server with every query, thus maintaining a consistent view data. Once the client is done querying the server, it should close the session and discard the session context.

Constructors Constructs an uninitialized session context. This constructor should be used only by the WSAPI.
public APISessionContext()

Methods The following methods are available for this class. getId Returns getTime
public java.lang.String getId()

The unique identifier of the context.


public long getTime()

Returns

The time when a session was opened.

getClientVersion public java.lang.String getClientVersion() Returns getLimit The version of the API client that is using the context.

public int getLimit()

Returns

The maximum number of values in a response to a query.

Connect API classes | 25

toString Overrides

public java.lang.String toString() toString in class java.lang.Object

Application
Represents an application to which a host in the SAN can belong. Constructors Initializes an Application object.
public Application()

Methods The following methods are available from this class: getBusinessUnit setBusinessUnit isIgnoreSharing
public java.lang.String getBusinessUnit() public void setBusinessUnit(java.lang.String businessUnit) public boolean isIgnoreSharing()

setIgnoreSharing public void setIgnoreSharing(boolean ignoreSharing) getName setName getPriority setPriority getHostIds setHostIds
public java.lang.String getName() public void setName(java.lang.String name) public java.lang.String getPriority() public void setPriority(java.lang.String priority) public java.lang.String[] getHostIds() public void setHostIds(java.lang.String[] hostIds)

ApplicationResponse
Application Response Constructors Initializes an Application response object.
public ApplicationResponse()

26 | OnCommand Insight Connect API Reference Guide Methods The following methods are available from this class: getApplications setApplications
public Application[] getApplications()

Should be used by the WSAPI.


public void setApplications(Application[] applications)

getRequestIterator Gets the iterator which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator Should be used by the WSAPI.


public void setRequestIterator(RequestIterator iterator)

iterator getSize

The iterator of this response.

Gets the number of objects contained in this response. Note that this is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

Should be used by the WSAPI.


public void setSize(int size)

size

Number of objects in this response.

DeviceGroup
DeviceGroup class Constructors Initializes a device group object.
public DeviceGroup()

Methods The following methods are available from this class.

Connect API classes | 27

getName setName

public java.lang.String getName()

Should be used by the WSAPI.


public void setName(java.lang.String name)

getType setType

public java.lang.String getType()

Should be used by the WSAPI.


public void setType(java.lang.String type)

getStorageManagementId setStorageManagementId

public java.lang.String getStorageManagementId()

Should be used by the WSAPI.


public void setStorageManagementId(java.lang.String storageManagementId)

getStorageManagementName public java.lang.String

getStorageManagementName()

setStorageManagementName Should be used by the WSAPI.


public void setStorageManagementName(java.lang.String storageManagementName)

DeviceGroupResponse
DeviceGroupResponse class Constructors Initializes a device group response object.
public DeviceGroupResponse()

Methods The following methods are available from this class: getDeviceGroups setDeviceGroups
public DeviceGroup[] getDeviceGroups()

Should be used by the WSAPI.


public void setDeviceGroups(DeviceGroup[] deviceGroups)

28 | OnCommand Insight Connect API Reference Guide

getRequestIterator Gets the iterator which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator Should be used by the WSAPI.


public void setRequestIterator(RequestIterator iterator)

iterator getSize

The iterator of this response.

Gets the number of objects contained in this response. Note that this is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

Should be used by the WSAPI.


public void setSize(int size)

size

Number of objects in this response.

DRPath
DRPath class Constructors Initiates a DRPath object.
public DRPath()

Methods The following methods are available from this class. getHostId setHostId
public java.lang.String getHostId()

Should be used by the WSAPI.


public void setHostId(java.lang.String hostId)

getStorageId

public java.lang.String getStorageId()

Connect API classes | 29

setStorageId

Should be used by the WSAPI.


public void setStorageId(java.lang.String storageId)

getVolumeId setVolumeId

public java.lang.String getVolumeId()

Should be used by the WSAPI.


public void setVolumeId(java.lang.String volumeId)

getReplicaVolumeId setReplicaVolumeId

public java.lang.String getReplicaVolumeId()

Should be used by the WSAPI.


public void setReplicaVolumeId(java.lang.String replicaVolumeId)

getRemoteReplicaVolumeId setRemoteReplicaVolumeId

public java.lang.String getRemoteReplicaVolumeId()

Should be used by the WSAPI.


public void setRemoteReplicaVolumeId(java.lang.String remoteReplicaVolumeId)

getSecondaryReplicaVolumeId public java.lang.String

getSecondaryReplicaVolumeId()

setSecondaryReplicaVolumeId Should be used by the WSAPI.


public void setSecondaryReplicaVolumeId(java.lang.String secondaryReplicaVolumeId)

getRemoteHostId setRemoteHostId

public java.lang.String getRemoteHostId()

Should be used by the WSAPI.


public void setRemoteHostId(java.lang.String remoteHostId)

getRemoteStorageId setRemoteStorageId

public java.lang.String getRemoteStorageId()

Should be used by the WSAPI.


public void setRemoteStorageId(java.lang.String remoteStorageId

30 | OnCommand Insight Connect API Reference Guide

DRPathResponse
DRPathResponse class Constructors Initiates a DRPath response object.
public DRPathResponse()

Methods The following methods are available from this class: getDrPaths setDrPaths
public DRPath[] getDrPaths()

Should be used by the WSAPI.


public void setDrPaths(DRPath[] drPaths)

getRequestIterator Gets the iterator which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator Should be used by the WSAPI.


public void setRequestIterator(RequestIterator iterator)

iterator getSize

The iterator of this response.

Gets the number of objects contained in this response. Note that this is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

Should be used by the WSAPI.


public void setSize(int size)

size

Number of objects in this response.

Connect API classes | 31

FindObjectsResponse
FindObjectsResponse class Constructors Initiates a find objects response object.
public FindObjectsResponse()

Methods The following methods are available from this class: getDevices setDevices
public DeviceBase[] getDevices()

Should be used by the WSAPI.


public void setDevices(DeviceBase[] devices)

getRequestIterator Gets the iterator which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response. Used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator Should be used by the WSAPI.


public void setRequestIterator(RequestIterator iterator)

iterator getSize

The iterator of this response.

Gets the number of objects contained in this response. Note that this is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

Should be used by the WSAPI.


public void setSize(int size)

size

Number of objects in this response.

32 | OnCommand Insight Connect API Reference Guide

Generic
Represents a generic device. Generic devices are those known to OnCommand Insight but not yet identified. You can retrieve generic device information using the method call SANscreenAPIEndPoint.getGenerics(APISessionContext,RequestIterator). Constructors Initializes a generic object.
public Generic()

Methods The following methods are inherited from this class: getId
public java.lang.String getId()

Returns setId

The unique identifier of this object.

Should be used by the WSAPI.


public void setId(java.lang.String id)

id

The unique identifier of this object.

getWwn public java.lang.String getWwn() Returns The World Wide Name.

setWwn Should be used by the WSAPI.


public void setWwn(java.lang.String wwn)

wwn isDead

The World Wide Name.

public boolean isDead()

Returns True if this device is not currently visible to OnCommand Insight; otherwise false. setDead Should be used by the WSAPI.
public void setDead(boolean dead)

dead Indicates if a device is currently visible to OnCommand Insight. True = visible. False = not visible.

Connect API classes | 33

GenericResponse
A partial response to a SANscreenAPIEndPoint.getGenerics(APISessionContext,RequestIterator) method call containing an array of Generic objects. Constructors The following constructor initializes a generic response object.
public GenericResponse()

Methods The following methods are available from this class: getGenerics Generic devices are ports on unknown devices. An unknown device could be a switch, tape, disc storage controller, or an HBA with ports.
public Generic[] getGenerics()

Returns setGenerics

Generic devices known to OnCommand Insight.

Should be used by the WSAPI.


public void setGenerics(Generic[] generics)

generics Generic devices known to OnCommand Insight. Generic devices are ports on unknown devices. An unknown device could be a switch, tape, disc storage controller, or an HBA with ports. getRequestIterator Gets the iterator which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The iterator for this response.

setRequestIterator Should be used by the WSAPI.


public void setRequestIterator(RequestIterator iterator)

iterator getSize

The iterator of this response.

Gets the number of objects contained in this response. Note that this is not the total number of objects matching a query.
public int getSize()

Returns

The number of objects returned in this response.

34 | OnCommand Insight Connect API Reference Guide

setSize

Should be used by the WSAPI.


public void setSize(int size)

size

The number of objects in this response.

Host
Represents a host or server in the SAN. You can retrieve host information using the following method calls: SANscreenAPIEndPoint.getHosts(APISessionContext,RequestIterator) and SANscreenAPIEndPoint.getHost(APISessionContext,hostId). Constructors To be used by WSAPI only.
public Host()

Methods The following methods are available from this class: getName Gets the name of this device (usually, this is the DNS alias of the IP address).
public java.lang.String getName()

Returns

The name of this device.

setName Should be used by the WSAPI.


public void setName(java.lang.String name)

name getIp

The name of this device.

The TCP/IP address of this device, which cannot be NULL.


public java.lang.String getIp()

Returns setIp

The TCP/IP address of this device.

Should be used by the WSAPI.


public void setIp(java.lang.String ip)

ip isDead

The TCP/IP address of this device, cannot be NULL.

Indicator if the device is currently visible to OnCommand Insight. A device isn't visible to OnCommand Insight if no active data-source is currently reporting on it.
public boolean isDead()

Connect API classes | 35

Returns True if the device is not currently visible to OnCommand Insight; otherwise set to false. setDead Should be used by the WSAPI.
public void setDead(boolean dead)

dead True if the device is not currently visible to OnCommand Insight; otherwise false. getId
public java.lang.String getId()

Returns setId

The unique identifier of this object.

Should be used by the WSAPI.


public void setId(java.lang.String id)

id

The unique identifier for this object.

HostResponse
A partial response to a SANscreenAPIEndPoint.getHosts (APISessionContext, RequestIterator) method call containing an array of Host objects. Constructors To be used by WSAPI only.
public HostResponse()

Methods The following methods are available from this class: getHosts
public Host[] getHosts()

Returns setHosts

The hosts and servers contained in the host response.

Should be used by the WSAPI.


public void setHosts(Host[] hosts)

hosts

The hosts in the host response.

36 | OnCommand Insight Connect API Reference Guide

getRequestIterator Gets the iterator which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator Should be used by the WSAPI.


public void setRequestIterator(RequestIterator iterator)

iterator getSize

The iterator of this response.

Gets the number of objects contained in this response. Note that this is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

Should be used by the WSAPI.


public void setSize(int size)

size

Number of objects in this response.

InternalVolume
Represents an internal volume. Constructors Initiates the internal volume object.
public InternalVolume()

Methods The following methods are available from this class: getName Gets the name of the internal volume.
public String getName()

setName

Should be used by the WSAPI.


public void setName (String name)

getStorageId

Gets the ID of the storage object.


public String getStorageId()

Connect API classes | 37

setStorageId

Should be used by the WSAPI.


public void setStorageId(String storageId)

getStoragePool

Gets the ID of the storage pool.


public String getStoragePoolId()

setStoragePoolId

Should be used by the WSAPI.


public void setStoragePoolId(String storagePoolId)

getSpaceGuarantee

Gets a string indicating the space guarantee.


public String getSpaceGuarantee()

setSpaceGuarantee

Should be used by the WSAPI.


public void setSpaceGuarantee(String spaceGuarantee)

isThinProvisioned

public boolean isThinProvisioned()

True if thin provisioned. Otherwise, False. setThinProvisioned Should be used by the WSAPI.
public void setThinProvisioned(boolean thinProvisioned)

isThinProvisioningSupported

Indicates whether thin provisioning is supported.


public boolean isThinProvisioningSupported()

setThinProvisioningSupported Should be used by the WSAPI.


public void setThinProvisioningSupported(boolean thinProvisioningSupported)

isDedupeEnabled

True if deduplication is enabled. Otherwise, False.


public boolean isDedupeEnabled() {

setDedupeEnabled

Should be used by the WSAPI.


public void setDedupeEnabled(boolean dedupeEnabled)

getStatus

Gets the status of the internal volume.


public String getStatus()

setStatus

Should be used by the WSAPI.


public void setStatus(String status)

38 | OnCommand Insight Connect API Reference Guide

getType

Gets the internal volume type.


public String getType()

setType

Should be used by the WSAPI.


public void setType(String type)

getCloneSourceId

Gets the ID of the clone source.


public String getCloneSourceId()

setCloneSourceId

Should be used by the WSAPI.


public void setCloneSourceId(String cloneSourceId) {

getVirtualStorage

Gets the name of the virtual storage.


public String getVirtualStorage()

setVirtualStorage

Should be used by the WSAPI.


public void setVirtualStorage(String virtualStorage)

getHead

Gets the name of the head.


public String getHead()

setHead

Should be used by the WSAPI.


public void setHead(String head)

getProtectionType

Gets the type of protection on the internal volume.


public String getProtectionType()

setProtectionType

Should be used by the WSAPI.


public void setProtectionType(String protectionType)

getDedupeSavings

Gets the savings data based on the use of deduplication.


public float getDedupeSavings()

setDedupeSavings

Should be used by the WSAPI.


public void setDedupeSavings(float dedupeSavings)

getRawToUsableRatio

Gets the ratio of raw-to-usable capacity on the device.


public float getRawToUsableRatio()

setRawToUsableRatio

Should be used by the WSAPI.


public void setRawToUsableRatio(float rawToUsableRatio)

Connect API classes | 39

New Since Version

6.0

InternalVolumeResponse
A partial response to a SANscreenAPIEndPoint.getInternalVolumes (APISessionContext, RequestIterator) method call containing an array of InternalVolume objects. Constructors To be used by WSAPI only.
public InternalVolumeResponse()

Methods The following methods are available from this class: getInternalVolumes public InternalVolume[] getInternalVolumes() Returns internal volumes - The internal volumes contained in the host response. setInternalVolumes Should be used by the WSAPI.
public void setInternalVolumes(InternalVolume[] internalVolumes)

Parameter internalVolumes The internal volumes in the host response. getRequestIterator Gets the iterator which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response. Used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns setRequestIterator

RequestIterator - The request iterator for this response

Should be used by the WSAPI.


public void setRequestIterator(RequestIterator iterator)

Parameter

iterator The iterator of this response.

40 | OnCommand Insight Connect API Reference Guide

getSize

Gets the number of objects contained in this response. Note that this is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

Should be used by the WSAPI.


public void setSize(int size)

Parameter

size Number of objects in this response.

New Since Version

6.0

LogicalPort
Represents a logical port in the SAN. You can retrieve port information. Constructors
public LogicalPort()

Initiates the logical port object Methods The following methods are available from this class: getId
public java.lang.String getId()

Gets the unique identifier of this object. Returns setId The unique identifier of this object.

public void setId(java.lang.String id)

Should be used by the WSAPI. Parameter id The unique identifier for this object. getState
public java.lang.String getState()

Returns setState

Logical port state

public void setState(java.lang.String state)

Connect API classes | 41

Should be used by the WSAPI. Parameter State Logical port state getStatus
public java.lang.String getStatus()

Returns setStatus

Logical port status - either connected or disconnected

public void setStatus(java.lang.String status)

Should be used by the WSAPI. Parameter Status Logical port status - either connected or disconnected getWwn
public java.lang.String getWwn()

Returns setWwn

The World Wide Name of the port.

public void setWwn(java.lang.String wwn)

Should be used by the WSAPI. Parameter wwn The World Wide Name. getDeviceId
public java.lang.String getDeviceId()

Returns setDeviceId

The ID of the device to which the node belongs.

public void setDeviceId(java.lang.String deviceId)

Should be used by the WSAPI. Parameter deviceId The ID of the device to which the node belongs. getNodeId
public java.lang.String getNodeId()

Returns ID of the device that corresponds to the node that this port belongs to. For example,HBA of the host or protocol controller of the storage device. setNodeId
public void setNodeId(java.lang.String nodeId)

Should be used by the WSAPI.

42 | OnCommand Insight Connect API Reference Guide

Parameter nodeId ID of the device that corresponds to the node that this port belongs to. For example, HBA of the host or protocol controller of the storage device. getConnectedPortId public java.lang.String getConnectedPortId() Returns The ID of the port to which the other port is connected.

setConnectedPortId public void setConnectedPortId(java.lang.String


connectedPortId)

Should be used by the WSAPI. Parameter connectedPortId The ID of the port to which the other port is connected. isDead
public boolean isDead()

Returns True if this device is not currently visible to OnCommand Insight. setDead
public void setDead(boolean dead)

Should be used by the WSAPI. Parameter dead True if this device is not currently visible to OnCommand Insight. getName
public java.lang.String getName()

Returns setName

Name of the logical port.

public void setName(java.lang.String name)

Should be used by the WSAPI. Parameter name Name of the logical port. getPhysicalPortId
public java.lang.String getPhysicalPortId()

Returns

The physical port corresponding to the logical port.

Connect API classes | 43

setPhysicalPortId

public void setPhysicalPortId(java.lang.String physicalPortId)

Should be used by the WSAPI. Parameter physicalPortId The physical port corresponding to the logical port.

LogicalPortResponse
A partial response to any of several method calls that retrieve ports known to OnCommand Insight in the SAN being monitored. The response contains an array of LogicalPort objects. It is returned by the following methods: SANscreenAPIEndPoint.getConnectedPorts(APISessionContext,RequestIterator) SANscreenAPIEndPoint.getLogicalPortsByPhysicalPort(APISessionContext RequestIterator) SANscreenAPIEndPoint.getLogicalPortsByLogicalSwitch(APISessionContext, RequestIterator) SANscreenAPIEndPoint.getLogicalPortsByPhysicalSwitch(APISessionContext, RequestIterator)

Constructors Initiates the logical port response object


public LogicalPortResponse()

Methods The following methods are available from this class: getLogicalPorts
public LogicalPort[] getLogicalPorts()

Returns setLogicalPorts

The logical ports known to OnCommand Insight.

Should be used by the WSAPI.


public void setLogicalPorts(LogicalPort[] logicalPorts)

Parameter logicalPorts The logical ports known to OnCommand Insight.

44 | OnCommand Insight Connect API Reference Guide

getRequestIterator Gets the iterator which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator Should be used by the WSAPI.


public void setRequestIterator(RequestIterator iterator)

Parameter

iterator The iterator of this response.

getSize

Gets the number of objects contained in this response. Note that this is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

Should be used by the WSAPI.


public void setSize(int size)

Parameter

size Number of objects in this response.

Node
Represents a node in the SAN. You can retrieve known nodes using the method call SANscreenAPIEndPoint.getNodesOfDevice(APISessionContext,RequestIterator). Constructors
public Node()

Initiates the node object Methods The following methods are available from this class: getId
public java.lang.String getId()

Gets the unique identifier of this object. Returns The unique identifier of this object.

Connect API classes | 45

setId

public void setId(java.lang.String id)

Should be used by the WSAPI. Parameter id The unique identifier for this object. getDeviceID public java.lang.String getDeviceID() Returns The ID of the device where a node resides.

setDeviceID public void setDeviceID(java.lang.String deviceID) Should be used by the WSAPI. Parameter deviceID The ID of the device where a node resides. getWwn
public java.lang.String getWwn()

Returns setWwn

The World Wide Name of the node.

public void setWwn(java.lang.String wwn)

Should be used by the WSAPI. Parameter wwn The World Wide Name of the node. isDead
public boolean isDead()

Returns True if this device is not currently visible to OnCommand Insight; otherwise false. setDead
public void setDead(boolean dead)

Should be used by the WSAPI. Parameter dead Indicates whether a device is currently visible to OnCommand Insight. True = visible. False = not visible.

46 | OnCommand Insight Connect API Reference Guide

NodeResponse
A partial response to a SANscreenAPIEndPoint.getNodesOfDevice(APISessionContext, RequestIterator) method call containing an array of Node objects. Constructors Initiates a node response object.
public NodeResponse()

Methods The following methods are available from this class: getNodes
public Node[] getNodes()

Returns The nodes of a device, such as a host's HBA or the controller of a storage device. setNodes
public void setNodes(Node[] nodes)

Should be used by the WSAPI. Parameter nodes The nodes of a device, such as a host's HBA or the controller of a storage device. getRequestIterator public RequestIterator getRequestIterator() Gets the iterator which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations. Returns The request iterator for this response.

setRequestIterator public void setRequestIterator(RequestIterator iterator) Should be used by the WSAPI. Parameter iterator The iterator of this response. getSize
public int getSize()

Gets the number of objects contained in this response. Note that this is not the total number of objects matching a query.

Connect API classes | 47

Returns setSize

Number of objects returned in this response.

public void setSize(int size)

Should be used by the WSAPI. Parameter size Number of objects in this response.

Path
Represents a path in the SAN. You can retrieve known paths using the SANscreenAPIEndPoint.getPaths(APISessionContext,RequestIterator) method call. Constructors Initiates a path object
public Path()

Methods The following methods are available from this class: getId Gets the unique identifier of this object.
public java.lang.String getId()

Returns setId

The unique identifier of this object.

Should be used by the WSAPI.


public void setId(java.lang.String id)

Parameter

id The unique identifer for this object.

getArrayId

public java.lang.String getArrayId()

Returns setArrayId

The name of the storage device where the data for this path resides.

Should be used by the WSAPI.


public void setArrayId(java.lang.String arrayId)

Parameter arrayId

48 | OnCommand Insight Connect API Reference Guide

The name of the storage device where the data for this path resides. getHostId
public java.lang.String getHostId()

Returns setHostId

The name of the host from which the path originates.

Should be used by the WSAPI.


public void setHostId(java.lang.String hostId)

Parameter hostId The name of the host from which the path originates. getVolumeId public java.lang.String getVolumeId() Returns The name of the volume where the data for this path resides.

setVolumeId Should be used by the WSAPI.


public void setVolumeId(java.lang.String volumeId)

Parameter volumeId The name of the volume where the data for this path resides.

PathResponse
A partial response to a SANscreenAPIEndPoint.getPaths(APISessionContext,RequestIterator) method call containing an array of path objects. Constructors Initiates a path response object
public PathResponse()

Methods The following methods are available from this class: getPaths
public Path[] getPaths()

Returns The logical paths detected by OnCommand Insight in the SAN being monitored.

Connect API classes | 49

setPaths

Should be used by the WSAPI.


public void setNodes(Path[] paths)

Parameter paths The logical paths detected by OnCommand Insight in the SAN being monitored. getRequestIterator Gets the iterator which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator Should be used by the WSAPI.


public void setRequestIterator(RequestIterator iterator)

Parameter

iterator The iterator of this response.

getSize

Gets the number of objects contained in this response. Note that this is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

Should be used by the WSAPI.


public void setSize(int size)

Parameter

size Number of objects in this response.

Policy
Represents a policy. Constructors Initiates a policy object
public Policy()

50 | OnCommand Insight Connect API Reference Guide Methods The following methods are available from this class: getHostId setHostId
public java.lang.String getHostId()

Should be used by the WSAPI.


public void setHostId(java.lang.String hostId)

getArrayId setArrayId

public java.lang.String getArrayId()

Should be used by the WSAPI.


public void setArrayId(java.lang.String arrayId)

getVolumeId setVolumeId

public java.lang.String getVolumeId()

Should be used by the WSAPI.


public void setVolumeId(java.lang.String volumeId)

getRedundancy setRedundancy

public java.lang.String getRedundancy()

Should be used by the WSAPI.


public void setRedundancy(java.lang.String redundancy)

getHopsNumber setHopsNumber

public int getHopsNumber()

Should be used by the WSAPI.


public void setHopsNumber(int hopsNumber)

getHostPortsRedundancy public int getHostPortsRedundancy() setHostPortsRedundancy Should be used by the WSAPI.


public void setHostPortsRedundancy(int hostPortsRedundancy)

getVolumeSharingScope setVolumeSharingScope

public java.lang.String getVolumeSharingScope()

Should be used by the WSAPI.


public void setVolumeSharingScope(java.lang.String volumeSharingScope)

getOwner setOwner

public java.lang.String getOwner()

Should be used by the WSAPI.


public void setOwner(java.lang.String owner)

Connect API classes | 51

PolicyResponse
Represents a response to the SANScreenAPIEndPoint.getPolicies method. Constructors Initiates a policy object
public PolicyResponse()

Methods The following methods are available from this class: getPolicies setPolicies
public Policy[] getPolicies()

Should be used by the WSAPI.


public void setPolicies(Policy[] policies)

getRequestIterator Gets the iterator which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator Should be used by the WSAPI.


public void setRequestIterator(RequestIterator iterator)

Parameter

iterator The iterator of this response.

getSize

Gets the number of objects contained in this response. Note that this is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

Should be used by the WSAPI.


public void setSize(int size)

Parameter

size Number of objects in this response.

52 | OnCommand Insight Connect API Reference Guide

Port
Represents a port in the SAN. You can retrieve known ports. Direct Known Subclasses LogicalPort Constructors Initiates a Port object
public Port()

Methods The following methods are available from this class: getId Gets the unique identifier of this object.
public java.lang.String getId()

Returns setId

The unique identifier of this object

Should be used by the WSAPI.


public void setId(java.lang.String id)

Parameter

id The unique identifier for this object.

getState

public java.lang.String getState()

Returns setState Should be used by the WSAPI.

Port state

public void setState(java.lang.String state)

Parameter

state Port state

getStatus

public java.lang.String getStatus()

Returns setStatus

Port Status - either connected or disconnected.

Should be used by the WSAPI.


public void setStatus(java.lang.String status)

Connect API classes | 53

Parameter status Port status - either connected or disconnected. getWwn


public java.lang.String getWwn()

Returns setWwn

The World Wide Name of the port.

Should be used by the WSAPI.


public void setWwn(java.lang.String wwn)

Parameter

wwn The World Wide Name.

getDeviceId

public java.lang.String getDeviceId()

Returns setDeviceId

The ID of the device to which the node belongs.

Should be used by the WSAPI.


public void setDeviceId(java.lang.String deviceId)

Parameter deviceId The ID of the device to which the node belongs. getNodeId
public java.lang.String getNodeId()

Returns ID of the device that corresponds to the node that this port belongs to. For example, HBA of the host or protocol controller of the storage device. setNodeId Should be used by the WSAPI.
public void setNodeId(java.lang.String nodeId)

Parameter nodeId ID of the device that corresponds to the node that this port belongs to. For example, HBA of the host or protocol controller of the storage device. getConnectedPortId public java.lang.String getConnectedPortId() Returns The ID of the port to which the other port is connected.

54 | OnCommand Insight Connect API Reference Guide

setConnectedPortId Should be used by the WSAPI.


public void setConnectedPortId(java.lang.String connectedPortId)

Parameter connectedPortId The ID of the port to which the other port is connected. isDead
public boolean isDead()

Returns True if this device is not currently visible to OnCommand Insight. setDead Should be used by the WSAPI.
public void setDead(boolean dead)

Parameter dead True if this device is not currently visible to OnCommand Insight. getName
public java.lang.String getName()

Returns setName

Name of the port.

Should be used by the WSAPI.


public void setName(java.lang.String name)

Parameter

name Name of the port.

PortResponse
A partial response to any of several method calls that retrieve ports known to OnCommand Insight in the SAN being monitored. The response contains an array of Port objects. Constructors Initiates a Port Response object
public PortResponse()

Methods The following methods are available from this class:

Connect API classes | 55

getPorts

public Port[] getPorts()

Returns setPorts

The request iterator for this response.

Should be used by the WSAPI.


public void setPorts(Port[] ports)

Parameter

ports The iterator of this response.

getRequestIterator Gets the iterator which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator Should be used by the WSAPI.


public void setRequestIterator(RequestIterator iterator)

Parameter

iterator The iterator of this response.

getSize

Gets the number of objects contained in this response. Note that this is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

Should be used by the WSAPI.


public void setSize(int size)

Parameter

size Number of objects in this response.

RequestIterator
A RequestIterator is used by OnCommand Insight API to track and manage client query responses. Clients use the iterator to determine if there are more objects to be fetched by invoking the query

56 | OnCommand Insight Connect API Reference Guide again. The server uses the iterator to determine which objects should be returned in subsequent invocations of the query. Constructors To be used by WSAPI only (for deserializing the iterator).
public RequestIterator()

Methods The following methods are available from this class. getNextKey Gets the identifier of objects which should be returned on the next invocation of the query. Used internally by the API server.
public java.lang.String setNextKey()

Returns The identifier of the objects that should be returned on the next invocation of the query. setNextKey To be used by WSAPI only (for deserializing this iterator).
public void setNextKey(java.lang.String nextKey)

Parameter nextKey Identifies the objects that will be returned on the next invocation of the query. isHasMore Tells the client if there are more objects to be fetched by subsequent invocations of the query.
public boolean isHasMore()

Returns True if the client should invoke the query again using this iterator to get the next bulk of objects matching the query. setHasMore To be used by WSAPI only (for deserializing this response).
public void setHasMore(boolean hasMore)

Parameter hasMore True if the client should invoke the query again using this iterator to get the next bulk of objects matching the query). getMethodName Gets the name of the API query for which this iterator is used as part of the response.
public java.lang.String getMethodName()

Connect API classes | 57

Returns

The name of the query for which this iterator was created.

setMethodName To be used by WSAPI only (for deserializing this response).


public void setMethodName(java.lang.String methodName)

Parameter methodName The name of the query for which this iterator was created.

ReservationRequest
Used to generate reservation request for capacity. Constructors
public ReservationRequest()

Methods The following methods are available from this class: isSatisfied setSatisfied
public boolean isSatisfied()

Should be used by the WSAPI.


public void setSatisfied(boolean satisfied)

getDisplayName setDisplayName

public java.lang.String getDisplayName()

Should be used by the WSAPI.


public void setDisplayName(java.lang.String displayName)

getDescription setDescription

public java.lang.String getDescription()

Should be used by the WSAPI.


public void setDescription(java.lang.String description)

getOwner setOwner

public java.lang.String getOwner()

Should be used by the WSAPI.


public void setOwner(java.lang.String owner)

getRequester setRequester

public java.lang.String getRequester()

Should be used by the WSAPI.


public void setRequester(java.lang.String requester)

58 | OnCommand Insight Connect API Reference Guide

getRequesterEmail public java.lang.String getRequesterEmail() setRequesterEmail Should be used by the WSAPI.


public void setRequesterEmail(java.lang.String requesterEmail)

getState setState

public java.lang.String getState()

Should be used by the WSAPI.


public void setState(java.lang.String state)

getJustification setJustification

public java.lang.String getJustification()

Should be used by the WSAPI.


public void setJustification(java.lang.String justification)

getComments setComments

public java.lang.String getComments()

Should be used by the WSAPI.


public void setComments(java.lang.String comments)

getCreationDate setCreationDate

public long getCreationDate()

Should be used by the WSAPI.


public void setCreationDate(long creationDate)

getDueDate setDueDate

public long getDueDate()

Should be used by the WSAPI.


public void setDueDate(long dueDate)

getCompletionDate public long getCompletionDate() setCompletionDate Should be used by the WSAPI.


public void setCompletionDate(long completionDate)

getErrorCount setErrorCount

public int getErrorCount()

Should be used by the WSAPI.


public void setErrorCount(int errorCount)

getWarningCount setWarningCount

public int getWarningCount()

Should be used by the WSAPI.


public void setWarningCount(int warningCount)

getTargetType

public java.lang.String getTargetType()

Connect API classes | 59

setTargetType

Should be used by the WSAPI.


public void setTargetType(java.lang.String targetType)

getRequestTargets public ReservationRequestTarget[] getRequestTargets() setRequestTargets Should be used by the WSAPI.


public void setRequestTargets(ReservationRequestTarget[] requestTargets)

getProjectId setProjectId

public long getProjectId()

Should be used by the WSAPI.


public void setProjectId(long projectId)

getDataCenterId setDataCenterId

public long getDataCenterId()

Should be used by the WSAPI.


public void setDataCenterId(long dataCenterId)

getSanId setSanId

public long getSanId()

Should be used by the WSAPI.


public void setSanId(long sanId)

getBusinessUnitId setBusinessUnitId

public long getBusinessUnitId()

Should be used by the WSAPI.


public void setBusinessUnitId(long businessUnitId)

getTicket setTicket

public java.lang.String getTicket()

Should be used by the WSAPI.


public void setTicket(java.lang.String ticket)

ReservationRequirement
Represents requirement for Reservation Request. Constructors
public ReservationRequirement()

Methods The following methods are available from this class:

60 | OnCommand Insight Connect API Reference Guide

isSatisfied setSatisfied

public boolean isSatisfied()

Should be used by the WSAPI.


public void setSatisfied(boolean satisfied)

getNote setNote

public java.lang.String getNote()

Should be used by the WSAPI.


public void setNote(java.lang.String note)

getType setType

public java.lang.String getType()

Should be used by the WSAPI.


public void setType(java.lang.String type)

getAttributes setAttributes

public Attribute[] getAttributes()

Should be used by the WSAPI.


public void setAttributes(Attribute[] attributes)

StorageArray
Represents a storage array in the SAN. You can retrieve storage device information. Constructors Initiates a StorageArray object
public StorageArray()

Methods The following methods are available from this class: getName Gets the name of this device (usually, this is the DNS alias of the IP address).
public java.lang.String getName()

Returns setName

The name of this device.

Should be used by the WSAPI.


public void setName(java.lang.String name)

Parameter

name The name of this device.

Connect API classes | 61

getIp

Gets the IP address of this device.


public java.lang.String getIp()

Returns setIp

The IP address of this device, cannot be NULL.

Should be used by the WSAPI.


public void setIp(java.lang.String ip)

Parameter ip The IP address of this device, which cannot be NULL. isDead


public boolean isDead()

Returns True if the device is not currently visible to OnCommand Insight. setDead Should be used by the WSAPI.
public void setDead(boolean dead)

Parameter dead True if the device is not currently visible to OnCommand Insight. getId Gets the unique identifier of this object.
public java.lang.String getId()

Returns setId

The unique identifier of this object.

Should be used by the WSAPI.


public void setId(java.lang.String id)

Parameter

id The unique identifer for this object

getMicrocodeVersion public java.lang.String getMicrocodeVersion() Returns The microcode version.

setMicrocodeVersion Should be used by the WSAPI.


public void setMicrocodeVersion(java.lang.String microcodeVersion)

Parameter

microcodeVersion

62 | OnCommand Insight Connect API Reference Guide

The microcode version. getModel


public java.lang.String getModel()

Returns setModel

The vendor model.

Should be used by the WSAPI.


public void setModel(java.lang.String model)

Parameter

model The vendor model.

getRawCapacityGB

public double getRawCapacityGB()

Returns setRawCapacityGB

The raw capacity of the storage.

Should be used by the WSAPI.


public void setRawCapacityGB(double capacityGB)

Parameter

capacityGB The raw capacity of the storage.

getSerialNumber

public java.lang.String getSerialNumber()

Returns setSerialNumber

The serial number of the storage.

Should be used by the WSAPI.


public void setSerialNumber(java.lang.String serialNumber)

Parameter

serialNumber The serial number of the storage.

getVendor

public java.lang.String getVendor()

Returns setVendor

The vendor name, such as EMC or HDS.

Should be used by the WSAPI.


public void setVendor(java.lang.String vendor)

Parameter vendor The vendor name, such as EMC or HDS, etc.

Connect API classes | 63

StorageArrayResponse
A partial response to a SANscreenAPIEndPoint.getStorageArrays(APISessionContext, RequestIterator) method call containing an array of StorageArray objects. Constructors Initializes a StorageArrayResponse object.
public StorageArrayResponse()

Methods The following methods are available from this class: getArrays
public StorageArray[] getArrays()

Returns setArrays

An array of storages.

Should be used by the WSAPI.


public void setArrays(StorageArray[] arrays)

Parameters

arrays An array of storages

getRequestIterator Gets the iterator which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response. Used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator Should be used by the WSAPI.


public void setRequestIterator(RequestIterator iterator)

Parameter

iterator The iterator of this response.

getSize

Gets the number of objects contained in this response. Note that this is not the total number of objects matching a query.
public int getSize()

Returns

Number of objects returned in this response.

64 | OnCommand Insight Connect API Reference Guide

setSize

Should be used by the WSAPI.


public void setSize(int size)

Parameter

size Number of objects in this response.

Switch
Represents a switch in the SAN. You can retrieve switch information. Constructors Initializes a switch object.
public Switch()

Methods The following methods are available from this class: getName Gets the name of this device (usually, this is the DNS alias of the IP address).
public java.lang.String getName()

Returns setName

The name of this device.

Should be used by the WSAPI.


public void setName(java.lang.String name)

Parameter

name The name of this device.

getIp

Gets the IP address of this device.


public java.lang.String getIp()

Returns setIp

The IP address of this device, cannot be NULL.

Should be used by the WSAPI.


public void setIp(java.lang.String ip)

Parameter

ip The IP address of this device, cannot be NULL.

Connect API classes | 65

isDead

Gets if this device is currently visible to OnCommand Insight. A device isn't visible to OnCommand Insight if no active data-source is currently reporting on it.
public boolean isDead()

Returns setDead

True if the device is not currently visible to OnCommand Insight.

Should be used by the WSAPI.


public void setDead(boolean dead)

Parameter dead True if the device is not currently visible to OnCommand Insight getId Gets the unique identifier of this object.
public java.lang.String getId()

Returns setId

The unique identifier of this object.

Should be used by the WSAPI.


public void setId(java.lang.String id)

Parameter

id The unique identifier for this object

getModel

public java.lang.String getModel()

Returns setModel

The model of the switch.

Should be used by the WSAPI.


public void setModel(java.lang.String model)

Parameter

model The model of the switch.

getStatus

public java.lang.String getStatus()

Returns setStatus

The current status of the switch.

Should be used by the WSAPI.


public void setStatus(java.lang.String status)

Parameter

status The current status of the switch.

66 | OnCommand Insight Connect API Reference Guide

getVendor public java.lang.String getVendor() Returns The vendor of the switch.

setVendor Should be used by the WSAPI.


public void setVendor(java.lang.String vendor)

Parameter

vendor The vendor of the switch.

getWwn

public java.lang.String getWwn()

Returns setWwn

The World Wide Name of the switch.

Should be used by the WSAPI.


public void setWwn(java.lang.String wwn)

Parameter

wwn The World Wide Name of the switch.

SwitchResponse
A partial response to two method calls that retrieve switch devices known to OnCommand Insight. The response contains an array of switch objects. Constructors Initializes a switch response object.
public SwitchResponse()

Methods The following methods are available from this class: getSwitches public Switch[] getSwitches() Returns setSwitches Should be used by the WSAPI.
public void setSwitches(Switch[] switches)

A switch object.

Parameter

switches The switch object.

Connect API classes | 67

getRequestIterator Gets the iterator which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response. Used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator Should be used by the WSAPI.


public void setRequestIterator(RequestIterator iterator)

Parameter

iterator The iterator of this response.

getSize

Gets the number of objects contained in this response. Note that this is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

Should be used by the WSAPI.


public void setSize(int size)

Parameter

size Number of objects in this response.

SynchronizationResponse
Constructors
public SynchronizationResponse()

Methods The following methods are available from this class: getSynchronizations public Synchronization[] getSynchronizations() setSynchronizations Should be used by the WSAPI.
public void setSynchronizations(Synchronization[] synchronizations)

68 | OnCommand Insight Connect API Reference Guide

getRequestIterator

Gets the iterator which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns setRequestIterator

The request iterator for this response.

Should be used by the WSAPI.


public void setRequestIterator(RequestIterator iterator)

Parameter

iterator The iterator of this response.

getSize

Gets the number of objects contained in this response. Note that this is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

Should be used by the WSAPI.


public void setSize(int size)

Parameter

size Number of objects in this response. size - Number of objects in this response.

Tape
Represents a tape storage device in the SAN. Constructors Initializes a tape object.
public Tape()

Methods The following methods are available from this class: getName Gets the name of this device (usually, this is the DNS alias of the IP address).
public java.lang.String getName()

Returns

The name of this device.

Connect API classes | 69

setName

Should be used by the WSAPI.


public void setName(java.lang.String name)

Parameter

name The name of this device.

getIp

Gets the IP address of this device.


public java.lang.String getIp()

Returns setIp

The IP address of this device, cannot be NULL.

Should be used by the WSAPI.


public void setIp(java.lang.String ip)

Parameter ip The IP address of this device, cannot be NULL. isDead Gets if this device is currently visible to OnCommand Insight. A device isn't visible to OnCommand Insight if no active data-source is currently reporting on it.
public boolean isDead()

Returns True if the device is not currently visible to OnCommand Insight. setDead Should be used by the WSAPI.
public void setDead(boolean dead)

Parameter dead True if the device is not currently visible to OnCommand Insight. getId Gets the unique identifier of this object.
public java.lang.String getId()

Returns setId

The unique identifier of this object.

Should be used by the WSAPI.


public void setId(java.lang.String id)

Parameter

id The unique identifier for this object.

getModel

public java.lang.String getModel()

70 | OnCommand Insight Connect API Reference Guide

Returns setModel

The model of the tape device.

Should be used by the WSAPI.


public void setModel(java.lang.String model)

Parameter

model The model of the tape device.

getSerialNumber public java.lang.String getSerialNumber() Returns The serial number of the tape device.

setSerialNumber Should be used by the WSAPI.


public void setSerialNumber(java.lang.String serialNumber)

Parameter

serialNumber The serial number of the tape device.

getVendor

public java.lang.String getVendor()

Returns setVendor

The vendor of the tape device.

Should be used by the WSAPI.


public void setVendor(java.lang.String vendor)

Parameter

vendor The vendor of the tape device.

TapeResponse
A partial response to a SANscreenAPIEndPoint.getTapes(APISessionContext,RequestIterator) method call containing an array of Tape objects. Constructors Initializes a violation object.
public TapeResponse()

Methods The following methods are available from this class: getTapes
public Tape[] getTapes()

Connect API classes | 71

Returns setTapes

An array of tape objects.

Should be used by the WSAPI.


public void setTapes(Tape[] tapes)

Parameter

tapes An array of tape objects.

getRequestIterator Gets the iterator, which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator Should be used by the WSAPI.


public void setRequestIterator(RequestIterator iterator)

Parameter

iterator The iterator of this response.

getSize

Gets the number of objects contained in this response. This is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

Should be used by the WSAPI.


public void setSize(int size)

Parameter

size Number of objects in this response.

Task
Gets planning task by ID. Constructors
public Task()

72 | OnCommand Insight Connect API Reference Guide Methods The following methods are available from this class: getHostId getName setName
public java.lang.String getHostId() public java.lang.String getName()

Should be used by the WSAPI.


public void setName(java.lang.String name)

getUserTaskId setUserTaskId

public java.lang.String getUserTaskId()

Should be used by the WSAPI.


public void setUserTaskId(java.lang.String userTaskId)

getReferenceNumber public java.lang.String getReferenceNumber() setReferenceNumber Should be used by the WSAPI.


public void setReferenceNumber(java.lang.String referenceNumber)

getState setState

public java.lang.String getState()

Should be used by the WSAPI.


public void setState(java.lang.String state)

getStatus setStatus

public java.lang.String getStatus()

Should be used by the WSAPI.


public void setStatus(java.lang.String status)

getViolationsCount setViolationsCount

public int getViolationsCount()

Should be used by the WSAPI.


public void setViolationsCount(int violationsCount)

getErrorsCount setErrorsCount

public int getErrorsCount()

Should be used by the WSAPI.


public void setErrorsCount(int errorsCount)

getOwner setOwner

public java.lang.String getOwner()

Should be used by the WSAPI.


public void setOwner(java.lang.String owner)

getComments

public java.lang.String getComments()

Connect API classes | 73

setComments

Should be used by the WSAPI.


public void setComments(java.lang.String comments)

getStartTime setStartTime

public long getStartTime()

Should be used by the WSAPI.


public void setStartTime(long startTime)

getEndTime setEndTime

public long getEndTime()

Should be used by the WSAPI.


public void setEndTime(long endTime)

getDependedTaskId setDependedTaskId

public java.lang.String getDependedTaskId()

Should be used by the WSAPI.


public void setDependedTaskId(java.lang.String dependedTaskId)

TaskResponse
Gets all planning tasks. Constructors
public TaskResponse()

Methods The following methods are available from this class: getTask setTask
public java.lang.String getTasks()

Should be used by the WSAPI.


public void setTasks(java.lang.String details)

getRequestIterator Gets the iterator which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator Should be used by the WSAPI.


public void setRequestIterator(RequestIterator iterator)

74 | OnCommand Insight Connect API Reference Guide

Parameter

iterator The iterator of this response.

getSize

Gets the number of objects contained in this response. Note that this is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

Should be used by the WSAPI.


public void setSize(int size)

Parameter

size Number of objects in this response.

TaskViolationResponse
Gets future violations for a given task. Constructors
public TaskViolationResponse()

Methods The following methods are available from this class: getTaskViolations public TaskViolation[] getTaskViolations() setTaskViolations Should be used by the WSAPI.
public void setTaskViolations(TaskViolation[] taskViolations)

getRequestIterator Gets the iterator, which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator Should be used by the WSAPI.


public void setRequestIterator(RequestIterator iterator)

Parameter

iterator

Connect API classes | 75

The iterator of this response. getSize Gets the number of objects contained in this response. This is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

Should be used by the WSAPI.


public void setSize(int size)

Parameter

size Number of objects in this response.

Violation
Constructors Initializes a violation object.
public Violation()

Methods The following methods are available from this class: getHostId setHostId
public java.lang.String getHostId()

Should be used by the WSAPI.


public void setHostId(java.lang.String hostId)

getArrayId setArrayId

public java.lang.String getArrayId()

Should be used by the WSAPI.


public void setArrayId(java.lang.String arrayId)

getVolumeId setVolumeId

public java.lang.String getVolumeId()

Should be used by the WSAPI.


public void setVolumeId(java.lang.String volumeId)

setType

Should be used by the WSAPI.


public void setType(java.lang.String type)

76 | OnCommand Insight Connect API Reference Guide

getType

Gets the Violation Type.


public java.lang.String getType()

The following Violation Types are included: Violation Type Corresponding UI Description Field Path doesn't have policy assigned to it. There is an existing policy and/or violation for the path but path itself went down. A path policy requires NO single point of failure between the host and volume, but in reality SPF exists. A path policy requires dual fabric redundancy between host and volume, but in reality there is only one fabric. The number of switch hops specified in the path policy is less than the actual number of switch hops between host and volume. The number of host ports specified in the path policy is greater than the actual number of host ports. The sharing model set in the path policy doesn't match the existing volume sharing conditions. For example, if the path policy has "Application" model of volume sharing (which means only hosts from the same application are allowed to share certain volume, but volume is configured to be available to any host) sharing violation will be created. The number of storage ports specified in the path policy is greater than the actual number of storage ports. A path from the host to the virtual volume doesn't have a corresponding backend link (backend LUN). The number of iSCSI sessions defined in the iSCSI path policy is greater than the actual number of iSCSI sessions. The number of iSCSI connections defined in the iSCSI path policy is greater than the actual number of iSCSI connections.

EXIST_NOT_APP Unauthorized path ROVED APPROVE_NOT_ Path Outage EXIST NO_SPF REDUNDANCY_ VIOLATION Single Point of Failure Missing Redundancy

HOPS_VIOLATIO Switch Hop Count N HOST_PORTS_VI Missing Active OLATION Host Ports SHARE_VOLUM Unauthorized E_SCOPE_VIOLA Sharing TION

STORAGE_PORT Missing Active S_VIOLATION Storage Ports BACKEND_OUT AGE_VIOLATIO N Virtual Volume Missing Backend Support

ISCSI_NUMBER_ Session Count OF_SESSIONS_V IOLATION ISCSI_NUMBER_ Connection Count OF_CONNECTIO NS_VIOLATION

Connect API classes | 77

Violation Type

Corresponding UI Description Field In case security is required by the iSCSI path policy and if security settings for at least one iSCSI session corresponding to the path are not strong (both inbound and outbound keywords should be present), then the iSCSI security violation is generated. All storage ports that are part of the same path from ESX server to storage/ volume do NOT share the same storage processor, but the policy is turned on for the single storage processor for volume active paths. A volume is NOT accessed by all ESX hosts from the same virtual cluster, but the policy is turned on for identical volume access for hosts within a virtual cluster.

ISCSI_SECURITY Missing Security _VIOLATION

HV_ACTIVE_PA TH_CONFLICT_ VIOLATION

Active Path Conflict

HV_MISSING_VI Missing Virtual RTUAL_ Cluster Paths CLUSTER_PATH _VIOLATION

HV_INCONSISTE Inconsistent LUNS Different LUN numbers exist for the same volume NT_LUNS_ accessed by ESX hosts from the same virtual cluster, but VIOLATION the policy is turned on for identical volume LUN numbers for hosts within a virtual cluster. HV_MISSING_VI Missing Virtual RTUAL_ Cluster NAS Share CLUSTER_NAS_ PATH_ VIOLATION New Since Version A NAS share is NOT accessed by all ESX hosts from the same virtual cluster, but the policy is turned on for identical NAS share access for hosts within a virtual cluster.

6.0. Addition of Violation Types to getType method documentation.

ViolationResponse
A partial response to a SANscreenAPIEndPoint.getViolations (APISessionContext, RequestIterator) method call containing an array of Violation objects. Constructors Initializes a volume response object.
public ViolationResponse()

Methods The following methods are available from this class:

78 | OnCommand Insight Connect API Reference Guide

getViolations setViolations

public Violation[] getViolations()

Should be used by the WSAPI.


public void setViolations(Violation[] violations)

getRequestIterator Gets the iterator, which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator Should be used by the WSAPI.


public void setRequestIterator(RequestIterator iterator)

Parameter

iterator The iterator of this response.

getSize

Gets the number of objects contained in this response. This is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response. Should be used by the WSAPI.


public void setSize(int size)

Parameter

size Number of objects in this response.

VirtualMachine
Constructors Initiates the virtual machine object.
public VirtualMachine()

Methods The following methods are available from this class: getMoid Gets the virtual machine ID.
public String getMoid()

Connect API classes | 79

setMoid

Should be used by the WSAPI.


public void setMoid(String moid)

getName

Gets the virtual machine name.


public String getName()

setName

Should be used by the WSAPI.


public void setName(String name)

getDnsName

Gets the DNS name.


public String getDnsName()

setDnsName

Should be used by the WSAPI.


public void setDnsName(String dnsName)

getIps

Gets the IP address.


public String getIps()

setIps

Should be used by the WSAPI.


public void setIps(String ips)

getPowerState

Gets the state of the virtual machines power.


public String getPowerState(){

setPowerState

Should be used by the WSAPI.


public void setPowerState(String powerState)

getPowerStateChangeTime Gets the time of a change to the virtual machines power state.
public String getPowerStateChangeTime()

setPowerStateChangeTime Should be used by the WSAPI.


public void setPowerStateChangeTime(String powerStateChangeTime)

getGuestState

Gets the state of the guest machine.


public String getGuestState()

setGuestState

Should be used by the WSAPI.


public void setGuestState(String guestState)

getOs

Gets the virtual machines operating system.


public String getOs()

setOs

Should be used by the WSAPI.


public void setOs(String os)

80 | OnCommand Insight Connect API Reference Guide

getProcessors

Gets the virtual machines processor information.


public String getProcessors()

setProcessors

Should be used by the WSAPI.


public void setProcessors(String processors)

getMemory

Gets the virtual machines memory information.


public String getMemory()

setMemory

Should be used by the WSAPI.


public void setMemory(String memory)

getHostId

Gets the ID of the host associated with this virtual machine.


public String getHostId()

setHostId

Should be used by the WSAPI.


public void setHostId(String hostId)

getDataStoreId

Gets the ID of the data source.


public String getDataStoreId()

setDataStoreId

Should be used by the WSAPI.


public void setDataStoreId(String dataStoreId)

New Since Version

6.0

VirtualMachineResponse
A partial response to a SANscreenAPIEndPoint.getVirtualMachine (APISessionContext, RequestIterator) method call containing an array of VirtualMachine objects. Constructors Initiates the virtual machine response object.
public VirtualMachineResponse()

Methods The following methods are available from this class: getVirtualMachines public VirtualMachine[] getVirtualMachines() Returns The virtual machines contained in the response.

Connect API classes | 81

setVirtualMachines Should only be used by WSAPI.


public void setVirtualMachines(VirtualMachine[] virtualMachines)

Parameter

virtualMachines The virtual machines in the response.

getRequestIterator Gets the iterator, which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator To be used by WSAPI only.


public void setRequestIterator(RequestIterator iterator)

Parameter

iterator The iterator of this response.

getSize

Gets the number of objects contained in this response. Note that this is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

To be used by WSAPI only.


public void setSize(int size)

Parameter

size Number of objects in this response.

New Since Version 6.0

Volume
Represents a volume in the SAN. Constructors Initializes a volume object.
public Volume()

82 | OnCommand Insight Connect API Reference Guide Methods The following methods are available from this class: getId Gets the unique identifier of this object.
public java.lang.String getId()

Returns setId

The unique identifier of this object.

Should only be used by WSAPI.


public void setId(java.lang.String id)

Parameter

id The unique identifier for this object.

getCapacityGB

public double getCapacityGB()

Returns setCapacityGB

The capacity of the volume.

Should be used by the WSAPI.


public void setCapacityGB(double capacityGB)

Parameter

capacityGB The capacity of the volume.

getName

public java.lang.String getName()

Returns setName

The name of the volume.

Should be used by the WSAPI.


public void setName(java.lang.String name)

Parameter

name The name of the volume.

getRawCapacityGB public double getRawCapacityGB() Returns The raw capacity of the volume.

setRawCapacityGB Should be used by the WSAPI.


public void setRawCapacityGB(double rawCapacityGB)

Parameter

rawCapacityGB The raw capacity of the volume.

getRedundancy

public java.lang.String getRedundancy()

Connect API classes | 83

Returns setRedundancy

The volume redundancy.

Should be used by the WSAPI.


public void setRedundancy(java.lang.String redundancy)

Parameter

redundancy The volume redundancy.

getType

public java.lang.String getType()

Returns setType

The type of volume.

Should be used by the WSAPI.


public void setType(java.lang.String type)

Parameters

type The volume type.

getStorageID

public java.lang.String getStorageID()

Returns setStorageID

The storage ID.

Should be used by the WSAPI.


public void setStorageID(java.lang.String storageID)

Parameter

storageID The storage ID.

getDiskType

public java.lang.String getDiskType()

Returns setDiskType Should be used by the WSAPI.

The disk type.

public void setDiskType(java.lang.String diskType)

Parameter

diskType The disk type.

84 | OnCommand Insight Connect API Reference Guide

VolumeMap
Represents mapping between a storage unit volume and a port on the same storage unit. In addition, you can use a volume mask to prevent certain ports from accessing the volume. See VolumeMask. Constructors Initializes a volume map object.
public VolumeMap()

Methods The following methods are available from this class: getId
public java.lang.String getId()

Returns setId

The unique identifier of this object.

Should only be used by WSAPI.


public void setId(java.lang.String id)

Parameter id The unique identifier for this object. getLun


public java.lang.String getLun()

Returns The logical unit number used by the host to access this volume. setLun Should only be used by WSAPI.
public void setLun(java.lang.String lun)

Parameter lun The logical unit number used by the host to access this volume. getStoragePortId
public java.lang.String getStoragePortId()

Returns The port on the storage device to which the volume is mapped.

Connect API classes | 85

setStoragePortId

Should only be used by WSAPI.


public void setStoragePortId(java.lang.String storagePortId)

Parameter storagePortId The port on the storage device to which the volume is mapped. getProtocolController
public java.lang.String getProtocolController()

Returns The protocol controller through which the volume is mapped to the storage port. setStoragePortId Should only be used by WSAPI.
public void setProtocolController(java.lang.String protocolController)

Parameter protocolController The protocol controller through which the volume is mapped to the storage port. getVolumeId
public java.lang.String getVolumeId()

Returns The ID of the volume being masked to a specified disk storage port. setVolumeId Should be used by the WSAPI.
public void setVolumeId(java.lang.String volumeId)

Parameter volumeId The ID of the volume being masked to a specified disk storage port. getStoragePortWwn
public java.lang.String getStoragePortWwn()

Returns The World Wide Name for the port to which the volume is mapped. setStoragePortWwn Should only be used by WSAPI.
public void setStoragePortWwn(java.lang.String storagePortWwn)

Parameter storagePortWwn

86 | OnCommand Insight Connect API Reference Guide

The World Wide Name for the port to which the volume is mapped. isWwnsecurityvalidity Validates the WWNs of the ports accessing a volume to ensure they are masked for that volume.
public boolean isWwnsecurityvalidity()

Returns When this flag is true, the system validates the WWNs of the ports accessing a volume to ensure they are masked for that volume. The port WWN is stored in the storagePortWwn member in the VolumeMask class. If set to false, the system ignores the WWNs of ports access a volume and therefor eliminates the need for masking. setWwnsecurityvalidity Validates the WWNs of the ports accessing a volume to ensure they are masked for that volume. Should be used by the WSAPI.
public void setWwnsecurityvalidity(boolean wwnsecurityvalidity)

Parameter wwnsecurityvalidity When this flag is true, the system validates the WWNs of the ports accessing a volume to ensure they are masked for that volume. The port WWN is stored in the storagePortWwn member in the VolumeMask class. If set to false, the system ignores the WWNs of ports access a volume and therefor eliminates the need for masking.

VolumeMapResponse
A partial response to a SANscreenAPIEndPoint.getVolumeMap (APISessionContext, RequestIterator) method call containing an array of VolumeMap objects. Constructors Initializes a volume map response object
public VolumeMapResponse()

Connect API classes | 87 Methods The following methods are available from this class: getVolumeMaps
public VolumeMap[] getVolumeMaps()

Returns setVolumeMaps

An array of volume maps.

Should only be used by WSAPI.


public void setVolumeMaps(VolumeMap[] volumeMaps)

Parameter

volumeMaps An array of volume maps.

getRequestIterator Gets the iterator, which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator Should only be used by WSAPI.


public void setRequestIterator(RequestIterator iterator)

Parameter

iterator The iterator of this response.

getSize

Gets the number of objects contained in this response. Note that this is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

Should only be used by WSAPI.


public void setSize(int size)

Parameter

size Number of objects in this response.

88 | OnCommand Insight Connect API Reference Guide

VolumeMask
Adds masking between a volume (disk storage port) and a host. Constructors Initializes a volume mask object.
public VolumeMask()

Methods The following methods are available from this class: getId Gets the unique identifier of this object.
public java.lang.String getId()

Returns setId

The unique identifier of this object.

Should only be used by WSAPI.


public void setId(java.lang.String id)

Parameter id The unique identifer for this object. getInitiatorPortOrNodeWwn public java.lang.String

getInitiatorPortOrNodeWwn()

Returns The host port or adapter to which the storage volume is masked. setInitiatorPortOrNodeWwn Should only be used by WSAPI.
public void setInitiatorPortOrNodeWwn(java.lang.String initiatorPortOrNodeWwn)

Parameter initiatorPortOrNodeWwn The host port or adapter to which the storage volume is masked. getStoragePortWwn
public java.lang.String getStoragePortWwn()

Returns

The World Wide Name of the storage port.

Connect API classes | 89

setStoragePortWwn

Should only be used by WSAPI.


public void setStoragePortWwn(java.lang.String storagePortWwn)

Parameter storagePortWwn The World Wide Name of the storage port. getVolumeId
public java.lang.String getVolumeId()

Returns The ID for the volume to be masked to the host adaptor or port. setVolumeId Should only be used by WSAPI.
public void setVolumeId(java.lang.String volumeId)

Parameter volumeId The identifier for the volume to be masked to the host adaptor or port. getStoragePortId
public java.lang.String getStoragePortId()

Returns The ID of the storage port from which the volume is accessible to the host initiator. setStoragePortId Should only be used by WSAPI.
public void setStoragePortId(java.lang.String storagePortId)

Parameter storagePortId The ID of the storage port from which the volume is accessible to the host initiator. getProtocolController
public java.lang.String getProtocolController()

Returns The protocol controller through which the volume is mapped to the storage port. setProtocolController Should only be used by WSAPI.
public void setProtocolController(java.lang.String protocolController)

90 | OnCommand Insight Connect API Reference Guide

Parameter protocolController The protocol controller through which the volume is mapped to the storage port.

VolumeMaskResponse
String containing an array of volume masks. A partial response to the method call:
SANscreenAPIEndPoint.getVolumeMasksByStorageArray(APISessionContext, RequestIterator,

Constructors Initializes a volume mask response object.


public VolumeMaskResponse()

Methods The following methods are available from this class: getMasks
public VolumeMask[] getMasks()

Returns setMasks

The masks known to OnCommand Insight.

Should only be used by WSAPI.


public void setViolations(VolumeMask[] masks)

Parameter masks The masks known to OnCommand Insight getRequestIterator Gets the iterator, which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator Should only be used by WSAPI.


public void setRequestIterator(RequestIterator iterator)

Parameter

iterator

Connect API classes | 91

The iterator of this response. iterator - The iterator of this response. getSize Gets the number of objects contained in this response. This is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

Should only be used by WSAPI.


public void setSize(int size)

Parameter

size Number of objects in this response.

VolumeResponse
A partial response to two method calls that retrieve volumes known to OnCommand Insight. The response contains an array of Volume objects. It is returned by the following methods:
SANscreenAPIEndPoint.getVolumes(APISessionContext, RequestIterator) and SANscreenAPIEndPoint.getVolumesByStorageArray(APISessionContext, RequestIteratorBean)

Constructors Initializes a volume response object.


public VolumeResponse()

Methods The following methods are available from this class: getVolumes public Volume[] getVolumes() Returns An array of volumes.

setVolumes Should only be used by WSAPI.


public void setVolumes(Volume[] volumes)

Parameter

volumes An array of volumes.

92 | OnCommand Insight Connect API Reference Guide

getRequestIterator Gets the iterator, which is used by the client to determine if there are more objects to be fetched in addition to the objects in this response, used by the server to determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns

The request iterator for this response.

setRequestIterator To be used by WSAPI only (for deserializing this response).


public void setRequestIterator(RequestIterator iterator)

Parameter

iterator The iterator of this response.

getSize

Gets the number of objects contained in this response. This is not the total number of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

To be used by WSAPI only (for deserializing the response).


public void setSize(int size)

Parameter

size Number of objects in this response.

VolumesSynchronizationState
Initiates a volume synchronization state object. Constructors
public VolumesSynchronizationState()

Methods The following methods are available from this class: getSourceStorageId setSourceStorageId
public java.lang.String getSourceStorageId()

Should be used by the WSAPI.


public void setSourceStorageId(java.lang.String sourceStorageId)

getSourceVolumeId

public java.lang.String getSourceVolumeId()

Connect API classes | 93

setSourceVolumeId

Should be used by the WSAPI.


public void setSourceVolumeId(java.lang.String sourceVolumeId)

getTargetStorageId setTargetStorageId

public java.lang.String getTargetStorageId()

Should be used by the WSAPI.


public void setTargetStorageId(java.lang.String targetStorageId)

getTargetVolumeId setTargetVolumeId

public java.lang.String getTargetVolumeId()

Should be used by the WSAPI.


public void setTargetVolumeId(java.lang.String targetVolumeId)

getVolumesSynchronizationState public java.lang.String

getVolumesSynchronizationState()

setVolumesSynchronizationState Should be used by the WSAPI.


public void setVolumesSynchronizationState(java.lang.String volumesSynchronizationState)

getDetailedSynchronizationState public int getDetailedSynchronizationState() setDetailedSynchronizationState Should be used by the WSAPI.


public void setDetailedSynchronizationState(int detailedSynchronizationState)

getTimeStamp setTimeStamp

public long getTimeStamp()

Should be used by the WSAPI.


public void setTimeStamp(long timeStamp)

VolumesSynchronizationStateResponse
Initiates the volumes synchronization state response object. Constructors
public VolumesSynchronizationStateResponse()

Methods The following methods are available from this class:

94 | OnCommand Insight Connect API Reference Guide

getVolumesSynchronizationState public VolumesSynchronizationState[]


getVolumesSynchronizationState()

setVolumesSynchronizationState Should only be used by WSAPI.

public void setVolumesSynchronizationState(VolumesSynchronizationSt volumesSynchronizationState)

getRequestIterator

Gets the iterator, which is used by the client to determine if there are mor to be fetched in addition to the objects in this response, used by the server determine which objects to return in subsequent invocations.
public RequestIterator getRequestIterator()

Returns setRequestIterator

The request iterator for this response.

Should only be used by WSAPI.

public void setRequestIterator(RequestIterator iterator

Parameter

iterator The iterator of this response.

getSize

Gets the number of objects contained in this response. This is not the tota of objects matching a query.
public int getSize()

Returns setSize

Number of objects returned in this response.

Should only be used by WSAPI.


public void setSize(int size)

Parameter

size Number of objects in this response.

95

Connect API endpoint methods


You can use OnCommand Insight Connect API endpoint methods in your programs.

closeSession
Closes a session.
public boolean closeSession(APISessionContext sessionContext)

Parameter This method has the following parameter. sessionContext Identifies the session to close. The session context is returned by the openSession method. Throws This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if the sessionContent is null. java.rmi.RemoteException RMI or WSAPI failure occurred. Closes an API session, discarding any resources being used by the server.

dismissPathOutageViolations
This method dismisses path outage violations.
public boolean dismissPathOutageViolations(APISessionContext sessionContext, String [] violationIds) throws APIException {

Parameters

This method has the following parameters. sessionContext Mandatory. Snapshot of data to be used. The response will show the path violations that were known at the time the session was created. The session context is returned by the openSession method. violationIds

96 | OnCommand Insight Connect API Reference Guide

Ds of path outage violations to be dismissed. Returns Throws This method dismisses the specified path violations. The session limit is set when a session is opened. Returns Boolean values. This method throws the following exception. APIException The server experienced an internal error. New Since Version 6.1

findObjectByWwn
This method finds SAN devices based on their WWN. A device can be a switch or WWN of the host adapter, a WWN of the port of the host adapter, a WWN of the protocol controller, or a WWN of the port of the protocol controller. Fabrics are excluded from search.
public DeviceBase findObjectByWwn (APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String wwn)

Parameter This method has the following parameter. wwn WWN value to use in search Throws This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more hosts to retrieve, if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

findObjectsByIp
This method finds SAN devices based on their IP address/DNS name which is a regular expression.
public DeviceResponse findObjectsByIp (APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String ip)

Connect API endpoint methods | 97

Parameter This method has the following parameter. ip Regular expression for device ip Throws This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more hosts to retrieve, if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

addHostToApplication
This method associates a host with an application.
public boolean addHostToApplication(APISessionContext sessionContext, java.lang.StrWing hostIp, java.lang.String hostName, java.lang.String applicationId)

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, thus the response will show the hosts that were known at the time the session was created. hostIp hostName applicationId Returns True if the host was not associated before with the application. Throws This method throws the following exceptions. APIException The server experienced an internal error. IP of the host to be associated with the application. Name of the host to be associated with the application. ID of the application to associate with the host.

98 | OnCommand Insight Connect API Reference Guide

APIBadRequestException Occurs if an iterator was specified but there are no more hosts to retrieve, if the specified iterator is part of a response to a different query. or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

addReservationRequests
This method adds new request objects for capacity management product.
public ReservationRequests[] addReservationRequests(APISessionContext sessionContext, java.lang.String[] states) throws APIException, java.rmi.RemoteException

Throws Parameters This method has the following parameters. sessionContext Requests are not historical data requests Requests to add Returns Has to return something for WSAPI to work, so it is a placeholder. Throws This method throws the following exceptions. APIException The server experienced an internal error. java.rmi.RemoteException RMI or WSAPI failure occurred.

addReservationRequirements
This method adds the requirement objects of the request for capacity management product.
public ReservationRequests[] addReservationRequirements(APISessionContext sessionContext,

Connect API endpoint methods | 99


java.lang.String[] states)throws APIException, java.rmi.RemoteException

Parameters

This method has the following parameters. sessionContext Requests are not historical data requestId ID of the request for which requirements will be added. requirements Requirements to add

Returns Throws

Has to return something for WSAPI to work, so it is a placeholder. This method throws the following exceptions. APIException The server experienced an internal error. java.rmi.RemoteException RMI or WSAPI failure occurred.

getAllApplications
This method retrieves all the applications known to OnCommand Insight. Each application contains a list of the hosts that are associated with it. Optional attributes describing the application, such as priority, may also be included.
public ApplicationResponse getAllApplications (APISessionContext sessionContext, RequestIterator RequestIterator)

Parameters The method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, thus the response will show the nodes that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent nodes for a query that exceeded the session limit, if null, begins a new query. Returns The response includes an array of Applications up to the session limit together with an RequestIterator which is used to fetch the rest of the nodes by subsequent invocations of this method.

100 | OnCommand Insight Connect API Reference Guide

Throws

This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more hosts to retrieve, if the specified iterator is part of a response to a different query. or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

getAPIVersion
This method gets the version of the API deployed in the OnCommand Insight server to which the client is connected.
public java.lang.String getAPIVersion()

Returns Throws

The version of API deployed in the OnCommand Insight server. This method throws the following exception. java.rmi.RemoteException Sent if there was a failure connecting to the server.

getApplication
This method retrieves a single application based on its name. The application contains a list of the hosts that are associated with it. Optional attributes describing the application, such as priority, may also be included.
public ApplicationResponse getApplication(APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String applicationName)

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, thus the response will show the nodes that were known at the time the session was created. requestIterator

Connect API endpoint methods | 101

Optional. If specified, used to fetch subsequent nodes for a query that exceeded the session limit, if null, begins a new query. applicationName Unique name of the application. Returns The response includes an array of one or no Application up to the session limit together with an RequestIterator which is used to fetch the rest of the nodes by subsequent invocations of this method. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more nodes to retrieve, if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

getApplicationsOfHost
This method retrieves all the applications that are associated with a given host. Each application contains a list of the hosts that are associated with it. Optional attributes describing the application, such as priority, may also be included.
public ApplicationResponse getApplicationsOfHost(APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String hostId)

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, thus the response will show the nodes that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent nodes for a query that exceeded the session limit, if null, begins a new query. hostId Id of host.

102 | OnCommand Insight Connect API Reference Guide

Returns

The response includes an array of applications that are associated with the given host, up to the session limit together with an RequestIterator which is used to fetch the rest of the nodes by subsequent invocations of this method. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more nodes to retrieve, if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

getClosedViolations
This method retrieves all the closed violations (see Violation) in the SAN starting from a specified time.
public ViolationResponse getClosedViolations(APISessionContext sessionContext, RequestIterator requestIterator, long time)

Parameters

This method has the following parameters. sessionContext Mandatory. The session identifies the limit of records for each batch. requestIterator Optional. If specified, used to fetch subsequent violations for a query that exceeded the session limit. If null, begins a new query. time Starting time from which closed violations are retrieved.

Returns

The response includes an array of closed violations starting from a specified time up to the session limit together with a RequestIterator which is used to fetch the rest of the closed violations by subsequent invocations of this method. This method throws the following exception. APIException The server experienced an internal error.

Throws

Connect API endpoint methods | 103

New Since Version

6.0

getConnectedPorts
Retrieves all connected logical-ports associated with the specified session context. You can use LogicalPort class methods to access logical port data, such as physical port ID and status.
public LogicalPortResponse getConnectedPorts(APISessionContext sessionContext, RequestIterator requestIterator,

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, thus the response will show ports that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent ports for a query that exceeded the session limit; if null, begins a new query. Returns The response includes an array of logical ports, up to the session limit, together with a RequestIterator, used to fetch the rest of the logical ports by subsequent invocations of this method. The session limit is set when a session is opened. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException An iterator was specified but there are no more ports to retrieve; the specified iterator is part of a response to a different query; or the session context is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

getDeviceGroup
This method retrieves a Symmetrix device group (see DeviceGroup) by its ID.
public DeviceGroup getDeviceGroup(APISessionContext sessionContext, java.lang.String deviceGroupId)

104 | OnCommand Insight Connect API Reference Guide

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, thus the response will show the device group that was known at the time the session was created. deviceGroupId Id of the device group Returns Throws Device group object or null if none was found The method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if the session is null or the input parameter is incorrect. java.rmi.RemoteException RMI or WSAPI failure occurred.

getDeviceGroups
This method retrieves all the Symmetrix device groups (see DeviceGroup).
public DeviceGroupResponse getDeviceGroups(APISessionContext sessionContext, RequestIterator requestIterator)

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, thus the response will show the device groups that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent device groups for a query that exceeded the session limit, if null, begins a new query. Returns The response includes an array of DeviceGroups up to the session limit together with an RequestIterator which is used to fetch the rest of the device groups by subsequent invocations of this method. This method throws the following exceptions.

Throws

Connect API endpoint methods | 105

APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more hosts to retrieve, if the specified iterator is part of a response to a different query. or if the session is null. APIBadRequestException Occurs if an iterator was specified but there are no more device groups to retrieve, if the specified iterator is part of a response to a different query. or if the session is null. . java.rmi.RemoteException RMI or WSAPI failure occurred.

getDeviceGroupsByStorage
This method retrieves all the Symmetrix device groups (see DeviceGroup) that have volumes for given storage.
public DeviceGroupResponse getDeviceGroupsByStorage(APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String storageId)

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, thus the response will show the device groups that were known at the time the session was created requestIterator Optional. If specified, used to fetch subsequent device groups for a query that exceeded the session limit, if null, begins a new query. storageId ID of the storage to get device groups for Returns The response includes an array of DeviceGroups up to the session limit together with an RequestIterator which is used to fetch the rest of the device groups by subsequent invocations of this method. This method throws the following exceptions. APIException

Throws

106 | OnCommand Insight Connect API Reference Guide

The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more device groups to retrieve, if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

getDeviceGroupsByVolume
This method retrieves all the Symmetrix device groups (see DeviceGroup) that a volume is part of.
public DeviceGroupResponse getDeviceGroupsByVolume(APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String volumeId)

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, thus the response will show the device groups that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent device groups for a query that exceeded the session limit, if null, begins a new query. volumeId Returns The response includes an array of DeviceGroups up to the session limit together with an RequestIterator which is used to fetch the rest of the device groups by subsequent invocations of this method. Throws This method throws the following exceptions. APIException The server experienced an internal error. Id of the volume for which to get device groups.

APIBadRequestException Occurs if an iterator was specified but there are no more device groups to retrieve, if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

Connect API endpoint methods | 107

getDeviceGroupVolumes
This method retrieves all the volumes that are part of Symmetrix device groups (see DeviceGroup).
public VolumeResponse getDeviceGroupVolumes(APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String deviceGroupId)

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, thus the response will show the volumes that were known at the time the session was created. requestIterator Optional. If specified, used to get subsequent volumes for a query that exceeded the session limit, if null, begins a new query. Returns The response includes an array of Volumes up to the session limit together with an RequestIterator which is used to fetch the rest of the volumes by subsequent invocations of this method. Throws This method throws the following exceptions. APIException The server experienced an internal error.

APIBadRequestException Occurs if an iterator was specified but there are no more volumes to retrieve, if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

getDRPathsByVolume
This method retrieves all the DR (disaster recovery)-paths (see DRPath) detected by OnCommand Insight for a given volume. Volume ID can refer to any volume from DRPath for DRPath to be returned in this call.
public DRPathResponse getDRPathsByVolume(APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String volumeId)

Parameters This method has the following parameters.

108 | OnCommand Insight Connect API Reference Guide

sessionContext Mandatory. The session identifies the snapshot of the data to be used, thus the response will show the DR-paths that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent DR-paths for a query that exceeded the session limit, if null, begins a new query. volumeId ID of the volume for which to return DR-paths. Returns The response includes an array of DRPaths up to the session limit together with an RequestIterator which is used to fetch the rest of the DR-path by subsequent invocations of this method. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more DRpaths to retrieve, if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

getGeneric
This method retrieves a generic device. A generic device is a SAN device that is not yet identified.
public Generic getGeneric(APISessionContext sessionContext, java.lang.String id)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, thus the response will show devices that were known at the time the session was created. id Unique identifier for the generic device.

Connect API endpoint methods | 109

Returns Throws

A Generic if it exists, otherwise NULL. This method throws the following exception. APIException The server experienced an internal error. java.rmi.RemoteException RMI or WSAPI failure occurred.

getGenerics
This method retrieves all generic devices. Generic devices are those that are known to OnCommand Insight (including inactive ones), but not yet identified.
public GenericResponse getGenerics(APISessionContext sessionContext RequestIterator requestIterator)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, thus the response will show devices that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent devices for a query that exceeded the session limit; if null, begins a new query. The session limit is set when a session is opened. Returns The response includes an array of Generics up to the session limit together with an RequestIterator which is used to fetch the rest of the devices by subsequent invocations of this method. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException An iterator was specified but there are no more devices to retrieve; a specified iterator is part of a response to a different query; or the session context is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

110 | OnCommand Insight Connect API Reference Guide

getHost
This method retrieves a host/server.
public Host getHost(APISessionContext sessionContext, java.lang.String hostId)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, so the response will show the hosts that were known at the time the session was created. hostId The ID of the host that needs to be fetched. Returns Throws A single instance of Host, if it exists. Otherwise, returns NULL. This method throws the following exceptions. APIException The server experienced an internal error. java.rmi.RemoteException RMI or WSAPI failure occurred.

getHosts
This method retrieves all the hosts/servers known to OnCommand Insight, including inactive hosts.
public HostResponse getHosts(APISessionContext sessionContext, RequestIterator requestIterator)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, so the response will show the hosts that were known at the time the session was created. requestIterator

Connect API endpoint methods | 111

Optional. If specified, used to fetch subsequent hosts for a query that exceeded the session limit; if null, begins a new query. The session limit is set when a session is first opened. Throws This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException ccurs if an iterator was specified but there are no more hosts to retrieve, or if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

getHostsOfApplication
This method retrieves all the hosts/servers (see Host) which are associated with a given application.
public HostResponse getHostsOfApplication(APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String applicationName)

Parameters The method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, so the response will show the hosts that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent hosts for a query that exceeded the session limit, if null, begins a new query. applicationName Unique name of an application. Returns The response includes an array of Hosts up to the session limit together with an RequestIterator which is used to fetch the rest of the hosts by subsequent invocations of this method. This method throws the following exceptions. APIException

Throws

112 | OnCommand Insight Connect API Reference Guide

The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more hosts to retrieve, or if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

getHostPolicy
This method retrieves the policy (see Policy) defined for host.
public Policy getHostPolicy(APISessionContext sessionContext, java.lang.String hostId)

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, so the response will show the policies that were known at the time the session was created. hostId ID of the host for which to get the policy. Returns Throws Policy for given host which is used to fetch the rest of the volumes by subsequent invocations of this method This methods throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more policies to retrieve, if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

Connect API endpoint methods | 113

getInternalVolume
This method retrieves an internal volume data by ID.
public InternalVolume getInternalVolume(APISessionContext sessionContext, String id) throws APIException

Parameters

This method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, so the response will show the internal volume that was known at the time the session was created. id ID of the internal volume.

Returns Throws

An internal volume, if it exists. Otherwise, null. This method throws the following exception. APIException The server experienced an internal error.

New Since Version

6.0

getInternalVolumes
This method retrieves all internal volumes known to OnCommand Insight.
public InternalVolumeResponse getInternalVolumes(APISessionContext sessionContext, RequestIterator requestIterator) throws APIException

Parameters

This method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, so the response will show the internal volumes that were known at the time the session was created. requestIterator Optional. If specified, fetches subsequent internal volumes for a query that exceeded the session limit. If null, this begins a new query.

114 | OnCommand Insight Connect API Reference Guide

Returns

An array of internal volumes up to the session limit together with a RequestIterator, which is used to fetch the rest of the internal volumes by subsequent invocations of this method. This method throws the following exception. APIException The server experienced an internal error.

Throws

New Since Version

6.0

getInternalVolumesByStorageArray
This method retrieves internal volumes for a given storage array.
public InternalVolumeResponse getInternalVolumesByStorageArray(APISessionContext sessionContext, RequestIterator requestIterator, String storageArrayId) throws APIException

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, so the response will show the internal volumes that were known at the time the session was created. requestIterator Optional. If specified, fetches subsequent internal volumes for a query that exceeded the session limit. If null, this begins a new query. storageArrayId Mandatory. Uniquely identifies the Storage Array for which internal volumes are requested. Use getStorageArrays(APISessionContext,RequestIterator) to get a list of all the arrays. Returns Returns an array of internal volumes up to the session limit together with a RequestIterator, which is used to fetch the rest of the internal volumes by subsequent invocations of this method. This method throws the following exception. APIException The server experienced an internal error.

Throws

Connect API endpoint methods | 115

New Since Version

6.0

getLogicalPortsByPhysicalPort
This method retrieves all logical ports associated with the specified physical port. You can use LogicalPort class methods to access logical port data, such as physical port ID and status.
public LogicalPortResponse getLogicalPortsByPhysicalPort (APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String physicalPortId)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, thus the response will show ports that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent ports for a query that exceeded the session limit; if null, begins a new query. physicalPortID Uniquely identifies the physical port whose logical ports are requested. Returns The response includes an array of logical ports, up to the session limit, together with a RequestIterator, used to fetch the rest of the logical ports by subsequent invocations of this method. The session limit is set when a session is opened. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more ports to retrieve; if the specified iterator is part of a response to a different query; or if the session context is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

116 | OnCommand Insight Connect API Reference Guide

getLogicalPortsByLogicalSwitch
This method retrieves the logical ports associated with the specified switch. You can use LogicalPort class methods to access logical port data, such as physical port ID and status.
public LogicalPortResponse getLogicalPortsByLogicalSwitch( APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String logicalSwitchId)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, so the response can only include ports known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent ports for a query that exceeded the session limit; if null, begins a new query. logicalSwitchId Uniquely identifies the switch whose logical ports are requested. Returns The response includes an array of ports, up to the session limit, together with a RequestIterator, used to fetch the rest of the ports by subsequent invocations of this method. The session limit is set when a session is opened. The method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more ports to retrieve; the specified iterator is part of a response to a different query; or the session context is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

Connect API endpoint methods | 117

getLogicalPortsByPhysicalSwitch
This method retrieves the logical ports associated with the specified switch. You can use LogicalPort class methods to access logical port data, such as physical port ID and status.
public LogicalPortResponse getLogicalPortsByPhysicalSwitch (APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String switchId)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, so the response can only include ports known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent ports for a query that exceeded the session limit; if null, begins a new query. switchId Uniquely identifies the switch for which logical ports are requested. Returns The response includes an array of ports, up to the session limit, together with a RequestIterator, used to fetch the rest of the ports by subsequent invocations of this method. The session limit is set when a session is opened. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more ports to retrieve; if the specified iterator is part of a response to a different query; or if the session context is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

118 | OnCommand Insight Connect API Reference Guide

getLogicalSwitchesByPhysicalSwitch
This method retrieves the logical switches associated with the specified physical switch. You can use Switch class methods to access switch data, such as WWN and status.
public SwitchResponse getLogicalSwitchesByPhysicalSwitch(APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String switchId)

Parameters This method has the following parameters sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, so the response can only include switches known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent switches for a query that exceeded the session limit; if null, begins a new query. switchId Uniquely identifies the physical switch whose logical switches are requested. Returns The response includes an array of switches, up to the session limit, together with a RequestIterator, used to fetch the rest of the switches by subsequent invocations of this method. The session limit is set when a session is opened. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException An iterator was specified but there are no more switches to retrieve; the specified iterator is part of a response to a different query; or the session context is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

Connect API endpoint methods | 119

getNodesOfDevice
This method retrieves the nodes of a device, such as a host's HBA or the controller of a storagedevice. You can use Node class methods to access node data, such as WWN and device ID.
public NodeResponse getNodesOfDevice(APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String storageArrayId)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, so the response will show the nodes that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent nodes for a query that exceeded the session limit; if null, begins a new query. deviceId Uniquely identifies the device whose nodes are requested. Returns The response includes an array of nodes, up to the session limit, together with a RequestIterator, used to fetch the rest of the nodes by subsequent invocations of this method. The session limit is set when a session is opened. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more nodes to retrieve; the specified iterator is part of a response to a different query; or the session context is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

getPathPolicy
This policy retrieves the policy (see Policy) defined for path.
public Policy getPathPolicy(APISessionContext sessionContext, Path path)

120 | OnCommand Insight Connect API Reference Guide

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the Snapshot copy of the data to be used, so the response will show the policies that were known at the time the session was created. path The logical path for which policy will be returned. Returns Throws Policy for the path. The method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more policies to retrieve, if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

getPaths
This method retrieves all the logical paths detected by OnCommand Insight in the SAN being monitored. You can use Path class methods to access path data, such as host ID and array ID.
public PathResponse getPaths(APISessionContext sessionContext, RequestIterator requestIterator,

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, so the response will show the logical paths that were known at the time the session was created. requestIterator Optional If specified, used to fetch subsequent logical paths for a query that exceeded the session limit; if null, begins a new query.

Connect API endpoint methods | 121

Returns

The response includes an array of paths, up to the session limit, together with a RequestIterator, used to fetch the rest of the logical-path by subsequent invocations of this method. The session limit is set when a session is opened. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more logical-paths to retrieve; the specified iterator is part of a response to a different query; or the session context is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

getPathsByHost
This method retrieves all the logical-paths (see Path) detected by OnCommand Insightin the SAN being monitored for a given host.
public PathResponse getPathsByHost(APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String hostId)

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, so the response will show the logical-paths that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent logical paths for a query that exceeded the session limit, if null, begins a new query hostId ID of the host for which to return paths Returns The response includes an array of Paths up to the session limit together with an RequestIterator which is used to fetch the rest of the logical-path by subsequent invocations of this method. This method throws the following exceptions. APIException

Throws

122 | OnCommand Insight Connect API Reference Guide

The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more logical-paths to retrieve , if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

getPhysicalPortByLogicalPort
This method retrieves the physical port associated with the specified logical port. You can use Port class methods to access physical port data, such as WWN and status.
public PortResponse getPhysicalPortByLogicalPort(APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String logicalPortId)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, so the response can only include a port known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent ports for a query that exceeded the session limit; if null, begins a new query. logicalPortId Uniquely identifies the logical port whose physical port is requested. Returns The response includes an array of ports, up to the session limit, together with a RequestIterator, used to fetch the rest of the ports by subsequent invocations of this method. The session limit is set when a session is opened. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException

Throws

Connect API endpoint methods | 123

Occurs if an iterator was specified but there are no more ports to retrieve; the specified iterator is part of a response to a different query; or the session is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

getPolicies
This method retrieves all the policies (see Policy) defined for the SAN.
public PolicyResponse getPolicies(APISessionContext sessionContext, RequestIterator requestIterator)

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, thus the response will show the policies that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent policies for a query that exceeded the session limit, if null, begins a new query. Returns The response includes an array of Policies up to the session limit together with an RequestIterator which is used to fetch the rest of the volumes by subsequent invocations of this method. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more policies to retrieve, if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

124 | OnCommand Insight Connect API Reference Guide

getPort
This method retrieves a port. You can use Port methods to access port data, such as WWN and status.
public Port getPort(APISessionContext sessionContext, java.lang.String id)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, so the response will show the ports that were known at the time the session was created. id Unique identifier for the port. Returns Throws The port, if it exists; otherwise Null. The method throws the following exceptions. APIException The server experienced an internal error. java.rmi.RemoteException RMI or WSAPI failure occurred.

getPorts
This method retrieves all the ports in the SAN. You can use Port methods to access port data, such as WWN and status.
public PortResponse getPorts(APISessionContext sessionContext, RequestIterator requestIterator)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, so the response will show the ports that were known at the time the session was created. requestIterator

Connect API endpoint methods | 125

Optional. If specified, used to fetch subsequent ports for a query that exceeded the session limit; if null, begins a new query. Returns The response includes an array of ports, up to the session limit, together with a RequestIterator, used to fetch the rest of the ports by subsequent invocations of this method. The session limit is set when a session is opened. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified, but there are no more devices to retrieve; the specified iterator is part of a response to a different query; or the session context is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

getPortsOfDevice
This method retrieves all the ports of a device in all the nodes of the device. You can use Port methods to access port data, such as WWN and status.
public PortResponse getPortsOfDevice(APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String storageArrayId)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, thus the response will show the ports that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent ports for a query that exceeded the session limit; if null, begins a new query. deviceId Uniquely identifies the device whose ports are requested.

126 | OnCommand Insight Connect API Reference Guide

Returns

The response includes an array of ports, up to the session limit, together with a RequestIterator, used to fetch the rest of the ports by subsequent invocations of this method. The session limit is set when a session is opened. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more ports to retrieve; the specified iterator is part from a response to a different query; or the session context is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

getPortsOfNode
This method retrieves all the ports in a single node of a device. You can use Port methods to access port data, such as WWN and status.
public PortResponse getPortsOfNode(APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String storageArrayId)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, so the response will show the ports that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent ports for a query that exceeded the session limit; if null, begins a new query. nodeId Uniquely identifies the node and device whose ports are requested. Returns The response includes an array of ports, up to the session limit, together with a RequestIterator, used to fetch the rest of the ports by subsequent invocations of this method. The session limit is set when a session is opened. This method throws the following exceptions.

Throws

Connect API endpoint methods | 127

APIException The server experienced an internal error. APIBadRequestException An iterator was specified but there are no more ports to retrieve; the specified iterator is part of a response to a different query; or the session context is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

getPortsOfDeviceType
This method retrieves ports on all the devices of the specified type. You can use Port methods to access port data, such as WWN and status.
public PortResponse getPortsOfDeviceType(APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String type)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, thus the response will show the ports that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent ports for a query that exceeded the session limit; if null, begins a new query. type Types of the devices. Returns The response includes an array of ports, up to the session limit, together with a RequestIterator, used to fetch the rest of the ports by subsequent invocations of this method. The session limit is set when a session is opened. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException

Throws

128 | OnCommand Insight Connect API Reference Guide

An iterator was specified, but there are no more devices to retrieve; the specified iterator is part of a response to a different query; or the session context is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

getRecentDevice
This method gets the most recent SAN device in the history.
public DeviceBase getRecentDevice(APISessionContext sessionContext, java.lang.String id)

Parameter This method has the following parameter. id Device ID Throws This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified, but there are no more devices to retrieve; the specified iterator is part of a response to a different query; or the session context is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

getRecentHost
This method retrieves a host/server (see Host) most recent in history.
public Host getRecentHost(APISessionContext sessionContext, java.lang.String hostId)

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, so the response will show the hosts that were known at the time the session was created.

Connect API endpoint methods | 129

hostId The ID of the Host that needs to be fetched. Returns Throws A single instance of Host, if exists. Null otherwise. This method throws the following exceptions. APIException The server experienced an internal error. java.rmi.RemoteException RMI or WSAPI failure occurred.

getRecentStorageArray
This method retrieves a storage array (see StorageArray) most recent in history.
public StorageArray getRecentStorageArray(APISessionContext sessionContext, java.lang.String id)

Parameter This method has the following parameter. sessionContext Mandatory. The session identifies the snapshot of the data to be used, so the response will show the arrays that were known at the time the session was created. Returns Throws The array StorageArray if exists, Null otherwise. This method throws the following exceptions. APIException The server experienced an internal error. java.rmi.RemoteException RMI or WSAPI failure occurred

getRecentSwitch
This method retrieves a switch device (see Switch) most recent in history.
public Switch getRecentSwitch(APISessionContext sessionContext, java.lang.String id)

Parameter This method has the following parameter. sessionContext

130 | OnCommand Insight Connect API Reference Guide

Mandatory. The session identifies the snapshot of the data to be used, so the response will show the devices that were known at the time the session was created. Returns Throws The switch if exists, Null otherwise. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified, but there are no more devices to retrieve; the specified iterator is part of a response to a different query; or the session context is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

getRecentTape
This method retrieves a tape device (see Tape) most recent in history.
public Tape getRecentTape(APISessionContext sessionContext, java.lang.String id)

Parameter This method has the following parameter. sessionContext Mandatory. The session identifies the snapshot of the data to be used, thus the response will show the devices that were known at the time the session was created. Returns Throws The tape of Tape if exists, Null Otherwise. This method throws the following exceptions. APIException The server experienced an internal error. java.rmi.RemoteException RMI or WSAPI failure occurred.

Connect API endpoint methods | 131

getRecentVolume
This method retrieves a volume (see Volume) most recent in history.
public Volume getRecentVolume(APISessionContext sessionContext, java.lang.String id)

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, so the response will show the volumes that were known at the time the session was created. id ID of the volume Returns Throws The Volume if exists, Null otherwise. This method throws the following exceptions. APIException The server experienced an internal error. java.rmi.RemoteException RMI or WSAPI failure occurred.

getReservationRequests
This method gets all request objects for capacity management product.
public ReservationRequest[] getReservationRequests(APISessionContext sessionContext,java.lang.String[] states) throws APIException,java.rmi.RemoteException

Parameter

This method has the following parameter. sessionContext Requests are not historical data

Returns Throws

Array of reservation requests This method throws the following exceptions. APIException The server experienced an internal error. java.rmi.RemoteException

132 | OnCommand Insight Connect API Reference Guide

RMI or WSAPI failure occurred.

getReservationRequestsByStates
This method gets request objects for capacity management product filtered by states.
public ReservationRequest[] getReservationRequestsByStates(APISessionContext sessionContext, java.lang.String[] states)throws APIException, java.rmi.RemoteException

Parameters This method has the following parameters. sessionContext Requests are not historical data States Request states to get requests for: NEW, OPEN, CANCELLED, REJECTED, etc. Returns Throws Array of reservation requests This method throws the following exceptions. APIException The server experienced an internal error. java.rmi.RemoteException RMI or WSAPI failure occurred.

getReservationRequirements
This method gets all requirement objects of the request for capacity management product.
public ReservationRequirements[] getReservationRequirements(APISessionContext sessionContext, java.lang.String[] states) throws APIException, java.rmi.RemoteException

Parameters This method has the following parameters. sessionContext requestId Requests are not historical data. ID of the request for which requirements will be retrieved.

Connect API endpoint methods | 133 Returns Array of reservation requirements. Throws This method throws the following exceptions. APIException java.rmi.RemoteException The server experienced an internal error. RMI or WSAPI failure occurred.

getSANscreenVersion
This method gets the version of the OnCommand Insight server to which the client is connected. Use setSessionContext to retrieve the version number from the server before calling this method.
public java.lang.String getSANscreenVersion()

Returns Throws

The version of the OnCommand Insight server. This method throws the following exception. java.rmi.RemoteException Sent if there was a failure connecting to the server.

getStorageArray
This method retrieves a storage array. After you retrieve a storage array, you can use StorageArray methods to access array data such as vendor name, model name, and raw capacity.
public StorageArray getStorageArray(APISessionContext sessionContext, java.lang.String id)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, so the response will show devices that were known at the time the session was created. id Unique identifier for the storage array. Returns Throws The StorageArray, if it exists; otherwise NULL. This method throws the following exceptions.

134 | OnCommand Insight Connect API Reference Guide

APIException The server experienced an internal error. java.rmi.RemoteException RMI or WSAPI failure occurred.

getStorageArrays
This method retrieves all the storage arrays known to OnCommand Insight (including inactive ones). After you retrieve a storage array, you can use StorageArraymethods to access array data such as vendor name, model name, and raw capacity.
public StorageArrayResponse getStorageArrays(APISessionContext sessionContext, RequestIterator requestIterator)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, so the response will show devices that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent devices for a query that exceeded the session limit, if null, begins a new query. Returns The response includes an array of StorageArrays, up to the session limit, together with a RequestIterator, used to fetch the rest of the arrays by subsequent invocations of this method. The session limit is set when a session is opened. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified, but there are no more devices to retrieve; the specified iterator is part of a response to a different query; or the session context is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

Connect API endpoint methods | 135

getSwitch
This method retrieves a switch device.
public Switch getSwitch(APISessionContext sessionContext, java.lang.String id)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, so the response will show devices that were known at the time the session was created. id Unique identifier for the switch. Returns Throws A Switch if it exists, otherwise NULL. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Incorrect input parameters. java.rmi.RemoteException RMI or WSAPI failure occurred.

getSwitches
This method retrieves all the switch devices which are known toOnCommand Insight (including inactive ones).
public SwitchResponse getSwitches(APISessionContext sessionContext, RequestIterator requestIterator)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, so the response will show devices that were known at the time the session was created.

136 | OnCommand Insight Connect API Reference Guide

requestIterator Optional. If specified, used to fetch subsequent devices for a query that exceeded the session limit; if null, begins a new query. The session limit is set when a session is opened. Returns The response includes an array of switches, up to the session limit, together with a RequestIterator, used to fetch the rest of the devices by subsequent invocations of this method. This method throws the following exceptions APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more devices to retrieve; the specified iterator is part of a response to a different query; or the session context is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

getTape
This method retrieves a tape device. You can use Tape methods to access tape device data, such as vendor name and model name.
public Tape getTape(APISessionContext sessionContext, java.lang.String id)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, so the response will show devices that were known at the time the session was created. id Unique identifier for the tape. Returns Throws The tape, if it exists; otherwise NULL. The method throws the following exceptions. APIException The server experienced an internal error. java.rmi.RemoteException

Connect API endpoint methods | 137

RMI or WSAPI failure occurred.

getTapes
This method retrieves all the tape devices known to OnCommand Insight (including inactive ones). You can use Tape methods to access tape data, such as vendor name and model name.
public TapeResponse getTapes(APISessionContext sessionContext, RequestIterator requestIterator)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, thus the response will show devices that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent devices for a query that exceeded the session limit; if null, begins a new query. Returns The response includes an array of type Tape, up to the session limit, together with a RequestIterator, used to fetch the rest of the devices by subsequent invocations of this method. The session limit is set when a session is opened. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified, but there are no more devices to retrieve; the specified iterator is part of a response to a different query; or the session context is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

getViolations
This method retrieves all the violations (see Violation) in the SAN.
public ViolationResponse getViolations(APISessionContext sessionContext, RequestIterator requestIterator)

138 | OnCommand Insight Connect API Reference Guide

Parameters This method has the following parameters. sessionContext Mandatory, the session identifies the Snapshot copy of the data to be used, so the response will show the violations that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent violations for a query that exceeded the session limit. If null, begins a new query. Returns The response includes an array of violations up to the session limit together with a RequestIterator, which is used to fetch the rest of the violations by subsequent invocations of this method. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException If an iterator was specified but there are no more violations to retrieve, or if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

getViolationsByHost
Retrieves all the violations for given host.
public ViolationResponse getViolationsByHost(APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String hostId)

Parameters This method has the following parameters. hostId ID of the host to get violations for. sessionContext Mandatory. The session identifies the Snapshot copy of the data to be used, so the response will show the violations that were known at the time the session was created. requestIterator

Connect API endpoint methods | 139

Optional. If specified, used to retrieve subsequent violations for a query that exceeded the session limit. If null, begins a new query. Returns The response includes an array of Violations up to the session limit together with a RequestIterator which is used to retrieve the rest of the volumes by subsequent invocations of this method. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException Occurs if an iterator was specified but there are no more violations to retrieve, if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

getVirtualMachine
This method gets virtual machine (VM) data by ID.
public VirtualMachine getVirtualMachine(APISessionContext sessionContext, String id) throws APIException

Parameters

This method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, so the response will show the virtual machine that was known at the time the session was created. id ID of the virtual machine.

Returns Throws

Virtual machine object. This method throws the following exception APIException The server experienced an internal error.

New Since Version

6.0

140 | OnCommand Insight Connect API Reference Guide

getVirtualMachines
This method retrieves all virtual machines.
public VirtualMachineResponse getVirtualMachines(APISessionContext sessionContext, RequestIterator requestIterator) throws APIException

Parameters

This method has the following parameters. sessionContext Mandatory. The session identifies the Snapshot copy of the data to be used, so the response will show the virtual machine that was known at the time the session was created. requestIterator Optional. If specified, it fetches subsequent virtual machines for a query that exceeded the session limit. If null, it begins a new query.

Returns

An array of virtual machines up to the session limit together with a RequestIterator, which is used to fetch the rest of the virtual machines by subsequent invocations of this method. This method throws the following exception. APIException The server experienced an internal error.

Throws

New Since Version

6.0

getVolume
Retrieves a volume. You can use Volume class methods to access volume data, such as disk type and capacity.
public Volume getVolume(APISessionContext sessionContext, java.lang.String id)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the Snapshot copy of data to be used, so

Connect API endpoint methods | 141

responses can contain only those volumes known at the time the session was created. id Unique identifier for the volume. Returns Throws The volume if it exists; otherwise, NULL. This method throws the following exceptions. APIException The server experienced an internal error. java.rmi.RemoteException RMI or WSAPI failure occurred.

getVolumes
Retrieves all the volumes in the SAN. You can use Volume class methods to access volume data, such as disk type and capacity.
public VolumeResponse getVolumes(APISessionContext sessionContext, RequestIterator requestIterator,

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, so the response will show the volumes that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent volumes for a query that exceeded the session limit. If null, begins a new query. Returns The response includes an array of volumes, up to the session limit, together with a RequestIterator, used to fetch the rest of the volumes by subsequent invocations of this method. The session limit is set when a session is opened. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException

Throws

142 | OnCommand Insight Connect API Reference Guide

An iterator was specified but there are no more volumes to retrieve; the specified iterator is part of a response to a different query; or the session context is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

getVolumesByStorageArray
Retrieves all volumes known to OnCommand Insight on the specified storage array. You can use Volume class methods to access volume data, such as disk type and capacity.
public VolumeResponse getVolumesByStorageArray(APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String storageArrayId)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the Snapshot copy of data to be used, thus responses can contain only those volumes known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent volumes for a query that exceeded the session limit. If null, begins a new query. storageArrayId Uniquely identifies the storage array whose volumes are requested. You can get a list of storage arrays by using the getStorageArrays method. Returns The response includes an array of volumes, up to the session limit, together with a RequestIterator, used to fetch the rest of the volumes by subsequent invocations of this method. The session limit is set when a session is opened. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException An iterator was specified but there are no more volumes to retrieve; the specified iterator is part of a response to a different query; or the session context is NULL. java.rmi.RemoteException

Throws

Connect API endpoint methods | 143

RMI or WSAPI failure occurred.

getVolumeMapsByStorageArray
Retrieves all the volume-maps known to OnCommand Insight on the specified storage array. You can use VolumeMap class methods to access volume-map data, such as storage port ID and protocol controller.
public VolumeMapResponse getVolumeMapsByStorageArray(APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String storageArrayId)

Parameters This method has the following parameters sessionContext The session context returned by the openSession method. The context corresponds to the Snapshot copy of data to be used, so the response will show the volume-maps that were known at the time the session was created. requestIterator Optional. If specified, used to fetch subsequent volume-maps for a query that exceeded the session limit. If null, begins a new query. storageArrayId Uniquely identifies the storage array whose volume-maps are requested. You can get a list of storage arrays by using the getStorageArrays method. Returns The response includes an array of volume-maps, up to the session limit, together with a RequestIterator, used to fetch the rest of the volume-maps by subsequent invocations of this method. The session limit is set at the time a session is opened. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException An iterator was specified but there are no more volume-maps to retrieve; the specified iterator is part of a response to a different query; or the session context is NULL. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

144 | OnCommand Insight Connect API Reference Guide

getVolumeMasksByStorageArray
Retrieves all the volume-masks known to OnCommand Insight on the specified storage array. You can use VolumeMask class methods to access volume-mask data, such as storage port WWN and ID.
public VolumeMaskResponse getVolumeMasksByStorageArray(APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String storageArrayId)

Parameters This method has the following parameters. sessionContext The session context returned by the openSession method. The context corresponds to the snapshot of data to be used, so the response will show the volume-masks that were known at the time the session was created. requestIterator Optional. If specified, used to retrieve subsequent volumemasks for a query that exceeded the session limit. If null, begins a new query. storageArrayId Uniquely identifies the storage array whose volume-masks are requested. You can get a list of storage arrays by using the getStorageArrays method. Returns The response includes an array of volume-masks, up to the session limit, together with a RequestIterator, used to retrieve the rest of the volume-masks by subsequent invocations of this method. The session limit is set when a session is opened. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException If an iterator was specified but there are no more volume masks to retrieve or if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

Throws

Connect API endpoint methods | 145

getVolumesSynchStatesByDRPath
Returns synchronization states for the volumes of the DR Path.
public VolumesSynchronizationStateResponse getVolumesSynchStatesByDRPath(APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String drPathId, long period)

Throws This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException If an iterator was specified but there are no more volume synchronization states to retrieve, or if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

getVolumesSynchStatesBySourceVolume
Returns all synchronization states for given source volume.
public VolumesSynchronizationStateResponse getVolumesSynchStatesBySourceVolume (APISessionContext sessionContext, RequestIterator requestIterator, java.lang.String volumeId, long period)

Throws This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException If an iterator was specified but there are no more volume synchronization states to retrieve, or if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

146 | OnCommand Insight Connect API Reference Guide

openSession
Creates the APISessionContext, which is required by the API server in order to provide a consistent view of the data. Opening a session also defines the API version being used by the client as well as the maximum number of values returned in a single query.
public APISessionContext openSession(java.lang.String clientVersion, int limit)

A session defines a Snapshot copy of the data at the time it was created. Therefore, queries that are issued using the same session will reflect the data at the time the session was created. When you open a session, the system verifies whether you have a valid API license. If a valid API license is not found, an exception is thrown. Parameters This method has the following parameters. clientVersion The version of the API client. The server will verify that the API client version number equals the supported server version. If they do not match, an exception is thrown. limit Maximum number of values in a response to a query. A RequestIterator will be used to fetch values exceeding the limit. This limit cannot exceed 10000. Returns Throws A new session. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException If an iterator was specified but there are no more items to retrieve, or if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

removeHostFromApplication
Removes association between a host and an application.
public boolean removeHostFromApplication(APISessionContext sessionContext, java.lang.String hostIp, java.lang.String hostName, java.lang.String applicationId)

Connect API endpoint methods | 147

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the Snapshot copy of the data to be used, so the response will show the hosts that were known at the time the session was created. hostIp IP of the host whose association with the application should be removed. hostName Name of the host whose association with the application should be removed. applicationId ID of the application to associate with the host. Returns Throws True if the host was not associated before with the application. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException If an iterator was specified but there are no more hosts to retrieve, or if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

removeHostPolicies
Removes policies (see Policy) for host including path policies and host policy.
public boolean removeHostPolicies(APISessionContext sessionContext, java.lang.String hostId)

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the Snapshot copy of the data to be used, thus the response will show the policies that were known at the time the session was created. hostId ID of the host for which policies will be removed.

148 | OnCommand Insight Connect API Reference Guide

Throws

This method throws the following exception. APIException The server experienced an internal error. APIBadRequestException If an iterator was specified but there are no more policies to retrieve, or if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

removePolicies
Removes policies (see Policy).
public boolean removePolicies(APISessionContext sessionContext, java.lang.String[] policyIds)

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the Snapshot copy of the data to be used, so the response will show the policies that were known at the time the session was created. policyIds IDs of the policies to remove. Throws This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException If an iterator was specified but there are no more policies to retrieve, or if the specified iterator is part of a response to a different query, or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

Connect API endpoint methods | 149

removeReservationRequirements
Removes existing requirement objects of the request for capacity management product.
public ReservationRequirements[] removeReservationRequirements(APISessionContext sessionContext, java.lang.String[] states)throws APIException, java.rmi.RemoteException

Parameters This method has the following parameters. sessionContext Requests are not historical data. requestId ID of the request for which requirements will be removed. requirementIds IDs of the requirements to remove. Returns Throws Has to return something for WSAPI to work, so it is a placeholder. This method throws the following exceptions. APIException The server experienced an internal error. java.rmi.RemoteException RMI or WSAPI failure occurred.

setAnnotationValues
This method sets annotation values.
public boolean setAnnotationValues(APISessionContext sessionContext, AnnotationValue[] annotationValues) throws APIException, java.rmi.RemoteException

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the Snapshot copy of the data to be used, so the response will show the hosts that were known at the time the session was created. annotationValues Annotation values to set. Returns True if everything went fine.

150 | OnCommand Insight Connect API Reference Guide

Throws

This method throws the following exceptions. APIException The server experienced an internal error. java.rmi.RemoteException RMI or WSAPI failure occurred.

setApplication
Adds or updates attributes of an application.
public boolean setApplication(APISessionContext sessionContext, java.lang.String name, java.lang.String priority, java.lang.String businessUnit, boolean ignoreSharing)

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the Snapshot copy of the data to be used, so the response will show the hosts that were known at the time the session was created. name Unique name of an application. priority Priority of the application. can be one of the following values: Critical, High, Medium, Low. businessUnit Business Unit to which the application belongs. ignoreSharing Hosts associated with this application will be ignored when calculating volume sharing violation for other hosts. Returns True if new application was created or if attributes of existing application were updated. If the application existed with the same attributes, nothing will be changed and false will be returned. This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException

Throws

Connect API endpoint methods | 151

If an iterator was specified but there are no more applications to retrieve, or if the specified iterator is part of a response to a different query or if the session is null. java.rmi.RemoteException RMI or WSAPI failure occurred.

setHostsPolicy
Creates policy (see Policy) for several hosts.
public boolean setHostsPolicy(APISessionContext sessionContext, java.lang.String[] hostIds, java.lang.String redundancy, int hopsNumber, int hostPortsRedundancy, java.lang.String volumeSharingScope)

Parameters This method has the following parameters. sessionContext Mandatory. The session identifies the snapshot of the data to be used, so the response will show the policies that were known at the time the session was created. hostIds IDs of the hosts to create policies for. redundancy Policy attribute redundancy, possible values: none, no-spf, redundant hopsNumber Maximum number of hops between host and storage. hostPortsRedundancy Minimum number of ports per host adapter. volumeSharingScope Possible values NO, ANY, CLUSTER Throws This method throws the following exceptions. APIException The server experienced an internal error. APIBadRequestException If an iterator was specified but there are no more policies to retrieve or if the specified iterator is part from a response to a different query or if the session is null. java.rmi.RemoteException

152 | OnCommand Insight Connect API Reference Guide

RMI or WSAPI failure occurred.

updateReservationRequirements
Updates existing requirement objects of the request for OnCommand Insight Plan, the capacity management product.
public ReservationRequirements[] updateReservationRequirements(APISessionContext sessionContext, java.lang.String[] states)throws APIException, java.rmi.RemoteException

Parameters sessionContext requestId requirements Returns Has to return something for WSAPI to work, so it is a placeholder. Throws APIException java.rmi.RemoteException The server experienced an internal error. RMI or WSAPI failure occurred. Requests are not historical data. ID of the request for which requirements will be updated. Requirements to update.

updateReservationRequests
Updates existing request objects for OnCommand Insight Plan, the capacity management product.
public ReservationRequests[] updateReservationRequests(APISessionContext sessionContext, java.lang.String[] states)throws APIException, java.rmi.RemoteException

Parameters

This method has the following parameters. sessionContext Requests are not historical data. requests Requests to update

Returns

Has to return something for WSAPI to work, so it is a placeholder.

Connect API endpoint methods | 153

Throws

This method throws the following exceptions. APIException The server experienced an internal error. java.rmi.RemoteException RMI or WSAPI failure occurred.

154 | OnCommand Insight Connect API Reference Guide

155

OnCommand Insight Connect API code sample scripts and packages


You might find it beneficial to review some Connect API Java scripts and Perl script package examples. Also see the examples provided in the OnCommand Insight portal by clicking Insight Connect API > Examples.
Note: Java is the only API supported by NetApp. Perl API and other examples are provided for

reference only with no support.

Java
The following code provides API Examples in Java.
import import import import com.onaro.sanscreen.wsapi.*; javax.xml.rpc.Stub; java.rmi.RemoteException; java.util.*;

public class APIExamples { /* Create a service endpoint interface to the SANscreenAPI bean */ /* The Web service endpoint is defined in the WSDD XML file */ private SANscreenAPIEndPoint endPoint; /* Initialize the endpoint */ public APIExamples() { endPoint = init(); } /* Print the current API and OnCommand Insight version numbers */ public void printVersions() throws RemoteException { System.out.println("endPoint.getAPIVersion() = " + endPoint.getAPIVersion()); System.out.println("endPoint.getSANscreenVersion() = " + endPoint.getSANscreenVersion()); } /*------------------------------------------------------------*/ /* Retrieve and print attributes for all known storage arrays */ /*------------------------------------------------------------*/ public void getAllStorageArrays() throws APIException, RemoteException { /* Open a session context. You must open a session context before querying data */ APISessionContext context = endPoint.openSession("1.0", 200); /* Retrieve all storage arrays */ StorageArrayResponse response = endPoint.getStorageArrays(context, null); /* Create an array to hold all the returned storage arrays */ StorageArray[] storageArrays = response.getArrays(); System.out.println(""); System.out.println("Number of storage arrays returned is: " + storageArrays.length);

156 | OnCommand Insight Connect API Reference Guide


System.out.println("Storage Name Vendor Model Raw Capacity (GB)"); System.out.println("------------------------------------------------------------"); /* Print attributes for each storage array in the array of storage arrays */ for (int i = 0; i < storageArrays.length; i++) { StorageArray storageArray = storageArrays[i]; String vendor = storageArray.getVendor()!=null ? storageArray.getVendor() : "NA"; String model = storageArray.getModel()!=null ? storageArray.getModel() : "NA"; System.out.println(storageArray.getName() + "\t\t" + vendor + "\t" + model + "\t" + storageArray.getRawCapacityGB()); } } /*------------------------------------------------------------*/ /* Retrieve and print attributes for all known paths */ /*------------------------------------------------------------*/ public void getAllPaths() throws APIException, RemoteException { /* Open a session context. You must open a session context before querying data */ APISessionContext context = endPoint.openSession("1.0", 10000); Map<String, StorageArray> arrayIdToArray = prepareArrayMap(context); Map<String, Volume> volumeIdToVolume = prepareVolumeMap(context, arrayIdToArray.keySet()); Map<String, Host> hostIdToArray = prepareHostMap(context); Map<String, Tape> tapeIdToTape = prepareTapeMap(context); List<Path> paths = getPaths(context); System.out.println(""); System.out.println("Number of paths is: " + paths.size()); System.out.println("Host Name Storage array name Volume name"); System.out.println("---------------------------------------------------"); for (Iterator<Path> iterator = paths.iterator(); iterator.hasNext();) { Path path = iterator.next(); Host host = hostIdToArray.get(path.getHostId()); String hostName = ""; if (host!=null) hostName = host.getName(); String targetName = ""; String volumeName = ""; StorageArray storageArray = arrayIdToArray.get(path.getArrayId()); if (storageArray != null) { targetName = storageArray.getName(); Volume volume = volumeIdToVolume.get(path.getVolumeId()); if (volume!=null) volumeName = volume.getName(); } else { Tape tape = tapeIdToTape.get(path.getArrayId()); if (tape!=null) targetName = tape.getName(); } System.out.println(hostName + "\t\t" + targetName + "\t" + volumeName); } } private Map<String, Tape> prepareTapeMap(APISessionContext context) throws APIException, RemoteException { Map<String, Tape> tapeIdToTape = new HashMap<String, Tape>(); RequestIterator requestIterator = null; do {

OnCommand Insight Connect API code sample scripts and packages | 157
TapeResponse tapeResponse = endPoint.getTapes(context, requestIt erator); requestIterator = tapeResponse.getRequestIterator(); Tape[] tapes = tapeResponse.getTapes(); for (int i = 0; i < tapes.length; i++) { Tape tape = tapes[i]; tapeIdToTape.put(tape.getId(), tape); } } while (requestIterator.isHasMore()); return tapeIdToTape; } private List<Path> getPaths(APISessionContext context) throws APIException, RemoteException { List<Path> pathsList = new LinkedList<Path>(); RequestIterator requestIterator = null; do { PathResponse pathResponse = endPoint.getPaths(context, requestIterator); requestIterator = pathResponse.getRequestIterator(); Path[] paths = pathResponse.getPaths(); pathsList.addAll(Arrays.asList(paths)); } while (requestIterator.isHasMore()); return pathsList; } private List<Violation> getViolations(APISessionContext context) throws APIException, RemoteException { List<Violation> violationsList = new LinkedList<Violation>(); RequestIterator requestIterator = null; do { ViolationResponse violationResponse = endPoint.getViolations(context, requestIterator); requestIterator = violationResponse.getRequestIterator(); Violation[] violations = violationResponse.getViolations(); violationsList.addAll(Arrays.asList(violations)); } while (requestIterator.isHasMore()); return violationsList; public void getAllViolations() throws APIException, RemoteException { APISessionContext context = endPoint.openSession("1.0", 10000); List<Violation> violations = getViolations(context); System.out.println(""); System.out.println("Number of violations is: " + violations.size()); System.out.println("Host id Storage id Volume id Violation type"); System.out.println("---------------------------------------------------"); for (Iterator<Violation> iterator = violations.iterator(); iterator.hasNext();) { Violation violation = iterator.next(); System.out.println(violation.getHostId() + "\t\t" + violation.getArrayId() + "\t" + violation.getVolumeId() + "\t" + violation.getType()); } } private List<Policy> getPolicies(APISessionContext context) throws APIException, RemoteException { List<Policy> policiesList = new LinkedList<Policy>(); RequestIterator requestIterator = null; do { PolicyResponse policyResponse = endPoint.getPolicies(context, requestIterator); requestIterator = policyResponse.getRequestIterator(); Policy[] violations = policyResponse.getPolicies(); policiesList.addAll(Arrays.asList(violations)); } while (requestIterator.isHasMore()); return policiesList; } public void getAllPolicies() throws APIException, RemoteException {

158 | OnCommand Insight Connect API Reference Guide


APISessionContext context = endPoint.openSession("1.0", 10000); List<Policy> policies = getPolicies(context); System.out.println(""); System.out.println("Number of policies is: " + policies.size()); System.out.println("Host id Storage id Volume id Redundancy HopsNumber HostPortsRedundancy VolumeSharing Owner"); System.out.println("---------------------------------------------------"); for (Iterator<Policy> iterator = policies.iterator(); iterator.hasNext();) { Policy policy = iterator.next(); System.out.println(policy.getHostId() + "\t\t" + policy.getArrayId() + "\t" + policy.getVolumeId() + "\t" + policy.getRedundancy() + "\t" + policy.getHopsNumber() + "\t" + policy.getHostPortsRedundancy() + "\t" + policy.getVolumeSharingScope() + "\t" + policy.getOwner()); } } private Map<String, Volume> prepareVolumeMap(APISessionContext context, Set<String> storageArrayIds) throws APIException, RemoteException { Map<String, Volume> volumeIdToVolume = new HashMap<String, Volume>(); for (Iterator<String> iterator = storageArrayIds.iterator(); iterator.hasNext();) { String storageArrayId = iterator.next(); RequestIterator requestIterator = null; do { VolumeResponse volumeResponse = endPoint.getVolumesByStorageArray(context, requestIterator, storageArrayId); requestIterator = volumeResponse.getRequestIterator(); Volume[] volumes = volumeResponse.getVolumes(); for (int i = 0; i < volumes.length; i++) { Volume volume = volumes[i]; volumeIdToVolume.put(volume.getId(), volume); } } while (requestIterator.isHasMore()); } return volumeIdToVolume; } private Map<String, Host> prepareHostMap(APISessionContext context) throws APIException, RemoteException { Map<String, Host> hostIdToHost = new HashMap<String, Host>(); RequestIterator requestIterator = null; do { HostResponse hostResponse = endPoint.getHosts(context, requestIterator); requestIterator = hostResponse.getRequestIterator(); Host[] hosts = hostResponse.getHosts(); for (int i = 0; i < hosts.length; i++) { Host host = hosts[i]; hostIdToHost.put(host.getId(), host); } } while (requestIterator.isHasMore()); return hostIdToHost; } private Map<String, StorageArray> prepareArrayMap(APISessionContext context) throws APIException, RemoteException { Map<String, StorageArray> arrayIdToArray = new HashMap<String, StorageArray>(); RequestIterator requestIterator = null; do { StorageArrayResponse arrayResponse = endPoint.getStorageArrays(context, requestIterator); requestIterator = arrayResponse.getRequestIterator(); StorageArray[] arrays = arrayResponse.getArrays(); for (int i = 0; i < arrays.length; i++) { StorageArray array = arrays[i]; arrayIdToArray.put(array.getId(), array); } } while (requestIterator.isHasMore()); return arrayIdToArray; }

OnCommand Insight Connect API code sample scripts and packages | 159

private SANscreenAPIEndPoint init() { //needed for ssl System.setProperty("javax.net.ssl.trustStore", "c:\\Program Files\\SANscreen\\jboss\\server\\onaro\\cert\\server.keystore"); System.setProperty("javax.net.ssl.trustStorePass", "changeit"); String serviceUrl = "http://localhost/sanscreenapi"; System.setProperty("javax.xml.soap.MessageFactory", "com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl"); SANscreenAPIEndPoint endPoint = new SANscreenAPIService_Impl().getSANscreenAPIEndPointPort(); ((Stub) endPoint)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, serviceUrl); ((Stub) endPoint)._setProperty(Stub.USERNAME_PROPERTY, "admin"); ((Stub) endPoint)._setProperty(Stub.PASSWORD_PROPERTY, "admin123"); return endPoint; } public static void main(String[] args) throws RemoteException, APIException { APIExamples examples = new APIExamples(); examples.printVersions(); examples.getAllStorageArrays(); examples.getAllPaths(); } }

CSV Example in Java


This is an example of CSV in Java code.
import com.onaro.sanscreen.wsapi.*; import com.sun.xml.rpc.client.*; import javax.net.ssl.*; public class CSVExample { public static void main(String args[]) throws Exception { SANscreenAPIEndPoint endpoint = createEndPoint(); APISessionContext context = endpoint.openSession("1.0", 10000); new csv.GetInventory("inventory-api.csv").printReport(context, endpoint); new csv.GetConnectedPorts("connected-api.csv").printReport(context,endpoint); new csv.GetReplicas("replicas-api.csv").printReport(context, endpoint); new csv.GetVolumes("volumes-api.csv").printReport(context, endpoint); endpoint.closeSession(context); System.out.println("Done"); } protected static SANscreenAPIEndPoint createEndPoint() { TrustManager[] trustAllCerts = new TrustManager[]{ new X509TrustManager() { public java.security.cert.X509Certificate[] getAcceptedIssuers() { return null; } public void checkClientTrusted( java.security.cert.X509Certificate[] certs, String authType) { } public void checkServerTrusted( java.security.cert.X509Certificate[] certs, String authType) { } } }; // Install the trust manager try { SSLContext sc = SSLContext.getInstance("SSL"); sc.init(null, trustAllCerts, new java.security.SecureRandom()); HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory( )); } catch (Exception e) { } //this will prevent the server from throwing the following exception:

160 | OnCommand Insight Connect API Reference Guide


//"Couldn't create SOAP message factory due to exception: javax.xml.soap.SOAPException: Failed to create MessageFactory: org.jboss.axis.soap.MessageFactoryImpl" System.setProperty("javax.xml.soap.MessageFactory", "com.sun.xml.messajing.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl"); SANscreenAPIEndPoint port = new SANscreenAPIService_Impl().getSANscreenAPIEndPointPort(); ((StubBase) port)._setProperty(StubPropertyConstants.ENDPOINT_ADDRESS_PROPERTY, "http://localhost:80/sanscreenapi"); ((StubBase) port)._setProperty(StubPropertyConstants.USERNAME_PROPERTY, "admin"); ((StubBase) port)._setProperty(StubPropertyConstants.PASSWORD_PROPERTY, "admin123"); return port; } }

CSV Example
CSV Example
package csv; import java.io.*; public abstract class CsvExample { protected BufferedWriter writter;

public CsvExample(String fileName) throws IOException { writter = new BufferedWriter(new FileWriter(fileName)); System.out.println("writing results to '"+fileName+"'"); }

public void addLine(String ... params) throws IOException { StringBuilder builder = new StringBuilder(); for (int i = 0; i < params.length; i++) { Object param = params[i]; if (param != null) { builder.append(param); } if(i+1 < params.length) { builder.append('$'); } } builder.append('\n'); writter.write(builder.toString()); } }

GetConnectedPorts This demonstrates how to extract data from connected ports and put it into a CSV file.
package csv; import com.onaro.sanscreen.wsapi.*; import java.io.*; import java.util.*; public class GetConnectedPorts extends CsvExample { public GetConnectedPorts(String fileName) throws IOException { super(fileName); } public void printReport(APISessionContext context, SANscreenAPIEndPoint endPoint) throws IOException, APIException { addLine("Initiator", "Target");

OnCommand Insight Connect API code sample scripts and packages | 161
//first put all the ports in a map Map<String, LogicalPort> allPorts = new HashMap<String, LogicalPort>(); for(LogicalPort port: endPoint.getConnectedPorts(context, null).getLogicalPorts()) { allPorts.put(port.getId(), port); } for(LogicalPort port: allPorts.values()){ LogicalPort connectedPort = allPorts.get(port.getConnectedPortId()); String initiator = port.getWwn(); if (connectedPort != null) { taget = connectedPort.getWwn(); }else{ System.out.println("could not find port ["+ port.getConnectedPortId()+"] connected to port ["+port.getId()+"]"); } addLine(initiator,taget); } writter.flush(); writter.close(); } }

GetInventory This sample demonstrates how to extract inventory data and dump it into a CSV file.
package csv; import com.onaro.sanscreen.wsapi.*; import java.io.*; import java.rmi.*; import java.util.*; public class GetInventory extends CsvExample { private Map<String, Set<Port>> portsOfNodes = new HashMap<String, Set<Port>>(); private Map<String, Set<Port>> portsOfDevices = new HashMap<String, Set<Port>>(); public GetInventory(String fileName) throws IOException { super(fileName); } public void printReport(APISessionContext context, SANscreenAPIEndPoint endPoint) throws APIException, IOException { calcPortsMap(endPoint, context); addLine("Alias", "Identifier", "DeviceType", "WWNN", "WWPN", "PortName"); for(StorageArray array:endPoint.getStorageArrays(context, null).getArrays()) { addLines(array.getId(), array.getName(), array.getIp(), "Storage", endPoint, context, true); } for(Tape tape :endPoint.getTapes(context, null).getTapes()) { addLines(tape.getId(), tape.getName(), tape.getIp(), "Tape", endPoint,context, true); } for (Host host : endPoint.getHosts(context, null).getHosts()) { addLines(host.getId(), host.getName(), host.getIp(), "Host", endPoint, context, true); } for (Switch aSwitch : endPoint.getSwitches(context, null).getSwitches()) { addLines( aSwitch.getId(), aSwitch.getName(), aSwitch.getWwn(), "Switch", endPoint, context, false); } for (Generic generic : endPoint.getGenerics(context, null).getGenerics()) { addLines( generic.getId(), generic.getWwn(), generic.getWwn(), "Generic Device", endPoint, context, false); }

162 | OnCommand Insight Connect API Reference Guide

writter.flush(); writter.close(); } private void addPort(Map<String, Set<Port>> map, String nodeOrDeviceId, Port port) { Set<Port> ports = map.get(nodeOrDeviceId); if(ports == null){ ports = new HashSet<Port>(); map.put(nodeOrDeviceId, ports); } ports.add(port); } private void addLines(String deviceId, String deviceAlias, String deviceIdentifier, String deviceType, SANscreenAPIEndPoint endPoint, APISessionContext context, boolean isNodeContainer) throws APIException, IOException { if(isNodeContainer) { NodeResponse nodesOfDevice = endPoint.getNodesOfDevice(context, null, deviceId); for(Node node: nodesOfDevice.getNodes()) { for (Port port : portsOfNodes.get(node.getId())) { addLine(deviceAlias, deviceIdentifier, deviceType, node.getWwn(), port.getWwn(), port.getName()); } } }else { for (Port port : portsOfDevices.get(deviceId)) { addLine(deviceAlias, deviceIdentifier, deviceType, deviceIdentifier, port.getWwn(), port.getName()); } } } }

GetReplicas This sample demonstrates how to extract data on replicas and dump it into a CSV file.
package csv; import com.onaro.sanscreen.wsapi.*; import java.io.*; import java.util.*; public class GetReplicas extends CsvExample { public GetReplicas(String fileName) throws IOException { super(fileName); } public void printReport(APISessionContext context, SANscreenAPIEndPoint endPoint) throws APIException, IOException { addLine("InitiatorStorageIdentifier", "InitiatorStorageName", "InitiatorStorageSerial", "InitiatorVolume", "TargetStorageIdentifier", "TargetStorageName", "TargetStorageSerial", "TargetVolume"); Map<String, StorageArray> allStorages = new HashMap<String, StorageArray>(); for(StorageArray storage: endPoint.getStorageArrays(context, null).getArrays()) { allStorages.put(storage.getId(), storage); } HashSet<SyncInfo> syncHistory = new HashSet<SyncInfo>(); for(StorageArray storage: allStorages.values()) { for(Synchronization sync: endPoint.getSynchronizationsByStorageArray(context, null, storage.getId()).getSynchronizations()){ String sourceIP = sync.getSourceStorageArrayIP(); String sourceName = getName(allStorages,sync.getSourceStorageArrayId()); String sourceSerial = getSerial(allStorages,sync.getSourceStorageArrayId()); String sourceVolume = sync.getSourceVolumeName(); String targetIP = sync.getTargetStorageArrayIP(); String targetName = getName(allStorages,sync.getTargetStorageArrayId());

OnCommand Insight Connect API code sample scripts and packages | 163
String targetSerial = getSerial(allStorages,sync.getTargetStorageArrayId()); String targetVolume = sync.getTargetVolumeName(); if (notRedundant(syncHistory, sourceIP,sourceVolume,targetIP,targetVolume)) { addLine(sourceIP,sourceName,sourceSerial,sourceVolume,targ etIP,targetName,targetSerial,targetVolume); } } } writter.flush(); writter.close(); } private boolean notRedundant(Set<SyncInfo> syncHistory, String sourceIP, String sourceVolume, String targetIP, String targetVolume) { return syncHistory.add(new SyncInfo(sourceIP, sourceVolume, targetIP, targetVolume)); } private String getName(Map<String, StorageArray> allStorages, String storstorageArrayId){ StorageArray storageArray = allStorages.get(storageArrayId); return storageArray != null ? storageArray.getName() : ""; } private String getSerial(Map<String, StorageArray> allStorages, String storageArrayId) { StorageArray storageArray = allStorages.get(storageArrayId); return storageArray != null ? storageArray.getSerialNumber() : ""; } private static class SyncInfo { private String sourceIP; private String targetIP; private String sourceVolume; private String targetVolume; public SyncInfo(String sourceIP, String sourceVolume, String targetIP, String targetVolume) { this.sourceIP = sourceIP; this.sourceVolume = sourceVolume; this.targetIP = targetIP; this.targetVolume = targetVolume; } public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final SyncInfo syncInfo = (SyncInfo) o; if (sourceIP != null ? !sourceIP.equals(syncInfo.sourceIP) : syncInfo.sourceIP != null) return false; if (sourceVolume != null ? !sourceVolume.equals(syncInfo.sourceVolume) : syncInfo.sourceVolume != null) return false; if (targetIP != null ? !targetIP.equals(syncInfo.targetIP) : syncInfo.targetIP != null) return false; if (targetVolume != null ? !targetVolume.equals(syncInfo.targetVolume) : syncInfo.targetVolume != null) return false; return true; } public int hashCode() { int result; result = (sourceIP != null ? sourceIP.hashCode() : 0); result = 29 * result + (targetIP != null ? targetIP.hashCode() : 0); result = 29 * result + (sourceVolume != null ? sourceVolume.hashCode() : 0); result = 29 * result + (targetVolume != null ? targetVolume.hashCode() : 0); return result; }

164 | OnCommand Insight Connect API Reference Guide


} }

GetVolumes This sample demonstrates how to extract volume data and dump it into a CSV file.
package csv; import com.onaro.sanscreen.wsapi.*; import java.io.*; import java.text.*; import java.util.*; import java.rmi.*; public class GetVolumes extends CsvExample { public GetVolumes(String fileName) throws IOException { super(fileName); } public void printReport(APISessionContext context, SANscreenAPIEndPoint endPoint) throws APIException, IOException { NumberFormat format = NumberFormat.getNumberInstance(); format.setMaximumFractionDigits(2); Map<String, List<String>> map = calcVolumeIdToHostId(endPoint, context); Map<String, WwnSet> hostsPorts = calcHostsPortsList(endPoint, context); addLine("ArrayName", "Volume", "Capacity", "Type", "Redundancy", "WWNs"); Map<StorageArray, List<Volume>> storages = calcStorageVolumesMap(endPoint,context); for(Map.Entry<StorageArray,List<Volume>> storage: storages.entrySet()){ String ArrayName = storage.getKey().getName(); for(Volume volume: storage.getValue()) { String Volume = volume.getName(); String Capacity = format.format(volume.getCapacityGB()); String Type = getType(volume); String Redundancy = getRedundancy(volume); List<String> hostIds = map.get(volume.getId()); if (hostIds != null) { for (String hostId : hostIds) { WwnSet wwnSet = hostsPorts.get(hostId); if (wwnSet != null) { addLine(ArrayName, Volume, Capacity, Type, Redundancy, wwnSet.getWwnsList()); }else{ //host is Unknown addLine(ArrayName, Volume, Capacity, Type, Redundancy, ""); } } } else { addLine(ArrayName, Volume, Capacity, Type, Redundancy, ""); } } } writter.flush(); writter.close(); } private List<Path> getAllPaths(SANscreenAPIEndPoint endPoint, APISessionContext context) throws APIException, RemoteException { LinkedList<Path> list = new LinkedList<Path>(); RequestIterator requestIterator = null; while(requestIterator == null || requestIterator.isHasMore()){ PathResponse pathResponse = endPoint.getPaths(context, requestIterator); list.addAll(Arrays.asList(pathResponse.getPaths())); requestIterator = pathResponse.getRequestIterator(); } return list;

OnCommand Insight Connect API code sample scripts and packages | 165
} private static String getType(Volume volume) { String type = volume.getType(); if (type != null && type.length() > 0) { //looking for comma to remove the ", Meta" and leave only the Volume R1 or R2 int indexOfComma = type.indexOf(','); return indexOfComma != -1 ? type.substring(0, indexOfComma) : type; } else { return "N/A"; } } private static String getRedundancy(Volume volume) { String redundancy = volume.getRedundancy(); if (redundancy != null && redundancy.length() > 0) { String rv = redundancy.replace(", ", ";"); if (rv.startsWith("[")) { rv = rv.substring(1); } if (rv.endsWith("]")) { rv = rv.substring(0, rv.length() - 1); } return rv; } else { return "N/A"; } } private Map<String, List<String>> calcVolumeIdToHostId(SANscreenAPIEndPoint endPoint,APISessionContext context) throws APIException, RemoteException { List<Path> paths = getAllPaths(endPoint, context); HashMap<String, List<String>> map = new HashMap<String, List<String>>(); for(Path path: paths){ String volumeId = path.getVolumeId(); List<String> hosts = map.get(volumeId); if(hosts == null){ hosts = new ArrayList<String>(); map.put(volumeId, hosts); } hosts.add(path.getHostId()); } return map; } private Map<String, WwnSet> calcHostsPortsList(SANscreenAPIEndPoint endPoint, APISessionContext context) throws APIException, RemoteException { HashMap<String, WwnSet> map = new HashMap<String, WwnSet>(); for(Port port: getAllPortsOfHost(endPoint, context)){ String wwn = port.getWwn(); String hostId = port.getDeviceId(); WwnSet wwnSet = map.get(hostId); if(wwnSet == null){ wwnSet = new WwnSet(); map.put(hostId, wwnSet); } wwnSet.add(wwn); } return map; } private LinkedList<Port> getAllPortsOfHost(SANscreenAPIEndPoint endPoint, APISessionContext context) throws APIException, RemoteException { LinkedList<Port> list = new LinkedList<Port>(); RequestIterator requestIterator = null; while (requestIterator == null || requestIterator.isHasMore()) { PortResponse portResponse = endPoint.getPortsOfDeviceType(context, requestIterator,"Host"); list.addAll(Arrays.asList(portResponse.getPorts()));

166 | OnCommand Insight Connect API Reference Guide


requestIterator = portResponse.getRequestIterator(); } return list; } private static class WwnSet extends TreeSet<String>{ private String wwnsList = null; public String getWwnsList() { if(wwnsList== null){ StringBuilder wwnsbuilder = new StringBuilder(); for (Iterator<String> wwnIterator = iterator(); wwnIterator.hasNext();) { wwnsbuilder.append(wwnIterator.next()); if (wwnIterator.hasNext()) { wwnsbuilder.append(';'); } } wwnsList = wwnsbuilder.toString(); } return wwnsList; } } }

Perl
Perl scripts cannot be executed without the appropriate packages or libraries. Sample scripts and corresponding packages are provided as examples. NetApp. The following sample scripts are provided: computeTotalStoragePerArray.pl: Iterates through all the volumes of all the storage devices and sums up their sizes to determine the capacity of each storage. findDisconnectedHosts.pl: Compares the list of paths and the list of hosts, pointing out any hosts that are not in a path. getPaths.pl: Queries the localhost for all paths using iterations. getStorage.pl: Queries the localhost for storage devices without using iterations.

The following packages are necessary to support the scripts listed above. APISessionContext.pm APIVersion.pm Host.pm Iterator.pm Path.pm SOAPParam.pm StorageArray.pm Timeout.pm Volume.pm

OnCommand Insight Connect API code sample scripts and packages | 167

Sample Perl scripts


You might find it helpful to look at some sample Perl scripts. Perl examples are for reference purposes only and are not actively supported by NetApp. To make the examples work, download the following libraries and their dependencies from a location such as the Comprehensive Perl Archive Network (www.cpan.org): Ssleay: SSL library for Windows SOAP::LITE: Basic implementation of SOAP

computeTotalStoragePerArray.pl sample script This computeTotalStoragePerArray.pl script looks up all the volume on storage devices and figures out the total amount of capacity available. Because storage devices have a capacity attribute on them, you would never want to actually do this script. The script is for example only.
#!/usr/bin/perl -w use warnings; use strict; use SOAP::Lite; use APIVersion; use Timeout; use APISessionContext; use StorageArray; use Iterator; use Volume; # This is to get standard output to flush on write. $| = 1; # # # # # # First instantiate the SOAPLite object. Provide the namespace, which in our case is: http://wsapi.sanscreen.onaro.com/SANscreenAPI and the actual server to connect to: https//<yourserver>/sanscreenapi. Note that using the https in the URL requires some version of SSL installed on the system. On windows boxes this can be supplied by using SSLeay

my $Soap= new SOAP::Lite ns => 'http://wsapi.sanscreen.onaro.com/SANscreenAPI', proxy => 'https://localhost/sanscreenapi', on_debug => sub{print@_;}, on_fault => sub { my($soap, $res) = @_; die ref $res ? $res->faultstring : $soap->transport->status, "\n"; }; # We want to 'overload' getting the login information. It expects a # map with a # name that points to a password sub SOAP::Transport::HTTP::Client::get_basic_credentials { return 'guest' => ''; } # SOAPLite uses SOAP::Data objects to build up the request. Included in the # examples directory will be a copy of the APIVersion and Timeout objects. # This simplifies the instantiation of the SOAP::Data objects my $SOAPApiVersion = new APIVersion("1.0")->getSOAP(); my $SOAPTimeOut = new Timeout(1000)->getSOAP(); # Now our first request.

168 | OnCommand Insight Connect API Reference Guide


my $somResponse = $Soap->openSession($SOAPApiVersion, $SOAPTimeOut); # # # # # # # Our response, the "somResponse" is stored in SOAP::Som format. This object is an object you can feed XPath queries into to get the actual contents of the response. To simplify the parsing of this XML, im going to feed it into the parse function of an APISessionContext object, also found in the examples directory. This context is what we're going to be passing a round to let the server know which session we are.

my $APIContext = new APISessionContext(); $APIContext->parseResult($somResponse); # We can print out the values of the API Context after parse to signify # a successful connection print("Client Version: " . $APIContext->clientVersion() . "\n"); print("ID: " . $APIContext->id() . "\n"); print("Limit: " . $APIContext->limit() . "\n"); print("Time: " . $APIContext->time() . "\n\n\n"); my @allStorageObjects; # We need to build an empty request iterator to seed the call my $iterObject = new SOAPParam( "RequestIterator_2", "tns:RequestIterator"); do { my $storageArraysResponse = $Soap->getStorageArrays($APIContext>getSOAP(), $iterObject->getSOAP()); $iterObject = Iterator->parseResult($storageArraysResponse); my @currStorageArrayObjects = StorageArray->parseResult($storageArraysResponse); push @allStorageObjects, @currStorageArrayObjects; } while($iterObject->hasMore() eq "true"); foreach my $storageArrayObject (@allStorageObjects) { # We need to build an empty request iterator to seed the call $iterObject = new SOAPParam( "RequestIterator_2", "tns:RequestIterator"); print $storageArrayObject->name() . "\n\n"; my $size = 0; my @allVolumeObjects; do { my $arrayRequester = new SOAP::Data( value => $storageArrayObject->id(), name => "String_3", type => "string"); my $volumeResponse = $Soap->getVolumesByStorageArray($APIContext>getSOAP(), $iterObject->getSOAP(), $arrayRequester ); $iterObject = Iterator->parseResult($volumeResponse); my @currVolumeObjects= Volume->parseResult($volumeResponse); push @allVolumeObjects, @currVolumeObjects; } while($iterObject->hasMore() eq "true"); foreach my $volume (@allVolumeObjects){ $size += $volume->capacityGB();

OnCommand Insight Connect API code sample scripts and packages | 169
} print "Size in GB as returned by summing the volume sizes: ". $size . "\n\n\n"; }

findDisconnectedHosts.pl sample script This findDisconnectedHosts.pl script is an example of how to get hosts that do not have any paths associated with them.
#!/usr/bin/perl -w use warnings; use strict; use SOAP::Lite; use APIVersion; use Timeout; use APISessionContext; use Iterator; use Path; use Host; # This is perl deep magic to get standard output to flush on write. $| = 1; # # # # # # First instantiate the SOAPLite object. Provide the namespace, which in our case is: http://wsapi.sanscreen.onaro.com/SANscreenAPI and the actual server to connect to: https//<yourserver>/sanscreenapi. Note that using the https in the URL requires some version of SSL installed on the system. On windows boxes this can be supplied by using SSLeay

my $Soap= new SOAP::Lite ns => 'http://wsapi.sanscreen.onaro.com/SANscreenAPI', proxy => 'https://localhost/sanscreenapi', on_debug => sub{print@_;}, on_fault => sub { my($soap, $res) = @_; die ref $res ? $res->faultstring : $soap->transport->status "\n"; }; # We want to 'overload' getting the login information. It expects a map with a # name that points to a password sub SOAP::Transport::HTTP::Client::get_basic_credentials { return 'guest' => ''; } # SOAPLite uses SOAP::Data objects to build up the request. Included in the # examples directory will be a copy of the APIVersion and Timeout objects. # This simplifies the instantiation of the SOAP::Data objects my $SOAPApiVersion = new APIVersion("1.0")->getSOAP(); my $SOAPTimeOut = new Timeout(1000)->getSOAP(); # Now our first request. my $somResponse = $Soap->openSession($SOAPApiVersion, $SOAPTimeOut); # # # # # # # Our response, the "somResponse" is stored in SOAP::Som format. This object is an object you can feed XPath queries into to get the actual contents of the response. To simplify the parsing of this XML, im going to feed it into the parse function of an APISessionContext object, also found in the examples directory. This context is what we're going to be passing a round to let the server know which session we are.

my $APIContext = new APISessionContext(); $APIContext->parseResult($somResponse);

170 | OnCommand Insight Connect API Reference Guide

# We can print out the values of the API Context after parse, just to signify # a successful connection print("Client Version: " . $APIContext->clientVersion() . "\n"); print("ID: " . $APIContext->id() . "\n"); print("Limit: " . $APIContext->limit() . "\n"); print("Time: " . $APIContext->time() . "\n\n\n"); # We need to build an empty request iterator to seed the call my $iterObject = new SOAPParam( "RequestIterator_2", "tns:RequestIterator"); # First we retrieve all the path objects my (@currPathObjects, @allPathObjects); print("Finding paths...\n"); do { my $pathResponse = $Soap->getPaths($APIContext->getSOAP(), $iterObject->getSOAP()); $iterObject = Iterator->parseResult($pathResponse); my @currPathObjects = Path->parseResult($pathResponse); push @allPathObjects, @currPathObjects; print("."); } while($iterObject->hasMore() eq "true"); print("\n"); # Now go through the pats we retrieved and put them into a hash object, there # by eliminating duplicates for my $pathObject (@allPathObjects) { $allHostsInPaths{$pathObject->hostId()} = 1; } # Now retrieve all the hosts. If a host is not in our hash, then it is # disconnected my (@currHostObjects, @allHostObjects); $iterObject = new SOAPParam( "RequestIterator_2", "tns:RequestIterator"); print("Finding all hosts...\n"); do { my $hostResponse = $Soap->getHosts($APIContext->getSOAP(), $iterObject->getSOAP()); $iterObject = Iterator->parseResult($hostResponse); my @currHostObjects = Host->parseResult($hostResponse); push @allHostObjects, @currHostObjects; print("."); } while($iterObject->hasMore() eq "true"); print("\n"); my @disconnectedHosts; for my $hostObject(@allHostObjects) { if(!defined $allHostsInPaths{$hostObject->id()}) { push @disconnectedHosts, $hostObject; $hostObject->dump();

OnCommand Insight Connect API code sample scripts and packages | 171
print("\n\n"); } }

getPaths.pl sample script The getPaths.pl sample script queries the localhost for all paths using iterations.
#!/usr/bin/perl -w use warnings; use strict; use SOAP::Lite; use APIVersion; use Timeout; use APISessionContext; use StorageArray; use Iterator; use Path; # This is perl deep magic to get standard output to flush on write. $| = 1; # First instantiate the SOAPLite object. # Provide the namespace, which in our case is: # http://wsapi.sanscreen.onaro.com/SANscreenAPI # and the actual server to connect to: https//<yourserver>/sanscreenapi. # Note that using the https in the URL requires some version of SSL installed on # the system. On windows boxes this can be supplied by using SSLeay # my $Soap= new SOAP::Lite ns => 'http://wsapi.sanscreen.onaro.com/SANscreenAPI', proxy => 'https://localhost/sanscreenapi', on_fault => sub { my($soap, $res) = @_; die ref $res ? $res->faultstring : $soap->transport->status, "\n"; }; # We want to 'overload' getting the login information. It expects a map with a # name that points to a password sub SOAP::Transport::HTTP::Client::get_basic_credentials { return 'guest' => ''; } # SOAPLite uses SOAP::Data objects to build up the request. Included in the # examples directory will be a copy of the APIVersion and Timeout objects. # This simplifies the instantiation of the SOAP::Data objects my $SOAPApiVersion = new APIVersion("1.0")->getSOAP(); my $SOAPTimeOut = new Timeout(1000)->getSOAP(); # Now our first request. my $somResponse = $Soap->openSession($SOAPApiVersion, $SOAPTimeOut); # # # # # # Our response, the "somResponse" is stored in SOAP::Som format. This object is an object you can feed XPath queries into to get the actual contents of the response. To simplify the parsing of this XML, im going to feed it into the parse function of an APISessionContext object, also found in the examples directory. This context is what we're going to be passing a round to let the server know which session we are.

my $APIContext = new APISessionContext(); $APIContext->parseResult($somResponse); # We can print out the values of the API Context after parse, just to signify # a succeful connection print("Client Version: " . $APIContext->clientVersion() . "\n"); print("ID: " . $APIContext->id() . "\n"); print("Limit: " . $APIContext->limit() . "\n"); print("Time: " . $APIContext->time() . "\n\n\n"); # This shows how to retrieve the paths arrays that OnCommand Insight knows about

172 | OnCommand Insight Connect API Reference Guide


# normally the second command of this function will be an iterator object, # but we'll just retrieve all of them in one batch now. my (@currPathObjects, @allPathObjects); # We need to build an empty request iterator to seed the call my $iterObject = new SOAPParam( "RequestIterator_2", "tns:RequestIterator"); do { my $pathResponse = $Soap->getPaths($APIContext->getSOAP(), $iterObject->getSOAP()); $iterObject = Iterator->parseResult($pathResponse); my @currPathObjects = Path->parseResult($pathResponse); push @allPathObjects, @currPathObjects; print("."); } while($iterObject->hasMore() eq "true"); # Now print them out for my $pathObject (@allPathObjects) { $pathObject->dump(); print("\n\n"); }

getStorage.pl sample script The getStorage.pl sample script queries the localhost for storage devices without using iterations.
#!/usr/bin/perl -w use warnings; use strict; use SOAP::Lite; use APIVersion; use Timeout; use APISessionContext; use StorageArray; # This is perl deep magic to get standard output to flush on write. $| = 1; # First instantiate the SOAPLite object. # Provide the namespace, which in our case is: # http://wsapi.sanscreen.onaro.com/SANscreenAPI # and the actual server to connect to: https//<yourserver>/sanscreenapi. # Note that using the https in the URL requires some version of SSL # installed on the system. On windows boxes this can be supplied by using SSLeay my $Soap= new SOAP::Lite ns => 'http://wsapi.sanscreen.onaro.com/SANscreenAPI', proxy => 'https://localhost/sanscreenapi', on_fault => sub { my($soap, $res) = @_; die ref $res ? $res->faultstring : $soap->transport->status, "\n"; }; # We want to 'overload' getting the login information. It expects a # map with a name that points to a password sub SOAP::Transport::HTTP::Client::get_basic_credentials { return 'guest' => ''; } # SOAPLite uses SOAP::Data objects to build up the request. # Included in the examples # directory will be a copy of the APIVersion and Timeout objects. # This simplifies the instantiation of the SOAP::Data objects my $SOAPApiVersion = new APIVersion("1.0")->getSOAP(); my $SOAPTimeOut = new Timeout(1000)->getSOAP(); # Now our first request. my $somResponse = $Soap->openSession($SOAPApiVersion,

OnCommand Insight Connect API code sample scripts and packages | 173
$SOAPTimeOut); # # # # # # Our response, the "somResponse" is stored in SOAP::Som format. This object is an object you can feed XPath queries into to get the actual contents of the response. To simplify the parsing of this XML, im going to feed it into the parse function of an APISessionContext object, also found in the examples directory. This context is what we're going to be passing a round to let the server know which session we are.

my $APIContext = new APISessionContext(); $APIContext->parseResult($somResponse); # We can print out the values of the API Context after parse, to signify # a successful connection print("Client Version: " . $APIContext->clientVersion() . "\n"); print("ID: " . $APIContext->id() . "\n"); print("Limit: " . $APIContext->limit() . "\n"); print("Time: " . $APIContext->time() . "\n\n\n"); # This shows how to retrieve the storage arrays that OnCommand Insight knows about # normally the second command of this function will be an iterator object, # but we'll just retrieve all of them in one batch now. my $storageArraysResponse = $Soap->getStorageArrays($APIContext>getSOAP()); my @storageArrayObjects = StorageArray>parseResult($storageArraysResponse); # Now print them out for my $storageArrayObject (@storageArrayObjects) { $storageArrayObject->dump(); print("\n\n"); }

Sample Perl packages


Packages files are indicated by a .pm extension. Package files cannot be executed. They are libraries necessary to support script files. APISessionContext package APISessionContext.pm is a Perl package. It is not a script and cannot be executed. All package (.pm) files support script (.pl) files, which are executable.
package APISessionContext; use warnings; use strict; use SOAPParam; our @ISA = qw(SOAPParam); #### # APISessionContext # Ive decided to model this as one SOAPParam containing several child # SOAP::Data objects. If you parse the results from a connect call, it will # fill in the objects as necessary. Ive overloaded SOAPParam::getSoap() to # drop these child objects in the value for the SOAP::Data object right # before deserializing. sub new { my ( $class ) = @_; my $self = $class->SUPER::new( "APISessionContext_1", "tns:APISessionContext"); # Build a temporary hash of parameter name to SOAP::Data objects to aid # in deserialization. We will fill in the values when we get them. # when you deserialize SOAP::Data objects without values, you get empty

174 | OnCommand Insight Connect API Reference Guide


# elements, which can still be parsed by the server. $self->{_childHash} = (); $self->{_childHash}->{"clientVersion"} = new SOAP::Data( type => "string", name => "clientVersion"); $self->{_childHash}->{"id"} = new SOAP::Data( type => "string", name => "id"); $self->{_childHash}->{"limit"} = new SOAP::Data( type => "int", name => "limit"); $self->{_childHash}->{"time"} = new SOAP::Data( type => "long", name => "time"); bless $self, ref($class) || $class; return $self; } # # # # { my ($self, $som) = @_; $self->clientVersion($som->valueof("//result/clientVersion")); $self->id($som->valueof("//result/id")); $self->limit($som->valueof("//result/limit")); $self->time($som->valueof("//result/time")); } # clientVersion # The getter and setter method for _childHash->{"clientVersion") SOAP::Data # object sub clientVersion { my ($self, $clientVersion) = @_; $self->{_childHash}->{"clientVersion"}->value($clientVersion) if defined $clientVersion; return $self->{_childHash}->{"clientVersion"}->value(); } # id # The getter and setter method for _childHash->{"id") SOAP::Data # object sub id { my ($self, $id) = @_; $self->{_childHash}->{"id"}->value($id) if defined $id; return $self->{_childHash}->{"id"}->value(); } # limit # The getter and setter method for _childHash->{"limit") SOAP::Data # object sub limit { my ($self, $limit) = @_; $self->{_childHash}->{"limit"}->value($limit) if defined $limit; parseResult Takes a SOAP::SOM data representation. An object that can be searched using XPath. We will parse the results of a openSession call so that we can reuse. this context object in subsequent calls sub parseResult

OnCommand Insight Connect API code sample scripts and packages | 175
return $self->{_childHash}->{"limit"}->value(); } # time # The getter and setter method for _childHash->{"time") SOAP::Data # object sub time { my ($self, $time) = @_; $self->{_childHash}->{"time"}->value($time) if defined $time; return $self->{_childHash}->{"time"}->value(); } # # # # getSoap The overloaded function that drops the values of our childHash, in this case SOAP::Data objects into the encapsulating SOAP::Data object. The SOAP xml representation will be <Parent><Child1>value<Child2

sub getSOAP { my ( $self ) = @_; my @valueList = values %{$self->{_childHash}}; $self->value(\@valueList); return $self->SUPER::getSOAP(); } 1;

APIVersion package APIVersion.pm is a Perl package. It is not a script and cannot be executed. All package (.pm) files support script (.pl) files, which are executable.
package APIVersion; use warnings; use strict; use SOAPParam; our @ISA = qw(SOAPParam); sub new { my ( $class, $apiVersion ) = @_; my $self = $class->SUPER::new( "String_1", "string", $apiVersion); $self->{_apiVersion} = $apiVersion; bless $self, ref($class) || $class; return $self; } sub apiVersion { my ( $self, $apiVersion ) = @_; if(defined $apiVersion) { $self->{_apiVersion} = $apiVersion; $self->value($apiVersion); } return $self->{_apiVersion}; } 1;

176 | OnCommand Insight Connect API Reference Guide

Host package Host.pm is a Perl package. It is not a script and cannot be executed. All package (.pm) files support script (.pl) files which are executable.
package Host; use warnings; use strict; sub new { my ( $class, $id, $dead, $ip, $name )= @_; my $self = { _id => $id, _dead => $dead, _ip => $ip, _name => $name}; bless $self, ref($class) || $class; return $self; } # This method is intended to be called statically to retrieve the sub parseResult { my ($self, $somResponse) = @_; my @retValue = (); if($somResponse->valueof("//result/size") eq "0") { return @retValue; } my @hostResponses = $somResponse->valueof("//result/hosts"); for my $hostResponse(@hostResponses) { my $host = new Host(); $host->id($hostResponse->{id}); $host->dead($hostResponse->{dead}); $host->ip($hostResponse->{ip}); $host->name($hostResponse->{name}); push @retValue, $host; } return @retValue; } sub id { my ($self, $id) = @_; $self->{_id} = $id if defined $id; return $self->{_id}; } sub dead { my ($self, $dead) = @_; $self->{_dead} = $dead if defined $dead; return $self->{_dead}; } sub ip { my ($self, $ip) = @_; $self->{_ip} = $ip if defined $ip;

OnCommand Insight Connect API code sample scripts and packages | 177
return $self->{_ip}; } sub name { my ($self, $name) = @_; $self->{_name} = $name if defined $name; return $self->{_name}; } sub dump() { my ($self) if(defined if(defined if(defined if(defined } 1;

= @_; $self->id()) { $self->dead()) $self->ip()) { $self->name())

print("id: " . { print("dead: print("ip: " . { print("name:

$self->id() . "\n");} " . $self->dead() . "\n");} $self->ip() . "\n");} " . $self->name() . "\n");}

Iterator package Iterator.pm is a Perl package. It is not a script and cannot be executed. All package (.pm) files support script (.pl) files, which are executable.
package Iterator; use warnings; use strict; use SOAPParam; our @ISA = qw(SOAPParam); sub new { my ( $class ) = @_; my $self = $class->SUPER::new( "RequestIterator_2", "tns:RequestIterator"); $self->{_childHash} = (); $self->{_childHash}->{"hasMore"} = new SOAP::Data( type => "boolean", $self->{_childHash}->{"nextKey"} = new SOAP::Data( type => "string", name => "nextKey"); $self->{_childHash}->{"methodName"} = new SOAP::Data( type => "string", name => "methodName"); bless $self, ref($class) || $class; return $self; } sub parseResult { my ($self, $som) = @_; my $retValue = new Iterator(); $retValue->hasMore($som->valueof("//result/requestIterator/hasMore")); $retValue->nextKey($som->valueof("//result/requestIterator/nextKey")); $retValue->methodName($som->valueof("//result/requestIterator/methodName")); return $retValue; } sub methodName { my ( $self, $methodName) = @_; $self->{_childHash}->{"methodName"}->value($methodName) if defined $methodName;

178 | OnCommand Insight Connect API Reference Guide


return $self->{_childHash}->{"methodName"}->value(); } sub hasMore { my ( $self, $hasMore) = @_; $self->{_childHash}->{"hasMore"}->value($hasMore) if defined $hasMore; return $self->{_childHash}->{"hasMore"}->value(); } sub nextKey { my ( $self, $nextKey) = @_; $self->{_childHash}->{"nextKey"}->value($nextKey) if defined $nextKey; return $self->{_childHash}->{"nextKey"}->value(); } # # # # getSoap The overloaded function that drops the values of our childHash, in this case SOAP::Data objects into the encapsulating SOAP::Data object. The SOAP xml representation will be <Parent><Child1>value<Child2

sub getSOAP { my ( $self ) = @_; my @valueList = values %{$self->{_childHash}}; $self->value(\@valueList); return $self->SUPER::getSOAP(); } 1;

Path package Path.pm is a Perl package. It is not a script and cannot be executed. All package (.pm) files support script (.pl) files which are executable.
package Path; use warnings; use strict; sub new { my ( $class, $id, $arrayId, $hostId, $volumeId )= @_; my $self = { _id => $id, _arrayId => $arrayId, _hostId => $hostId, _volumeId => $volumeId}; bless $self, ref($class) || $class; return $self; } # This method is intended to be called statically to retrieve the sub parseResult { my ($self, $somResponse) = @_; my @retValue = (); if($somResponse->valueof("//result/size") eq "0") { return @retValue; }

OnCommand Insight Connect API code sample scripts and packages | 179
my @pathResponses = $somResponse->valueof("//result/paths"); for my $pathResponse(@pathResponses) { my $path = new Path(); $path->id($pathResponse->{id}); $path->arrayId($pathResponse->{arrayId}); $path->hostId($pathResponse->{hostId}); $path->volumeId($pathResponse->{volumeId}); push @retValue, $path; } return @retValue; } sub id { my ($self, $id) = @_; $self->{_id} = $id if defined $id; return $self->{_id}; } sub arrayId { my ($self, $arrayId) = @_; $self->{_arrayId} = $arrayId if defined $arrayId; return $self->{_arrayId}; } sub hostId { my ($self, $hostId) = @_; $self->{_hostId} = $hostId if defined $hostId; return $self->{_hostId}; } sub volumeId { my ($self, $volumeId) = @_; $self->{_volumeId} = $volumeId if defined $volumeId; return $self->{_volumeId}; } sub dump() { my ($self) if(defined if(defined if(defined if(defined } 1;

= @_; $self->id()) { print("id: " . $self->id() . "\n");} $self->arrayId()) { print("arrayId: " . $self->arrayId() ."\n");} $self->hostId()) { print("hostId: " . $self->hostId() ."\n");} $self->volumeId()) { print("volumeId: " . $self->volumeId() . "\n");}

SOAPParam package SOAPParam.pm is a Perl package. It is not a script and cannot be executed. All package (.pm) files support script (.pl) files which are executable.
package SOAPParam; use warnings; use strict; sub new { my ( $class, $name, $type, $value ) = @_; my $self = { _name => $name, _type => $type, _value => $value

180 | OnCommand Insight Connect API Reference Guide


}; bless $self, ref($class) || $class; return $self; } sub name { my ( $self, $name ) = @_; $self->{_name} = $name if defined($name); return $self->{_name}; } sub type { my ( $self, $type ) = @_; $self->{_type} = $type if defined($type); return $self->{_type}; } sub value { my ( $self, $value ) = @_; $self->{_value} = $value if defined($value); return $self->{_value}; } sub getSOAP { my ( $self ) = @_; return SOAP::Data->new( name => $self->{_name}, type => $self->{_type}, value => $self->{_value}); } 1;

StorageArray package StorageArray.pm is a Perl package. It is not a script and cannot be executed. All package (.pm) files support script (.pl) files which are executable.
package StorageArray; use warnings; use strict; sub new { my ( $class, $id, $ip, $name, $capacityGB, $firmware, $model, $rawCapacityGB, $serialNumber, $vendor )= @_; my $self = { _id => $id, _ip => $ip, _name => $name, _capacityGB => $capacityGB, _firmware => $firmware, _model => $model, _rawCapacityGB => $rawCapacityGB, _serialNumber => $serialNumber, _vendor => $vendor}; bless $self, ref($class) || $class; return $self; } # This method is intended to be called statically to retrieve the

OnCommand Insight Connect API code sample scripts and packages | 181
#sub parseResult { my ($self, $somResponse) = @_; my @retValue = (); if($somResponse->valueof("//result/size") eq "0") { return @retValue; } my @storageArraysResponse = $somResponse->valueof("//result/arrays"); for my $storageArrayResponse(@storageArraysResponse) { my $storageArray = new StorageArray(); $storageArray->id($storageArrayResponse->{id}); $storageArray->ip($storageArrayResponse->{ip}); $storageArray->name($storageArrayResponse->{name}); $storageArray->capacityGB($storageArrayResponse->{capacityGB}); $storageArray->firmware($storageArrayResponse->{firmware}); $storageArray->model($storageArrayResponse->{model}); $storageArray->rawCapacityGB($storageArrayResponse->{rawCapacityGB}); $storageArray->serialNumber($storageArrayResponse->{serialNumber}); $storageArray->vendor($storageArrayResponse->{vendor}); push @retValue, $storageArray; } return @retValue; } sub id { my ($self, $id) = @_; $self->{_id} = $id if defined $id; return $self->{_id}; } sub ip { my ($self, $ip) = @_; $self->{_ip} = $ip if defined $ip; return $self->{_ip}; } sub name() { my ($self, $name) = @_; $self->{_name} = $name if defined $name; return $self->{_name}; } sub capacityGB() { my ($self, $capacityGB) = @_; $self->{_capacityGB} = $capacityGB if defined $capacityGB; return $self->{_capacityGB}; } sub firmware() { my ($self, $firmware) = @_; $self->{_firmware} = $firmware if defined $firmware; return $self->{_firmware}; } sub model() { my ($self, $model) = @_; $self->{_model} = $model if defined $model; return $self->{_model}; }

182 | OnCommand Insight Connect API Reference Guide

sub rawCapacityGB() { my ($self, $rawCapacityGB) = @_; $self->{_rawCapacityGB} = $rawCapacityGB if defined $rawCapacityGB; return $self->{_rawCapacityGB}; } sub serialNumber() { my ($self, $serialNumber) = @_; $self->{_serialNumber} = $serialNumber if defined $serialNumber; return $self->{_serialNumber}; } sub vendor() { my ($self, $vendor) = @_; $self->{_vendor} = $vendor if defined $vendor; return $self->{_vendor}; } sub dump() { my ($self) = @_; if(defined $self->id()) { print("id: " . $self->id() . "\n");} if(defined $self->ip()) { print("ip: " . $self->ip() . "\n");} if(defined $self->name()) { print("name: " . $self->name() . "\n");} if(defined $self->capacityGB()) { print("capacityGB: " . $self>capacityGB() . "\n");} if(defined $self->firmware()) { print("firmware: " . $self>firmware() . "\n");} if(defined $self->model()) { print("model: " . $self->model() ."\n");} if(defined $self->rawCapacityGB()) { print("rawCapacityGB: " . $self>rawCapacityGB() . "\n");} if(defined $self->serialNumber()) { print("serialNumber: " . $self>serialNumber() . "\n");} if(defined $self->vendor()) { print("vendor: " . $self->vendor() . "\n");} } 1;

Timeout package Timeout.pm is a Perl package. It is not a script and cannot be executed. All package (.pm) files support script (.pl) files which are executable.
package Timeout; use warnings; use strict; use SOAPParam; our @ISA = qw(SOAPParam); sub new { my ( $class, $timeout ) = @_; my $self = $class->SUPER::new( "int_2", "int", $timeout); $self->{_timeout} = $timeout; bless $self, ref($class) || $class; return $self; } sub timeout { my ( $self, $timeout ) = @_; if(defined $timeout)

OnCommand Insight Connect API code sample scripts and packages | 183
{ $self->{_timeout} = $timeout; $self->value($timeout); } return $self->{_timeout}; } 1;

Volume package Volume. pm is a Perl package. It is not a script and cannot be executed. All package (.pm) files support script (.pl) files which are executable.
package Volume; use warnings; use strict; sub new { my ( $class, $id, $capacityGB, $name, $rawCapacityGB, $redundancy, $storageID, $type ) = @_; my $self = { _id => $id, _capacityGB => $capacityGB, _name => $name, _rawCapacityGB => $rawCapacityGB, _redundancy => $redundancy, _storageID => $storageID, _type => $type }; bless $self, ref($class) || $class; return $self; } # This method is intended to be called statically to retrieve the sub parseResult { my ($self, $somResponse) = @_; my @retValue = (); if($somResponse->valueof("//result/size") eq "0") { return @retValue; } my @volumeResponses = $somResponse->valueof("//result/volumes"); for my $volumeResponse(@volumeResponses) { my $volume = new Volume(); $volume->class($volumeResponse->{class}); $volume->id($volumeResponse->{id}); $volume->capacityGB($volumeResponse->{capacityGB}); $volume->name($volumeResponse->{name}); $volume->rawCapacityGB($volumeResponse->{rawCapacityGB}); $volume->redundancy($volumeResponse->{redundancy}); $volume->storageID($volumeResponse->{storageID}); $volume->type ($volumeResponse->{type}); push @retValue, $volume; } return @retValue; } sub class() {

184 | OnCommand Insight Connect API Reference Guide


my ($self, $class ) = @_; $self->{_class} = $class if defined $class; return $self->{_class}; } sub id() { my ($self, $id ) = @_; $self->{_id} = $id if defined $id; return $self->{_id}; } sub capacityGB() { my ($self, $capacityGB ) = @_; $self->{_capacityGB} = $capacityGB if defined $capacityGB; return $self->{_capacityGB}; } sub name() { my ($self, $name ) = @_; $self->{_name} = $name if defined $name; return $self->{_name}; } sub rawCapacityGB() { my ($self, $rawCapacityGB ) = @_; $self->{_rawCapacityGB} = $rawCapacityGB if defined $rawCapacityGB; return $self->{_rawCapacityGB}; } sub redundancy() { my ($self, $redundancy ) = @_; $self->{_redundancy} = $redundancy if defined $redundancy; return $self->{_redundancy}; } sub storageID() { my ($self, $storageID ) = @_; $self->{_storageID} = $storageID if defined $storageID; return $self->{_storageID}; } sub type() { my ($self, $type ) = @_; $self->{_type} = $type if defined $type; return $self->{_type}; } sub dump() { my ($self) = @_; if(defined $self->class()) { print("class: " . $self->class() ."\n"); } if(defined $self->id()) { print("id: " . $self->id() . "\n"); } if(defined $self->capacityGB()) { print("capacityGB: " . $self>capacityGB() . "\n"); } if(defined $self->name()) { print("name: " . $self->name() . "\n"); } if(defined $self->rawCapacityGB()) { print("rawCapacityGB: " . $self>rawCapacityGB() . "\n"); } if(defined $self->redundancy()) { print("redundancy: " . $self>redundancy() . "\n"); } if(defined $self->storageID()) { print("storageID: " . $self>storageID() . "\n"); } if(defined $self->type()) { print("type: " . $self->type() . "\n"); } } 1;

OnCommand Insight Connect API code sample scripts and packages | 185

Enter an example to illustrate your reference here (optional).

186 | OnCommand Insight Connect API Reference Guide

187

Connect API web services WSDL file


WSDL is an XML-based service description on how to communicate using web services. WSDL defines services as collections of network endpoints or ports. The WSDL specification provides an XML format for documents for this purpose. The abstract definition of ports and messages is separated from their concrete use or instance, which allows for the reuse of these definitions. A port is defined by associating a network address with a reusable binding, and a collection of ports defines a service. Port types are abstract collections of supported operations. Messages are abstract descriptions of the data being exchanged.

The concrete protocol and data format specifications for a particular port type constitutes a reusable binding, where the messages and operations are then bound to a concrete network protocol and message format. In this way, WSDL describes the public interface to the web service.

188 | OnCommand Insight Connect API Reference Guide

189

Web services WSDL specification


The WSDL specification provides an XML format for documents on how to communicate using web services. WSDL specification You can obtain the WSDL specification file from within the OnCommand Insight administrative portal by clicking Insight Connect API > WSDL File.

190 | OnCommand Insight Connect API Reference Guide

191

Copyright information
Copyright 19942012 NetApp, Inc. All rights reserved. Printed in the U.S.A. No part of this document covered by copyright may be reproduced in any form or by any means graphic, electronic, or mechanical, including photocopying, recording, taping, or storage in an electronic retrieval systemwithout prior written permission of the copyright owner. Software derived from copyrighted NetApp material is subject to the following license and disclaimer: THIS SOFTWARE IS PROVIDED BY NETAPP "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL NETAPP BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. NetApp reserves the right to change any products described herein at any time, and without notice. NetApp assumes no responsibility or liability arising from the use of products described herein, except as expressly agreed to in writing by NetApp. The use or purchase of this product does not convey a license under any patent rights, trademark rights, or any other intellectual property rights of NetApp. The product described in this manual may be protected by one or more U.S.A. patents, foreign patents, or pending applications. RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.277-7103 (October 1988) and FAR 52-227-19 (June 1987).

192 | OnCommand Insight Connect API Reference Guide

193

Trademark information
NetApp, the NetApp logo, Network Appliance, the Network Appliance logo, Akorri, ApplianceWatch, ASUP, AutoSupport, BalancePoint, BalancePoint Predictor, Bycast, Campaign Express, ComplianceClock, Cryptainer, CryptoShred, Data ONTAP, DataFabric, DataFort, Decru, Decru DataFort, DenseStak, Engenio, Engenio logo, E-Stack, FAServer, FastStak, FilerView, FlexCache, FlexClone, FlexPod, FlexScale, FlexShare, FlexSuite, FlexVol, FPolicy, GetSuccessful, gFiler, Go further, faster, Imagine Virtually Anything, Lifetime Key Management, LockVault, Manage ONTAP, MetroCluster, MultiStore, NearStore, NetCache, NOW (NetApp on the Web), Onaro, OnCommand, ONTAPI, OpenKey, PerformanceStak, RAID-DP, ReplicatorX, SANscreen, SANshare, SANtricity, SecureAdmin, SecureShare, Select, Service Builder, Shadow Tape, Simplicity, Simulate ONTAP, SnapCopy, SnapDirector, SnapDrive, SnapFilter, SnapLock, SnapManager, SnapMigrator, SnapMirror, SnapMover, SnapProtect, SnapRestore, Snapshot, SnapSuite, SnapValidator, SnapVault, StorageGRID, StoreVault, the StoreVault logo, SyncMirror, Tech OnTap, The evolution of storage, Topio, vFiler, VFM, Virtual File Manager, VPolicy, WAFL, Web Filer, and XBB are trademarks or registered trademarks of NetApp, Inc. in the United States, other countries, or both. IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. A complete and current list of other IBM trademarks is available on the web at www.ibm.com/legal/copytrade.shtml. Apple is a registered trademark and QuickTime is a trademark of Apple, Inc. in the U.S.A. and/or other countries. Microsoft is a registered trademark and Windows Media is a trademark of Microsoft Corporation in the U.S.A. and/or other countries. RealAudio, RealNetworks, RealPlayer, RealSystem, RealText, and RealVideo are registered trademarks and RealMedia, RealProxy, and SureStream are trademarks of RealNetworks, Inc. in the U.S.A. and/or other countries. All other brands or products are trademarks or registered trademarks of their respective holders and should be treated as such. NetApp, Inc. is a licensee of the CompactFlash and CF Logo trademarks. NetApp, Inc. NetCache is certified RealSystem compatible.

194 | OnCommand Insight Connect API Reference Guide

195

How to send your comments


You can help us to improve the quality of our documentation by sending us your feedback. Your feedback is important in helping us to provide the most accurate and high-quality information. If you have suggestions for improving this document, send us your comments by email to doccomments@netapp.com. To help us direct your comments to the correct division, include in the subject line the product name, version, and operating system. You can also contact us in the following ways: NetApp, Inc., 495 East Java Drive, Sunnyvale, CA 94089 U.S. Telephone: +1 (408) 822-6000 Fax: +1 (408) 822-4501 Support telephone: +1 (888) 463-8277

196 | OnCommand Insight Connect API Reference Guide

197

Websites
IBM maintains pages on the World Wide Web where you can get the latest technical information and download device drivers and updates. The following web pages provide N series information: A listing of currently available N series products and features can be found at the following web page:

www.ibm.com/storage/nas/ The IBM System Storage N series support website requires users to register in order to obtain access to N series support content on the web. To understand how the N series support web content is organized and navigated, and to access the N series support website, refer to the following publicly accessible web page: www.ibm.com/storage/support/nseries/ This web page also provides links to AutoSupport information as well as other important N series product resources. IBM System Storage N series products attach to a variety of servers and operating systems. To determine the latest supported attachments, go to the IBM N series interoperability matrix at the following web page: www.ibm.com/systems/storage/network/interophome.html For the latest N series hardware product documentation, including planning, installation and setup, and hardware monitoring, service and diagnostics, see the IBM N series Information Center at the following web page: publib.boulder.ibm.com/infocenter/nasinfo/nseries/index.jsp

198 | OnCommand Insight Connect API Reference Guide

Index | 199

Index
A
Action class 19 ActionResponse class 20 addHostToApplication method 97 addReservationRequests method 98 addReservationRequirements method 98 annotations importing 13 setting 149 types 21 values 22 AnnotationType class 21 AnnotationValue class 22 API servers failure 23 query requirements 24 APIBadRequestException 19 APIException class 23 APISessionContext class 24 APISessionContext package 173 APIVersion package 175 Application class 25 ApplicationResponse class 25, 26 applications associated hosts 97 data about 25 hosts/servers 111 response 25, 26 retrieving 99101 setting 150 authentication Connect API 11 licenses Connect API 11 main object types 11 overview 9 prerequisites 10 CSV Example sample code 160 CSV in Java sample code 159

D
device groups response 27 retrieving 103107 DeviceGroup class 26 DeviceGroupResponse class 27 dismissPathOutageViolations method 95 documentation list of 15 videos 16 DR paths retrieving by volumes 107 DRPath class 28 DRPathResponse class 30

F
find objects response 31 findDisconnectedHosts.plsample script 169 findObjectByWwn method 96 findObjectsByIp method 96 FindObjectsResponse class 31

C
capacity management request requirements 98, 132, 133 requests 98, 131 retrieving requests 132 classes, list of 19 closeSession method 95 computeTotalStoragePerArray.pl sample script 167 Connect API classes 19 licensing

G
Generic class 32 GenericResponse class 33 generics device retrieval 108, 109 response 33 getAllApplications method 99 getAPIVersion method 100 getApplication method 100 getApplicationsOfHost method 101 getClosedViolations method 102 getConnectedPorts method 103

200 | OnCommand Insight Connect API Reference Guide


GetConnectedPorts sample code 160 getDeviceGroup method 103 getDeviceGroups method 104 getDeviceGroupsByStorage method 105 getDeviceGroupsByVolume method 106 getDeviceGroupVolume method 107 getDRPathsByVolume method 107 getGeneric method 108 getGenerics method 109 getHost method 110 getHostPolicy method 112 getHosts methods 110 getHostsOfApplication method 111 getInternalVolume methods 113 getInternalVolumes method 113 getInternalVolumesByStorageArray method 114 GetInventory sample code 161 getLogicalPortsByLogicalSwitch methods 116 getLogicalPortsByPhysicalPort method 115 getLogicalPortsByPhysicalSwitch methods 117 getLogicalSwitchesByPhysicalSwitch method 118 getNodesOfDevice method 119 getPathPolicy method 119 getPaths method 120 getPaths.pl sample script 171 getPathsByHost method 121 getPhysicalPortByLogicalPort method 122 getPolicies method 123 getPort method 124 getPorts method 124 getPortsOfDevice method 125 getPortsOfDeviceType method 127 getPortsOfNode method 126 getRecentDevice method 128 getRecentHost method 128 getRecentStorageArray method 129 getRecentSwitch method 129 getRecentTape method 130 getRecentVolume method 131 GetReplicas sample code 162 getReservationRequests method 131 getReservationRequestsByStates method 132 getReservationRequirements method 132, 133 getSANscreenVersion method 133 getStorage.pl sample script 172 getStorageArray method 133 getStorageArrays method 134 getSwitch method 135 getSwitches method 135 getTape method 136 getTapes method 137 getViolations method 137 getViolationsByHost method 138 getVirtualMachine method 139 getVirtualMachines method 140 getVolume method 140 getVolumeMapsByStorageArray method 143 getVolumeMasksByStorageArray method 144 getVolumes method 141 GetVolumes sample code 164 getVolumesByStorageArray method 142 getVolumesSynchStatesByDRPath method 145 getVolumesSynchStatesBySourceVolume method 145

H
Host package 176 HostResponse class 35 hosts class 34 logical paths 121 removing from applications 146 removing policies on 147 response 35 retrieving 110 retrieving policies for 112 setting policies 151

I
internal volumes data about 36 response 39 retrieving 113, 114 InternalVolume class 36 InternalVolumeResponse class 39 Iterator package 177 iterators request 55, 56

J
Java sample code 155, 159162, 164

L
logical paths retrieving 120, 121 logical ports

Index | 201
response 43 retrieving 40 retrieving by physical ports 115 retrieving by session context 103 retrieving by switch 116, 117 logical switches retrieving by physical switch 118 LogicalPort class 40 LogicalPortResponse class 43 Policy class 49, 50 PolicyResponse class 51 Port class 52 PortResponse Class 54 ports data about 52 retrieving 54, 124127 product documentation list of 15

M
masks getting 144, 149

R
removeHostFromApplication method 146 removeHostPolicies method 147 removePolicies method 148 removeReservationRequirements method 149 RequestIterator class 55, 56 requests capacity management 98, 132, 133 iterator 55, 56 ReservationRequest class 57 ReservationRequirement class 59 reservations capacity management 131 removing requirements 149 requests 57 requirements 59 updating requests for 152 updating requirements for 152 retrieval methods API version 100 applications 99101 closed violations 102 device groups by volume 106, 107 DR paths by volume 107 generic devices 108, 109 host policies 112 hosts/servers 110, 128 hosts/servers by application 111 internal volumes 113, 114 logical paths 120, 121 logical ports 115117 logical ports by session context 103 logical switches by physical switch 118 nodes 119 physical ports by logical ports 122 ports 124 ports by device node 125 ports by node 126 ports by type 127

N
Node class 44 NodeResponse class 46 nodes response 46 retrieving 44, 119

O
openSession method 146

P
Path class 47 path outages violations 95 Path package sample script 178 PathResponse class 48 paths policies 119 response 48 retrieval 47 Perl packages APISessionContext package 173 APIVersion package 175 Host package 176 Iterator package 177 overview 173 Path package 178 SOAPParam package 179 StorageArray package 180 Timeout package 182 Volume package 183 policies data about 49, 50 paths 119 removing 147, 148 response 51 retrieving 123 setting for hosts 151

202 | OnCommand Insight Connect API Reference Guide


storage arrays 129, 133, 134 switches 129, 135 symmetric device group by id 103 symmetrix device groups 104, 105 tape devices 136, 137 tapes 130 virtual machines 140 volumes 131, 140142 tapes data about 68 response 70 retrieving 130, 136, 137 Task class 71, 72 TaskResponse class 73 tasks data about 71, 72 future violations on 74 TaskViolationResponse class 74 Timeout package 182

S
sample code CSV 160 CSV in Java 159 Java 155, 160162, 164 sample scripts computeTotalStoragePerArray.pl 167 findDisconnectedHosts.pl 169 getPaths.pl 171 getStorage.pl 172 SAN devices discovery by WWN 96 retrieving by IP/DNS 96 scripts library prerequisites 167 security Connect API authentication 11 sessions closing 13, 95 opening 12, 146 setAnnotationValues method 149 setApplication method 150 SetHostsPolicy method 151 SOAPParam package 179 storage arrays resonse 63 retrieving 60, 129, 133, 134 StorageArray class 60 StorageArray package 180 StorageArrayResponse class 63 switches information about 64 response 66 retrieving 129, 135 Switches class 64 SwitchResponse class 66 synchronization volumes 92, 93 SynchronizationResponse class 67

U
updateReservationRequests method 152 updateReservationRequirements method 152

V
videos 16 Violation class 75 ViolationResponse class 77 violations closed 102 data about 75 future per task 74 path outages 95 response 77 retrieving 137, 138 virtual machines data about 78 response 80 retrieving 139, 140 VirtualMachine class 78 VirtualMachineResponse class 80 Volume class 81, 82 Volume package 183 VolumeMap class 84 VolumeMapResponse class 86, 87 VolumeMask class 88 VolumeMaskResponse class volumes masks 90 VolumeResponse class 91 volumes data about 81, 82 DR paths 107 getting masks 144 mapping between storage volume and port 84 mapping response 86, 87

T
TapeResponse class 70

Index | 203
maps 143 masks 88 response 91 retrieving 131, 140142 synchronization 92 synchronization state response 93 synchronization states for 145 VolumesSynchronizationState class 92 VolumesSynchronizationStateResponse class 93

W
web services WSDL file 187, 189 WSDL web services file 187, 189

Potrebbero piacerti anche