Class: MCollective::Util::Playbook::Nodes::PqlNodes
- Inherits:
-
Object
- Object
- MCollective::Util::Playbook::Nodes::PqlNodes
- Defined in:
- lib/mcollective/util/playbook/nodes/pql_nodes.rb
Instance Method Summary collapse
- #choria ⇒ Object
-
#discover ⇒ Object
Performs the PQL query and extracts certnames.
-
#from_hash(data) ⇒ PqlNodes
Initialize the nodes source from a hash.
-
#initialize ⇒ PqlNodes
constructor
A new instance of PqlNodes.
- #prepare ⇒ Object
- #validate_configuration! ⇒ Object
Constructor Details
#initialize ⇒ PqlNodes
Returns a new instance of PqlNodes.
8 9 10 |
# File 'lib/mcollective/util/playbook/nodes/pql_nodes.rb', line 8 def initialize @query = nil end |
Instance Method Details
#choria ⇒ Object
18 19 20 |
# File 'lib/mcollective/util/playbook/nodes/pql_nodes.rb', line 18 def choria @_choria ||= Util::Choria.new(false) end |
#discover ⇒ Object
Performs the PQL query and extracts certnames
33 34 35 |
# File 'lib/mcollective/util/playbook/nodes/pql_nodes.rb', line 33 def discover choria.pql_query(@query, true) end |
#from_hash(data) ⇒ PqlNodes
Initialize the nodes source from a hash
26 27 28 29 30 |
# File 'lib/mcollective/util/playbook/nodes/pql_nodes.rb', line 26 def from_hash(data) @query = data["query"] self end |
#prepare ⇒ Object
12 |
# File 'lib/mcollective/util/playbook/nodes/pql_nodes.rb', line 12 def prepare; end |
#validate_configuration! ⇒ Object
14 15 16 |
# File 'lib/mcollective/util/playbook/nodes/pql_nodes.rb', line 14 def validate_configuration! raise("No PQL query specified") unless @query end |