Context
Contains the information necessary to perform ARS API calls including authentication information like username and password as well as server information like server name and port number. An instance of this class will be required to make any calls with ars models. This class wraps the ARServerUser class from the ARS Java API.
Context.new
ArsModels::Context.new() is the method used to instantiate a new ArsModels::Context instance. Below are the options that this constructor takes, the required options are in bold.
:username | Sets the username of the user when connecting to the server. This value is required. |
:password | Sets the password of the user when connecting to the server. The value defaults to an empty string if not specified. |
:server | Sets the host name of the server that will be accessed. This value is required. |
:port | Sets the port number used when connecting to the server. The value defaults to 0 if not specified. The value will be converted to an integer if a string value is specified. |
:prognum | Sets the RPC queue used when connecting to the server. The value defaults to 0 if not specified. The value will be converted to an integer if a string value is specified. |
:authentication | Sets the authentication string used when connecting to the server. The value defaults to an empty string if not specified. |
Intance Methods
ars_context | Returns the com.bmc.arsys.api.ARServerUser instance that is instantiated internally with the Context. This is the instance that the ARS API calls are made with |
login | Attempts to login into the specified ARS server with the specified credentials. If successful it will simply return nil. If unsuccessful an error will be raised |
username | Returns the username of the user when connecting to the server. |
password | Returns the password of the user when connecting to the server. |
server | Returns the host name of the server that will be accessed. |
port | Returns the port number used when connecting to the server. |
prognum | Returns the RPC queue used when connecting to the server. |
authentication | Returns the authentication string used when connecting to the server. |