[AIX Solaris HP-UX Linux Windows][z/OS]

manageODC.py script

manageODC.py permits the interaction with the On Demand Configuration (ODC) tree. The ODC tree is an in-memory representation of the state of a WebSphere® Application Server cell.

Purpose

The manageODC.py script helps with troubleshooting On Demand Router (ODR) issues. You can also use the script to alter the ODC tree.
Note: Forced alterations to the ODC tree might require a restart of the cell in order to correct inadvertent ODC tree corruption.
For transitioning users: The WebSphere Virtual Enterprise command that equates to manageODC.py is ve_manageODC.py. If you are making the transition from WebSphere Virtual Enterprise, you can continue to use the ve_manageODC.py command, which operates the same as the manageODC.py command.

Location

The manageODC.py script is in the app_server_root/bin directory.

Usage

To obtain the usage information for manageODC.py, run:
./wsadmin.sh -lang jython -f manageODC.py
or
./wsadmin.sh -lang jython -f manageODC.py operation --help

Generate a target.xml file to determine the ODC names to plug into the script.

Operations

You can perform the following operations with the manageODC.py script:
  • getTargetTree: Retrieves the target tree.
    • nodeName: Specifies the name of the WebSphere node that contains the server from which the tree is retrieved.
    • serverName: Specifies the name of the server from which the tree is retrieved.
  • getP2PMemberData: Retrieves data about peer-to-peer (P2P) members.
    • nodeName: Specifies the name of the WebSphere node that contains the server from which the P2P member data is retrieved.
    • serverName: Specifies the name of the server from which the P2P member data is retrieved.
  • generateHAPluginCfgs: Generates the plugin-cfg.xml file.
    • generationDefinitionNames: Is a comma-separated list of generation names that configured via cell custom properties of the form ODCPluginCfg. For example: ODCPluginCfg_1, ODCPluginCfg_2
    • nodeName: Specifies the name of the WebSphere node that contains the server that generates plugin-cfg.xml .
    • serverName: Specifies the name of the server to that generates plugin-cfg.xml file.

Example

Generate a target.xml file to determine the ODC names to include in the script. The following code example shows a shortened version of a target.xml file, where parameters for the cell, node, and server that you want to use in the script are located.
cellGroup name="target"> 
 !-- cell section -->
    <cell name="Cell1">
     !--  node section  --> 
       <node name="metis07">
        !--  server section --> 
         <server name="odr">
         <property name="state" priority="1" value="STOPPED" /> 

To delete the server named odr from the ODC tree, type the following command:

./wsadmin.sh -lang jython -f manageODC.py removeODCNode /cell/Cell1/node/metis07/server/odr <myNode> <myServer>

Note that /cellGroup/target is never specified as part of the path.

In this example, the property ODC object is named state, with a value of STOPPED, and a priority of 1. To change the property to STARTED, use the following command:

./wsadmin.sh -lang jython -f manageODC.py modifyODCProperty /cell/Cell1/node/metis07/server/odr state 
 1::STARTED <mynode> <myserver>