Script Functions, Arguments, and Exit Codes for Resource Profiles
The following are resource profile script functions, arguments and exit codes.
Script Functions for Resource Profiles
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 Profiles
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. |