Session Management APIs for Perl

The session management APIs are used to open the server connection, and to set and retrieve the server session parameters, such as transport type, authentication style, and so on.

This page contains information about the Session Management APIs for Perl, including the description and syntax, and the input, input types, input description, and input return values.

NaServer::set_style

Prototype

set_style($style)

Description

Sets the authentication mechanism to be used for communicating with the given server.

 

Input

Description

$style

The authentication style.

Following are the supported values:

  • HOSTSto use the hosts.equiv file on the storage system to determine access rights.

  • LOGINto provide user name and password information. You set the user name using the API set_admin_user.

Return value

undef on failure

[top]

NaServer::get_style

Prototype

get_style()

Description

Retrieves the configured authentication style.

Return value

The authentication style.

Following are the supported values:

[top]

NaServer::set_port

Prototype

set_port($port)

Description

Sets the port number on which the API commands need to be invoked with the given server.

Input

Description

$port

The port number that is to be set.

Return value

None

[top]

NaServer::get_port

Prototype

get_port()

Description

Retrieves the port number used for invoking API commands.

Return value

The port number

[top]

NaServer::set_admin_user

Prototype

set_admin_user($user,$passwd)

Description

Sets the administrator user name and password for a server context.

This API is used if $style=LOGIN. However, the user name must be root.

 

Input

Description

$user

The user name.

$passwd

The password.

Return value

None

[top]

NaServer::set_server_type

Prototype

set_server_type($type)

Description

Sets the type of system you are connecting to.

 

Input

Description

$type

The server-type to be set.

Following are the supported values:

  • FILERto connect to a NetApp storage system.

  • NETCACHEto connect to a NetCache appliance.

  • DFMto connect to a DataFabric Manager server.

The default server type is FILER.

Return value

[top]

NaServer::get_server_type

Prototype

get_server_type()

Description

Retrieves the value of the server-type.

Return Value

The type of the given server.

Following are the possible return values:

[top]

NaServer::set_transport_type

Prototype

set_transport_type($type)

Description

Set the connection transport type.

 

Input

Description

$type

The connection transport type.

Following are the supported values:

  • HTTP

  • HTTPS

Return value

[top]

NaServer::get_transport_type

Prototype

get_transport_type()

Description

Retrieves the connection transport type.

Return value

The connection transport type

Following are the supported values:

[top]

NaServer::set_debug_style

Prototype

set_debug_style($debug_style)

Description

Sets the debug style for the given server context.

Input

Description

$debug_style

The debug style that is to be set.

It takes the value NA_PRINT_DONT_PARSE. If set to NA_PRINT_DONT_PARSE, then the raw XML input and output of the Data ONTAP API are  printed.

Return value

[top]

NaServer::set_vfiler

Prototype

set_vfiler($vfiler)

Description

Sets the name of the vFiler unit on which the API commands need to be invoked.

After you set the command, all the API commands are executed on the vFiler unit through the actual storage system.

This API supports the vFiler tunneling feature.

Input

Description

$vfiler

The name of the vFiler unit that is to be set.

Return value

[top]

NaServer::use_https

Prototype

use_https()

Description

Determines whether HTTPS is enabled.

Return value

[top]

NaServer::invoke

Prototype

invoke($api, [$argname, $argval] ...)

Description

Invokes any Data ONTAP API on the given NetApp storage system.

This function takes the API name as the first argument. If the API has any input element, you type it as input argument name-value pairs. This function takes only an odd number of arguments.

All the input elements are assembled and sent to the server.

 

Input

Description

$api

The name of the API to be invoked.

$argname

The input element name.

$argsval

The input element value.

Return value

The NaElement object

[top]

NaServer::invoke_elem

Prototype

invoke_elem($elt)

Description

 

Input

Description

$elt

An object of NaElement.

Return value:

The NaElement object