39caf2b31f1665f5d50192646e644504fc543a47
[packages/precise/mcollective.git] / ext / help-templates / rpc-help-markdown.erb
1 <%= meta[:name].upcase %> AGENT
2 <% (meta[:name].size + 7).times do %>=<% end %>
3
4 <%= meta[:description] %>
5
6          Author: <%= meta[:author] %>
7         Version: <%= meta[:version] %>
8         License: <%= meta[:license] %>
9         Timeout: <%= meta[:timeout] %>
10       Home Page: <%= meta[:url] %>
11
12
13
14 ACTIONS:
15 ========
16 % actions.keys.sort.each do |action|
17    * <%= action %>
18 % end
19
20 % actions.keys.sort.each do |action|
21 _<%= action %>_ action:
22 <% (action.size + 8).times do %>-<% end %>
23 <%= actions[action][:description] %>
24
25 % if actions[action][:input].keys.size > 0
26        INPUT:
27 % end
28 %    actions[action][:input].keys.sort.each do |input|
29            <%= input %>:
30               Description: <%= actions[action][:input][input][:description] %>
31                    Prompt: <%= actions[action][:input][input][:prompt] %>
32                      Type: <%= actions[action][:input][input][:type] %>
33 %        if actions[action][:input][input][:type] == :string
34                Validation: <%= actions[action][:input][input][:validation] %>
35                    Length: <%= actions[action][:input][input][:maxlength] %>
36 %        elsif actions[action][:input][input][:type] == :list
37              Valid Values: <%= actions[action][:input][input][:list].join(", ") %>
38 %        end
39
40 %    end
41
42        OUTPUT:
43 %    actions[action][:output].keys.sort.each do |output|
44            <%= output %>:
45               Description: <%= actions[action][:output][output][:description] %>
46                Display As: <%= actions[action][:output][output][:display_as] %>
47
48 %    end
49 % end