Model Help Tool
The Model Help Tool provides information about the folders and attributes that are valid for sections and folders of a domain model. This is useful when creating a new domain model, or expanding an existing model, including discovered models.
Here is a simple example using the Model Help Tool:
$ weblogic-deploy/bin/modelHelp.sh -oracle_home /tmp/oracle resources:/JDBCSystemResource
This will result in the following output:
There are several important parts of this output.
- the list of attributes for the folder
- the list of sub-folders
- the MBean description
The following three sections discuss each of these in more detail.
Attributes
The sample output shows the eight attributes and two sub-folders available for the JDBCSystemResource folder in the
resources section of the model. Each attribute includes a comment describing the type of the value to be added. An
asterisk (*) next to an attribute indicates that the attribute has additional information available, possibly
including a default value, valid range, and a description. To access this additional information, simply add the
attribute name to the end of the path and re-invoke the Model Help Tool.
$ weblogic-deploy/bin/modelHelp.sh -oracle_home /tmp/oracle /JDBCSystemResource/DeploymentOrder
Sub-folders
Folders that support multiple instances, such as SubDeployment in this example, are shown with a derived name,
such as 'SubDeployment-1'. Each sub-folder includes a comment with a model path that can be used to display additional
information about that sub-folder. For example, to determine the attributes and sub-folders for 'SubDeployment-1',
the Model Help Tool could be re-invoked with the model path from the comment:
$ weblogic-deploy/bin/modelHelp.sh -oracle_home /tmp/oracle /JDBCSystemResource/SubDeployment
Note
The /JDBCSystemResource/SubDeployment path omits the leading resources: element but still works because the Model
Help Tool is able to determine which folder is being requested.
MBean description
The text at the bottom of the output comes directly from the WebLogic Server MBean description. This text varies by MBean and some MBeans have more useful information than others.
Path patterns
There are a number of ways to specify model location in the path argument. Here are some examples:
top
List all the top-level model sections, such as topology, resources, and such.
$ weblogic-deploy/bin/modelHelp.sh -oracle_home /tmp/oracle top
Section names
List the attributes and folders within a section, such as topology, resources, and such.
$ weblogic-deploy/bin/modelHelp.sh -oracle_home /tmp/oracle appDeployments
Folders
List all the attributes and folders within a folder. As previously discussed, the path to the folder can include or
exclude the top-level section name. If the section is not provided for a folder, then it will be derived and included
in the output text. For example, resources:/JDBCSystemResource/JdbcResource and /JDBCSystemResource/JdbcResource
are equivalent and will produce the same output.
$ weblogic-deploy/bin/modelHelp.sh -oracle_home /tmp/oracle /JDBCSystemResource/JdbcResource
Attribute help
To show help for a particular attribute in a folder, simply add it to the model path. Note that the folder listing will include an asterisk at the end of an attribute line that has additional help information.
$ weblogic-deploy/bin/modelHelp.sh -oracle_home /tmp/oracle topology:/Server/Log/StdoutSeverity
Output options
There are several command-line options that you can use to control the output text for the model path. Use only one of these options at a time. If no output options are specified, then the attributes and immediate sub-folders for the specified path are listed.
Note
When the top sections are listed using the path top, any output options are ignored.
-attributes_only
This option will list only the attributes for the specified path.
-folders_only
This option will list only the immediate sub-folders for the specified path.
-recursive
This option will recursively list all the sub-folders within the specified path. No attributes are listed.
$ weblogic-deploy/bin/modelHelp.sh -oracle_home /tmp/oracle -recursive resources:/JDBCSystemResource
Interactive option
To access an interactive command line for exploring model paths using a directory style syntax, omit the model path from the command line.
$ modelHelp.sh -oracle_home /tmp/oracle
Environment variables
The following environment variables may be set.
JAVA_HOMEThe location of the JDK. This must be a valid Java 7 or later JDK.WLSDEPLOY_PROPERTIESSystem properties that will be passed to Java.
Since the Model Help Tool uses Jython directly without using WLST, the JAVA_HOME will be the JDK used to execute
the command (unlike other tools that use WLST).
Parameter table for model_help
| Parameter | Definition | Default |
|---|---|---|
-attributes_only |
List only the attributes for the specified model path. | |
-folders_only |
List only the folders for the specified model path. | |
-oracle_home |
Home directory of the Oracle WebLogic installation. Required if the ORACLE_HOME environment variable is not set. |
|
-recursive |
List only the folders for the specified model path, and recursively include the folders below that path. | |
-target <target> |
The target platform, such as wko (the default). This determines the structure of the kubernetes section. |
|
-target_mode <mode> |
The WLST mode to use to load the aliases. The mode is either online or offline (the default). |
|
<model_path> |
The path to the model element to be examined. The format is [^<section^>:][/^<folder^>]... Omit this argument to start in interactive mode. |