Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

Commit

Permalink
Merge pull request #586 from ripienaar/585
Browse files Browse the repository at this point in the history
(#585) Add support for Choria Autonomous Agents
  • Loading branch information
ripienaar committed May 2, 2019
2 parents 55bcb12 + 245c1ed commit e03f2a7
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
34 changes: 34 additions & 0 deletions lib/mcollective/agent/choria_util.ddl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,40 @@ metadata :name => "choria_util",

requires :mcollective => "2.9.0"

action "machine_transition", :description => "Attempts to force a transition in a hosted Choria Autonomous Agent" do
input :machine_id,
:prompt => "Machine ID",
:description => "Machine Instance ID",
:type => :string,
:validation => '^.+-.+-.+-.+-.+$',
:maxlength => 36,
:optional => false

input :transition,
:prompt => "Transition Name",
:description => "The transition event to send to the machine",
:type => :string,
:validation => '^[a-zA-Z][a-zA-Z0-9_-]+$',
:maxlength => 128,
:optional => false

output :success,
:description => "Indicates if the transition was succesfully accepted",
:display_as => "Accepted"
end

action "machine_states", :description => "States of the hosted Choria Autonomous Agents" do
display :always

output :machine_ids,
:description => "List of running machine IDs",
:display_as => "Machine IDs"

output :states,
:description => "Hash map of machine statusses indexed by machine ID",
:display_as => "Machine States"
end

action "info", :description => "Choria related information from the running Daemon and Middleware" do
output :security,
:description => "Security Provider plugin",
Expand Down
8 changes: 8 additions & 0 deletions lib/mcollective/agent/choria_util.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
module MCollective
module Agent
class Choria_util < RPC::Agent
action "machine_states" do
reply.fail!("Choria Autonomous Agents are not support on mcollectived based Choria Servers")
end

action "machine_transtion" do
reply.fail!("Choria Autonomous Agents are not support on mcollectived based Choria Servers")
end

action "info" do
connector = PluginManager["connector_plugin"]

Expand Down

0 comments on commit e03f2a7

Please sign in to comment.