Updated mcollective.init according to OSCI-658
[packages/precise/mcollective.git] / ext / help-templates / rpc-help-markdown.erb
diff --git a/ext/help-templates/rpc-help-markdown.erb b/ext/help-templates/rpc-help-markdown.erb
new file mode 100644 (file)
index 0000000..39caf2b
--- /dev/null
@@ -0,0 +1,49 @@
+<%= meta[:name].upcase %> AGENT
+<% (meta[:name].size + 7).times do %>=<% end %>
+
+<%= meta[:description] %>
+
+         Author: <%= meta[:author] %>
+        Version: <%= meta[:version] %>
+        License: <%= meta[:license] %>
+        Timeout: <%= meta[:timeout] %>
+      Home Page: <%= meta[:url] %>
+
+
+
+ACTIONS:
+========
+% actions.keys.sort.each do |action|
+   * <%= action %>
+% end
+
+% actions.keys.sort.each do |action|
+_<%= action %>_ action:
+<% (action.size + 8).times do %>-<% end %>
+<%= actions[action][:description] %>
+
+% if actions[action][:input].keys.size > 0
+       INPUT:
+% end
+%    actions[action][:input].keys.sort.each do |input|
+           <%= input %>:
+              Description: <%= actions[action][:input][input][:description] %>
+                   Prompt: <%= actions[action][:input][input][:prompt] %>
+                     Type: <%= actions[action][:input][input][:type] %>
+%        if actions[action][:input][input][:type] == :string
+               Validation: <%= actions[action][:input][input][:validation] %>
+                   Length: <%= actions[action][:input][input][:maxlength] %>
+%        elsif actions[action][:input][input][:type] == :list
+             Valid Values: <%= actions[action][:input][input][:list].join(", ") %>
+%        end
+
+%    end
+
+       OUTPUT:
+%    actions[action][:output].keys.sort.each do |output|
+           <%= output %>:
+              Description: <%= actions[action][:output][output][:description] %>
+               Display As: <%= actions[action][:output][output][:display_as] %>
+
+%    end
+% end