CLI Host Configuration Methods
Contents
casso10
Contents
AddCluster Method Adds an Empty Cluster to the Host Configuration
The AddCluster method adds an empty cluster to the host configuration. Call the AddServer method to populate the cluster with servers.
Syntax
The AddCluster method has the following format:
Netegrity::PolicyMgtHostConfig->AddCluster( )
Parameters
The AddCluster method accepts no parameters.
Return Value
The AddCluster method returns one of the following values:
- An empty PolicyMgtCluster object
- undefif the call is unsuccessful
Remarks
The clusters in a host configuration are referenced in a cluster array. When you add a cluster, the cluster is added to the end of the cluster array. The order in which you add clusters to a host configuration object determines the failover sequence. The first cluster you add (that is, the first cluster in the cluster array) is the primary cluster. This is the first cluster in the failover sequence that
CA Single Sign-On
sends requests to. If there are not enough available servers in the primary cluster (that is, if the number of available servers in the cluster falls below the failover threshold), failover to the next cluster occurs (the second cluster that was added to the host configuration object). If that cluster also fails, failover to the third cluster added to the host configuration object occurs, and so on.AddServer Method Adds a Non-clustered Server to the Host Configuration
The AddServer method adds a non-clustered server to the host configuration.
Syntax
The AddServer method has the following format:
Netegrity::PolicyMgtHostConfig->AddServer(Host [, AcctPort] [, AuthPort] [, AzPort])
Parameters
The AddServer method accepts the following parameters:
- Host(string)Specifies the IP address of the Policy Server.
- AcctPort(string)(Optional) Specifies the IP port for the accounting server.
- AuthPort(string)(Optional) Specifies the IP port for the authentication server.
- AzPort(string)(Optional) Specifies the IP port for the authorization server.
Return Value
The AddServer method returns one of the following values:
- 0 on success
- -1 on failure
Remarks
The single-process Policy Server introduced in
CA Single Sign-On
v6.0 combines the previously separate Authentication, Authorization, and Accounting processes into one combined process whose requests go through one TCP port. As a result, the arguments AcctPort, AuthPort, and AzPort all reference the same port number. The three arguments are maintained for backward compatibility.To add a server to a cluster, call the PolicyMgtCluster->AddServer method.
Description Method Sets or Retrieves the Description of the Host Configuration Object
The Description method sets or retrieves the description of the host configuration object.
Syntax
The Description method has the following format:
Netegrity::PolicyMgtHostConfig->Description([Description])
Parameters
The method accepts the following parameter:
- Description(string)(Optional) Specifies the description to set.
Return Value
The Description method returns one of the following values:
- The new or existing description
- undefif the call is unsuccessful
EnableFailover Method Sets or Retrieves the Enable Failover Flag
The EnableFailover method Sets or retrieves the enable failover flag. This flag determines whether an agent and the Policy Server should communicate through failover or round-robin.
Syntax
The EnableFailover method has the following format:
Netegrity::PolicyMgtHostConfig->EnableFailover([EnableFailover])
Parameters
The EnableFailover method accepts the following parameter:
- EnableFailover(int)(Optional) Specifies the value of the flag to set.
Return Value
The EnableFailover method returns one of the following values:
- The new or existing flag setting:
- 1 for failover
- 0 for round-robin
- -1if the call is unsuccessful
FailoverThreshold Method Sets or Retrieves the Failover Threshold Percentage
The FailoverThreshold method sets or retrieves the failover threshold percentage for the clusters in the host configuration.
Syntax
The FailoverThreshold method has the following format:
Netegrity::PolicyMgtHostConfig->FailoverThreshold([FailoverThreshold])
Parameters
The FailoverThreshold method accepts the following parameter:
- FailoverThreshold(int)(Optional) Specifies the failover threshold percentage to set.
Return Value
The FailoverThreshold method returns one of the following values:
- The new or existing failover threshold percentage
- undefif the call is unsuccessful
Remarks
The threshold percentage represents the minimum number of servers in a cluster that must be available for requests. If the number of available servers falls below the threshold, failover to the next cluster occurs. To determine the number of servers represented by the percentage, multiply the threshold percentage by the number of servers in a cluster, rounding up to the next highest integer. For example:
With a 60-percent failover threshold for a cluster of five servers, failover to the next cluster occurs when the number of available servers in the cluster falls below 3.
- With a 61-percent failover threshold for the same cluster, failover occurs when the number of available servers falls below 4.
GetAllClusters Method Retrieves an Array of Policy Management Cluster Objects
The GetAllClusters method retrieves an array of Policy Management Cluster objects.
Syntax
The GetAllClusters method has the following format:
Netegrity::PolicyMgtHostConfig->GetAllClusters()
Parameters
The GetAllClusters method accepts no parameters.
Return Value
The GetAllClusters method returns one of the following values:
- An array of PolicyMgtCluster objects
- undefif the call is unsuccessful
GetAllServers Method Retrieves an Array of Non-clustered Server Objects
The GetAllServers method retrieves an array of non-clustered server objects for the host configuration.
Syntax
The GetAllServers method has the following format:
Netegrity::PolicyMgtHostConfig->GetAllServers( )
Parameters
The GetAllServers method accepts no parameters.
Return Value
The GetAllServers method returns one of the following values:
- An array of PolicyMgtServer objects
- undefif no server objects are found, or if the call is unsuccessful
Remarks
To retrieve the servers that are members of clusters, call the PolicyMgtCluster->GetAllServers method.
MaxSocketsPerPort Method Sets or Retrieves the Maximum Number of TCP IP Sockets
The MaxSocketsPerPort method sets or retrieves the maximum number of TCP/IP sockets that can be opened between an agent and the Policy Server.
Syntax
The MaxSocketsPerPort method has the following format:
Netegrity::PolicyMgtHostConfig->MaxSocketsPerPort([MaxSocketsPerPort])
Parameters
The MaxSocketsPerPort method accepts the following parameter:
- MaxSocketsPerPort(int)(Optional) Specifies the new maximum number of sockets per port.
Return Value
The MaxSocketsPerPort method returns one of the following values:
- The new or existing setting for maximum number of sockets
- -1if the call is unsuccessful
MinSocketsPerPort Method Sets or Retrieves the Minimum Number of TCP IP Sockets
The MinSocketsPerPort method sets or retrieves the minimum number of TCP/IP sockets that should be opened between an agent and the Policy Server.
Syntax
The MinSocketsPerPort method has the following format:
Netegrity::PolicyMgtHostConfig->MinSocketsPerPort([MinSocketsPerPort])
Parameters
The MinSocketsPerPort method accepts the following parameter:
- MinSocketsPerPort(int)(Optional) Specifies the new minimum socket value.
Return Value
The MinSocketsPerPort method returns one of the following values:
- The new or existing setting for minimum number of sockets
- -1if the call is unsuccessful
Name Method Sets or Retrieves the Name of the Host Configuration Object
The Name method sets or retrieves the name of the host configuration object.
Syntax
The Name method has the following format:
Netegrity::PolicyMgtHostConfig->Name([Name])
Parameters
The Name method accepts the following parameter:
- Name(string)(Optional) Specifies the name to set.
Return Value
The Name method returns one of the following values:
- The new or existing name
- undefif the call is unsuccessful
NewSocketStep Method Sets or Retrieves the New Socket Step Value for the Host Configuration
The NewSocketStep method sets or retrieves the new socket step value for the host configuration. This value is an incremental number of TCP/IP sockets that should be opened between an agent and the Policy Server when demand increases.
Syntax
The NewSocketStep method has the following format:
Netegrity::PolicyMgtHostConfig->NewSocketStep([NewSocketStep])
Parameters
The NewSocketStep method accepts the following parameter:
- NewSocketStep(int)(Optional) Specifies the new sockets step value to set.
Return Value
The NewSocketStep method returns one of the following values:
- The new or existing sockets step value
- -1 if the call is unsuccessful
RemoveAllClusters Method Removes All Cluster Objects Associated with This Host Configuration
The RemoveAllClusters method removes all cluster objects associated with this host configuration.
Syntax
The RemoveAllClusters method has the following format:
Netegrity::PolicyMgtHostConfig->RemoveAllClusters()
Parameters
The RemoveAllClusters method accepts no parameters.
Return Value
The RemoveAllClusters method returns one of the following values:
- 0 if the call is successful
- -1 if the call is unsuccessful
RemoveAllServers Method Removes All Non-clustered Policy Server Objects from the Host Configuration
The RemoveAllServers method removes all non-clustered PolicyMgtServer objects from the host configuration.
Syntax
The RemoveAllServers method has the following format:
Netegrity::PolicyMgtHostConfig->RemoveAllServers()
Parameters
The RemoveAllServers method accepts no parameters.
Return Value
The RemoveAllServers method returns one of the following values:
- 0 if the call is successful
- -1 if the call is unsuccessful
RequestTimeout Method Sets or Retrieves the Request Timeout Value
The RequestTimeout method sets or retrieves the request timeout value, in seconds. This value represents the length of time that an agent will wait for a response from the Policy Server.
Syntax
The RequestTimeout method has the following format:
Netegrity::PolicyMgtHostConfig->RequestTimeout([RequestTimeout])
Parameters
The RequestTimeout method accepts the following parameter:
- RequestTimeout(int)(Optional) Specifies the new timeout value to set.
Return Value
The RequestTimeout method returns one of the following values:
- The new or existing timeout value
- -1 if the call is unsuccessful