X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=doc%2Fclasses%2FMCollective%2FDDL%2FDataDDL.html;fp=doc%2Fclasses%2FMCollective%2FDDL%2FDataDDL.html;h=0d21aa3da989117655eb7e015aa2ff9bcbadbf4b;hb=d1f1649ba43c5cbc43c4beb2380096ba051d646a;hp=0000000000000000000000000000000000000000;hpb=8a3fe7daeecccf43dd71c59371c5005400d35101;p=packages%2Fprecise%2Fmcollective.git diff --git a/doc/classes/MCollective/DDL/DataDDL.html b/doc/classes/MCollective/DDL/DataDDL.html new file mode 100644 index 0000000..0d21aa3 --- /dev/null +++ b/doc/classes/MCollective/DDL/DataDDL.html @@ -0,0 +1,256 @@ + + + + +
+Class | +MCollective::DDL::DataDDL | +
In: | +
+
+ lib/mcollective/ddl/dataddl.rb
+
+ + |
+
Parent: | ++ + Base + + | +
+A DDL file for the data query plugins. +
++Query plugins can today take only one input by convention in the DDL that is called :query, otherwise the input is identical to the standard input. +
++metadata :name => "Agent", +
++ :description => "Meta data about installed MColletive Agents", + :author => "R.I.Pienaar <rip@devco.net>", + :license => "ASL 2.0", + :version => "1.0", + :url => "http://marionette-collective.org/", + :timeout => 1 ++
+dataquery :description => "Agent Meta Data" +do +
++ input :query, + :prompt => "Agent Name", + :description => "Valid agent name", + :type => :string, + :validation => /^[\w\_]+$/, + :maxlength => 20 + + [:license, :timeout, :description, :url, :version, :author].each do |item| + output item, + :description => "Agent #{item}", + :display_as => item.to_s.capitalize + end ++
+end +
+ ++ # File lib/mcollective/ddl/dataddl.rb, line 31 +31: def dataquery(input, &block) +32: raise "Data queries need a :description" unless input.include?(:description) +33: raise "Data queries can only have one definition" if @entities[:data] +34: +35: @entities[:data] = {:description => input[:description], +36: :input => {}, +37: :output => {}} +38: +39: @current_entity = :data +40: block.call if block_given? +41: @current_entity = nil +42: end ++
+Returns the interface for the data query +
+ ++ # File lib/mcollective/ddl/dataddl.rb, line 51 +51: def dataquery_interface +52: @entities[:data] || {} +53: end ++