choria-mcorpc-support 2.23.3 → 2.24.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +5 -5
  2. data/lib/mcollective.rb +3 -2
  3. data/lib/mcollective/application/find.rb +1 -1
  4. data/lib/mcollective/application/plugin.rb +2 -15
  5. data/lib/mcollective/client.rb +1 -1
  6. data/lib/mcollective/config.rb +135 -103
  7. data/lib/mcollective/discovery.rb +11 -63
  8. data/lib/mcollective/discovery/broadcast.ddl +11 -0
  9. data/lib/mcollective/discovery/choria.ddl +6 -4
  10. data/lib/mcollective/discovery/delegate.ddl +13 -0
  11. data/lib/mcollective/discovery/delegate.rb +73 -0
  12. data/lib/mcollective/discovery/external.ddl +13 -0
  13. data/lib/mcollective/discovery/file.ddl +13 -0
  14. data/lib/mcollective/discovery/flatfile.ddl +7 -5
  15. data/lib/mcollective/discovery/inventory.ddl +13 -0
  16. data/lib/mcollective/discovery/mc.ddl +3 -3
  17. data/lib/mcollective/optionparser.rb +1 -1
  18. data/lib/mcollective/pluginpackager/forge_packager.rb +1 -1
  19. data/lib/mcollective/rpc/client.rb +4 -2
  20. metadata +9 -23
  21. data/lib/mcollective/data.rb +0 -96
  22. data/lib/mcollective/data/agent_data.ddl +0 -22
  23. data/lib/mcollective/data/agent_data.rb +0 -17
  24. data/lib/mcollective/data/base.rb +0 -68
  25. data/lib/mcollective/data/bolt_task_data.ddl +0 -90
  26. data/lib/mcollective/data/bolt_task_data.rb +0 -32
  27. data/lib/mcollective/data/collective_data.ddl +0 -20
  28. data/lib/mcollective/data/collective_data.rb +0 -9
  29. data/lib/mcollective/data/fact_data.ddl +0 -28
  30. data/lib/mcollective/data/fact_data.rb +0 -55
  31. data/lib/mcollective/data/fstat_data.ddl +0 -89
  32. data/lib/mcollective/data/fstat_data.rb +0 -54
  33. data/lib/mcollective/data/result.rb +0 -50
  34. data/lib/mcollective/ddl/dataddl.rb +0 -56
  35. data/lib/mcollective/discovery/choria.rb +0 -223
  36. data/lib/mcollective/discovery/flatfile.rb +0 -47
  37. data/lib/mcollective/discovery/stdin.ddl +0 -11
  38. data/lib/mcollective/discovery/stdin.rb +0 -67
  39. data/lib/mcollective/generators/data_generator.rb +0 -50
  40. data/lib/mcollective/generators/templates/data_input_snippet.erb +0 -7
@@ -1,50 +0,0 @@
1
- module MCollective
2
- module Generators
3
- class DataGenerator < Base
4
- attr_accessor :ddl, :content
5
-
6
- def initialize(plugin_name, outputs=[], name=nil, description=nil, author=nil,
7
- license=nil, version=nil, url=nil, timeout=nil)
8
-
9
- super(name, description, author, license, version, url, timeout)
10
- @mod_name = "Data"
11
- @pclass = "Base"
12
- @plugin_name = plugin_name
13
- @outputs = outputs
14
- @ddl = create_ddl
15
- @content = create_plugin_content
16
- @plugin = create_plugin_string
17
- write_plugins
18
- end
19
-
20
- def create_ddl
21
- query_text = "dataquery :description => \"Query information\" do\n"
22
- query_text += ERB.new(File.read(File.join(File.dirname(__FILE__), "templates", "data_input_snippet.erb"))).result
23
-
24
- @outputs.each_with_index do |output, i|
25
- query_text += "%2s%s" % [" ", "output :#{output},\n"]
26
- query_text += "%9s%s" % [" ", ":description => \"%DESCRIPTION%\",\n"]
27
- query_text += "%9s%s" % [" ", ":display_as => \"%DESCRIPTION%\"\n"]
28
- query_text += "\n" unless @outputs.size == (i + 1)
29
- end
30
-
31
- query_text += "end"
32
-
33
- # Use inherited method to create metadata part of the ddl
34
- create_metadata_string + query_text
35
- end
36
-
37
- def create_plugin_content
38
- content_text = "%6s%s" % [" ", "query do |what|\n"]
39
-
40
- @outputs.each do |output|
41
- content_text += "%8s%s" % [" ", "result[:#{output}] = nil\n"]
42
- end
43
- content_text += "%6s%s" % [" ", "end\n"]
44
-
45
- # Add actions to agent file
46
- content_text
47
- end
48
- end
49
- end
50
- end
@@ -1,7 +0,0 @@
1
- input :query,
2
- :prompt => "%PROMP%",
3
- :description => "%DESCRIPTION%",
4
- :type => %TYPE%,
5
- :validation => %VALIDATION%,
6
- :maxlength => %MAXLENGTH%
7
-