Commit c18c4ce0 authored by Fabien Viale's avatar Fabien Viale
Browse files

Add documentation of Resource Manager models

parent ae0956e9
......@@ -140,6 +140,7 @@ Examples: PA:LIST(a,b,c) will accept "a", "b", "c" but no other value.
* *PA:REGEXP(pattern)* : variable syntax must match the regular expression defined in the pattern. The regular expression syntax is described in class[Pattern]. +
Examples: PA:REGEXP([a-z]+) will accept "abc", "foo", but not "Foo".
* *PA:MODEL_FROM_URL(url)* : variable syntax must match the model fetched from the given URL. This can be used for example when the model needs to represent a list of elements which may evolve over time and is updated inside a file. Such as a list of machines in an infrastructure, a list of users, etc. +
See <<_variable_model_using_resource_manager_data>> for premade models based on the Resource Manager state. +
Examples: PA:MODEL_FROM_URL(file:///srv/machines_list_model.txt), if the file machines_list_model.txt contains PA:LIST(host1,host2), will accept only "host1" and "host2", but may accept other values as the machines_list_model file changes.
* *PA:CRON* : variable syntax must be a valid cron expression as defined in the[cron4j manual]. +
Examples: PA:CRON will accept "5 * * * \*" but not "* * * *" (missing minutes sub-pattern).
......@@ -180,6 +181,37 @@ For example, a variable `MY_OPTIONAL_INTEGER` defined as the model `PA:INTEGER?`
All the available model syntaxes, except `PA:NOT_EMPTY_STRING` support to be defined as *optional*.
====== Variable Model using Resource Manager data
ProActive Resource Manager provides a set of REST endpoints which allow to create dynamic models based on the Resource Manager state.
These models are summarized in the following table. Models returned are PA:LIST types which allow to select a value in ProActive portals through a drop-down list.
The list always contain an empty value choice.
.Resource Manager Models
|Metric Name
|Model Syntax
|Example returned data
|All machine host names or ip addresses registered in the Resource Manager
|Node Sources
|All node sources registered in the Resource Manager
|All tokens registered in the Resource Manager (across all registered ProActive Nodes). See <<_node_access_token>>.
====== Spring Expression Language Model
The `PA:SPEL(expr)` model allows to define expressions able to validate a variable value or not. Additionally, this model can be used to validate multiple variable values or to dynamically update other variables.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment