Variable Substitution
The configuration mechanism of PRIS supports basic variable substitution.
Therefore it is possible to add properties to the global.properties
file and reference the property values in any requisition.properties
file.
Properties defined in the global.properties
can be overwritten in a requisition.properties
file.
It is also possible to use properties defined in a requisition.properties
in a different part of the same requisition.properties
again.
An implicit property requisition
is also available in requisition.properties
by default.
The following examples demonstrate the use of properties as variables in a PRIS configuration.
With the following configuration Nodes from the OpenNMS Demo system will be fetched.
To get the information a authentication is required and provided as a global configuration parameter.
The requisition for this example is named opennmsdemo
.
driver = http
host = 0.0.0.0
port = 8000
httpUser = myUser
httpPassword = 987654321
source = http
source.url = http://demo.opennms.com/opennms/rest/requisitions/${requisition}
source.username = ${httpUser}
source.password = ${httpPassword}
mapper = script
mapper.file = setGeoInfo.groovy