Listing attributes of configuration objects using the wsadmin scripting tool

You can use scripting to generate a list of attributes of configuration objects.

Before you begin

Before starting this task, the wsadmin tool must be running. See the topic on starting wsadmin.

About this task

Run an AdminConfig command to create a list of attributes of configuration objects.

Procedure

  1. List the attributes of a given configuration object type, using the attributes command, for example:
    • Using Jacl:

      $AdminConfig attributes type
    • Using Jython:
      AdminConfig.attributes('type')
    Table 1. AdminConfig attributes command description. Run the attributes command from a wsadmin command line.
    $ is a Jacl operator for substituting a variable name with its value
    AdminConfig is an object that represents the product configuration
    attributes is an AdminConfig command
    type is an object type
    This command returns a list of attributes and its data type.

    To get a list of attributes for the JDBCProvider type, use the following example command:

    • Using Jacl:

      $AdminConfig attributes JDBCProvider
      
    • Using Jython:
      AdminConfig.attributes('JDBCProvider')
  2. List the required attributes of a given configuration object type, using the required command, for example:
    • Using Jacl:

      $AdminConfig required type
    • Using Jython:
      AdminConfig.required('type')
    Table 2. AdminConfig required command description. Run the command from a wsadmin command line.
    $ is a Jacl operator for substituting a variable name with its value
    AdminConfig is an object that represents the product configuration
    required is an AdminConfig command
    type is an object type
    This command returns a list of required attributes.

    To get a list of required attributes for the JDBCProvider type, use the following example command:

    • Using Jacl:

      $AdminConfig required JDBCProvider
    • Using Jython:
      AdminConfig.required('JDBCProvider')
  3. List attributes with defaults of a given configuration object type, using the defaults command, for example:
    • Using Jacl:

      $AdminConfig defaults type
    • Using Jython:
      AdminConfig.defaults('type')
    Table 3. AdminConfig defaults command description. Run the command from a wsadmin command line.
    $ is a Jacl operator for substituting a variable name with its value
    AdminConfig is an object that represents the product configuration
    defaults is an AdminConfig command
    type is an object type
    This command returns a list of all the attributes, types, and defaults.

    To get a list of attributes with the defaults displayed for the JDBCProvider type, use the following example command:

    • Using Jacl:

      $AdminConfig defaults JDBCProvider
    • Using Jython:
      AdminConfig.defaults('JDBCProvider')



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Feb 6, 2014 8:11:25 PM CST
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-nd-mp&topic=txml_listattribute
File name: txml_listattribute.html