Go to main content

Reference for Oracle Solaris Cluster 4.4

Exit Print View

Updated: August 2018
 
 

scds_property_functions (3HA)

Name

scds_property_functions - A set of convenience functions to retrieve values of commonly used resource properties, resource group properties, resource type properties, and extension properties

Synopsis

cc [flags…] –I /usr/cluster/include file –L /usr/cluster/lib 
     –l dsdev#include <rgm/libdsdev.h>
     return-value-type scds-get-property-name(scds_handle_t handle);

Description

The Data Service Development Library (DSDL) provides a set of convenience functions to retrieve values of commonly used resource properties, resource group properties, resource type properties, and extension properties. Retrieve user-defined extension properties with scds_get_ext_property(3HA).

All convenience functions use the following conventions:

  • The functions take only the handle argument. The handle argument to be passed to the property retrieval function is returned by a prior call to scds_initialize(3HA).

  • Each function corresponds to a particular property.

  • The return value type of the function matches the type of the property value that the function retrieves.

  • These functions do not return errors because the return values have been precomputed in scds_initialize(3HA). For functions that return pointers, a NULL value is returned when an error condition is encountered, for example, when scds_initialize()was not previously called.

  • If a new value for a property has been specified in the command-line arguments that are passed to the calling program (argv[]), this new value is returned (in the case of the implementation of a Validate method). By this means, you can validate prospective new property values before they are actually set. Otherwise, these functions return the value that is retrieved from the RGM.

  • Some of these convenience functions return a pointer to memory belonging to the DSDL. Do not modify this memory. A call to scds_close(3HA) invalidates this pointer.

See the r_properties(7), rg_properties(7), and rt_properties(7) man pages for descriptions of standard properties. See the individual data service man pages for descriptions of extension properties.

See the scha_calls(3HA) man page and the scha_types.hheader file for information about the data types used by these functions, such as scha_prop_type_t, scha_extprop_value_t, scha_initnodes_flag_t, scha_str_array_t, scha_failover_mode_t, scha_switch_t, and scha_rsstatus_t.

These functions use the following naming conventions:

Resource property

scds_get_rs_property-name

Resource group property

scds_get_rg_property-name

Resource type property

scds_get_rt_property-name

Commonly used extension property

scds_get_ext_property-name


Note -  Property names are not case sensitive. You can use any combination of uppercase and lowercase letters when you specify property names.

Resource-Specific Functions

The function returns the value of a specific resource property. Some of the properties' values are explicitly set either in the RTR file or by a clresource(8CL) command. Others are determined dynamically by the RGM. The functions return data types that correspond to the requested property.

Each of the following resource dependencies query functions has a corresponding “Q” or “qualified” version:

scds_get_rs_resource_dependencies

scds_get_rs_resource_dependencies_Q

scds_get_rs_resource_dependencies_offline_restart

scds_get_rs_resource_dependencies_Q_offline_restart

scds_get_rs_resource_dependencies_restart

scds_get_rs_resource_dependencies_Q_restart

scds_get_rs_resource_dependencies_weak

scds_get_rs_resource_dependencies_Q_weak

The qualified version returns the scope, or qualifier, if any, that was declared for each resource dependency. The {LOCAL_NODE}, {ANY_NODE}, and {FROM_RG_AFFINITIES} qualifiers are described in the r_properties(7) man page.

Cheap_probe_interval

int scds_get_rs_cheap_probe_interval(scds_handle_t handle)

Failover_mode

scha_failover_mode_t scds_get_rs_failover_mode(scds_handle_t handle)

Monitor_stop_timeout

int scds_get_rs_monitor_stop_timeout(scds_handle_t handle)

Monitored_switch

scha_switch_t scds_get_rs_monitored_switch(scds_handle_t handle)

Network_resources_used

scha_str_array_t * scds_get_rs_network_resources_used(scds_handle_t handle)

On_off_switch

scha_switch_t scds_get_rs_on_off_switch(scds_handle_t handle)

Resource_dependencies

const scha_str_array_t * scds_get_rs_resource_dependencies(scds_handle_t handle)

Resource_dependencies_Q (qualified)

const scha_str_array_t * scds_get_rs_resource_dependencies_Q(scds_handle_t handle)

Resource_dependencies_offline_restart

const scha_str_array_t * scds_get_rs_resource_dependencies_offline_restart(scds_handle_t handle)

Resource_dependencies_Q_offline_restart (qualified)

const scha_str_array_t * scds_get_rs_resource_dependencies_Q_offline_restart(scds_handle_t handle)

Resource_dependencies_restart

const scha_str_array_t * scds_get_rs_resource_dependencies_restart(scds_handle_t handle)

Resource_dependencies_Q_restart (qualified)

const scha_str_array_t * scds_get_rs_resource_dependencies_Q_restart(scds_handle_t handle)

Resource_dependencies_weak

const scha_str_array_t * scds_get_rs_resource_dependencies_weak(scds_handle_t handle)

Resource_dependencies_Q_weak (qualified)

const scha_str_array_t * scds_get_rs_resource_dependencies_Q_weak(scds_handle_t handle)

Resource_project_name

const char * scds_get_rs_resource_project_name(scds_handle_t handle)

Retry_count

int scds_get_rs_retry_count(scds_handle_t handle)

Retry_interval

int scds_get_rs_retry_interval(scds_handle_t handle)

Scalable

boolean scds_get_rs_scalable(scds_handle_t handle)

Start_timeout

int scds_get_rs_start_timeout(scds_handle_t handle)

Stop_timeout

int scds_get_rs_stop_timeout(scds_handle_t handle)

Thorough_probe_interval

int scds_get_rs_thorough_probe_interval(scds_handle_t handle)

Resource Group-Specific Functions

The function returns the value of a specific resource group property. Some of the properties' values are explicitly set by a clresourcegroup(8CL) command. Others are determined dynamically by the RGM. The functions return data types appropriate for the requested property.

Desired_primaries

int scds_get_rg_desired_primaries(scds_handle_t handle)

Global_resources_used

const scha_str_array_t * scds_get_rg_global_resources_used(scds_handle_t handle)

Implicit_network_dependencies

boolean_t scds_get_rg_implicit_network_dependencies(scds_handle_t handle)

Maximum_primaries

int scds_get_rg_maximum_primaries(scds_handle_t handle)

Nodelist

const scha_str_array_t * scds_get_rg_nodelist (scds_handle_t handle)

Pathprefix

const char * scds_get_rg_pathprefix(scds_handle_t handle)

Pingpong_interval

int scds_get_rg_pingpong_interval(scds_handle_t handle)

Resource_list

const scha_str_array_t * scds_get_rg_resource_list(scds_handle_t handle)

RG_affinities

const scha_str_array_t * scds_get_rg_rg_affinities(scds_handle_t handle)

RG_mode

scha_rgmode_t scds_get_rg_rg_mode(scds_handle_t handle)

RG_project_name

const char * scds_get_rg_rg_project_name(scds_handle_t handle)

RG_slm_cpu_shares

int scds_get_rg_rg_slm_cpu_shares(scds_handle_t handle)

RG_slm_pset_min

int scds_get_rg_rg_slm_pset_min(scds_handle_t handle)

RG_slm_pset_type

const char * scds_get_rg_rg_slm_pset_type(scds_handle_t handle)

RG_slm_type

const char * scds_get_rg_rg_slm_type(scds_handle_t handle)

Resource Type-Specific Functions

The function returns the value of a specific resource type property. Some of the properties' values are explicitly set either in the RTR file or by a clresourcetype(8CL) command. Others are determined dynamically by the RGM. The functions return data types appropriate for the requested property.

API_version

int scds_get_rt_api_version(scds_handle_t handle)

Failover

boolean_t scds_get_rt_failover(scds_handle_t handle)

Init_nodes

scha_initnodes_flag_t scds_get_rt_init_nodes(scds_handle_t handle)

Installed_nodes

const scha_str_array_t * scds_get_rt_installed_nodes(scds_handle_t handle)

RT_basedir

const char * scds_get_rt_rt_basedir(scds_handle_t handle)

RT_version

const char * scds_get_rt_rt_version(scds_handle_t handle)

Single_instance

boolean_t scds_get_rt_single_instance(scds_handle_t handle)

Start_method

const char * scds_get_rt_start_method(scds_handle_t handle)

Stop_method

const char * scds_get_rt_stop_method(scds_handle_t handle)

Extension Property-Specific Functions

The function returns the value of a specific resource extension property. The properties' values are explicitly set either in the RTR file or by a clresource(8CL) command. The functions return data types appropriate for the requested property.

A resource type can define extension properties beyond the four listed here, but these four properties have convenience functions defined for them. You retrieve these properties with these convenience functions or with the scds_get_ext_property(3HA) function. You must use scds_get_ext_property() to retrieve extension properties other than these four.

Confdir_list

scha_str_array_t * scds_get_ext_confdir_list(scds_handle_t handle)

Monitor_retry_count

int scds_get_ext_monitor_retry_count(scds_handle_t handle)

Monitor_retry_interval

int scds_get_ext_monitor_retry_interval(scds_handle_t handle)

Probe_timeout

int scds_get_ext_probe_timeout(scds_handle_t handle)

Parameters

The following parameter is supported for all the convenience functions:

handle

The handle that is returned from scds_initialize(3HA).

Return Values

The return value type of the function matches the type of the property value that the function retrieves.

These functions do not return errors because the return values have been precomputed in scds_initialize(3HA). For functions that return pointers, a NULL value is returned when an error condition is encountered, for example, when scds_initialize()was not previously called.

Files

/usr/cluster/include/rgm/libdsdev.h

Include file

/usr/cluster/lib/libdsdev.so

Library

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
ha-cluster/developer/api
Interface Stability
Evolving

See Also

scds_close(3HA), scds_get_ext_property(3HA), scds_get_port_list(3HA), scds_get_resource_group_name(3HA), scds_get_resource_name(3HA), scds_get_resource_type_name(3HA), scds_initialize(3HA), scha_calls(3HA), attributes(7), r_properties(7), rg_properties(7), rt_properties(7), clresource(8CL), clresourcegroup(8CL), and clresourcetype(8CL)