1 Overview of the WebLogic Scripting Tool for Oracle Traffic Director

This chapter provides an overview of the general syntax, usage modes, WLST (WebLogic Scripting Tool) commands, common options, variables, security, and error messages that are relevant to Oracle Traffic Director.

This guide defines all the custom WLST commands supported for configuring and administering Oracle Traffic Director in Release Starting with Release 12.2.1, Oracle Traffic Director administration is built on a Common Admin Model (CAM). CAM brings system components such as Oracle HTTP Server, and Oracle Traffic Director, into the WebLogic domain. Compared to Release 11g, there is no longer an Oracle Traffic Director Administration Server. CAM requires you to install Oracle WebLogic, create an Oracle WebLogic domain and use Oracle WebLogic Administration Server to manage Oracle Traffic Director.

Oracle Traffic Director exposes all the configuration tasks via configuration mbeans which will be used to manage Oracle Traffic Director configurations and instances. The custom WLST commands are wrappers which interact with these mbeans.

1.1 Command-Line Interface

The command line interface in Oracle Traffic Director is WLST (Weblogic Scripting Tool). The WLST scripting environment is based on Jython which is an implementation of the Python language for the Java platform. The tool can be used both online and offline. For more information on WLST and various online and offline commands, see Oracle WebLogic Scripting Tool. Oracle Traffic Director ships with custom WLST commands that you can run using WLST.


Oracle Traffic Director ships a wlst.sh wrapper <oracle_home>/otd/common/bin/wlst.sh which initializes the required environment and libraries for Oracle Traffic Director commands. All Oracle Traffic Director custom commands can only be executed from this wlst.sh.

1.2 Usage Modes

You can use the following techniques to invoke Oracle Traffic Director custom commands. For more information on using WLST in these modes, see Using the WebLogic Scripting Tool in Oracle WebLogic Scripting Tool.

1.2.1 Interactive Mode

In the interactive mode, the WLST scripting shell maintains a persistent connection with an instance of WebLogic Server. You can enter an Oracle Traffic Director command and view the response at the command line prompt.

# Launch wlst.sh
# Connect to WLS admin server
> connect('weblogic', 'welcome1',"t3://localhost:7001")
# Execute an OTD command - list existing configurations
> otd_listConfigurations()
['origin-server-1', 'test', 'origin-server-2', 'origin-server-3']
# Execute another command - get http properties of configuration 'test'
> props={'configuration': 'test'}
> ret = otd_getHttpProperties(props)
> print ret
{'ecid': 'true', 'unchunk-timeout': '60', 'discard-misquoted-cookies': 'true', 'max-request-headers': '64', 'favicon': 'true',
'request-body-timeout': '-1', 'request-header-buffer-size': '8192', 'etag': 'true', 'max-unchunk-size': '8192', 'io-timeout': '30',
'body-buffer-size': '1024', 'output-buffer-size': '8192', 'websocket-strict-upgrade': 'false', 'strict-request-headers': 'false',
'request-header-timeout': '30', 'server-header': None}

1.2.2 Script Mode

Scripts invoke a sequence of WLST commands without requiring interactive input, much like a shell script. Scripts contain WLST commands in a text file with a .py file extension.

1.2.3 Embedded Mode

In embedded mode, the WLST interpreter can be instantiated in Java code and used to run WLST commands and scripts. To run Oracle Traffic Director commands in embedded mode, you must extend the environment to include Oracle Traffic Director commands and libraries as follows:

  1. Extend the Java classpath to include <oracle_home>/otd/lib/admin.jar.

  2. Set the weblogic.wlstHome Java system property to point to <oracle_home>/otd/common/wlst.

    For example, -Dweblogic.wlstHome=<oracle_home>/otd/common/wlst

  3. Write a Java program to invoke Oracle Traffic Director commands:

    package oracle.otd.wlst;
    import weblogic.management.scripting.utils.WLSTInterpreter;
    import org.python.util.InteractiveInterpreter;
    public class WLSTClient
       public static void main(String[] args)
           InteractiveInterpreter interpreter = new WLSTInterpreter();
           interpreter.exec("connect('weblogic', 'weblogic1','t3://localhost:1894')");
           interpreter.exec("print otd_listConfigurations()");

1.3 Changes from Release 11g

Starting with Release 12.2.1, WLST is the equivalent of the Oracle Traffic Director tadm command line in Release 11g. Unlike in Release 11g, you can only run the commands in script mode and not in standalone mode. The commands are implemented as WLST custom command functions, they are not hyphenated and follow the pattern 'otd_MixedCaseCommandName'. For example, the create-config command in Release 11g is the otd_createConfiguration command in Release 12.2.1. There are no operands in Release 12.2.1. All the options are passed to the command in a python dict as name-value pairs.

1.4 Offline Commands

The following Oracle Traffic Director WLST commands can be executed in offline mode directly on the host where the Oracle Traffic Director instance/admin server is configured.

1.4.1 Offline Provisioning

The following commands can be used for offline provisioning where we could create and delete Oracle Traffic Director configurations and instances on the admin server after creating and extending the domain with Oracle Traffic Director domain template. These commands does not require admin server to be running and should be executed directly on the host where the admin server resides.

As these are offline commands, you need not execute activate for changes to be applied. Ensure that there is no open edit session while running these commands as these would manipulate the config-store directly and the changes will not be applied in the edit session unless the admin server is restarted.


You cannot invoke the above commands in offline mode until a domain has been read using readDomain. Make sure to update the domain using updateDomain after the command for changes to be applied.

1.4.2 Monitoring

The following commands can be used for monitoring the statistics pertaining to an instance by executing the commands directly on the host where the OTD instance resides.

1.4.3 SNMP Runtime Management

The following commands can be used to start/stop SNMP sub-agent by executing the commands directly on the host corresponding to the machine.

1.4.4 Failover Runtime Management

The following commands can be executed to start/stop failover on the instance by executing the commands directly on the host where the OTD instance resides:

1.5 OTD Custom WLST Command Usage

All OTD custom WLST commands are implemented as jython functions with options (if any) passed as function arguments.

1.5.1 Syntax

> <otd_custom_command>(props) or <otd_custom_command>()

1.5.2 Use with WLST

Unless specified otherwise, the commands can only be executed online where the connection to a running server is needed. If mentioned as Offline, the command can be executed directly on the host where the Oracle Traffic Director instances are to be configured.

1.5.3 Arguments

The commands either take no argument or a python dictionary as an argument. All the properties are passed to the command in python dictionary as name-value pairs with both name and the value being strings.

1.5.4 Return Values

Unless specified otherwise, all the getter commands (otd_getX) return a python dictionary with properties as name (string)-value (string) pairs, setters (otd_setX) and create/delete do not return any value while list methods (otd_listX) return a list of python dictionaries of name (string)-value (string) pairs

1.5.5 Error Messages

In case of an error, all the commands throw a WLSTException with an exception message ID in the format 'OTD-XXXXX', and a description. For example:

WLSTException: OTD-67853 Object does not exist: oracle.otd.admin:type=Configuration,configuration=test1

1.5.6 Unable to Unset/Disable the URI Mapping on a Route

To unset a value for any property, ensure that you enter "None". Leaving an empty string does not unset a property.

1.6 List of Commands

This section contains the functional list of WLST commands that are used in Oracle® Fusion Middleware. Using this section you can look for specific commands based on the functional role of Oracle® Fusion Middleware

1.6.1 Provisioning

Commands for provisioning a collocated or standalone domain. Collocated Domain

The following commands are for provisioning a collocated domain: Standalone Domain

The following commands are for provisioning a standalone domain.

1.6.2 Instance Management

The following are instance management commands:

1.6.3 Configuration Deployment

The following are configuration deployment commands:

1.6.6 TCP Load Balancer Management

The following are commands for TCP load balancer management:

1.6.7 Server Pool Management

Commands for server pool management. Server Pool

The following are server pool management commands: Health Check

The following are health check commands:

1.6.9 SSL Management

Commands for managing SSL. Ciphers

The following are the ciphers supported by the server.

























1.6.12 Monitoring

Commands for monitoring. Runtime Statistics

The following are commands for displaying runtime statistics: SNMP Configuration

The following are commands for SNMP configuration: SNMP Runtime Management

The following are commands for SNMP runtime management:

1.6.16 Failover Management

The following are failover management commands: Runtime Management

The following are runtime management commands: Instance Management

The following are instance management commands:

1.6.17 Multi-tenancy (with WebLogic Server MT)

Commands for use with Oracle Traffic Director in a WebLogic Server MT environment.