Metadata
The main component of the automation tool is metadata. Metadata can be created based on custom requirement. Structure of metadata is as follows:
{
}
check cardinality
Here one resource item is values from one file. Resource
{
}
This defines the property to fetch. This is specified for following types as,
JSON - JSONPath. To verify use - https://jsonpath.curiousconcept.com/
XML - XPath
PROPERTIES - Key match
CONF - XPath. (The conf file is converted to an intermediate xml file.)
JSON, XML, PROPERTIES, CONFIG, SHELL, STATIC
If type is JSON, XML, CONFIG, file is required.
used to specific remote file which is fetched using scp
extract data from string using below format
meta-chars: {}, ?
Example:
Format='-Xms{}?'
String='-Xms512m -Xmx8192m -Xss102400k'
Extracted Data=512
one-to-many= This is default. Consider property is an array. And file is also array. Each property is fetched from all the files.
one-to-one = Consider property is an array. And file is also array. Now first property is fetched from first file, second property from second file. And so on.
Extrapolate
Extrapolation is where values from dynamic map replace the placeholder in the string. The specific value from dynamic map is referred using its key name in the format - ${key}
Example: in string 'wlscluster[${clusterIndex}]' ${clusterIndex}' is replaced by value found for 'clusterIndex' key in dynamic properties
If clusterIndex = [0, 1, 2] then
Result
Hence here one property - 'wlscluster[${clusterIndex}]' results in 3 results.
This can go to multiple levels.
Example:
wlscluster[${clusterIndex}].${clusterName}
clusterIndex = [0, 1, 2] and clusterValue = [a, b, c]
Intermediate Result
Final Result
Here one property wlscluster[${clusterIndex}].${clusterName} resulted in 3x3 = 9 results. Hence the name extrapolation.
Except type, format, cardinality, key all other resource attributes are extrapolatable