Unverified Commit 71b93eb4 authored by Fabien Viale's avatar Fabien Viale Committed by GitHub
Browse files

Merge pull request #776 from fviale/master

Add documentation of Resource Manager models
parents ae0956e9 c18c4ce0
......@@ -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 https://docs.oracle.com/javase/7/docs/api/index.html?java/util/regex/Pattern.html[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 http://www.sauronsoftware.it/projects/cron4j/manual.php#p02[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
[%header,cols=4*]
|===
|Metric Name
|Description
|Model Syntax
|Example returned data
|Hosts
|All machine host names or ip addresses registered in the Resource Manager
|`PA:MODEL_FROM_URL(${PA_SCHEDULER_REST_PUBLIC_URL}/rm/model/hosts)`
|PA:LIST(,try.activeeon.com,10.0.0.19)
|Node Sources
|All node sources registered in the Resource Manager
|`PA:MODEL_FROM_URL(${PA_SCHEDULER_REST_PUBLIC_URL}/rm/model/nodesources)`
|PA:LIST(,Default,LocalNodes,GPU,Kubernetes)
|Tokens
|All tokens registered in the Resource Manager (across all registered ProActive Nodes). See <<_node_access_token>>.
|`PA:MODEL_FROM_URL(${PA_SCHEDULER_REST_PUBLIC_URL}/rm/model/tokens)`
|PA:LIST(,token1,token2)
|===
====== 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.
......
Markdown is supported
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