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.
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:
|
Return value
undef on failure
Prototype
get_style()
Description
Retrieves the configured authentication style.
Return value
The authentication style.
Following are the supported values:
HOSTS
LOGIN
set_port($port)
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
get_port()
Retrieves the port number used for invoking API commands.
The port number
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
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:
The default server type is FILER. |
Return value
undef on success
The NaElement object containing the reason for failure
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:
FILER
NETCACHE
DFM
Prototype
set_transport_type($type)
Description
Set the connection transport type.
|
Input |
Description |
|
$type |
The connection transport type. Following are the supported values:
|
Return value
undef on success
The NaElement object containing the reason for failure
Prototype
get_transport_type()
Description
Retrieves the connection transport type.
Return value
The connection transport type
Following are the supported values:
HTTP
HTTPS
set_debug_style($debug_style)
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. |
undef on success
The NaServer object containing the reason for failure
set_vfiler($vfiler)
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. |
1 on success
0 on failure
Prototype
use_https()
Description
Determines whether HTTPS is enabled.
Return value
1 if HTTPS is enabled
0 if HTTPS is not enabled
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
Prototype
invoke_elem($elt)
Description
Invokes any Data ONTAP API on the given NetApp storage system.
Creates an input output element for the API to be invoked. All the input elements of the API should be added to this input output element using child_add*.
|
Input |
Description |
|
$elt |
An object of NaElement. |
Return value:
The NaElement object