bolt 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bolt might be problematic. Click here for more details.

Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bolt/cli.rb +31 -21
  3. data/lib/bolt/config.rb +1 -0
  4. data/lib/bolt/error.rb +28 -0
  5. data/lib/bolt/executor.rb +10 -6
  6. data/lib/bolt/node.rb +7 -5
  7. data/lib/bolt/node/errors.rb +25 -3
  8. data/lib/bolt/node/orch.rb +7 -16
  9. data/lib/bolt/node/output.rb +17 -0
  10. data/lib/bolt/node/ssh.rb +101 -44
  11. data/lib/bolt/node/winrm.rb +86 -40
  12. data/lib/bolt/outputter/human.rb +65 -8
  13. data/lib/bolt/outputter/json.rb +8 -1
  14. data/lib/bolt/result.rb +74 -124
  15. data/lib/bolt/version.rb +1 -1
  16. data/{vendored/puppet → modules/boltlib}/lib/puppet/functions/file_upload.rb +9 -7
  17. data/{vendored/puppet → modules/boltlib}/lib/puppet/functions/run_command.rb +8 -9
  18. data/{vendored/puppet → modules/boltlib}/lib/puppet/functions/run_plan.rb +8 -12
  19. data/{vendored/puppet → modules/boltlib}/lib/puppet/functions/run_script.rb +12 -8
  20. data/{vendored/puppet → modules/boltlib}/lib/puppet/functions/run_task.rb +10 -10
  21. data/vendored/puppet/lib/puppet/agent.rb +1 -1
  22. data/vendored/puppet/lib/puppet/application/lookup.rb +1 -3
  23. data/vendored/puppet/lib/puppet/configurer.rb +2 -3
  24. data/vendored/puppet/lib/puppet/configurer/plugin_handler.rb +25 -7
  25. data/vendored/puppet/lib/puppet/defaults.rb +9 -1
  26. data/vendored/puppet/lib/puppet/face/epp.rb +4 -2
  27. data/vendored/puppet/lib/puppet/face/module/build.rb +1 -1
  28. data/vendored/puppet/lib/puppet/face/module/list.rb +5 -16
  29. data/vendored/puppet/lib/puppet/face/module/uninstall.rb +14 -3
  30. data/vendored/puppet/lib/puppet/face/plugin.rb +1 -3
  31. data/vendored/puppet/lib/puppet/forge/errors.rb +17 -7
  32. data/vendored/puppet/lib/puppet/functions.rb +8 -6
  33. data/vendored/puppet/lib/puppet/functions/each.rb +10 -4
  34. data/vendored/puppet/lib/puppet/functions/lookup.rb +2 -2
  35. data/vendored/puppet/lib/puppet/functions/map.rb +12 -2
  36. data/vendored/puppet/lib/puppet/functions/slice.rb +2 -3
  37. data/vendored/puppet/lib/puppet/graph/simple_graph.rb +9 -5
  38. data/vendored/puppet/lib/puppet/interface.rb +1 -0
  39. data/vendored/puppet/lib/puppet/module_tool/errors/installer.rb +27 -17
  40. data/vendored/puppet/lib/puppet/module_tool/errors/shared.rb +143 -63
  41. data/vendored/puppet/lib/puppet/module_tool/errors/uninstaller.rb +37 -14
  42. data/vendored/puppet/lib/puppet/module_tool/errors/upgrader.rb +30 -18
  43. data/vendored/puppet/lib/puppet/network/auth_config_parser.rb +8 -8
  44. data/vendored/puppet/lib/puppet/network/http/error.rb +7 -7
  45. data/vendored/puppet/lib/puppet/network/http/rack.rb +2 -2
  46. data/vendored/puppet/lib/puppet/network/http/webrick.rb +1 -1
  47. data/vendored/puppet/lib/puppet/node.rb +10 -0
  48. data/vendored/puppet/lib/puppet/node/facts.rb +9 -0
  49. data/vendored/puppet/lib/puppet/parameter/value_collection.rb +16 -6
  50. data/vendored/puppet/lib/puppet/parser/resource.rb +103 -31
  51. data/vendored/puppet/lib/puppet/pops/evaluator/access_operator.rb +13 -0
  52. data/vendored/puppet/lib/puppet/pops/evaluator/evaluator_impl.rb +22 -6
  53. data/vendored/puppet/lib/puppet/pops/loader/static_loader.rb +1 -1
  54. data/vendored/puppet/lib/puppet/pops/lookup/lookup_adapter.rb +13 -4
  55. data/vendored/puppet/lib/puppet/pops/model/ast_transformer.rb +1 -1
  56. data/vendored/puppet/lib/puppet/pops/parser/eparser.rb +527 -529
  57. data/vendored/puppet/lib/puppet/pops/serialization/abstract_reader.rb +4 -0
  58. data/vendored/puppet/lib/puppet/pops/serialization/abstract_writer.rb +6 -0
  59. data/vendored/puppet/lib/puppet/pops/serialization/extension.rb +1 -0
  60. data/vendored/puppet/lib/puppet/pops/serialization/serializer.rb +2 -1
  61. data/vendored/puppet/lib/puppet/pops/types/execution_result.rb +8 -0
  62. data/vendored/puppet/lib/puppet/pops/types/iterable.rb +2 -0
  63. data/vendored/puppet/lib/puppet/pops/types/p_object_type.rb +3 -0
  64. data/vendored/puppet/lib/puppet/pops/types/p_object_type_extension.rb +6 -0
  65. data/vendored/puppet/lib/puppet/pops/types/p_uri_type.rb +191 -0
  66. data/vendored/puppet/lib/puppet/pops/types/string_converter.rb +17 -0
  67. data/vendored/puppet/lib/puppet/pops/types/type_calculator.rb +5 -0
  68. data/vendored/puppet/lib/puppet/pops/types/type_factory.rb +7 -0
  69. data/vendored/puppet/lib/puppet/pops/types/type_formatter.rb +16 -18
  70. data/vendored/puppet/lib/puppet/pops/types/type_mismatch_describer.rb +15 -5
  71. data/vendored/puppet/lib/puppet/pops/types/type_parser.rb +6 -0
  72. data/vendored/puppet/lib/puppet/pops/types/type_with_members.rb +43 -0
  73. data/vendored/puppet/lib/puppet/pops/types/types.rb +3 -0
  74. data/vendored/puppet/lib/puppet/provider/package/gem.rb +1 -1
  75. data/vendored/puppet/lib/puppet/provider/package/nim.rb +7 -8
  76. data/vendored/puppet/lib/puppet/provider/package/opkg.rb +1 -1
  77. data/vendored/puppet/lib/puppet/provider/package/pkg.rb +6 -4
  78. data/vendored/puppet/lib/puppet/provider/package/pkgutil.rb +3 -3
  79. data/vendored/puppet/lib/puppet/provider/service/init.rb +1 -1
  80. data/vendored/puppet/lib/puppet/syntax_checkers/base64.rb +5 -6
  81. data/vendored/puppet/lib/puppet/transaction.rb +1 -1
  82. data/vendored/puppet/lib/puppet/type.rb +1 -9
  83. data/vendored/puppet/lib/puppet/type/schedule.rb +1 -1
  84. data/vendored/puppet/lib/puppet/util/log.rb +2 -3
  85. data/vendored/puppet/lib/puppet/util/plist.rb +1 -1
  86. data/vendored/puppet/lib/puppet/util/reference.rb +2 -3
  87. data/vendored/puppet/lib/puppet_pal.rb +326 -53
  88. metadata +28 -12
  89. data/lib/bolt/node/result.rb +0 -115
  90. data/vendored/puppet/lib/puppet/configurer/downloader_factory.rb +0 -44
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bolt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-17 00:00:00.000000000 Z
11
+ date: 2017-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -39,19 +39,19 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: net-sftp
42
+ name: net-scp
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.0'
47
+ version: '1.2'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.0'
54
+ version: '1.2'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: net-ssh
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -226,6 +226,20 @@ dependencies:
226
226
  - - '='
227
227
  - !ruby/object:Gem::Version
228
228
  version: 0.8.8
229
+ - !ruby/object:Gem::Dependency
230
+ name: puppetlabs_spec_helper
231
+ requirement: !ruby/object:Gem::Requirement
232
+ requirements:
233
+ - - "~>"
234
+ - !ruby/object:Gem::Version
235
+ version: '2.5'
236
+ type: :development
237
+ prerelease: false
238
+ version_requirements: !ruby/object:Gem::Requirement
239
+ requirements:
240
+ - - "~>"
241
+ - !ruby/object:Gem::Version
242
+ version: '2.5'
229
243
  - !ruby/object:Gem::Dependency
230
244
  name: bundler
231
245
  requirement: !ruby/object:Gem::Requirement
@@ -280,12 +294,13 @@ files:
280
294
  - lib/bolt.rb
281
295
  - lib/bolt/cli.rb
282
296
  - lib/bolt/config.rb
297
+ - lib/bolt/error.rb
283
298
  - lib/bolt/executor.rb
284
299
  - lib/bolt/formatter.rb
285
300
  - lib/bolt/node.rb
286
301
  - lib/bolt/node/errors.rb
287
302
  - lib/bolt/node/orch.rb
288
- - lib/bolt/node/result.rb
303
+ - lib/bolt/node/output.rb
289
304
  - lib/bolt/node/ssh.rb
290
305
  - lib/bolt/node/winrm.rb
291
306
  - lib/bolt/node_uri.rb
@@ -295,6 +310,11 @@ files:
295
310
  - lib/bolt/outputter/json.rb
296
311
  - lib/bolt/result.rb
297
312
  - lib/bolt/version.rb
313
+ - modules/boltlib/lib/puppet/functions/file_upload.rb
314
+ - modules/boltlib/lib/puppet/functions/run_command.rb
315
+ - modules/boltlib/lib/puppet/functions/run_plan.rb
316
+ - modules/boltlib/lib/puppet/functions/run_script.rb
317
+ - modules/boltlib/lib/puppet/functions/run_task.rb
298
318
  - vendored/facter/lib/facter.rb
299
319
  - vendored/facter/lib/facter/Cfkey.rb
300
320
  - vendored/facter/lib/facter/application.rb
@@ -498,7 +518,6 @@ files:
498
518
  - vendored/puppet/lib/puppet/compilable_resource_type.rb
499
519
  - vendored/puppet/lib/puppet/configurer.rb
500
520
  - vendored/puppet/lib/puppet/configurer/downloader.rb
501
- - vendored/puppet/lib/puppet/configurer/downloader_factory.rb
502
521
  - vendored/puppet/lib/puppet/configurer/fact_handler.rb
503
522
  - vendored/puppet/lib/puppet/configurer/plugin_handler.rb
504
523
  - vendored/puppet/lib/puppet/confine.rb
@@ -622,7 +641,6 @@ files:
622
641
  - vendored/puppet/lib/puppet/functions/epp.rb
623
642
  - vendored/puppet/lib/puppet/functions/err.rb
624
643
  - vendored/puppet/lib/puppet/functions/eyaml_lookup_key.rb
625
- - vendored/puppet/lib/puppet/functions/file_upload.rb
626
644
  - vendored/puppet/lib/puppet/functions/filter.rb
627
645
  - vendored/puppet/lib/puppet/functions/find_file.rb
628
646
  - vendored/puppet/lib/puppet/functions/hiera.rb
@@ -647,10 +665,6 @@ files:
647
665
  - vendored/puppet/lib/puppet/functions/require.rb
648
666
  - vendored/puppet/lib/puppet/functions/return.rb
649
667
  - vendored/puppet/lib/puppet/functions/reverse_each.rb
650
- - vendored/puppet/lib/puppet/functions/run_command.rb
651
- - vendored/puppet/lib/puppet/functions/run_plan.rb
652
- - vendored/puppet/lib/puppet/functions/run_script.rb
653
- - vendored/puppet/lib/puppet/functions/run_task.rb
654
668
  - vendored/puppet/lib/puppet/functions/scanf.rb
655
669
  - vendored/puppet/lib/puppet/functions/slice.rb
656
670
  - vendored/puppet/lib/puppet/functions/split.rb
@@ -1080,6 +1094,7 @@ files:
1080
1094
  - vendored/puppet/lib/puppet/pops/types/p_timespan_type.rb
1081
1095
  - vendored/puppet/lib/puppet/pops/types/p_timestamp_type.rb
1082
1096
  - vendored/puppet/lib/puppet/pops/types/p_type_set_type.rb
1097
+ - vendored/puppet/lib/puppet/pops/types/p_uri_type.rb
1083
1098
  - vendored/puppet/lib/puppet/pops/types/puppet_object.rb
1084
1099
  - vendored/puppet/lib/puppet/pops/types/recursion_guard.rb
1085
1100
  - vendored/puppet/lib/puppet/pops/types/ruby_generator.rb
@@ -1097,6 +1112,7 @@ files:
1097
1112
  - vendored/puppet/lib/puppet/pops/types/type_mismatch_describer.rb
1098
1113
  - vendored/puppet/lib/puppet/pops/types/type_parser.rb
1099
1114
  - vendored/puppet/lib/puppet/pops/types/type_set_reference.rb
1115
+ - vendored/puppet/lib/puppet/pops/types/type_with_members.rb
1100
1116
  - vendored/puppet/lib/puppet/pops/types/types.rb
1101
1117
  - vendored/puppet/lib/puppet/pops/utils.rb
1102
1118
  - vendored/puppet/lib/puppet/pops/validation.rb
@@ -1,115 +0,0 @@
1
- require 'json'
2
- require 'bolt/result'
3
-
4
- module Bolt
5
- class Node
6
- class ResultOutput
7
- attr_reader :stdout, :stderr
8
-
9
- def initialize
10
- @stdout = StringIO.new
11
- @stderr = StringIO.new
12
- end
13
- end
14
-
15
- class Result
16
- attr_reader :output
17
-
18
- def initialize(output)
19
- @output = output
20
- end
21
-
22
- def output_string
23
- str = StringIO.new
24
- print_to_stream(str)
25
- str.string
26
- end
27
-
28
- def to_result
29
- Bolt::Result.new
30
- end
31
-
32
- def to_command_result
33
- Bolt::CommandResult.new(output.stdout.string,
34
- output.stderr.string,
35
- exit_code)
36
- end
37
-
38
- def exit_code
39
- 0
40
- end
41
-
42
- def ensure
43
- yield
44
- self
45
- end
46
- end
47
-
48
- class Success < Result
49
- attr_reader :value
50
-
51
- def initialize(value = '', output = nil)
52
- super(output)
53
- @value = value
54
- end
55
-
56
- def success?
57
- true
58
- end
59
-
60
- def then
61
- yield @value
62
- end
63
-
64
- def to_task_result
65
- Bolt::TaskSuccess.new(output.stdout.string,
66
- output.stderr.string,
67
- exit_code)
68
- end
69
- end
70
-
71
- class Failure < Result
72
- attr_reader :exit_code
73
-
74
- def initialize(exit_code, output)
75
- super(output)
76
- @exit_code = exit_code
77
- end
78
-
79
- def success?
80
- false
81
- end
82
-
83
- def then
84
- self
85
- end
86
-
87
- def to_task_result
88
- Bolt::TaskFailure.new(output.stdout.string,
89
- output.stderr.string,
90
- exit_code)
91
- end
92
- end
93
-
94
- class ExceptionFailure < Failure
95
- attr_reader :exception
96
-
97
- def initialize(exception)
98
- super(1, nil)
99
- @exception = exception
100
- end
101
-
102
- def to_result
103
- Bolt::ExceptionResult.new(@exception)
104
- end
105
-
106
- def to_task_result
107
- to_result
108
- end
109
-
110
- def to_command_result
111
- to_result
112
- end
113
- end
114
- end
115
- end
@@ -1,44 +0,0 @@
1
- require 'puppet/configurer'
2
-
3
- # Factory for <tt>Puppet::Configurer::Downloader</tt> objects.
4
- #
5
- # Puppet's pluginsync facilities can be used to download modules
6
- # and external facts, each with a different destination directory
7
- # and related settings.
8
- #
9
- # @api private
10
- #
11
- class Puppet::Configurer::DownloaderFactory
12
- def create_plugin_downloader(environment)
13
- plugin_downloader = Puppet::Configurer::Downloader.new(
14
- "plugin",
15
- Puppet[:plugindest],
16
- Puppet[:pluginsource],
17
- Puppet[:pluginsignore],
18
- environment
19
- )
20
- end
21
-
22
- def create_plugin_facts_downloader(environment)
23
- source_permissions = Puppet.features.microsoft_windows? ? :ignore : :use
24
-
25
- plugin_fact_downloader = Puppet::Configurer::Downloader.new(
26
- "pluginfacts",
27
- Puppet[:pluginfactdest],
28
- Puppet[:pluginfactsource],
29
- Puppet[:pluginsignore],
30
- environment,
31
- source_permissions
32
- )
33
- end
34
-
35
- def create_locales_downloader(environment)
36
- locales_downloader = Puppet::Configurer::Downloader.new(
37
- "locales",
38
- Puppet[:localedest],
39
- Puppet[:localesource],
40
- Puppet[:pluginsignore] + " config.yaml",
41
- environment
42
- )
43
- end
44
- end