Quantum DXi-Series Command Line Interface (CLI) Guide
6-67081-09 Rev B
February 2014
8
Web Services Support (Optional)
Note:
It is strongly recommended that all CLI commands not be run in Web
Services mode when both the server and the client are on the same
system. It is much faster to run the commands directly without using
Web Services. Running a CLI command over Web Services protocol is a
complex process involving two distinct programs (client-server) and
network communication, thus having more points for failure.
Web Services Syntax
To use Web Services for any CLI, one has to specify an additional option as
follows:
syscli --<cmd> <subcmd> . . . . . --ws [<ws_server>[:<port>]]
where:
•
ws_server
is the hostname or IP address of the system that runs the WS
server. If not specified, it is assumed to be
localhost
.
•
port
is the port number to which the server is listening for client requests. If
not specified, it is assumed to be port 9090.
The presence of the
–ws
option makes the syscli program work in client-server
mode; it will not execute the command on the local DXi system anymore.
Rather, it will send the command to the axis2 server on the specified remote
system. This server will then invoke the syscli program on the system it is
running to execute the requested command and then send the result back to
the syscli client to display.
To get more help on Web Services, type “
syscli help ws
”.
Example: The following commands are equivalent:
• syscli --list share ... --ws
• syscli --list share ... --ws localhost:9090
• syscli --list share ... --ws localhost
• syscli --list share ... --ws :9090
Web Services Session
For security reasons the WS server cannot allow an arbitrary client to send
commands to it for execution. Before a client can execute any command, it has
to log in the WS server first in order to begin a WS session. If the login is
successful, the server will send back a credential token (an encrypted string). The
client has to include this credential token in all subsequent WS commands that
it sends to the server for execution. When the client is done with its commands,
it can log out the server. If the client is idle for more than 30 minutes, the server
automatically terminates the session. This time-out value can be overridden in
the login command.
Sample Web Services
Session
A Web Services session begins when the user logs in successfully and terminates
when the user logs out (releases credential), or when the session is idle for
30 minutes.