puppet 5.3.7-x86-mingw32 → 5.4.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +42 -29
- data/README.md +8 -6
- data/ext/cert_inspector +2 -2
- data/ext/envpuppet +1 -1
- data/ext/gentoo/init.d/puppetmaster +4 -4
- data/ext/ips/puppet-agent +11 -11
- data/ext/ips/puppet-master +11 -11
- data/ext/puppet-test +1 -2
- data/ext/redhat/client.init +2 -2
- data/ext/redhat/logrotate +1 -1
- data/ext/solaris/smf/puppet +11 -11
- data/ext/solaris/smf/svc-puppetd +5 -5
- data/ext/solaris/smf/svc-puppetmasterd +5 -5
- data/ext/windows/service/daemon.rb +1 -1
- data/install.rb +2 -3
- data/lib/puppet/agent.rb +1 -1
- data/lib/puppet/application/cert.rb +1 -3
- data/lib/puppet/application/describe.rb +0 -1
- data/lib/puppet/application/device.rb +12 -99
- data/lib/puppet/application/filebucket.rb +32 -11
- data/lib/puppet/application/lookup.rb +1 -11
- data/lib/puppet/application/script.rb +261 -0
- data/lib/puppet/configurer.rb +3 -4
- data/lib/puppet/configurer/plugin_handler.rb +26 -9
- data/lib/puppet/context.rb +1 -1
- data/lib/puppet/datatypes.rb +213 -0
- data/lib/puppet/datatypes/error.rb +21 -0
- data/lib/puppet/datatypes/impl/error.rb +40 -0
- data/lib/puppet/defaults.rb +51 -20
- data/lib/puppet/environments.rb +17 -0
- data/lib/puppet/error.rb +17 -0
- data/lib/puppet/etc.rb +2 -2
- data/lib/puppet/external/pson/pure/generator.rb +1 -1
- data/lib/puppet/external/pson/pure/parser.rb +1 -1
- data/lib/puppet/face/config.rb +45 -0
- data/lib/puppet/face/epp.rb +3 -3
- data/lib/puppet/face/help/action.erb +3 -0
- data/lib/puppet/face/module/build.rb +1 -0
- data/lib/puppet/face/module/generate.rb +5 -0
- data/lib/puppet/face/module/install.rb +1 -0
- data/lib/puppet/face/module/search.rb +6 -2
- data/lib/puppet/face/module/uninstall.rb +1 -0
- data/lib/puppet/face/module/upgrade.rb +1 -0
- data/lib/puppet/face/parser.rb +0 -1
- data/lib/puppet/face/plugin.rb +1 -3
- data/lib/puppet/feature/base.rb +1 -1
- data/lib/puppet/feature/bolt.rb +3 -0
- data/lib/puppet/file_bucket/dipper.rb +1 -2
- data/lib/puppet/file_serving/http_metadata.rb +1 -1
- data/lib/puppet/file_system/uniquefile.rb +2 -2
- data/lib/puppet/forge.rb +6 -0
- data/lib/puppet/functions.rb +70 -88
- data/lib/puppet/functions/all.rb +6 -2
- data/lib/puppet/functions/annotate.rb +1 -1
- data/lib/puppet/functions/any.rb +7 -3
- data/lib/puppet/functions/contain.rb +6 -0
- data/lib/puppet/functions/convert_to.rb +32 -0
- data/lib/puppet/functions/defined.rb +0 -3
- data/lib/puppet/functions/each.rb +10 -6
- data/lib/puppet/functions/filter.rb +16 -10
- data/lib/puppet/functions/find_file.rb +0 -1
- data/lib/puppet/functions/include.rb +6 -0
- data/lib/puppet/functions/map.rb +12 -9
- data/lib/puppet/functions/module_directory.rb +41 -0
- data/lib/puppet/functions/new.rb +1 -4
- data/lib/puppet/functions/regsubst.rb +1 -1
- data/lib/puppet/functions/require.rb +6 -0
- data/lib/puppet/generate/type.rb +1 -1
- data/lib/puppet/gettext/config.rb +2 -2
- data/lib/puppet/gettext/stubs.rb +1 -1
- data/lib/puppet/indirector/catalog/compiler.rb +0 -1
- data/lib/puppet/indirector/file_bucket_file/file.rb +6 -2
- data/lib/puppet/indirector/file_server.rb +1 -1
- data/lib/puppet/indirector/node/ldap.rb +19 -3
- data/lib/puppet/indirector/request.rb +10 -6
- data/lib/puppet/indirector/rest.rb +11 -12
- data/lib/puppet/info_service/class_information_service.rb +1 -1
- data/lib/puppet/interface/action.rb +11 -0
- data/lib/puppet/interface/action_builder.rb +8 -0
- data/lib/puppet/interface/option_manager.rb +1 -1
- data/lib/puppet/loaders.rb +2 -0
- data/lib/puppet/module.rb +6 -2
- data/lib/puppet/module_tool/applications/builder.rb +4 -0
- data/lib/puppet/module_tool/applications/installer.rb +3 -0
- data/lib/puppet/module_tool/applications/uninstaller.rb +3 -0
- data/lib/puppet/module_tool/applications/unpacker.rb +1 -1
- data/lib/puppet/module_tool/applications/upgrader.rb +3 -0
- data/lib/puppet/module_tool/installed_modules.rb +1 -1
- data/lib/puppet/module_tool/metadata.rb +0 -1
- data/lib/puppet/network/authstore.rb +1 -1
- data/lib/puppet/network/http/api/indirected_routes.rb +1 -1
- data/lib/puppet/network/http/connection.rb +1 -9
- data/lib/puppet/network/http/factory.rb +0 -3
- data/lib/puppet/network/http/webrick.rb +1 -0
- data/lib/puppet/network/rights.rb +1 -1
- data/lib/puppet/node.rb +53 -0
- data/lib/puppet/node/environment.rb +1 -1
- data/lib/puppet/parameter/boolean.rb +1 -1
- data/lib/puppet/parser.rb +1 -0
- data/lib/puppet/parser/abstract_compiler.rb +36 -0
- data/lib/puppet/parser/ast/branch.rb +1 -1
- data/lib/puppet/parser/ast/pops_bridge.rb +8 -52
- data/lib/puppet/parser/compiler.rb +4 -54
- data/lib/puppet/parser/functions.rb +0 -1
- data/lib/puppet/parser/functions/create_resources.rb +6 -0
- data/lib/puppet/parser/functions/fqdn_rand.rb +6 -2
- data/lib/puppet/parser/functions/inline_template.rb +6 -0
- data/lib/puppet/parser/functions/new.rb +47 -32
- data/lib/puppet/parser/functions/realize.rb +6 -0
- data/lib/puppet/parser/functions/return.rb +1 -22
- data/lib/puppet/parser/functions/reverse_each.rb +1 -1
- data/lib/puppet/parser/functions/scanf.rb +1 -1
- data/lib/puppet/parser/functions/sha256.rb +5 -0
- data/lib/puppet/parser/functions/tag.rb +6 -0
- data/lib/puppet/parser/functions/tagged.rb +6 -0
- data/lib/puppet/parser/functions/template.rb +5 -0
- data/lib/puppet/parser/scope.rb +28 -4
- data/lib/puppet/parser/script_compiler.rb +118 -0
- data/lib/puppet/parser/type_loader.rb +1 -1
- data/lib/puppet/pops.rb +1 -1
- data/lib/puppet/pops/evaluator/access_operator.rb +38 -4
- data/lib/puppet/pops/evaluator/closure.rb +12 -4
- data/lib/puppet/pops/evaluator/compare_operator.rb +4 -4
- data/lib/puppet/pops/evaluator/epp_evaluator.rb +13 -0
- data/lib/puppet/pops/evaluator/evaluator_impl.rb +38 -10
- data/lib/puppet/pops/evaluator/literal_evaluator.rb +1 -1
- data/lib/puppet/pops/evaluator/runtime3_converter.rb +1 -1
- data/lib/puppet/pops/evaluator/runtime3_support.rb +2 -3
- data/lib/puppet/pops/functions/dispatch.rb +6 -5
- data/lib/puppet/pops/functions/function.rb +2 -2
- data/lib/puppet/pops/issues.rb +34 -2
- data/lib/puppet/pops/loader/base_loader.rb +10 -0
- data/lib/puppet/pops/loader/dependency_loader.rb +7 -0
- data/lib/puppet/pops/loader/loader.rb +21 -2
- data/lib/puppet/pops/loader/loader_paths.rb +180 -30
- data/lib/puppet/pops/loader/module_loaders.rb +202 -33
- data/lib/puppet/pops/loader/puppet_plan_instantiator.rb +84 -0
- data/lib/puppet/pops/loader/puppet_resource_type_impl_instantiator.rb +9 -9
- data/lib/puppet/pops/loader/ruby_data_type_instantiator.rb +40 -0
- data/lib/puppet/pops/loader/runtime3_type_loader.rb +6 -1
- data/lib/puppet/pops/loader/static_loader.rb +23 -8
- data/lib/puppet/pops/loader/task_instantiator.rb +69 -0
- data/lib/puppet/pops/loader/type_definition_instantiator.rb +4 -0
- data/lib/puppet/pops/loaders.rb +122 -11
- data/lib/puppet/pops/lookup/data_dig_function_provider.rb +1 -1
- data/lib/puppet/pops/lookup/interpolation.rb +1 -1
- data/lib/puppet/pops/lookup/lookup_adapter.rb +0 -1
- data/lib/puppet/pops/model/ast.pp +3 -0
- data/lib/puppet/pops/model/ast.rb +34 -1
- data/lib/puppet/pops/model/factory.rb +30 -3
- data/lib/puppet/pops/model/model_label_provider.rb +1 -0
- data/lib/puppet/pops/model/model_tree_dumper.rb +12 -1
- data/lib/puppet/pops/model/tree_dumper.rb +1 -1
- data/lib/puppet/pops/parser/code_merger.rb +2 -2
- data/lib/puppet/pops/parser/egrammar.ra +44 -15
- data/lib/puppet/pops/parser/eparser.rb +1687 -1571
- data/lib/puppet/pops/parser/epp_support.rb +1 -3
- data/lib/puppet/pops/parser/evaluating_parser.rb +1 -1
- data/lib/puppet/pops/parser/interpolation_support.rb +2 -2
- data/lib/puppet/pops/parser/lexer2.rb +4 -4
- data/lib/puppet/pops/parser/lexer_support.rb +2 -2
- data/lib/puppet/pops/parser/locatable.rb +1 -1
- data/lib/puppet/pops/parser/locator.rb +7 -13
- data/lib/puppet/pops/parser/parser_support.rb +3 -3
- data/lib/puppet/pops/parser/slurp_support.rb +0 -3
- data/lib/puppet/pops/pcore.rb +45 -0
- data/lib/puppet/pops/resource/param.rb +1 -1
- data/lib/puppet/pops/resource/resource_type_impl.rb +1 -1
- data/lib/puppet/pops/serialization/abstract_reader.rb +4 -0
- data/lib/puppet/pops/serialization/abstract_writer.rb +6 -0
- data/lib/puppet/pops/serialization/extension.rb +1 -0
- data/lib/puppet/pops/serialization/from_data_converter.rb +64 -10
- data/lib/puppet/pops/serialization/json_path.rb +2 -1
- data/lib/puppet/pops/serialization/object.rb +3 -4
- data/lib/puppet/pops/serialization/serializer.rb +2 -1
- data/lib/puppet/pops/serialization/to_data_converter.rb +7 -3
- data/lib/puppet/pops/time/timespan.rb +1 -1
- data/lib/puppet/pops/types/iterable.rb +38 -9
- data/lib/puppet/pops/types/p_init_type.rb +1 -1
- data/lib/puppet/pops/types/p_meta_type.rb +4 -0
- data/lib/puppet/pops/types/p_object_type.rb +146 -14
- data/lib/puppet/pops/types/p_object_type_extension.rb +218 -0
- data/lib/puppet/pops/types/p_sem_ver_range_type.rb +0 -1
- data/lib/puppet/pops/types/p_sem_ver_type.rb +10 -2
- data/lib/puppet/pops/types/p_type_set_type.rb +0 -1
- data/lib/puppet/pops/types/p_uri_type.rb +190 -0
- data/lib/puppet/pops/types/puppet_object.rb +15 -1
- data/lib/puppet/pops/types/ruby_generator.rb +46 -54
- data/lib/puppet/pops/types/string_converter.rb +22 -1
- data/lib/puppet/pops/types/type_acceptor.rb +1 -1
- data/lib/puppet/pops/types/type_calculator.rb +13 -4
- data/lib/puppet/pops/types/type_factory.rb +29 -5
- data/lib/puppet/pops/types/type_formatter.rb +67 -4
- data/lib/puppet/pops/types/type_parser.rb +92 -4
- data/lib/puppet/pops/types/type_with_members.rb +43 -0
- data/lib/puppet/pops/types/types.rb +212 -80
- data/lib/puppet/pops/validation/checker4_0.rb +10 -6
- data/lib/puppet/pops/validation/tasks_checker.rb +60 -0
- data/lib/puppet/pops/validation/validator_factory_4_0.rb +6 -1
- data/lib/puppet/property.rb +1 -1
- data/lib/puppet/provider.rb +18 -8
- data/lib/puppet/provider/augeas/augeas.rb +3 -4
- data/lib/puppet/provider/exec.rb +0 -2
- data/lib/puppet/provider/group/groupadd.rb +25 -1
- data/lib/puppet/provider/group/windows_adsi.rb +7 -4
- data/lib/puppet/provider/mount.rb +25 -8
- data/lib/puppet/provider/nameservice.rb +9 -4
- data/lib/puppet/provider/nameservice/directoryservice.rb +3 -3
- data/lib/puppet/provider/nameservice/objectadd.rb +13 -24
- data/lib/puppet/provider/nameservice/pw.rb +14 -14
- data/lib/puppet/provider/package/appdmg.rb +0 -1
- data/lib/puppet/provider/package/apple.rb +0 -1
- data/lib/puppet/provider/package/gem.rb +2 -2
- data/lib/puppet/provider/package/macports.rb +2 -2
- data/lib/puppet/provider/package/pkg.rb +3 -0
- data/lib/puppet/provider/package/pkgdmg.rb +0 -1
- data/lib/puppet/provider/package/portage.rb +0 -1
- data/lib/puppet/provider/package/yum.rb +23 -8
- data/lib/puppet/provider/package/zypper.rb +2 -2
- data/lib/puppet/provider/scheduled_task/win32_taskscheduler.rb +2 -2
- data/lib/puppet/provider/service/init.rb +1 -0
- data/lib/puppet/provider/service/launchd.rb +6 -7
- data/lib/puppet/provider/service/redhat.rb +3 -2
- data/lib/puppet/provider/service/systemd.rb +2 -2
- data/lib/puppet/provider/ssh_authorized_key/parsed.rb +1 -1
- data/lib/puppet/provider/user/aix.rb +3 -2
- data/lib/puppet/provider/user/openbsd.rb +1 -1
- data/lib/puppet/provider/user/pw.rb +1 -1
- data/lib/puppet/provider/user/user_role_add.rb +7 -1
- data/lib/puppet/provider/user/useradd.rb +36 -6
- data/lib/puppet/provider/user/windows_adsi.rb +1 -1
- data/lib/puppet/provider/yumrepo/inifile.rb +2 -4
- data/lib/puppet/provider/zfs/zfs.rb +23 -3
- data/lib/puppet/provider/zpool/zpool.rb +1 -1
- data/lib/puppet/reference/configuration.rb +0 -2
- data/lib/puppet/reference/type.rb +0 -1
- data/lib/puppet/resource.rb +1 -2
- data/lib/puppet/resource/catalog.rb +1 -1
- data/lib/puppet/resource/status.rb +0 -1
- data/lib/puppet/resource/type.rb +4 -4
- data/lib/puppet/resource/type_collection.rb +1 -1
- data/lib/puppet/settings/base_setting.rb +1 -1
- data/lib/puppet/settings/environment_conf.rb +0 -1
- data/lib/puppet/settings/ini_file.rb +66 -12
- data/lib/puppet/ssl/certificate_authority.rb +1 -1
- data/lib/puppet/ssl/certificate_request.rb +2 -2
- data/lib/puppet/ssl/certificate_revocation_list.rb +2 -1
- data/lib/puppet/ssl/certificate_signer.rb +11 -0
- data/lib/puppet/ssl/host.rb +2 -2
- data/lib/puppet/syntax_checkers/base64.rb +1 -1
- data/lib/puppet/transaction.rb +37 -14
- data/lib/puppet/transaction/report.rb +3 -1
- data/lib/puppet/type.rb +17 -4
- data/lib/puppet/type/cron.rb +1 -1
- data/lib/puppet/type/exec.rb +5 -4
- data/lib/puppet/type/file.rb +3 -3
- data/lib/puppet/type/file/checksum.rb +7 -1
- data/lib/puppet/type/file/checksum_value.rb +4 -3
- data/lib/puppet/type/group.rb +3 -0
- data/lib/puppet/type/k5login.rb +101 -0
- data/lib/puppet/type/macauthorization.rb +1 -1
- data/lib/puppet/type/mount.rb +6 -2
- data/lib/puppet/type/tidy.rb +6 -4
- data/lib/puppet/type/user.rb +26 -39
- data/lib/puppet/type/yumrepo.rb +9 -0
- data/lib/puppet/type/zfs.rb +4 -0
- data/lib/puppet/util.rb +8 -15
- data/lib/puppet/util/character_encoding.rb +2 -2
- data/lib/puppet/util/checksums.rb +82 -1
- data/lib/puppet/util/errors.rb +0 -2
- data/lib/puppet/util/filetype.rb +2 -2
- data/lib/puppet/util/json_lockfile.rb +1 -1
- data/lib/puppet/util/log.rb +1 -1
- data/lib/puppet/util/log/destinations.rb +10 -1
- data/lib/puppet/util/monkey_patches.rb +1 -1
- data/lib/puppet/util/network_device/cisco/device.rb +5 -5
- data/lib/puppet/util/network_device/config.rb +2 -3
- data/lib/puppet/util/platform.rb +13 -0
- data/lib/puppet/util/plist.rb +4 -4
- data/lib/puppet/util/rdoc/generators/puppet_generator.rb +2 -2
- data/lib/puppet/util/rdoc/parser/puppet_parser_rdoc2.rb +1 -1
- data/lib/puppet/util/reference.rb +8 -1
- data/lib/puppet/util/windows/adsi.rb +18 -15
- data/lib/puppet/util/windows/principal.rb +6 -7
- data/lib/puppet/util/windows/process.rb +1 -1
- data/lib/puppet/util/windows/registry.rb +2 -2
- data/lib/puppet/util/windows/sid.rb +7 -62
- data/lib/puppet/vendor/deep_merge/README.md +2 -2
- data/lib/puppet/vendor/pathspec/lib/pathspec/gitignorespec.rb +18 -18
- data/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version.rb +2 -2
- data/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version_range.rb +5 -5
- data/lib/puppet/vendor/semantic_puppet/locales/config.yaml +1 -1
- data/lib/puppet/version.rb +1 -1
- data/lib/puppet_pal.rb +874 -0
- data/locales/ja/puppet.po +140 -163
- data/locales/puppet.pot +940 -597
- data/man/man5/puppet.conf.5 +16 -91
- data/man/man8/puppet-agent.8 +2 -6
- data/man/man8/puppet-apply.8 +2 -2
- data/man/man8/puppet-ca.8 +1 -1
- data/man/man8/puppet-catalog.8 +1 -1
- data/man/man8/puppet-cert.8 +1 -1
- data/man/man8/puppet-certificate.8 +1 -1
- data/man/man8/puppet-certificate_request.8 +1 -1
- data/man/man8/puppet-certificate_revocation_list.8 +1 -1
- data/man/man8/puppet-config.8 +1 -1
- data/man/man8/puppet-describe.8 +1 -1
- data/man/man8/puppet-device.8 +11 -33
- data/man/man8/puppet-doc.8 +1 -1
- data/man/man8/puppet-epp.8 +1 -1
- data/man/man8/puppet-facts.8 +1 -1
- data/man/man8/puppet-filebucket.8 +4 -22
- data/man/man8/puppet-generate.8 +1 -1
- data/man/man8/puppet-help.8 +1 -1
- data/man/man8/puppet-key.8 +1 -1
- data/man/man8/puppet-lookup.8 +1 -1
- data/man/man8/puppet-man.8 +1 -1
- data/man/man8/puppet-master.8 +1 -1
- data/man/man8/puppet-module.8 +2 -11
- data/man/man8/puppet-node.8 +1 -1
- data/man/man8/puppet-parser.8 +1 -1
- data/man/man8/puppet-plugin.8 +1 -1
- data/man/man8/puppet-report.8 +1 -1
- data/man/man8/puppet-resource.8 +1 -1
- data/man/man8/puppet-status.8 +1 -1
- data/man/man8/puppet.8 +2 -2
- data/spec/integration/application/lookup_spec.rb +0 -21
- data/spec/integration/parser/compiler_spec.rb +18 -0
- data/spec/integration/parser/script_compiler_spec.rb +113 -0
- data/spec/integration/provider/mount_spec.rb +2 -0
- data/spec/integration/type/file_spec.rb +11 -3
- data/spec/integration/util/windows/adsi_spec.rb +1 -86
- data/spec/integration/util/windows/principal_spec.rb +1 -10
- data/spec/shared_contexts/checksum.rb +4 -1
- data/spec/shared_contexts/digests.rb +46 -1
- data/spec/shared_contexts/types_setup.rb +8 -3
- data/spec/unit/agent_spec.rb +2 -2
- data/spec/unit/application/cert_spec.rb +5 -17
- data/spec/unit/application/device_spec.rb +2 -96
- data/spec/unit/application/filebucket_spec.rb +18 -4
- data/spec/unit/configurer/plugin_handler_spec.rb +5 -32
- data/spec/unit/configurer_spec.rb +3 -3
- data/spec/unit/datatypes_spec.rb +304 -0
- data/spec/unit/defaults_spec.rb +41 -20
- data/spec/unit/face/config_spec.rb +46 -1
- data/spec/unit/face/epp_face_spec.rb +7 -3
- data/spec/unit/face/module/search_spec.rb +11 -0
- data/spec/unit/face/parser_spec.rb +2 -2
- data/spec/unit/file_bucket/dipper_spec.rb +12 -1
- data/spec/unit/forge/module_release_spec.rb +70 -0
- data/spec/unit/functions/break_spec.rb +34 -2
- data/spec/unit/functions/contain_spec.rb +1 -0
- data/spec/unit/functions/convert_to_spec.rb +22 -0
- data/spec/unit/functions/epp_spec.rb +5 -0
- data/spec/unit/functions/include_spec.rb +15 -0
- data/spec/unit/functions/module_directory_spec.rb +43 -0
- data/spec/unit/functions/new_spec.rb +14 -14
- data/spec/unit/functions/require_spec.rb +2 -0
- data/spec/unit/functions/shared.rb +12 -0
- data/spec/unit/functions/step_spec.rb +1 -1
- data/spec/unit/functions4_spec.rb +49 -4
- data/spec/unit/indirector/catalog/compiler_spec.rb +3 -3
- data/spec/unit/indirector/file_bucket_file/file_spec.rb +148 -94
- data/spec/unit/indirector/node/ldap_spec.rb +15 -12
- data/spec/unit/indirector/rest_spec.rb +0 -43
- data/spec/unit/interface/action_spec.rb +33 -0
- data/spec/unit/module_tool/applications/builder_spec.rb +7 -0
- data/spec/unit/module_tool/applications/installer_spec.rb +8 -0
- data/spec/unit/module_tool/applications/uninstaller_spec.rb +8 -0
- data/spec/unit/module_tool/applications/upgrader_spec.rb +6 -0
- data/spec/unit/network/http/connection_spec.rb +1 -1
- data/spec/unit/network/http/factory_spec.rb +28 -35
- data/spec/unit/parser/compiler_spec.rb +0 -8
- data/spec/unit/parser/environment_compiler_spec.rb +36 -0
- data/spec/unit/parser/functions/create_resources_spec.rb +9 -0
- data/spec/unit/parser/functions/inline_template_spec.rb +7 -0
- data/spec/unit/parser/functions/realize_spec.rb +9 -0
- data/spec/unit/parser/functions/tag_spec.rb +7 -0
- data/spec/unit/parser/functions/tagged_spec.rb +25 -0
- data/spec/unit/parser/functions/template_spec.rb +8 -0
- data/spec/unit/parser/scope_spec.rb +19 -0
- data/spec/unit/pops/evaluator/conditionals_spec.rb +1 -1
- data/spec/unit/pops/loaders/loader_spec.rb +516 -0
- data/spec/unit/pops/loaders/loaders_spec.rb +11 -0
- data/spec/unit/pops/loaders/module_loaders_spec.rb +43 -0
- data/spec/unit/pops/loaders/static_loader_spec.rb +15 -7
- data/spec/unit/pops/model/model_spec.rb +5 -0
- data/spec/unit/pops/parser/lexer2_spec.rb +15 -0
- data/spec/unit/pops/parser/locator_spec.rb +20 -0
- data/spec/unit/pops/parser/parse_basic_expressions_spec.rb +33 -0
- data/spec/unit/pops/parser/parse_calls_spec.rb +28 -0
- data/spec/unit/pops/parser/parse_conditionals_spec.rb +12 -0
- data/spec/unit/pops/parser/parse_plan_spec.rb +48 -0
- data/spec/unit/pops/serialization/packer_spec.rb +8 -0
- data/spec/unit/pops/serialization/serialization_spec.rb +30 -0
- data/spec/unit/pops/serialization/to_from_hr_spec.rb +31 -0
- data/spec/unit/pops/types/error_spec.rb +207 -0
- data/spec/unit/pops/types/p_init_type_spec.rb +98 -0
- data/spec/unit/pops/types/p_object_type_spec.rb +275 -10
- data/spec/unit/pops/types/p_uri_type_spec.rb +191 -0
- data/spec/unit/pops/types/ruby_generator_spec.rb +82 -44
- data/spec/unit/pops/types/task_spec.rb +353 -0
- data/spec/unit/pops/types/type_calculator_spec.rb +76 -5
- data/spec/unit/pops/types/type_formatter_spec.rb +31 -13
- data/spec/unit/pops/types/type_parser_spec.rb +13 -1
- data/spec/unit/pops/types/types_spec.rb +60 -0
- data/spec/unit/pops/validator/validator_spec.rb +76 -0
- data/spec/unit/provider/group/groupadd_spec.rb +77 -1
- data/spec/unit/provider/group/pw_spec.rb +4 -4
- data/spec/unit/provider/group/windows_adsi_spec.rb +22 -79
- data/spec/unit/provider/mount_spec.rb +18 -5
- data/spec/unit/provider/nameservice_spec.rb +5 -5
- data/spec/unit/provider/package/dnf_spec.rb +2 -2
- data/spec/unit/provider/package/gem_spec.rb +1 -1
- data/spec/unit/provider/package/pkg_spec.rb +3 -0
- data/spec/unit/provider/package/yum_spec.rb +40 -0
- data/spec/unit/provider/service/launchd_spec.rb +2 -1
- data/spec/unit/provider/service/redhat_spec.rb +5 -0
- data/spec/unit/provider/service/systemd_spec.rb +1 -1
- data/spec/unit/provider/user/hpux_spec.rb +2 -2
- data/spec/unit/provider/user/openbsd_spec.rb +2 -2
- data/spec/unit/provider/user/pw_spec.rb +14 -14
- data/spec/unit/provider/user/user_role_add_spec.rb +19 -2
- data/spec/unit/provider/user/useradd_spec.rb +188 -22
- data/spec/unit/provider/user/windows_adsi_spec.rb +4 -4
- data/spec/unit/provider/zfs/zfs_spec.rb +55 -1
- data/spec/unit/provider_spec.rb +48 -0
- data/spec/unit/puppet_pal_2pec.rb +1005 -0
- data/spec/unit/puppet_pal_spec.rb +11 -0
- data/spec/unit/settings/ini_file_spec.rb +313 -2
- data/spec/unit/ssl/certificate_request_spec.rb +42 -1
- data/spec/unit/ssl/certificate_revocation_list_spec.rb +2 -1
- data/spec/unit/transaction/report_spec.rb +1 -0
- data/spec/unit/transaction_spec.rb +112 -21
- data/spec/unit/type/file/checksum_spec.rb +20 -0
- data/spec/unit/type/file_spec.rb +8 -0
- data/spec/unit/type/group_spec.rb +8 -0
- data/spec/unit/type/k5login_spec.rb +22 -1
- data/spec/unit/type/scheduled_task_spec.rb +15 -0
- data/spec/unit/type/user_spec.rb +11 -1
- data/spec/unit/type/yumrepo_spec.rb +5 -0
- data/spec/unit/util/checksums_spec.rb +3 -3
- data/spec/unit/util/log/destinations_spec.rb +14 -0
- data/spec/unit/util/network_device/cisco/device_spec.rb +1 -1
- data/spec/unit/util/plist_spec.rb +3 -3
- data/spec/unit/util/windows/adsi_spec.rb +27 -31
- data/spec/unit/util/windows/sid_spec.rb +15 -86
- data/spec/unit/util_spec.rb +17 -3
- data/tasks/manpages.rake +1 -1
- metadata +220 -182
- data/lib/puppet/bindings.rb +0 -148
- data/lib/puppet/configurer/downloader_factory.rb +0 -44
- data/spec/unit/configurer/downloader_factory_spec.rb +0 -129
@@ -57,7 +57,9 @@ class Puppet::Indirector::REST < Puppet::Indirector::Terminus
|
|
57
57
|
if setting && setting != :server && Puppet.settings.set_by_config?(setting)
|
58
58
|
Puppet.settings[setting]
|
59
59
|
else
|
60
|
-
|
60
|
+
begin
|
61
|
+
Puppet.lookup(:server)
|
62
|
+
rescue
|
61
63
|
if primary_server = Puppet.settings[:server_list][0]
|
62
64
|
Puppet.debug "Dynamically-bound server lookup failed; using first entry"
|
63
65
|
primary_server[0]
|
@@ -67,7 +69,6 @@ class Puppet::Indirector::REST < Puppet::Indirector::Terminus
|
|
67
69
|
Puppet.settings[setting]
|
68
70
|
end
|
69
71
|
end
|
70
|
-
server
|
71
72
|
end
|
72
73
|
end
|
73
74
|
|
@@ -83,21 +84,22 @@ class Puppet::Indirector::REST < Puppet::Indirector::Terminus
|
|
83
84
|
(srv_setting && srv_setting != :server && Puppet.settings.set_by_config?(srv_setting))
|
84
85
|
Puppet.settings[setting].to_i
|
85
86
|
else
|
86
|
-
|
87
|
+
begin
|
88
|
+
Puppet.lookup(:serverport).to_i
|
89
|
+
rescue
|
87
90
|
if primary_server = Puppet.settings[:server_list][0]
|
88
91
|
Puppet.debug "Dynamically-bound port lookup failed; using first entry"
|
89
92
|
|
90
93
|
# Port might not be set, so we want to fallback in that
|
91
94
|
# case. We know we don't need to use `setting` here, since
|
92
95
|
# the default value of every port setting is `masterport`
|
93
|
-
(primary_server[1] || Puppet.settings[:masterport])
|
96
|
+
(primary_server[1] || Puppet.settings[:masterport]).to_i
|
94
97
|
else
|
95
98
|
setting ||= :masterport
|
96
99
|
Puppet.debug "Dynamically-bound port lookup failed; falling back to #{setting} setting"
|
97
|
-
Puppet.settings[setting]
|
100
|
+
Puppet.settings[setting].to_i
|
98
101
|
end
|
99
102
|
end
|
100
|
-
port.to_i
|
101
103
|
end
|
102
104
|
end
|
103
105
|
|
@@ -181,7 +183,7 @@ class Puppet::Indirector::REST < Puppet::Indirector::Terminus
|
|
181
183
|
# While this way of handling the issue is not perfect, there is at least an error
|
182
184
|
# that makes a user aware of the reason for the failure.
|
183
185
|
#
|
184
|
-
|
186
|
+
_, body = parse_response(response)
|
185
187
|
msg = _("Find %{uri} resulted in 404 with the message: %{body}") % { uri: elide(uri_with_query_string, 100), body: body }
|
186
188
|
raise Puppet::Error, msg
|
187
189
|
else
|
@@ -261,9 +263,7 @@ class Puppet::Indirector::REST < Puppet::Indirector::Terminus
|
|
261
263
|
def handle_response(request, response)
|
262
264
|
server_version = response[Puppet::Network::HTTP::HEADER_PUPPET_VERSION]
|
263
265
|
if server_version
|
264
|
-
Puppet.
|
265
|
-
Puppet.push_context(:server_agent_version => server_version)
|
266
|
-
end
|
266
|
+
Puppet.push_context({:server_agent_version => server_version})
|
267
267
|
if SemanticPuppet::Version.parse(server_version).major < MAJOR_VERSION_JSON_DEFAULT &&
|
268
268
|
Puppet[:preferred_serialization_format] != 'pson'
|
269
269
|
#TRANSLATORS "PSON" should not be translated
|
@@ -318,8 +318,7 @@ class Puppet::Indirector::REST < Puppet::Indirector::Terminus
|
|
318
318
|
# uncompress_body)
|
319
319
|
def parse_response(response)
|
320
320
|
if response['content-type']
|
321
|
-
[ response['content-type'].gsub(/\s*;.*$/,''),
|
322
|
-
body = uncompress_body(response) ]
|
321
|
+
[ response['content-type'].gsub(/\s*;.*$/,''), uncompress_body(response) ]
|
323
322
|
else
|
324
323
|
raise _("No content type in http response; cannot parse")
|
325
324
|
end
|
@@ -59,7 +59,7 @@ class Puppet::InfoService::ClassInformationService
|
|
59
59
|
{:classes =>
|
60
60
|
parse_result.definitions.select {|d| d.is_a?(Puppet::Pops::Model::HostClassDefinition)}.map do |d|
|
61
61
|
{:name => d.name,
|
62
|
-
:params =>
|
62
|
+
:params => d.parameters.map {|p| extract_param(p) }
|
63
63
|
}
|
64
64
|
end
|
65
65
|
}
|
@@ -149,6 +149,17 @@ class Puppet::Interface::Action
|
|
149
149
|
@render_as = value.to_sym
|
150
150
|
end
|
151
151
|
|
152
|
+
# @api private
|
153
|
+
# @return [void]
|
154
|
+
def deprecate
|
155
|
+
@deprecated = true
|
156
|
+
end
|
157
|
+
|
158
|
+
# @api private
|
159
|
+
# @return [Boolean]
|
160
|
+
def deprecated?
|
161
|
+
@deprecated
|
162
|
+
end
|
152
163
|
|
153
164
|
########################################################################
|
154
165
|
# Initially, this was defined to allow the @action.invoke pattern, which is
|
@@ -17,6 +17,14 @@ class Puppet::Interface::ActionBuilder
|
|
17
17
|
new(face, name, &block).action
|
18
18
|
end
|
19
19
|
|
20
|
+
# Deprecates the action
|
21
|
+
# @return [void]
|
22
|
+
# @api private
|
23
|
+
# @dsl Faces
|
24
|
+
def deprecate
|
25
|
+
@action.deprecate
|
26
|
+
end
|
27
|
+
|
20
28
|
# Ideally the method we're defining here would be added to the action, and a
|
21
29
|
# method on the face would defer to it, but we can't get scope correct, so
|
22
30
|
# we stick with this. --daniel 2011-03-24
|
@@ -26,7 +26,7 @@ module Puppet::Interface::OptionManager
|
|
26
26
|
|
27
27
|
# @api private
|
28
28
|
def walk_inheritance_tree(start, sym)
|
29
|
-
result = (start
|
29
|
+
result = (start || [])
|
30
30
|
if self.is_a?(Class) and superclass.respond_to?(sym)
|
31
31
|
result = superclass.send(sym) + result
|
32
32
|
elsif self.class.respond_to?(sym)
|
data/lib/puppet/loaders.rb
CHANGED
@@ -13,12 +13,14 @@ module Puppet
|
|
13
13
|
require 'puppet/pops/loader/static_loader'
|
14
14
|
require 'puppet/pops/loader/runtime3_type_loader'
|
15
15
|
require 'puppet/pops/loader/ruby_function_instantiator'
|
16
|
+
require 'puppet/pops/loader/ruby_data_type_instantiator'
|
16
17
|
require 'puppet/pops/loader/puppet_function_instantiator'
|
17
18
|
require 'puppet/pops/loader/type_definition_instantiator'
|
18
19
|
require 'puppet/pops/loader/puppet_resource_type_impl_instantiator'
|
19
20
|
require 'puppet/pops/loader/loader_paths'
|
20
21
|
require 'puppet/pops/loader/simple_environment_loader'
|
21
22
|
require 'puppet/pops/loader/predefined_loader'
|
23
|
+
require 'puppet/pops/loader/puppet_plan_instantiator'
|
22
24
|
end
|
23
25
|
end
|
24
26
|
|
data/lib/puppet/module.rb
CHANGED
@@ -334,7 +334,7 @@ class Puppet::Module
|
|
334
334
|
def dependencies_as_modules
|
335
335
|
dependent_modules = []
|
336
336
|
dependencies and dependencies.each do |dep|
|
337
|
-
|
337
|
+
_, dep_name = dep["name"].split('/')
|
338
338
|
found_module = environment.module(dep_name)
|
339
339
|
dependent_modules << found_module if found_module
|
340
340
|
end
|
@@ -457,7 +457,11 @@ class Puppet::Module
|
|
457
457
|
|
458
458
|
def assert_validity
|
459
459
|
if !Puppet::Module.is_module_directory_name?(@name) && !Puppet::Module.is_module_namespaced_name?(@name)
|
460
|
-
raise InvalidName,
|
460
|
+
raise InvalidName, _(<<-ERROR_STRING).chomp % { name: @name }
|
461
|
+
Invalid module name '%{name}'; module names must match either:
|
462
|
+
An installed module name (ex. modulename) matching the expression /^[a-z][a-z0-9_]*$/ -or-
|
463
|
+
A namespaced module name (ex. author-modulename) matching the expression /^[a-zA-Z0-9]+[-][a-z][a-z0-9_]*$/
|
464
|
+
ERROR_STRING
|
461
465
|
end
|
462
466
|
end
|
463
467
|
end
|
@@ -2,6 +2,7 @@ require 'fileutils'
|
|
2
2
|
require 'json'
|
3
3
|
require 'puppet/file_system'
|
4
4
|
require 'pathspec'
|
5
|
+
require 'facter'
|
5
6
|
|
6
7
|
module Puppet::ModuleTool
|
7
8
|
module Applications
|
@@ -14,6 +15,9 @@ module Puppet::ModuleTool
|
|
14
15
|
end
|
15
16
|
|
16
17
|
def run
|
18
|
+
# Disallow anything that invokes md5 to avoid un-friendly termination due to FIPS
|
19
|
+
raise _("Module building is prohibited in FIPS mode.") if Facter.value(:fips_enabled)
|
20
|
+
|
17
21
|
load_metadata!
|
18
22
|
create_directory
|
19
23
|
copy_contents
|
@@ -52,6 +52,9 @@ module Puppet::ModuleTool
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def run
|
55
|
+
# Disallow anything that invokes md5 to avoid un-friendly termination due to FIPS
|
56
|
+
raise _("Module install is prohibited in FIPS mode.") if Facter.value(:fips_enabled)
|
57
|
+
|
55
58
|
name = @name.tr('/', '-')
|
56
59
|
version = options[:version] || '>= 0.0.0'
|
57
60
|
|
@@ -16,6 +16,9 @@ module Puppet::ModuleTool
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def run
|
19
|
+
# Disallow anything that invokes md5 to avoid un-friendly termination due to FIPS
|
20
|
+
raise _("Module uninstall is prohibited in FIPS mode.") if Facter.value(:fips_enabled)
|
21
|
+
|
19
22
|
results = {
|
20
23
|
:module_name => @name,
|
21
24
|
:requested_version => @version,
|
@@ -27,6 +27,9 @@ module Puppet::ModuleTool
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def run
|
30
|
+
# Disallow anything that invokes md5 to avoid un-friendly termination due to FIPS
|
31
|
+
raise _("Module upgrade is prohibited in FIPS mode.") if Facter.value(:fips_enabled)
|
32
|
+
|
30
33
|
name = @name.tr('/', '-')
|
31
34
|
version = options[:version] || '>= 0.0.0'
|
32
35
|
|
@@ -60,7 +60,7 @@ module Puppet::ModuleTool
|
|
60
60
|
name = mod.forge_name.tr('/', '-')
|
61
61
|
begin
|
62
62
|
version = SemanticPuppet::Version.parse(mod.version)
|
63
|
-
rescue SemanticPuppet::Version::ValidationFailure
|
63
|
+
rescue SemanticPuppet::Version::ValidationFailure
|
64
64
|
Puppet.warning _("%{module_name} (%{path}) has an invalid version number (%{version}). The version has been set to 0.0.0. If you are the maintainer for this module, please update the metadata.json with a valid Semantic Version (http://semver.org).") % { module_name: mod.name, path: mod.path, version: mod.version }
|
65
65
|
version = SemanticPuppet::Version.parse("0.0.0")
|
66
66
|
end
|
@@ -16,7 +16,7 @@ module Puppet
|
|
16
16
|
# is provided, then the authstore is considered local and defaults to "true".
|
17
17
|
def allowed?(name, ip)
|
18
18
|
if name or ip
|
19
|
-
# This is probably unnecessary, and can cause some
|
19
|
+
# This is probably unnecessary, and can cause some weirdness in
|
20
20
|
# cases where we're operating over localhost but don't have a real
|
21
21
|
# IP defined.
|
22
22
|
raise Puppet::DevError, _("Name and IP must be passed to 'allowed?'") unless name and ip
|
@@ -5,7 +5,6 @@ require 'puppet/ssl/validator'
|
|
5
5
|
require 'puppet/network/http'
|
6
6
|
require 'uri'
|
7
7
|
require 'date'
|
8
|
-
require 'time'
|
9
8
|
|
10
9
|
module Puppet::Network::HTTP
|
11
10
|
|
@@ -210,7 +209,7 @@ module Puppet::Network::HTTP
|
|
210
209
|
# it by sleeping for the indicated number of seconds. The response is
|
211
210
|
# returned unmodified if no Retry-After header is present.
|
212
211
|
#
|
213
|
-
# @param response [Net::HTTPResponse] A response
|
212
|
+
# @param response [Net::HTTPResponse] A response received from the
|
214
213
|
# HTTP client.
|
215
214
|
#
|
216
215
|
# @return [nil] Sleeps and returns nil if the response contained a
|
@@ -298,14 +297,7 @@ module Puppet::Network::HTTP
|
|
298
297
|
end
|
299
298
|
|
300
299
|
def execute_request(connection, request)
|
301
|
-
start = Time.now
|
302
300
|
connection.request(request)
|
303
|
-
rescue EOFError => e
|
304
|
-
elapsed = (Time.now - start).to_f.round(3)
|
305
|
-
uri = @site.addr + request.path.split('?')[0]
|
306
|
-
eof = EOFError.new(_('request %{uri} interrupted after %{elapsed} seconds') % {uri: uri, elapsed: elapsed})
|
307
|
-
eof.set_backtrace(e.backtrace) unless e.backtrace.empty?
|
308
|
-
raise eof
|
309
301
|
end
|
310
302
|
|
311
303
|
def with_connection(site, &block)
|
@@ -12,8 +12,6 @@ require 'puppet/util/http_proxy'
|
|
12
12
|
class Puppet::Network::HTTP::Factory
|
13
13
|
@@openssl_initialized = false
|
14
14
|
|
15
|
-
KEEP_ALIVE_TIMEOUT = 2**31 - 1
|
16
|
-
|
17
15
|
def initialize
|
18
16
|
# PUP-1411, make sure that openssl is initialized before we try to connect
|
19
17
|
if ! @@openssl_initialized
|
@@ -39,7 +37,6 @@ class Puppet::Network::HTTP::Factory
|
|
39
37
|
http.use_ssl = site.use_ssl?
|
40
38
|
http.read_timeout = Puppet[:http_read_timeout]
|
41
39
|
http.open_timeout = Puppet[:http_connect_timeout]
|
42
|
-
http.keep_alive_timeout = KEEP_ALIVE_TIMEOUT if http.respond_to?(:keep_alive_timeout=)
|
43
40
|
|
44
41
|
if Puppet[:sourceaddress]
|
45
42
|
if http.respond_to?(:local_host)
|
@@ -52,6 +52,7 @@ class Puppet::Network::HTTP::WEBrick
|
|
52
52
|
|
53
53
|
# @api private
|
54
54
|
def create_server(address, port)
|
55
|
+
address = nil if address == '*'
|
55
56
|
arguments = {:BindAddress => address, :Port => port, :DoNotReverseLookup => true}
|
56
57
|
arguments.merge!(setup_logger)
|
57
58
|
arguments.merge!(setup_ssl)
|
@@ -34,7 +34,7 @@ class Rights
|
|
34
34
|
|
35
35
|
def is_forbidden_and_why?(name, args = {})
|
36
36
|
res = :nomatch
|
37
|
-
|
37
|
+
@rights.find do |acl|
|
38
38
|
found = false
|
39
39
|
# an acl can return :dunno, which means "I'm not qualified to answer your question,
|
40
40
|
# please ask someone else". This is used when for instance an acl matches, but not for the
|
data/lib/puppet/node.rb
CHANGED
@@ -226,4 +226,57 @@ class Puppet::Node
|
|
226
226
|
Puppet.warning(_("Trusted node data modified for node %{name}") % { name: name }) unless @trusted_data.nil?
|
227
227
|
@trusted_data = data.freeze
|
228
228
|
end
|
229
|
+
|
230
|
+
# Resurrects and sanitizes trusted information in the node by modifying it and setting
|
231
|
+
# the trusted_data in the node from parameters.
|
232
|
+
# This modifies the node
|
233
|
+
#
|
234
|
+
def sanitize
|
235
|
+
# Resurrect "trusted information" that comes from node/fact terminus.
|
236
|
+
# The current way this is done in puppet db (currently the only one)
|
237
|
+
# is to store the node parameter 'trusted' as a hash of the trusted information.
|
238
|
+
#
|
239
|
+
# Thus here there are two main cases:
|
240
|
+
# 1. This terminus was used in a real agent call (only meaningful if someone curls the request as it would
|
241
|
+
# fail since the result is a hash of two catalogs).
|
242
|
+
# 2 It is a command line call with a given node that use a terminus that:
|
243
|
+
# 2.1 does not include a 'trusted' fact - use local from node trusted information
|
244
|
+
# 2.2 has a 'trusted' fact - this in turn could be
|
245
|
+
# 2.2.1 puppet db having stored trusted node data as a fact (not a great design)
|
246
|
+
# 2.2.2 some other terminus having stored a fact called "trusted" (most likely that would have failed earlier, but could
|
247
|
+
# be spoofed).
|
248
|
+
#
|
249
|
+
# For the reasons above, the resurrection of trusted node data with authenticated => true is only performed
|
250
|
+
# if user is running as root, else it is resurrected as unauthenticated.
|
251
|
+
#
|
252
|
+
trusted_param = @parameters['trusted']
|
253
|
+
if trusted_param
|
254
|
+
# Blows up if it is a parameter as it will be set as $trusted by the compiler as if it was a variable
|
255
|
+
@parameters.delete('trusted')
|
256
|
+
unless trusted_param.is_a?(Hash) && %w{authenticated certname extensions}.all? {|key| trusted_param.has_key?(key) }
|
257
|
+
# trusted is some kind of garbage, do not resurrect
|
258
|
+
trusted_param = nil
|
259
|
+
end
|
260
|
+
else
|
261
|
+
# trusted may be Boolean false if set as a fact by someone
|
262
|
+
trusted_param = nil
|
263
|
+
end
|
264
|
+
|
265
|
+
# The options for node.trusted_data in priority order are:
|
266
|
+
# 1) node came with trusted_data so use that
|
267
|
+
# 2) else if there is :trusted_information in the puppet context
|
268
|
+
# 3) else if the node provided a 'trusted' parameter (parsed out above)
|
269
|
+
# 4) last, fallback to local node trusted information
|
270
|
+
#
|
271
|
+
# Note that trusted_data should be a hash, but (2) and (4) are not
|
272
|
+
# hashes, so we to_h at the end
|
273
|
+
if !trusted_data
|
274
|
+
trusted = Puppet.lookup(:trusted_information) do
|
275
|
+
trusted_param || Puppet::Context::TrustedInformation.local(self)
|
276
|
+
end
|
277
|
+
|
278
|
+
# Ruby 1.9.3 can't apply to_h to a hash, so check first
|
279
|
+
self.trusted_data = (trusted.is_a?(Hash) ? trusted : trusted.to_h)
|
280
|
+
end
|
281
|
+
end
|
229
282
|
end
|
@@ -295,7 +295,7 @@ class Puppet::Node::Environment
|
|
295
295
|
# @param forge_name [String] The module name
|
296
296
|
# @return [Puppet::Module, nil] The module if found, else nil
|
297
297
|
def module_by_forge_name(forge_name)
|
298
|
-
|
298
|
+
_, modname = forge_name.split('/')
|
299
299
|
found_mod = self.module(modname)
|
300
300
|
found_mod and found_mod.forge_name == forge_name ?
|
301
301
|
found_mod :
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'puppet/coercion'
|
2
2
|
|
3
3
|
# This specialized {Puppet::Parameter} handles Boolean options, accepting lots
|
4
|
-
# of strings and symbols for both
|
4
|
+
# of strings and symbols for both truth and falsehood.
|
5
5
|
#
|
6
6
|
class Puppet::Parameter::Boolean < Puppet::Parameter
|
7
7
|
def unsafe_munge(value)
|
data/lib/puppet/parser.rb
CHANGED
@@ -0,0 +1,36 @@
|
|
1
|
+
|
2
|
+
module Puppet::Parser::AbstractCompiler
|
3
|
+
|
4
|
+
# Returns the catalog for a compilation. Must return a Puppet::Resource::Catalog or fail with an
|
5
|
+
# error if the specific compiler does not support catalog operations.
|
6
|
+
#
|
7
|
+
def catalog
|
8
|
+
raise Puppet::DevError("Class '#{self.class}' should have implemented 'catalog'")
|
9
|
+
end
|
10
|
+
|
11
|
+
# Returns the environment for the compilation
|
12
|
+
#
|
13
|
+
def environment
|
14
|
+
raise Puppet::DevError("Class '#{self.class}' should have implemented 'environment'")
|
15
|
+
end
|
16
|
+
|
17
|
+
# Produces a new scope
|
18
|
+
# This method is here if there are functions/logic that will call this for some other purpose than to create
|
19
|
+
# a named scope for a class. It may not have to be here. (TODO)
|
20
|
+
#
|
21
|
+
def newscope(scope, options)
|
22
|
+
raise Puppet::DevError("Class '#{self.class}' should have implemented 'newscope'")
|
23
|
+
end
|
24
|
+
|
25
|
+
# Returns a hash of all externally referenceable qualified variables
|
26
|
+
#
|
27
|
+
def qualified_variables
|
28
|
+
raise Puppet::DevError("Class '#{self.class}' should have implemented 'qualified_variables'")
|
29
|
+
end
|
30
|
+
|
31
|
+
# Returns the top scope instance
|
32
|
+
def topscope
|
33
|
+
raise Puppet::DevError("Class '#{self.class}' should have implemented 'topscope'")
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|