InfoScale™ 9.0 Cluster Server Agent Developer's Guide - AIX, Linux, Solaris, Windows
- Introduction
- Agent entry point overview
- About agent entry points
- Agent entry points described
- About the action entry point
- About the info entry point
- Considerations for using C++ or script entry points
- About the agent information file
- About the ArgList and ArgListValues attributes
- Creating entry points in C++
- About creating entry points in C++
- Syntax for C++ entry points
- Agent framework primitives
- Agent Framework primitives for container support
- Creating entry points in scripts
- About creating entry points in scripts
- Syntax for script entry points
- Agent framework primitives
- VCSAG_GET_ATTR_VALUE
- Agent Framework primitives with container support
- Example script entry points
- Logging agent messages
- Building a custom agent
- Building a script based IMF-aware custom agent
- Creating XML file required for AMF plugins to do resource registration for online and offline state monitoring
- Testing agents
- Static type attributes
- About static attributes
- Static type attribute definitions
- AdvDbg
- ArgList
- State transition diagram
- Internationalized messages
- Troubleshooting VCS resource's unexpected behavior using First Failure Data Capture (FFDC)
- Appendix A. Using pre-5.0 VCS agents
VCSAG_GET_ATTR_VALUE
This API can be used to get the values of attribute. The attribute can be scalar type, key list type, and association type.
Input parameters:
attribute name: The first argument holds the name of the attribute whose value and index needs to be founded.
index of attribute: It is optional argument.
Should be specified as -1 for getting values of scalar attribute
Do not specify this argument, if you need to fetch only the number of keys in key list, vector, association attribute and the index of the attribute.
Should be the index of attribute if you need to fetch any particular key from the key list, vector and association attribute.
index of value required.
Should be specified as 1 for fetching the values of scalar attribute.
Do not specify this argument, if you need to fetch only the number of keys in key list, vector, association attribute and the index of the attribute.
Should be the index of key if you need to fetch the value key from the key list, vector and association attribute.
arglist : A list of attributes along with values. ResourceName and CleanReason should not be passed in this list.
Output parameters for Perl-based API:
ret_val: This API returns value 0 on success and non-zero value on failure. The error gets printed at debug level DBG_1.
Output parameters for Python-based API:
ret_status: This API returns value 0 on success and non-zero value on failure. The error gets printed at debug level DBG_1.
ret_values: This API returns tuple in case of success. The first entry of the tuple is the attribute value and second entry of the tuple is the index of attribute in the argument list.
Using VCSAG_GET_ATTR_VALUE API to fetch value of scalar attribute
Shell:
VCSAG_GET_ATTR_VALUE "MountPoint" -1 1 @ARGV
The environment variable VCSAG_ATTR_VALUE stores the value.
Perl:
my ($ret, $MountPoint) = VCSAG_GET_ATTR_VALUE ("MountPoint", -1, 1, @ARGV);
Python:
ret_status, ret_values = VCSAG_GET_ATTR_VALUE("MountPoint", -1, 1, *sys.argv)
Using VCSAG_GET_ATTR_VALUE API to fetch the value of key list, vector and association type attribute
The user needs to get the number of keys in key list attribute and index of attribute in argument list, and then calls the API in loop. The user can get the key or values in the key list, vector and association attributes.