Skip to content
This repository was archived by the owner on Oct 26, 2022. It is now read-only.

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

NodeAgent2 plugin that performs external exec() for every action.

Topics

Resources

Stars

0 stars

Watchers

6 watching

Forks

Releases

Packages

Contributors

Languages