This repository has been archived by the owner on Oct 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
29 lines (20 loc) · 2.27 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
The code is no longer being maintained. The repo is kept for historical reasons.
This is an exec plugin for NA2. It executes scripts (bash/python/etc) for each of the Plugin methods. Properties from handlers are passed in as environment variables following the convention that "some.property" becomes SOME_PROPERTY environment variable.
The join script is assumed to take no command line parameters. The leave/modify/renew/status scripts take as the last parameter the reservation id. The rest of the parameters are passed in as environment variables.
Upon return each script returns a status string (via echo) formatted as:
status_string ::= <OK | ERROR> [<status message>]; <reservation_id>
The plugin deals with changes in reservation id (e.g. in case of a renew that is break/make) by creating a new property "new.reservationid" or, equivalently, environment variable NEW_RESERVATIONID.
The plugin is configured using the following properties: exec.join, exec.leave, exec.modify, exec.renew which are paths and first few command line parameters of individual scripts, e.g. "/path/to/join.sh -a"
There is an optional exec.wd property that can set the working directory for the scripts if necessary.
<plugin name="execplug" >
<jar>/Users/ibaldin/workspace-nodeagent2/exec-plugin/target/exec-plugin-1.0-SNAPSHOT-jar-with-dependencies.jar</jar>
<mainClass>orca.nodeagent2.exec.Main</mainClass>
<schedulePeriod length="3" unit="minute" />
<properties>
<property name="exec.join" value="/Users/ibaldin/workspace-nodeagent2/exec-plugin/scripts/join.sh" />
<property name="exec.leave" value="/Users/ibaldin/workspace-nodeagent2/exec-plugin/scripts/leave.sh" />
<property name="exec.modify" value="/Users/ibaldin/workspace-nodeagent2/exec-plugin/scripts/modify.sh" />
<property name="exec.renew" value="/Users/ibaldin/workspace-nodeagent2/exec-plugin/scripts/renew.sh" />
<property name="exec.status" value="/Users/ibaldin/workspace-nodeagent2/exec-plugin/scripts/status.sh" />
</properties>
</plugin>