Top
Systemwalker Runbook Automation Reference Guide
Systemwalker

3.15.14 Operation Library

The operation library provides the following classes:

Article number/class name

3.15.14.1 System Operation

3.15.14.2 Change the Host Name

3.15.14.3 Set up Network

3.15.14.4 Install Software

3.15.14.1 System Operation

Class Name

Swrba_Systemoperation

List of Methods

Method

Description

String Systemoperation_shutdown(String hostname,
String deferringtime, String ostype,

String username, String password,

String execusername, String execpassword)

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,
String deferringtime, String ostype,

String username, String password,

String execusername, String execpassword)

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

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

3.15.14.2 Change the Host Name

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

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

3.15.14.3 Set up Network

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.
username
Specify 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

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

3.15.14.4 Install Software

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

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