The operation library provides the following classes:
Article number/class name |
Class Name
Swrba_Systemoperation
List of Methods
Method | Description |
String Systemoperation_shutdown(String hostname, | Perform the stop request to OS. "Success" is returned if the stop request was successful. An exception is returned if the stop request failed. |
String Systemoperation_reboot(String hostname, | Perform the reboot request to OS. "Success" is returned if the reboot request was successful. An exception is returned if the reboot request failed. |
Input Information
hostname Specify the host name or IP address.
deferringtimeSpecify the delay time to stop or reboot the processing of the operating system.
ostype Specify the operating system type.
username Specify the name of the user connecting to the host using SSH.
If the operation component connects with the file transfer infrastructure, the connected user name will be fixed at either of the following names and cannot be changed. In this case, the user name is ignored even if specified.
- If the Business Server is running on Windows: SYSTEM user
- If the Business Server is running on Linux: root
password Specify the password of the user connecting to the host using SSH.
If the operation component connects with the file transfer infrastructure, the password is ignored even if specified.
execusername Specify the name of the user executing processes.
If the host specified by the "hostname" option is running on Windows and the connection is made using the file transfer infrastructure, execute the command as a SYSTEM user. In this case, the user name is ignored even if specified.
execpassword This library does not use the value of "execpassword".
The value of "execpassword" is ignored even if specified.
Notes
If the information except for the Management Server has been entered for "hostname", this library uses the file transfer infrastructure or SSH communication to perform its operations. Set either at least to be able to communicate. Refer to the "3.16 Notes of Each Communication Method" for the notes of each communication method.
If the connected user and executing user are different, refer to the "3.16.7 Notes When Connected User And Executing User Are Different".
File Location
Windows | <Installation directory>\SWRBAM \rbaope\bin\parts\lib \standard\swrba_systemoperation.rb |
Linux | /opt/FJSVswrbam/rbaope/bin/parts/lib/standard/swrba_systemoperation.rb |
Class Name
Swrba_Systemoperation
List of Methods
Method | Description |
String change_hostname(String hostname, String newhostname, String ostype, String username, String password, String execusername, String execpassword, String domainusername, String domainpassword) | This method changes host names. If the host name has been changed successfully, this method will return the new host name. If the method fails to change the host name, it returns an exception. |
Input Information
hostname Specify the host name or IP address.
newhostname Specify the new (changed) host name.
ostypeSpecify the operating system type.
username Specify the name of the user using SSH to connect to the host.
If the operation component connects with the file transfer infrastructure, the connected user name will be fixed at either of the following names and cannot be changed. In this case, the user name is ignored even if specified.
- If the Business Server is running on Windows: SYSTEM user
- If the Business Server is running on Linux: root
password Specify the password of the user using SSH to connect to the host for the server.
If the operation component connects with the file transfer infrastructure, the password is ignored even if specified.
execusername Specify the name of the user who executes the processing.
If the host specified by the "hostname" option is running on Windows and the connection is made using the file transfer infrastructure, execute the command as a SYSTEM user. In this case, the user name is ignored even if specified.
execpassword This library does not use the value of "execpassword".
The value of "execpassword" is ignored even if specified.
domainusername Specify the name of the user for connecting to the domain. domainpassword Specify the password for connecting to the domain.
Notes
If information other than the Management Server is entered for the "hostname" option, this library will execute actions using either the file transfer infrastructure or SSH communications. Specify settings so that communications can be performed using at least one of these methods. Refer to "3.16 Notes of Each Communication Method" for notes on these communication methods.
If the connected user and the executing user are different, refer to "3.16.7 Notes When Connected User And Executing User Are Different".
To change a Linux host name using this library, edit the following files:
/etc/sysconfig/network
/etc/hosts
Alphanumeric characters and hyphens "-" can be specified for the new host name. Specify a letter for the first character of the host name, and an alphanumeric character for the last character of the host name.
When using this library to create operation components, make sure that the Management Server installation directory does not contain whitespace characters or the result cannot be guaranteed.
File Location
Windows | <installation path>\SWRBAM\rbaope\bin\parts\lib\standard\swrba_systemoperation.rb |
Linux | /opt/FJSVswrbam/rbaope/bin/parts/lib/standard/swrba_systemoperation.rb |
Class Name
Swrba_Systemoperation
List of Methods
Method | Description |
String join_domainorworkgroup(String hostname, String username, String password, String domain, String workgroup, String domainusername, String domainpassword) | This method sets the domain name or workgroup name that is set for the operating system. If the method successfully sets up the network, it returns "Success". If the method fails to set up the network, it returns an exception. |
String set_dns(String hostname, String username, String password, String interfacename, String dns, String ostype, String execusername, String execpassword) | This method sets the DNS server address that is set for the operating system. If the method successfully sets the DNS server address, it returns "Success". If the method fails to set the DNS server address, it returns an exception. |
String set_wins(String hostname, String username, String password, String interfacename, String wins) | This method sets the WINS address that is set for the operating system. If the method successfully sets the WINS address, it returns "Success". If the method fails to set the WINS address, it returns an exception. |
Input Information
hostnameSpecify the host name or IP address.
usernameSpecify the name of the user using SSH to connect to the host for the server.
If the operation component connects with the file transfer infrastructure, the connected user name will be fixed at either of the following names and cannot be changed. In this case, the user name is ignored even if specified.
- If the Business Server is running on Windows: SYSTEM user
- If the Business Server is running on Linux: root
passwordSpecify the password of the user using SSH to connect to the host for the server.
If the operation component connects with the file transfer infrastructure, the password is ignored even if specified.
domainSpecify the domain name set for the operating system. workgroupSpecify the work group name set for the operating system.
domainusernameSpecify the name of the user participating in the domain.
domainuserpasswordSpecify the password of the user participating in the domain.
interfacenameSpecify the name of the network interface for which the DNS server address or WINS address is set up.
dnsSpecify the DNS server address set for the operating system.
winsSpecify the WINS address set for the operating system.
ostype Specify the operating system type.
execusername Specify the name of the user who executes the processing.
If the host specified by the "hostname" option is running on Windows and the connection is made using the file transfer infrastructure, execute the command as a SYSTEM user. In this case, the user name is ignored even if specified.
execpassword This library does not use the value of "execpassword".
The value of "execpassword" is ignored even if specified.
Notes
If information other than the Management Server is entered for the "hostname" option, this library will execute actions using either the file transfer infrastructure or SSH communications. Specify settings so that communications can be performed using at least one of these methods. Refer to "3.16 Notes of Each Communication Method" for notes on these communication methods.
If the connected user and the executing user are different, refer to "3.16.7 Notes When Connected User And Executing User Are Different".
When using this library to create operation components, make sure that the Management Server installation directory does not contain whitespace characters or the result cannot be guaranteed.
File Location
Windows | <installation path>\SWRBAM\rbaope\bin\parts\lib\standard\swrba_systemoperation.rb |
Linux | /opt/FJSVswrbam/rbaope/bin/parts/lib/standard/swrba_systemoperation.rb |
Class Name
Swrba_Systemoperation
List of Methods
Method | Description |
String install_software(String hostname,String commandline, String sourcehostname, String sourcefile, String destinationfile, String ostype, String username, String password, String execusername, String execpassword, String sourceostype, String sourceusername, String sourcepassword) | This method installs the software. If the method successfully installs the software, it returns "Success". If the method fails to install the software, it returns an exception. |
Input Information
hostname Specify the host name or IP address.
commandlineSpecify the command, with relevant arguments, that installs the software.
sourcehostnameSpecify the host name or IP address of the host from where the installation file of the software is to be sent.
sourcefileSpecify the name of the installation file.
destinationfileSpecify the name of the installation file on the installation destination.
ostype Specify the operating system type.
username Specify the name of the user using SSH to connect to the host.
If the operation component connects with the file transfer infrastructure, the connected user name will be fixed at either of the following names and cannot be changed. In this case, the user name is ignored even if specified.
- If the Business Server is running on Windows: SYSTEM user
- If the Business Server is running on Linux: root
password Specify the password of the user using SSH to connect to the host.
If the operation component connects with the file transfer infrastructure, the password is ignored even if specified.
execusername Specify the name of the user who executes the processing.
If the host specified by the "hostname" option is running on Windows and the connection is made using the file transfer infrastructure, execute the command as a SYSTEM user. In this case, the user name is ignored even if specified.
execpassword This library does not use the value of "execpassword".
The value of "execpassword" is ignored even if specified..
sourceostype Specify the operating system of the host from where the file is to be transferred.
sourceusername Specify the name of the user using SSH to connect to the host from where the file is to be transferred.
sourcepassword Specify the password of the user using SSH to connect to the host from where the file is to be transferred.
Notes
If information other than the Management Server is entered for the "hostname" option, this operation component will execute actions using the file transfer infrastructure or SSH communications. Specify settings so that communications can be performed using at least one of these methods. Refer to "3.16 Notes of Each Communication Method" for notes on these communication methods.
If the connected user and the executing user are different, refer to "3.16.7 Notes When Connected User And Executing User Are Different".
If a folder (or directory) has been specified for the installation file, this library compresses the files in the specified folder (or directory) before sending the archive file to the host where the software is to be installed. While this library is being processed, an archive file is temporarily created in the folders (or directories) specified for the "sourcefile" and "destinationfile" options.
If the installation file is a self-extracting file, extract the file beforehand.
The installation file sent to the host where the installation performed is not deleted even after the processing of this library is complete.
Even if the software needs to reboot the operating system automatically, this library is exited normally.
For the name of the installation file, use only alphanumeric characters and the following symbols:
"!" "~" "_" "-" "."
Systemwalker Runbook Automation uses return values between 159 and 240. Return values outside this range and unused return values within the range are values output by the installation command rather than values set by Systemwalker Runbook Automation. Investigate the command itself.
If a command that does not exist is specified for the commandline option, an error may occur with return value 42.
When using this library to create operation components, make sure that the Management Server installation directory does not contain whitespace characters or the result cannot be guaranteed.
File Location
Windows | <installation path>\SWRBAM\rbaope\bin\parts\lib\standard\swrba_systemoperation.rb |
Linux | /opt/FJSVswrbam/rbaope/bin/parts/lib/standard/swrba_systemoperation.rb |