You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-30Lines changed: 27 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -849,9 +849,9 @@ When creating the archive, the tool will try to gather all binaries, scripts, an
849
849
850
850
An optional feature for the Discover Domain is the Variable Injector tool. The variable injector will replace a selected model attribute value with a property marker containing a unique variable name. This variable name and the replaced value are inserted into a variable property file.
851
851
852
-
To enable the Variable Injector during the Discover Domain, you must place a json file named model_variable_injector.json into the <WLSDEPLOY>/lib directory. This file must be manually created and contain one of the pre-defined keywords and/or a CUSTOM designated file.
852
+
To enable the Variable Injector during the Discover Domain, you must place a json file named model_variable_injector.json into the WLSDEPLOY/lib directory. This file must be manually created and contain one of the pre-defined keywords and/or a CUSTOM designated file.
853
853
854
-
A variable name substitution is only performed once for an attribute during the variable injector run. The first substitution is not replaced by and subsequent matches.
854
+
A variable name substitution is only performed once for an attribute during the variable injector run. The first substitution is not replaced by any subsequent matches.
855
855
856
856
The supported keywords are as follows:
857
857
@@ -874,9 +874,9 @@ The supported keywords are as follows:
874
874
- URL
875
875
All MBean URL attribute values in the model are injected with a variable property string and the string and value placed in the variable property file
876
876
877
-
These special keywords are defined in a keyword file that is installed into the <WLSDEPLOY>/lib directory. Each keyword is associated with an injector json file.
878
-
Each injector json file is installed into the <WLSDEPLOY>/lib/injectors directory. An injector file contains the directives for the Variable Injector tool to
879
-
inject variables into specific model attributes.
877
+
These special keywords are defined in a keyword file that is installed into the WLSDEPLOY/lib directory. Each keyword is associated with an injector json file.
878
+
Each injector json file is installed into the WLSDEPLOY/lib/injectors directory. An injector file contains the directives for the Variable Injector tool to
879
+
inject variable names into specified model attributes.
880
880
881
881
Here is an example of a model_variable_injector.json file using the PORT keyword.
882
882
@@ -886,7 +886,7 @@ Here is an example of a model_variable_injector.json file using the PORT keyword
886
886
}
887
887
```
888
888
889
-
Below is a model snippet that shows injected variables for the port values in a topology section.
889
+
Below is a model snippet that shows injected variables in the port attributes.
To designate the name and location of the variable properties file, include the variable_file_name directive in the model_variable_injector.json file.
936
934
@@ -942,18 +940,17 @@ To designate the name and location of the variable properties file, include the
942
940
943
941
If this directive is not included in the json file, the model or archive file name and location is used to create the variable properties file name and location. If the model_file command line
944
942
argument is used on the Discover Domain run, the properties file name and location will be the same as the model file, with the file extension `.properties`. If only the archive file argument is present, the archive file name
945
-
and location will be used to create the variable properties file name and location.
943
+
and location will be used.
946
944
947
945
As with the archive and model file, each run of the discover domain tool will overwrite the contents of an existing variable property file with the values from the current run.
948
946
949
-
# Custom Variable Injector
947
+
###Custom Variable Injector
950
948
951
949
You may customize the injector attribute replacement by using the CUSTOM keyword in the model_variable_injector.json. The CUSTOM keyword identifies a list of one or more custom injector json files.
952
-
These injector json files will be processed first, in list order, and the resulting variable properties will not be replaced when processing additional keywords in the model variable injector json file.
953
-
954
-
An entry in the injector json file is a key that specifies the unique MBean attribute that will be injected, and an optional set of directives.
950
+
These injector json files will be processed by the Variable Injector tool first, in list order. Any resulting variable replacement will not be overlaid when processing additional keywords.
955
951
956
-
The injector is a period separated MBean hierarchy and attribute name as they are defined in the model. Do not enter the name of the model section into the injector key.
952
+
An entry in the injector json file is a key that specifies the unique MBean attribute to parameterize, and an optional set of directives. The injector is a period separated MBean hierarchy and attribute name as they are defined in the model.
953
+
Do not enter the name of the model section into the injector key.
957
954
958
955
For example, an injector key for the Server SSL Listen Port is Server.SSL.ListenPort. The Server.SSL identifies the hierarchy in the model to the attribute.
959
956
@@ -976,26 +973,26 @@ topology:
976
973
ListenPort: 7002
977
974
```
978
975
979
-
The Variable Injector tool will inject a unique variable name for every server in the model that has the Server/SSL/ListenPort attribute.
976
+
For this example, the Variable Injector tool will inject a unique variable name for every server in the model that has the Server/SSL/ListenPort attribute.
980
977
981
-
# Custom special directives
978
+
#### Custom special directives
982
979
983
980
The following directives can refine the variable injection.
984
981
985
982
- force:<true|false>
986
983
For true, if the MBean hierarchy exists in the model, but the attribute does not, then the attribute will be added and persisted to the discovered model. The value stored in the
987
984
model is the weblogic default value.
988
985
989
-
- variable_value:<value>
986
+
- variable_value:
990
987
Replace the model value with the specified value in the variable properties. This may be used in conjunction with the force directive, replacing the default value with the indicated value.
991
988
992
-
-regexp:<list of regular expression directives>
989
+
-regexp:
993
990
A list of regexp patterns that will be applied to either the string values or map values of an attribute in the model. If the pattern matches, then the matching part of the
994
991
string or dictionary will be injected with a unique variable name.
995
-
-pattern:<regexp pattern>
996
-
the regular expression pattern to apply to the string value or map values of an attribute
997
-
-suffix:<suffix name>
998
-
The suffix name to append to each resulting variable name in the variable properties file
992
+
-- pattern:
993
+
the regular expression pattern to apply to the string value or map values of an attribute
994
+
-- suffix:
995
+
The suffix name to append to each resulting variable name in the variable properties file
999
996
1000
997
The regexp list is useful when only a segment of a string value needs to be parameterized (making for quick manipulation of the variable properties). If more than one
1001
998
pattern is specified in the regexp directive list, then a suffix MUST be added in order to generate a unique variable name.
@@ -1033,14 +1030,14 @@ We create a directive in our custom injector json file:
1033
1030
1034
1031
During the Discover Domain tool run, the pattern is applied to the URL string, and the resulting entries added to the variable properties:
## Selecting specific MBean names for variable injection
1038
+
###Selecting specific MBean names for variable injection
1042
1039
1043
-
The final custom directive allows you to explicitly define which named entries for an MBean in the model you wish to inject properties. For instance, you might wish to parameterize an attribute for a specific server, or for all the managed servers.
1040
+
The final custom directive allows you to explicitly define which named entries for an MBean in the model you wish to inject properties. For instance, you might wish to parameterize an attribute just for a specific set of servers.
1044
1041
To define a list of one or more names of an MBean, add a user directive to the injector keyword value. The user directive is added to the end of an MBean between brackets. For instance, to select only the admin server named AdminServer, add the
1045
1042
user directive to the Server MBean - Server[AdminServer]. To select servers soa_server1 and soa_server2 from the model, create the injector key Server[soa_server1,soa_server2]
1046
1043
@@ -1054,7 +1051,7 @@ A custom injector to parameterize the admin server SSL listen port is:
1054
1051
}
1055
1052
```
1056
1053
1057
-
A sample of a model_variable_injector.json file and a custom injector json file are installed in the <WLSDEPLOY>/samples directory.
1054
+
A sample of a model_variable_injector.json file and a custom injector json file are installed in the WLSDEPLOY/samples directory.
0 commit comments