manageODC.py script

The manageODC.py script manages the ODC tree. The ODC tree is an in-memory representation of the state of a WebSphere Application Server cell.

Purpose

The manageODC.py script can add and remove nodes and edges, or modify the value of properties on a node. You can also use the script when troubleshooting routing policy errors for the on demand router.

Location

The manageODC.py script is located in the install_root/bin directory.

Usage

The script usage for general help follows:
./wsadmin.sh|bat -lang jython -f manageODC.py
The script usage for operation-specific help follows:
./wsadmin.sh|bat -lang jython -f manageODC.py operation --help

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

Operations

You can perform the following operations with the manageODC.py script:
  • removeODCNode: Removes a node.
    • odcNodePath: Specifies the full ODC tree path of the node to remove.
    • nodeName: Specifies the name of the Websphere node containing the server that initiates the removal.
    • serverName: Specifies the name of the server to initiate the removal.
  • addODCNode: Creates a new node.
    • odcParentNodePath: Specifies the full ODC tree path for the parent of the new node to be created.
    • odcNodeType: Specifies the ODC node type of the new node to be created.
    • newNodeName: Specifies the name of the new node to be created.
    • nodeName: Specifies the name of the Websphere node containing the server that initiates the addition.
    • serverName: Specifies the name of the server to initiate the addition.
    • [--p odcPropertyDescriptor priority::value]: Specifies the name of the ODC property to be modified on the new node priority. Value is the priority and value to set the ODC property to on the new node. Priority can be omitted if the default value is used.
    • [--l linkOdcNodePath]: Specifies the full ODC tree path of the node for which an edge is to be created.
  • removeODCEdge: Removes the link between two nodes.
    • odcNodePathA odcNodePathB: Specifies the full ODC tree paths of the nodes to be unlinked.
    • nodeName: Specifies the name of the Websphere node containing the server that initiates the removal.
    • serverName: Specifies the name of the server to initiate the removal.
  • addODCEdge: Links one node to another node.
    • odcNodePathA odcNodePathB: Specifies the full ODC tree paths of the nodes to be linked.
    • nodeName: Specifies the name of the Websphere node containing the server that initiates the addition.
    • serverName: Specifies the name of the server to initiate the addition.
  • modifyODCProperty: Modifies a specified ODC property of a node.
    • odcNodePath: Specifies the full ODC tree path of the node whose property is to be modified.
    • odcPropertyDescriptor: Specifies the name of the ODC property to be modified.
    • priority::value: Specifies the priority and value to set the ODC property to. Priority can be omitted if the default value is used.
    • nodeName: Specifies the name of the Websphere node containing the server that initiates the modification.
    • serverName: Specifies the name of the server to initiate the modification.

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 server 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 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>

The URL for this topic is: