Script functions, arguments, and exit codes for resource profiles

The following are resource profile script functions, arguments and exit codes.

Script functions for resource profile

The following are script functions for Resource Profile scripts.

User-supplied script functions

Script function Description
getAttributes function getAttributes()
verifyPassword function verifyPassword(verifyPasswordInfo)
changePassword function changePassword(changePasswordInfo)
setPassword function setPassword(setPasswordInfo)
switchUser function switchUser(switchUserInfo)

System-supplied script functions

Script function Description
sshSend sshSend(data)
sshExpect sshExpect(regularExpressions)
sshWaitForNoOutput sshWaitForNoOutput(waitMilliseconds)
stringify stringify(object)
verbose verbose(text)
info info(text)
warn warn(text)
error error(text)

Script function return values

  • Success
  • ErrorFailed
  • ErrorInvalidUserPassword
  • ErrorInvalidAdminPassword
  • ErrorUnexpectedResult
  • ErrorUncertainResult

SshTest command arguments for resource profile

SshTest.exe [Options]

Command Description
-h, --help Displays usage.
-s, --script File name of the script.
-l, --load Load and verify script.
-v, --verify Verify user password.
-c, --change Change user password.
-r, --reset Reset user's password.
-w, --switch Switch user account.
-h, --host FQDN of the target system.
-u, --user Username.
-p, --password Password.

-n, --new-password

New password.

-m, --management-user

Management user.

-a, --management-password

Management user's password.

-x, --proxy

Proxy user name.

-y, --proxy-password

Proxy password.

--port

(Default: 22) SSH TCP port.

--log-level

(Default: Verbose) Logging level (Verbose, Info,Warn, or Error).

--show-connection-log

(Default: False) Display ssh connection logging messages.

--show-detailed-log

(Default: False) Display 'expect' and other internal logging messages.

--show-passwords

(Default: False) Display passwords in logging messages.

--version

Display version.

--help

Display this help screen.

SshTest exit codes

The SSH test utility returns an exit code upon completion. This exit code can be used in test script to automate testing of your scripts. The values are as follows:

Exit code values Description

0

Success.

1

ErrorFailed.

2

ErrorInvalidUserPassword.
3 ErrorInvalidAdminPassword.

4

ErrorInvalidProxyPassword.

5

ErrorUnexpectedResult.

6

ErrorUncertainResult.

7

ErrorChangePasswordNotSupported.

8

ErrorSetPasswordNotSupported.

9

ErrorProxyAccountNotSupported.