Skip to content

Commit b9a6cb5

Browse files
authored
Documentation for model help tool (HOLD FOR RELEASE) (#588)
* JIRA WDT-388 Added and linked README file * JIRA WDT-388 Changes from review * JIRA WDT-388 Changes from review * JIRA WDT-388 Change examples to omit the -path argument
1 parent 116a565 commit b9a6cb5

File tree

4 files changed

+106
-12
lines changed

4 files changed

+106
-12
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Many organizations are using WebLogic Server, with or without other Oracle Fusio
1212
- [Validate Model Tool](site/validate.md)
1313
- [Compare Model Tool](site/compare.md)
1414
- [Extract Domain Resource Tool](site/kubernetes.md)
15+
- [Model Help Tool](site/model_help.md)
1516
- [The Model](#the-metadata-model)
1617
- [Top-Level Sections](#top-level-model-sections)
1718
- [Simple Example](#simple-example)

site/kubernetes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,9 @@ A full list of sections and variables supported by the Oracle WebLogic Server Ku
9494

9595
The Extract Domain Resource Tool supports a subset of these sections, including `metadata`, `serverPod`, and `spec`.
9696

97+
The [Model Help Tool](model_help.md) can be used to determine the folders and attributes that can be used in the `kubernetes` section of the model. For example, this command will list the folders and attributes in the `spec` folder:
98+
```yaml
99+
<wls-deploy-home>/bin/modelHelp.sh -oracle_home /tmp/oracle kubernetes:/spec
100+
```
101+
97102
The content in the `kubernetes` section is not generated when a model is discovered by the Discover Domain Tool.

site/model_help.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
## The Model Help Tool
2+
3+
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.
4+
5+
**NOTE:** The Model Help Tool is new in WebLogic Deploy Tooling 1.8.
6+
7+
Here is a simple example using the Model Help Tool:
8+
```yaml
9+
<wls-deploy-home>/bin/modelHelp.sh -oracle_home /tmp/oracle resources:/JDBCSystemResource
10+
```
11+
This will result in the following output:
12+
```yaml
13+
Path: resources:/JDBCSystemResource
14+
15+
Valid Attributes:
16+
CompatibilityName string
17+
DeploymentOrder integer
18+
DeploymentPrincipalName string
19+
DescriptorFileName string
20+
ModuleType string
21+
Notes string
22+
SourcePath string
23+
Target delimited_string
24+
25+
Valid Folders:
26+
JdbcResource
27+
SubDeployment
28+
```
29+
This result lists the attributes and folders available for the `JDBCSystemResource` folder in the `resources` section of the model. You can use this information to construct this model section:
30+
```yaml
31+
resources:
32+
JDBCSystemResource:
33+
CompatibilityName: 'myName'
34+
DeploymentOrder: 5
35+
Target: 'ms1,ms2'
36+
JdbcSystemResource:
37+
# JdbcSystemResource attributes and folders
38+
SubDeployment:
39+
# SubDeployment attributes and folders
40+
```
41+
42+
### Path Patterns
43+
There are a number of ways to specify model location in the path argument. Here are some examples:
44+
45+
List all the top-level model sections, such as `topology`, `resources`, and such:
46+
```yaml
47+
top
48+
```
49+
50+
List the attributes and folders within a section, such as `topology`, `resources`, and such:
51+
```yaml
52+
topology
53+
```
54+
55+
List all the attributes and folders within a folder:
56+
```yaml
57+
resources:/JDBCSystemResource/JdbcResource
58+
```
59+
60+
If the section is not provided for a folder, then it will be derived and included in the output text:
61+
```yaml
62+
/JDBCSystemResource/JdbcResource
63+
```
64+
65+
### Output Options
66+
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.
67+
68+
**NOTE:**
69+
When the top sections are listed using the path ```top```, any output options are ignored.
70+
71+
#### ```-attributes_only```
72+
This option will list only the attributes for the specified path. If there are no attributes, then the section heading will appear with an empty list.
73+
74+
#### ```-folders_only```
75+
This option will list only the immediate sub-folders for the specified path. If there are no sub-folders, then the section heading will appear with an empty list.
76+
77+
#### ```-recursive```
78+
This option will recursively list all the sub-folders within the specified path. No attributes are listed. If there are no sub-folders, then the section heading will appear with an empty list.
79+
80+
Here is an example using the `-recursive` option:
81+
```yaml
82+
<wls-deploy-home>/bin/modelHelp.sh -oracle_home /tmp/oracle -recursive resources:/JDBCSystemResource
83+
```
84+
The output is:
85+
```yaml
86+
Filtering output to recursively display the sub-folders of the specified model section or path
87+
88+
Path: resources:/JDBCSystemResource
89+
90+
Valid Folders:
91+
JdbcResource
92+
JDBCConnectionPoolParams
93+
JDBCDataSourceParams
94+
JDBCDriverParams
95+
Properties
96+
JDBCOracleParams
97+
JDBCXAParams
98+
SubDeployment
99+
```

site/validate.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,7 @@ The output of the tool will look something like this:
6060
Errors: 1
6161
Message: Machines is not one of the folder, folder instance or attribute names allowed in model location topology:/Server/AdminServer
6262
63-
To get the valid list of attributes and folders at this model location, run the tool as follows:
64-
65-
weblogic-deploy\bin\validateModel.cmd -oracle_home c:\wls12213 -print_usage topology:/Server
66-
67-
This will print out the list of attributes and valid subfolders (the full output is omitted here for brevity) that will include the following attribute in the list:
68-
69-
Section: topology:/Server
70-
71-
Valid Attributes are :-
72-
...
73-
Machine string
74-
...
63+
Use the [Model Help Tool](model_help.md) to determine the valid list of attributes and folders at this model location.
7564
7665
If the model contains variable definitions and the variable file is specified, the Validate Model Tool will validate that all variable references in the model are defined in the variable file. For example, invoking the tool as shown here:
7766

0 commit comments

Comments
 (0)