puppet 4.5.3-universal-darwin → 4.6.1-universal-darwin
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 +7 -0
- data/Gemfile +10 -1
- data/ext/debian/control +2 -4
- data/ext/project_data.yaml +4 -4
- data/install.rb +6 -2
- data/lib/puppet.rb +3 -1
- data/lib/puppet/agent/locker.rb +1 -1
- data/lib/puppet/application.rb +6 -4
- data/lib/puppet/application/agent.rb +2 -1
- data/lib/puppet/application/cert.rb +35 -2
- data/lib/puppet/application/device.rb +1 -1
- data/lib/puppet/application/generate.rb +5 -0
- data/lib/puppet/application/lookup.rb +3 -3
- data/lib/puppet/application_support.rb +1 -1
- data/lib/puppet/compilable_resource_type.rb +15 -0
- data/lib/puppet/configurer.rb +67 -10
- data/lib/puppet/configurer/plugin_handler.rb +2 -4
- data/lib/puppet/data_providers/hiera_config.rb +1 -1
- data/lib/puppet/defaults.rb +34 -7
- data/lib/puppet/environments.rb +4 -2
- data/lib/puppet/error.rb +1 -1
- data/lib/puppet/external/dot.rb +1 -1
- data/lib/puppet/face/ca.rb +4 -1
- data/lib/puppet/face/certificate.rb +7 -1
- data/lib/puppet/face/epp.rb +5 -5
- data/lib/puppet/face/generate.rb +64 -0
- data/lib/puppet/face/help.rb +19 -13
- data/lib/puppet/face/man.rb +1 -1
- data/lib/puppet/feature/external_facts.rb +1 -1
- data/lib/puppet/file_system.rb +16 -0
- data/lib/puppet/file_system/file_impl.rb +5 -0
- data/lib/puppet/file_system/memory_impl.rb +4 -0
- data/lib/puppet/file_system/path_pattern.rb +1 -0
- data/lib/puppet/file_system/windows.rb +19 -0
- data/lib/puppet/functions.rb +3 -5
- data/lib/puppet/functions/assert_type.rb +1 -1
- data/lib/puppet/functions/defined.rb +7 -5
- data/lib/puppet/functions/dig.rb +2 -18
- data/lib/puppet/functions/hiera.rb +1 -1
- data/lib/puppet/functions/lest.rb +1 -37
- data/lib/puppet/functions/new.rb +2 -473
- data/lib/puppet/functions/reverse_each.rb +2 -59
- data/lib/puppet/functions/scanf.rb +4 -4
- data/lib/puppet/functions/step.rb +1 -63
- data/lib/puppet/functions/then.rb +1 -61
- data/lib/puppet/functions/type.rb +1 -40
- data/lib/puppet/functions/unwrap.rb +40 -0
- data/lib/puppet/generate/models/type/property.rb +70 -0
- data/lib/puppet/generate/models/type/type.rb +57 -0
- data/lib/puppet/generate/templates/type/pcore.erb +41 -0
- data/lib/puppet/generate/type.rb +239 -0
- data/lib/puppet/graph/simple_graph.rb +2 -6
- data/lib/puppet/indirector/catalog/static_compiler.rb +5 -2
- data/lib/puppet/indirector/facts/facter.rb +1 -1
- data/lib/puppet/indirector/key/ca.rb +2 -2
- data/lib/puppet/indirector/request.rb +25 -4
- data/lib/puppet/indirector/rest.rb +73 -3
- data/lib/puppet/info_service/class_information_service.rb +1 -2
- data/lib/puppet/interface/documentation.rb +1 -1
- data/lib/puppet/loaders.rb +2 -0
- data/lib/puppet/metatype/manager.rb +6 -6
- data/lib/puppet/module.rb +8 -1
- data/lib/puppet/module_tool.rb +2 -2
- data/lib/puppet/module_tool/checksums.rb +1 -1
- data/lib/puppet/module_tool/errors/installer.rb +2 -2
- data/lib/puppet/module_tool/metadata.rb +1 -1
- data/lib/puppet/network/http/api/indirected_routes.rb +23 -32
- data/lib/puppet/network/http/rack/rest.rb +15 -1
- data/lib/puppet/network/rights.rb +1 -11
- data/lib/puppet/node/environment.rb +7 -3
- data/lib/puppet/node/facts.rb +1 -1
- data/lib/puppet/parameter.rb +23 -3
- data/lib/puppet/parameter/boolean.rb +1 -1
- data/lib/puppet/parameter/value.rb +1 -1
- data/lib/puppet/parser.rb +0 -1
- data/lib/puppet/parser/ast/pops_bridge.rb +1 -1
- data/lib/puppet/parser/ast/resource.rb +5 -0
- data/lib/puppet/parser/ast/resource_instance.rb +5 -1
- data/lib/puppet/parser/ast/resourceparam.rb +5 -0
- data/lib/puppet/parser/compiler.rb +14 -17
- data/lib/puppet/parser/compiler/catalog_validator/relationship_validator.rb +1 -1
- data/lib/puppet/parser/environment_compiler.rb +10 -0
- data/lib/puppet/parser/functions/create_resources.rb +39 -24
- data/lib/puppet/parser/functions/defined.rb +2 -26
- data/lib/puppet/parser/functions/dig.rb +29 -0
- data/lib/puppet/parser/functions/lest.rb +49 -0
- data/lib/puppet/parser/functions/new.rb +530 -0
- data/lib/puppet/parser/functions/require.rb +1 -1
- data/lib/puppet/parser/functions/reverse_each.rb +83 -0
- data/lib/puppet/parser/functions/scanf.rb +4 -4
- data/lib/puppet/parser/functions/step.rb +84 -0
- data/lib/puppet/parser/functions/then.rb +73 -0
- data/lib/puppet/parser/functions/type.rb +53 -0
- data/lib/puppet/parser/resource.rb +16 -7
- data/lib/puppet/parser/scope.rb +36 -28
- data/lib/puppet/parser/type_loader.rb +1 -1
- data/lib/puppet/plugins/data_providers/data_provider.rb +1 -1
- data/lib/puppet/pops.rb +13 -0
- data/lib/puppet/pops/adapters.rb +49 -49
- data/lib/puppet/pops/binder/scheme_handler/confdir_scheme.rb +1 -1
- data/lib/puppet/pops/evaluator/access_operator.rb +39 -2
- data/lib/puppet/pops/evaluator/closure.rb +39 -13
- data/lib/puppet/pops/evaluator/collector_transformer.rb +10 -1
- data/lib/puppet/pops/evaluator/evaluator_impl.rb +16 -11
- data/lib/puppet/pops/evaluator/external_syntax_support.rb +1 -1
- data/lib/puppet/pops/evaluator/json_strict_literal_evaluator.rb +0 -1
- data/lib/puppet/pops/evaluator/literal_evaluator.rb +0 -1
- data/lib/puppet/pops/evaluator/relationship_operator.rb +1 -2
- data/lib/puppet/pops/evaluator/runtime3_resource_support.rb +119 -0
- data/lib/puppet/pops/evaluator/runtime3_support.rb +19 -45
- data/lib/puppet/pops/functions/function.rb +5 -0
- data/lib/puppet/pops/issues.rb +1 -1
- data/lib/puppet/pops/label_provider.rb +2 -2
- data/lib/puppet/pops/loader/base_loader.rb +12 -15
- data/lib/puppet/pops/loader/loader.rb +15 -50
- data/lib/puppet/pops/loader/loader_paths.rb +28 -2
- data/lib/puppet/pops/loader/module_loaders.rb +16 -1
- data/lib/puppet/pops/loader/null_loader.rb +17 -1
- data/lib/puppet/pops/loader/puppet_function_instantiator.rb +12 -11
- data/lib/puppet/pops/loader/puppet_resource_type_impl_instantiator.rb +80 -0
- data/lib/puppet/pops/loader/ruby_function_instantiator.rb +2 -3
- data/lib/puppet/pops/loader/runtime3_type_loader.rb +52 -13
- data/lib/puppet/pops/loader/static_loader.rb +55 -0
- data/lib/puppet/pops/loader/type_definition_instantiator.rb +30 -14
- data/lib/puppet/pops/loader/typed_name.rb +50 -0
- data/lib/puppet/pops/loaders.rb +64 -19
- data/lib/puppet/pops/merge_strategy.rb +7 -7
- data/lib/puppet/pops/migration/migration_checker.rb +4 -0
- data/lib/puppet/pops/model/model_label_provider.rb +2 -0
- data/lib/puppet/pops/parser/egrammar.ra +8 -5
- data/lib/puppet/pops/parser/eparser.rb +1550 -1498
- data/lib/puppet/pops/parser/evaluating_parser.rb +1 -1
- data/lib/puppet/pops/parser/interpolation_support.rb +7 -0
- data/lib/puppet/pops/parser/lexer2.rb +14 -1
- data/lib/puppet/pops/parser/locator.rb +30 -1
- data/lib/puppet/pops/parser/parser_support.rb +0 -3
- data/lib/puppet/pops/parser/slurp_support.rb +3 -3
- data/lib/puppet/pops/patterns.rb +9 -1
- data/lib/puppet/pops/pcore.rb +67 -11
- data/lib/puppet/pops/puppet_stack.rb +43 -0
- data/lib/puppet/pops/resource/param.rb +51 -0
- data/lib/puppet/pops/resource/resource_type_impl.rb +301 -0
- data/lib/puppet/pops/resource/resource_type_set.pcore +21 -0
- data/lib/puppet/pops/serialization.rb +17 -0
- data/lib/puppet/pops/serialization/abstract_reader.rb +149 -0
- data/lib/puppet/pops/serialization/abstract_writer.rb +179 -0
- data/lib/puppet/pops/serialization/deserializer.rb +60 -0
- data/lib/puppet/pops/serialization/extension.rb +126 -0
- data/lib/puppet/pops/serialization/instance_reader.rb +19 -0
- data/lib/puppet/pops/serialization/instance_writer.rb +14 -0
- data/lib/puppet/pops/serialization/json.rb +247 -0
- data/lib/puppet/pops/serialization/object.rb +63 -0
- data/lib/puppet/pops/serialization/rgen.rb +151 -0
- data/lib/puppet/pops/serialization/serializer.rb +91 -0
- data/lib/puppet/pops/serialization/time_factory.rb +66 -0
- data/lib/puppet/pops/types/annotatable.rb +36 -0
- data/lib/puppet/pops/types/implementation_registry.rb +3 -8
- data/lib/puppet/pops/types/p_meta_type.rb +83 -0
- data/lib/puppet/pops/types/p_object_type.rb +110 -117
- data/lib/puppet/pops/types/p_runtime_type.rb +13 -0
- data/lib/puppet/pops/types/p_sem_ver_range_type.rb +23 -0
- data/lib/puppet/pops/types/p_sem_ver_type.rb +30 -2
- data/lib/puppet/pops/types/p_sensitive_type.rb +69 -0
- data/lib/puppet/pops/types/p_type_set_type.rb +361 -0
- data/lib/puppet/pops/types/puppet_object.rb +0 -5
- data/lib/puppet/pops/types/ruby_generator.rb +9 -2
- data/lib/puppet/pops/types/type_calculator.rb +6 -1
- data/lib/puppet/pops/types/type_factory.rb +14 -12
- data/lib/puppet/pops/types/type_formatter.rb +78 -33
- data/lib/puppet/pops/types/type_mismatch_describer.rb +0 -2
- data/lib/puppet/pops/types/type_parser.rb +27 -2
- data/lib/puppet/pops/types/type_set_reference.rb +59 -0
- data/lib/puppet/pops/types/types.rb +366 -13
- data/lib/puppet/pops/validation.rb +4 -4
- data/lib/puppet/pops/validation/checker4_0.rb +5 -2
- data/lib/puppet/pops/visitor.rb +2 -2
- data/lib/puppet/property.rb +64 -5
- data/lib/puppet/provider.rb +1 -1
- data/lib/puppet/provider/aixobject.rb +3 -3
- data/lib/puppet/provider/group/aix.rb +4 -4
- data/lib/puppet/provider/macauthorization/macauthorization.rb +1 -1
- data/lib/puppet/provider/mailalias/aliases.rb +1 -1
- data/lib/puppet/provider/mcx/mcxcontent.rb +2 -2
- data/lib/puppet/provider/mount/parsed.rb +1 -1
- data/lib/puppet/provider/nameservice/directoryservice.rb +5 -5
- data/lib/puppet/provider/package/appdmg.rb +3 -3
- data/lib/puppet/provider/package/apple.rb +1 -1
- data/lib/puppet/provider/package/dnf.rb +5 -0
- data/lib/puppet/provider/package/nim.rb +1 -1
- data/lib/puppet/provider/package/pacman.rb +2 -2
- data/lib/puppet/provider/package/pip.rb +5 -3
- data/lib/puppet/provider/package/pip3.rb +1 -1
- data/lib/puppet/provider/package/pkg.rb +5 -5
- data/lib/puppet/provider/package/pkgdmg.rb +4 -4
- data/lib/puppet/provider/package/pkgin.rb +1 -1
- data/lib/puppet/provider/package/pkgutil.rb +1 -1
- data/lib/puppet/provider/package/portage.rb +48 -8
- data/lib/puppet/provider/package/sun.rb +1 -1
- data/lib/puppet/provider/package/tdnf.rb +28 -0
- data/lib/puppet/provider/package/yum.rb +22 -4
- data/lib/puppet/provider/parsedfile.rb +2 -2
- data/lib/puppet/provider/service/base.rb +1 -1
- data/lib/puppet/provider/service/bsd.rb +1 -1
- data/lib/puppet/provider/service/daemontools.rb +2 -2
- data/lib/puppet/provider/service/debian.rb +3 -3
- data/lib/puppet/provider/service/init.rb +5 -3
- data/lib/puppet/provider/service/launchd.rb +16 -2
- data/lib/puppet/provider/service/runit.rb +1 -1
- data/lib/puppet/provider/service/smf.rb +8 -1
- data/lib/puppet/provider/service/systemd.rb +39 -6
- 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/directoryservice.rb +4 -3
- data/lib/puppet/provider/user/hpux.rb +1 -1
- data/lib/puppet/provider/user/user_role_add.rb +1 -1
- data/lib/puppet/provider/user/windows_adsi.rb +3 -0
- data/lib/puppet/provider/zfs/zfs.rb +1 -1
- data/lib/puppet/reference/type.rb +1 -1
- data/lib/puppet/resource.rb +33 -7
- data/lib/puppet/resource/capability_finder.rb +74 -54
- data/lib/puppet/resource/status.rb +11 -2
- data/lib/puppet/settings.rb +17 -6
- data/lib/puppet/settings/environment_conf.rb +1 -1
- data/lib/puppet/settings/server_list_setting.rb +20 -0
- data/lib/puppet/ssl/certificate_authority.rb +32 -9
- data/lib/puppet/ssl/certificate_authority/interface.rb +164 -24
- data/lib/puppet/ssl/host.rb +3 -3
- data/lib/puppet/ssl/oids.rb +10 -0
- data/lib/puppet/ssl/validator/default_validator.rb +2 -2
- data/lib/puppet/test/test_helper.rb +2 -2
- data/lib/puppet/transaction.rb +12 -0
- data/lib/puppet/transaction/additional_resource_generator.rb +1 -1
- data/lib/puppet/transaction/event.rb +29 -2
- data/lib/puppet/transaction/event_manager.rb +1 -1
- data/lib/puppet/transaction/persistence.rb +84 -0
- data/lib/puppet/transaction/report.rb +49 -2
- data/lib/puppet/transaction/resource_harness.rb +98 -18
- data/lib/puppet/type.rb +63 -21
- data/lib/puppet/type/augeas.rb +3 -3
- data/lib/puppet/type/cron.rb +1 -1
- data/lib/puppet/type/file.rb +39 -2
- data/lib/puppet/type/file/data_sync.rb +13 -5
- data/lib/puppet/type/host.rb +1 -1
- data/lib/puppet/type/mount.rb +2 -6
- data/lib/puppet/type/notify.rb +1 -1
- data/lib/puppet/type/package.rb +1 -1
- data/lib/puppet/type/resources.rb +1 -1
- data/lib/puppet/type/scheduled_task.rb +1 -1
- data/lib/puppet/type/ssh_authorized_key.rb +2 -2
- data/lib/puppet/type/tidy.rb +1 -1
- data/lib/puppet/type/yumrepo.rb +3 -3
- data/lib/puppet/type/zone.rb +1 -1
- data/lib/puppet/util.rb +2 -2
- data/lib/puppet/util/classgen.rb +1 -1
- data/lib/puppet/util/command_line.rb +6 -2
- data/lib/puppet/util/command_line/trollop.rb +1 -1
- data/lib/puppet/util/execution.rb +2 -2
- data/lib/puppet/util/http_proxy.rb +1 -1
- data/lib/puppet/util/inifile.rb +1 -1
- data/lib/puppet/util/instance_loader.rb +1 -1
- data/lib/puppet/util/logging.rb +1 -1
- data/lib/puppet/util/multi_match.rb +1 -1
- data/lib/puppet/util/plist.rb +15 -5
- data/lib/puppet/util/profiler.rb +1 -1
- data/lib/puppet/util/profiler/around_profiler.rb +1 -1
- data/lib/puppet/util/psych_support.rb +1 -1
- data/lib/puppet/util/rdoc.rb +2 -2
- data/lib/puppet/util/rubygems.rb +1 -1
- data/lib/puppet/util/watcher/periodic_watcher.rb +2 -2
- data/lib/puppet/util/windows/access_control_entry.rb +1 -1
- data/lib/puppet/util/windows/adsi.rb +30 -8
- data/lib/puppet/util/windows/api_types.rb +1 -1
- data/lib/puppet/util/windows/file.rb +59 -0
- data/lib/puppet/util/windows/process.rb +10 -0
- data/lib/puppet/util/windows/security.rb +1 -1
- data/lib/puppet/util/windows/user.rb +22 -4
- data/lib/puppet/util/yaml.rb +15 -3
- data/lib/puppet/vendor/deep_merge/test/test_deep_merge.rb +1 -1
- data/lib/puppet/vendor/rgen_patch.rb +1 -1
- data/lib/puppet/version.rb +2 -2
- data/spec/fixtures/unit/pops/loaders/loaders/no_modules/manifests/site.pp +10 -0
- data/spec/integration/agent/logging_spec.rb +15 -14
- data/spec/integration/application/apply_spec.rb +1 -0
- data/spec/integration/directory_environments_spec.rb +16 -0
- data/spec/integration/environments/settings_spec.rb +32 -4
- data/spec/integration/faces/documentation_spec.rb +1 -1
- data/spec/integration/network/http/api/indirected_routes_spec.rb +33 -0
- data/spec/integration/node/environment_spec.rb +21 -0
- data/spec/integration/parser/collection_spec.rb +10 -0
- data/spec/integration/parser/compiler_spec.rb +76 -840
- data/spec/integration/parser/functions/require_spec.rb +3 -3
- data/spec/integration/parser/parameter_defaults_spec.rb +6 -2
- data/spec/integration/parser/pcore_resource_spec.rb +208 -0
- data/spec/integration/parser/resource_expressions_spec.rb +4 -2
- data/spec/integration/provider/yumrepo_spec.rb +4 -1
- data/spec/integration/transaction/report_spec.rb +666 -0
- data/spec/integration/type/file_spec.rb +11 -12
- data/spec/integration/util/windows/adsi_spec.rb +99 -0
- data/spec/integration/util/windows/principal_spec.rb +109 -60
- data/spec/integration/util/windows/process_spec.rb +4 -2
- data/spec/integration/util/windows/security_spec.rb +34 -8
- data/spec/integration/util/windows/user_spec.rb +26 -4
- data/spec/lib/puppet_spec/files.rb +2 -2
- data/spec/lib/puppet_spec/network.rb +12 -8
- data/spec/shared_examples/rhel_package_provider.rb +341 -0
- data/spec/spec_helper.rb +8 -2
- data/spec/unit/application/cert_spec.rb +20 -0
- data/spec/unit/configurer/plugin_handler_spec.rb +0 -26
- data/spec/unit/configurer_spec.rb +46 -0
- data/spec/unit/defaults_spec.rb +14 -0
- data/spec/unit/face/generate_spec.rb +230 -0
- data/spec/unit/face/help_spec.rb +53 -0
- data/spec/unit/face/parser_spec.rb +6 -0
- data/spec/unit/face/plugin_spec.rb +0 -4
- data/spec/unit/file_system_spec.rb +85 -0
- data/spec/unit/functions/lookup_spec.rb +4 -4
- data/spec/unit/functions/match_spec.rb +2 -2
- data/spec/unit/functions/regsubst_spec.rb +1 -1
- data/spec/unit/functions/split_spec.rb +1 -1
- data/spec/unit/functions/unwrap_spec.rb +29 -0
- data/spec/unit/functions/versioncmp_spec.rb +1 -1
- data/spec/unit/functions4_spec.rb +8 -8
- data/spec/unit/indirector/facts/facter_spec.rb +1 -9
- data/spec/unit/indirector/rest_spec.rb +95 -9
- data/spec/unit/module_spec.rb +43 -7
- data/spec/unit/module_tool/applications/installer_spec.rb +10 -1
- data/spec/unit/module_tool/applications/unpacker_spec.rb +2 -1
- data/spec/unit/module_tool/applications/upgrader_spec.rb +8 -0
- data/spec/unit/module_tool/tar/mini_spec.rb +3 -3
- data/spec/unit/network/http/api/indirected_routes_spec.rb +49 -58
- data/spec/unit/network/http/api/master/v3_spec.rb +7 -4
- data/spec/unit/network/rights_spec.rb +1 -1
- data/spec/unit/parameter_spec.rb +11 -0
- data/spec/unit/parser/compiler_spec.rb +19 -33
- data/spec/unit/{appmgmt_spec.rb → parser/environment_compiler_spec.rb} +12 -1
- data/spec/unit/parser/functions/create_resources_spec.rb +76 -4
- data/spec/unit/parser/functions/require_spec.rb +2 -2
- data/spec/unit/parser/resource_spec.rb +21 -11
- data/spec/unit/parser/scope_spec.rb +1 -5
- data/spec/unit/pops/evaluator/evaluating_parser_spec.rb +1 -1
- data/spec/unit/pops/loaders/dependency_loader_spec.rb +1 -1
- data/spec/unit/pops/loaders/loader_paths_spec.rb +1 -1
- data/spec/unit/pops/loaders/loaders_spec.rb +63 -5
- data/spec/unit/pops/loaders/module_loaders_spec.rb +2 -2
- data/spec/unit/pops/loaders/static_loader_spec.rb +1 -1
- data/spec/unit/pops/parser/lexer2_spec.rb +27 -3
- data/spec/unit/pops/parser/parse_basic_expressions_spec.rb +8 -0
- data/spec/unit/pops/parser/parse_calls_spec.rb +9 -0
- data/spec/unit/pops/puppet_stack_spec.rb +79 -0
- data/spec/unit/pops/resource/resource_type_impl_spec.rb +37 -0
- data/spec/unit/pops/serialization/packer_spec.rb +153 -0
- data/spec/unit/pops/serialization/rgen_spec.rb +88 -0
- data/spec/unit/pops/serialization/serialization_spec.rb +228 -0
- data/spec/unit/pops/types/p_object_type_spec.rb +44 -2
- data/spec/unit/pops/types/p_sem_ver_type_spec.rb +42 -0
- data/spec/unit/pops/types/p_sensitive_type_spec.rb +139 -0
- data/spec/unit/pops/types/p_type_set_type_spec.rb +424 -0
- data/spec/unit/pops/types/ruby_generator_spec.rb +497 -181
- data/spec/unit/pops/types/type_calculator_spec.rb +10 -4
- data/spec/unit/pops/types/type_formatter_spec.rb +1 -1
- data/spec/unit/pops/types/type_mismatch_describer_spec.rb +2 -2
- data/spec/unit/pops/types/type_parser_spec.rb +1 -1
- data/spec/unit/pops/types/types_spec.rb +1 -1
- data/spec/unit/pops/validator/validator_spec.rb +18 -1
- data/spec/unit/property_spec.rb +48 -11
- data/spec/unit/provider/group/windows_adsi_spec.rb +11 -1
- data/spec/unit/provider/package/dnf_spec.rb +1 -99
- data/spec/unit/provider/package/pacman_spec.rb +4 -4
- data/spec/unit/provider/package/pip_spec.rb +14 -0
- data/spec/unit/provider/package/pkg_spec.rb +6 -0
- data/spec/unit/provider/package/pkgdmg_spec.rb +0 -3
- data/spec/unit/provider/package/portage_spec.rb +64 -8
- data/spec/unit/provider/package/tdnf_spec.rb +18 -0
- data/spec/unit/provider/package/windows/package_spec.rb +4 -1
- data/spec/unit/provider/package/windows_spec.rb +8 -2
- data/spec/unit/provider/package/yum_spec.rb +6 -377
- data/spec/unit/provider/service/base_spec.rb +6 -0
- data/spec/unit/provider/service/debian_spec.rb +16 -7
- data/spec/unit/provider/service/gentoo_spec.rb +6 -0
- data/spec/unit/provider/service/init_spec.rb +7 -0
- data/spec/unit/provider/service/launchd_spec.rb +35 -4
- data/spec/unit/provider/service/openrc_spec.rb +6 -0
- data/spec/unit/provider/service/smf_spec.rb +31 -6
- data/spec/unit/provider/service/src_spec.rb +6 -0
- data/spec/unit/provider/service/systemd_spec.rb +70 -20
- data/spec/unit/provider/service/upstart_spec.rb +6 -0
- data/spec/unit/provider/user/aix_spec.rb +7 -0
- data/spec/unit/provider/user/directoryservice_spec.rb +30 -1
- data/spec/unit/provider/user/windows_adsi_spec.rb +19 -0
- data/spec/unit/resource/capability_finder_spec.rb +51 -3
- data/spec/unit/resource/catalog_spec.rb +5 -0
- data/spec/unit/resource/type_spec.rb +2 -2
- data/spec/unit/resource_spec.rb +19 -0
- data/spec/unit/settings_spec.rb +13 -0
- data/spec/unit/ssl/certificate_authority/interface_spec.rb +176 -10
- data/spec/unit/ssl/certificate_authority_spec.rb +63 -22
- data/spec/unit/ssl/host_spec.rb +1 -1
- data/spec/unit/ssl/oids_spec.rb +24 -21
- data/spec/unit/transaction/event_spec.rb +3 -1
- data/spec/unit/transaction/persistence_spec.rb +173 -0
- data/spec/unit/transaction/report_spec.rb +64 -1
- data/spec/unit/transaction/resource_harness_spec.rb +91 -0
- data/spec/unit/type/file/content_spec.rb +47 -15
- data/spec/unit/type/file_spec.rb +28 -0
- data/spec/unit/type/mount_spec.rb +5 -12
- data/spec/unit/type/yumrepo_spec.rb +1 -5
- data/spec/unit/type_spec.rb +32 -0
- data/spec/unit/util/command_line_spec.rb +11 -0
- data/spec/unit/util/execution_spec.rb +1 -1
- data/spec/unit/util/plist_spec.rb +16 -3
- data/spec/unit/util/storage_spec.rb +4 -1
- data/spec/unit/util/windows/adsi_spec.rb +23 -2
- data/spec/unit/util/windows/file_spec.rb +56 -1
- data/spec/unit/util/windows/sid_spec.rb +31 -7
- data/spec/unit/util/yaml_spec.rb +12 -0
- data/spec/unit/util_spec.rb +87 -20
- metadata +89 -34
- data/ext/puppetlisten/puppetlisten.rb +0 -77
- data/ext/puppetlisten/puppetrun.rb +0 -38
- data/lib/puppet/resource/type_collection_helper.rb +0 -7
- data/spec/unit/parser/functions/defined_spec.rb +0 -120
- data/spec/unit/resource/type_collection_helper_spec.rb +0 -24
@@ -36,8 +36,7 @@ class Puppet::InfoService::ClassInformationService
|
|
36
36
|
private
|
37
37
|
|
38
38
|
def type_parser
|
39
|
-
|
40
|
-
@@type_parser ||= Puppet::Pops::Types::TypeParser.new
|
39
|
+
Puppet::Pops::Types::TypeParser.singleton
|
41
40
|
end
|
42
41
|
|
43
42
|
def literal_evaluator
|
@@ -29,7 +29,7 @@ class Puppet::Interface
|
|
29
29
|
# We use module_eval, which I don't like much, because we can't have an
|
30
30
|
# argument to a block with a default value in Ruby 1.8, and I don't like
|
31
31
|
# the side-effects (eg: no argument count validation) of using blocks
|
32
|
-
# without as
|
32
|
+
# without as methods. When we are 1.9 only (hah!) you can totally
|
33
33
|
# replace this with some up-and-up define_method. --daniel 2011-04-29
|
34
34
|
module_eval(<<-EOT, __FILE__, __LINE__ + 1)
|
35
35
|
def #{name}(value = nil)
|
data/lib/puppet/loaders.rb
CHANGED
@@ -3,6 +3,7 @@ module Puppet
|
|
3
3
|
require 'puppet/pops/loaders'
|
4
4
|
|
5
5
|
module Loader
|
6
|
+
require 'puppet/pops/loader/typed_name'
|
6
7
|
require 'puppet/pops/loader/loader'
|
7
8
|
require 'puppet/pops/loader/base_loader'
|
8
9
|
require 'puppet/pops/loader/gem_support'
|
@@ -14,6 +15,7 @@ module Puppet
|
|
14
15
|
require 'puppet/pops/loader/ruby_function_instantiator'
|
15
16
|
require 'puppet/pops/loader/puppet_function_instantiator'
|
16
17
|
require 'puppet/pops/loader/type_definition_instantiator'
|
18
|
+
require 'puppet/pops/loader/puppet_resource_type_impl_instantiator'
|
17
19
|
require 'puppet/pops/loader/loader_paths'
|
18
20
|
require 'puppet/pops/loader/simple_environment_loader'
|
19
21
|
require 'puppet/pops/loader/predefined_loader'
|
@@ -183,13 +183,13 @@ module Manager
|
|
183
183
|
# Defaults to an instance of {Puppet::Util::Autoload} if no other auto loader has been set.
|
184
184
|
# @return [Puppet::Util::Autoload] the loader to use.
|
185
185
|
# @api private
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
end
|
190
|
-
|
191
|
-
@typeloader
|
186
|
+
def typeloader
|
187
|
+
unless defined?(@typeloader)
|
188
|
+
@typeloader = Puppet::Util::Autoload.new(self, "puppet/type")
|
192
189
|
end
|
190
|
+
|
191
|
+
@typeloader
|
192
|
+
end
|
193
193
|
end
|
194
194
|
end
|
195
195
|
|
data/lib/puppet/module.rb
CHANGED
@@ -10,6 +10,7 @@ class Puppet::Module
|
|
10
10
|
class UnsupportedPlatform < Error; end
|
11
11
|
class IncompatiblePlatform < Error; end
|
12
12
|
class MissingMetadata < Error; end
|
13
|
+
class FaultyMetadata < Error; end
|
13
14
|
class InvalidName < Error; end
|
14
15
|
class InvalidFilePattern < Error; end
|
15
16
|
|
@@ -92,7 +93,13 @@ class Puppet::Module
|
|
92
93
|
begin
|
93
94
|
metadata = JSON.parse(File.read(metadata_file, :encoding => 'utf-8'))
|
94
95
|
rescue JSON::JSONError => e
|
95
|
-
|
96
|
+
msg = "#{name} has an invalid and unparsable metadata.json file. The parse error: #{e.message}"
|
97
|
+
case Puppet[:strict]
|
98
|
+
when :off, :warning
|
99
|
+
Puppet.warning(msg)
|
100
|
+
when :error
|
101
|
+
raise FaultyMetadata, msg
|
102
|
+
end
|
96
103
|
return false
|
97
104
|
end
|
98
105
|
|
data/lib/puppet/module_tool.rb
CHANGED
@@ -149,7 +149,7 @@ module Puppet
|
|
149
149
|
options[:environment]
|
150
150
|
elsif options[:environment]
|
151
151
|
# This use of looking up an environment is correct since it honours
|
152
|
-
# a
|
152
|
+
# a request to get a particular environment via environment name.
|
153
153
|
Puppet.lookup(:environments).get!(options[:environment])
|
154
154
|
else
|
155
155
|
Puppet.lookup(:current_environment)
|
@@ -162,7 +162,7 @@ module Puppet
|
|
162
162
|
# @param where [String] a description of the thing we're parsing the
|
163
163
|
# dependency expression for
|
164
164
|
# @param dep [Hash] the dependency description to parse
|
165
|
-
# @return [Array(String, Semantic::VersionRange, String)]
|
165
|
+
# @return [Array(String, Semantic::VersionRange, String)] a tuple of the
|
166
166
|
# dependent module's name, the version range dependency, and the
|
167
167
|
# unparsed range expression.
|
168
168
|
def self.parse_module_dependency(where, dep)
|
@@ -5,7 +5,7 @@ module Puppet::ModuleTool
|
|
5
5
|
|
6
6
|
# = Checksums
|
7
7
|
#
|
8
|
-
# This class
|
8
|
+
# This class provides methods for generating checksums for data and adding
|
9
9
|
# them to +Metadata+.
|
10
10
|
class Checksums
|
11
11
|
include Puppet::Network::FormatSupport
|
@@ -81,12 +81,12 @@ Could not install module '#{@requested_module}' (#{@requested_version})
|
|
81
81
|
def initialize(options)
|
82
82
|
@entry_path = options[:entry_path]
|
83
83
|
@directory = options[:directory]
|
84
|
-
super "Attempt to install file into #{@entry_path.inspect} under #{@directory.inspect}"
|
84
|
+
super "Attempt to install file with an invalid path into #{@entry_path.inspect} under #{@directory.inspect}"
|
85
85
|
end
|
86
86
|
|
87
87
|
def multiline
|
88
88
|
<<-MSG.strip
|
89
|
-
Could not install package
|
89
|
+
Could not install package with an invalid path.
|
90
90
|
Package attempted to install file into
|
91
91
|
#{@entry_path.inspect} under #{@directory.inspect}.
|
92
92
|
MSG
|
@@ -79,7 +79,7 @@ module Puppet::ModuleTool
|
|
79
79
|
|
80
80
|
# Provides an accessor for the now defunct 'description' property. This
|
81
81
|
# addresses a regression in Puppet 3.6.x where previously valid templates
|
82
|
-
#
|
82
|
+
# referring to the 'description' property were broken.
|
83
83
|
# @deprecated
|
84
84
|
def description
|
85
85
|
@data['description']
|
@@ -47,10 +47,6 @@ class Puppet::Network::HTTP::API::IndirectedRoutes
|
|
47
47
|
Puppet.override(:trusted_information => trusted) do
|
48
48
|
send("do_#{method}", indirection, key, params, request, response)
|
49
49
|
end
|
50
|
-
rescue Puppet::Network::HTTP::Error::HTTPError => e
|
51
|
-
return do_http_control_exception(response, e)
|
52
|
-
rescue StandardError => e
|
53
|
-
return do_exception(response, e)
|
54
50
|
end
|
55
51
|
|
56
52
|
def uri2indirection(http_method, uri, params)
|
@@ -60,7 +56,8 @@ class Puppet::Network::HTTP::API::IndirectedRoutes
|
|
60
56
|
environment = params.delete(:environment)
|
61
57
|
|
62
58
|
if indirection_name !~ /^\w+$/
|
63
|
-
raise
|
59
|
+
raise Puppet::Network::HTTP::Error::HTTPBadRequestError.new(
|
60
|
+
"The indirection name must be purely alphanumeric, not '#{indirection_name}'")
|
64
61
|
end
|
65
62
|
|
66
63
|
# this also depluralizes the indirection_name if it is a search
|
@@ -69,21 +66,25 @@ class Puppet::Network::HTTP::API::IndirectedRoutes
|
|
69
66
|
# check whether this indirection matches the prefix and version in the
|
70
67
|
# request
|
71
68
|
if url_prefix != IndirectionType.url_prefix_for(indirection_name)
|
72
|
-
raise
|
69
|
+
raise Puppet::Network::HTTP::Error::HTTPBadRequestError.new(
|
70
|
+
"Indirection '#{indirection_name}' does not match url prefix '#{url_prefix}'")
|
73
71
|
end
|
74
72
|
|
75
73
|
indirection = Puppet::Indirector::Indirection.instance(indirection_name.to_sym)
|
76
74
|
if !indirection
|
77
75
|
raise Puppet::Network::HTTP::Error::HTTPNotFoundError.new(
|
78
|
-
"Could not find indirection '#{indirection_name}'",
|
76
|
+
"Could not find indirection '#{indirection_name}'",
|
77
|
+
Puppet::Network::HTTP::Issues::HANDLER_NOT_FOUND)
|
79
78
|
end
|
80
79
|
|
81
80
|
if !environment
|
82
|
-
raise
|
81
|
+
raise Puppet::Network::HTTP::Error::HTTPBadRequestError.new(
|
82
|
+
"An environment parameter must be specified")
|
83
83
|
end
|
84
84
|
|
85
85
|
if ! Puppet::Node::Environment.valid_name?(environment)
|
86
|
-
raise
|
86
|
+
raise Puppet::Network::HTTP::Error::HTTPBadRequestError.new(
|
87
|
+
"The environment must be purely alphanumeric, not '#{environment}'")
|
87
88
|
end
|
88
89
|
|
89
90
|
configured_environment = Puppet.lookup(:environments).get(environment)
|
@@ -92,16 +93,22 @@ class Puppet::Network::HTTP::API::IndirectedRoutes
|
|
92
93
|
params[:environment] = configured_environment
|
93
94
|
end
|
94
95
|
|
95
|
-
|
96
|
+
begin
|
97
|
+
check_authorization(method, "#{url_prefix}/#{indirection_name}/#{key}", params)
|
98
|
+
rescue Puppet::Network::AuthorizationError => e
|
99
|
+
raise Puppet::Network::HTTP::Error::HTTPNotAuthorizedError.new(e.message)
|
100
|
+
end
|
96
101
|
|
97
102
|
if configured_environment.nil?
|
98
|
-
raise
|
103
|
+
raise Puppet::Network::HTTP::Error::HTTPNotFoundError.new(
|
104
|
+
"Could not find environment '#{environment}'")
|
99
105
|
end
|
100
106
|
|
101
107
|
params.delete(:bucket_path)
|
102
108
|
|
103
109
|
if key == "" or key.nil?
|
104
|
-
raise
|
110
|
+
raise Puppet::Network::HTTP::Error::HTTPBadRequestError.new(
|
111
|
+
"No request key specified in #{uri}")
|
105
112
|
end
|
106
113
|
|
107
114
|
[indirection, method, key, params]
|
@@ -109,24 +116,6 @@ class Puppet::Network::HTTP::API::IndirectedRoutes
|
|
109
116
|
|
110
117
|
private
|
111
118
|
|
112
|
-
def do_http_control_exception(response, exception)
|
113
|
-
msg = exception.message
|
114
|
-
Puppet.info(msg)
|
115
|
-
response.respond_with(exception.status, "text/plain", msg)
|
116
|
-
end
|
117
|
-
|
118
|
-
def do_exception(response, exception, status=400)
|
119
|
-
if exception.is_a?(Puppet::Network::AuthorizationError)
|
120
|
-
# make sure we return the correct status code
|
121
|
-
# for authorization issues
|
122
|
-
status = 403 if status == 400
|
123
|
-
end
|
124
|
-
|
125
|
-
Puppet.log_exception(exception)
|
126
|
-
|
127
|
-
response.respond_with(status, "text/plain", exception.to_s)
|
128
|
-
end
|
129
|
-
|
130
119
|
# Execute our find.
|
131
120
|
def do_find(indirection, key, params, request, response)
|
132
121
|
unless result = indirection.find(key, params)
|
@@ -207,10 +196,12 @@ class Puppet::Network::HTTP::API::IndirectedRoutes
|
|
207
196
|
end
|
208
197
|
|
209
198
|
def indirection_method(http_method, indirection)
|
210
|
-
raise
|
199
|
+
raise Puppet::Network::HTTP::Error::HTTPMethodNotAllowedError.new(
|
200
|
+
"No support for http method #{http_method}") unless METHOD_MAP[http_method]
|
211
201
|
|
212
202
|
unless method = METHOD_MAP[http_method][plurality(indirection)]
|
213
|
-
raise
|
203
|
+
raise Puppet::Network::HTTP::Error::HTTPBadRequestError.new(
|
204
|
+
"No support for plurality #{plurality(indirection)} for #{http_method} operations")
|
214
205
|
end
|
215
206
|
|
216
207
|
method
|
@@ -103,7 +103,21 @@ class Puppet::Network::HTTP::RackREST
|
|
103
103
|
# NOTE: The SSL_CLIENT_CERT environment variable will be the empty string
|
104
104
|
# when Puppet agent nodes have not yet obtained a signed certificate.
|
105
105
|
if cert.nil? || cert.empty?
|
106
|
-
|
106
|
+
# When running with unicorn, the SSL_CLIENT_CERT variable is not available
|
107
|
+
# in the environment, therefore we have to pass a header: 'X-SSL-Client-Cert'
|
108
|
+
cert = request.env['HTTP_X_SSL_CLIENT_CERT']
|
109
|
+
if cert.nil? || cert.empty?
|
110
|
+
nil
|
111
|
+
else
|
112
|
+
# in contrast to the environment variable, the client cert is passed in
|
113
|
+
# as single string, therefore restore the certificate to a valid pem
|
114
|
+
# encoded certificate
|
115
|
+
cert.gsub!(/ /, "\n")
|
116
|
+
cert.gsub!(/BEGIN\nCERT/, "BEGIN CERT")
|
117
|
+
cert.gsub!(/END\nCERT/, "END CERT")
|
118
|
+
cert = Puppet::SSL::Certificate.from_instance(OpenSSL::X509::Certificate.new(cert))
|
119
|
+
cert
|
120
|
+
end
|
107
121
|
else
|
108
122
|
Puppet::SSL::Certificate.from_instance(OpenSSL::X509::Certificate.new(cert))
|
109
123
|
end
|
@@ -53,17 +53,7 @@ class Rights
|
|
53
53
|
|
54
54
|
# if we end up here, then that means we either didn't match or failed, in any
|
55
55
|
# case will return an error to the outside world
|
56
|
-
|
57
|
-
|
58
|
-
msg = "#{host_description} access to #{name} [#{args[:method]}]"
|
59
|
-
|
60
|
-
if args[:authenticated]
|
61
|
-
msg += " authenticated "
|
62
|
-
end
|
63
|
-
|
64
|
-
if right
|
65
|
-
msg += " at #{right.file}:#{right.line}"
|
66
|
-
end
|
56
|
+
msg = "#{name} [#{args[:method]}]"
|
67
57
|
|
68
58
|
AuthorizationError.new("Forbidden request: #{msg}")
|
69
59
|
end
|
@@ -48,7 +48,7 @@ class Puppet::Node::Environment
|
|
48
48
|
obj.send(:initialize,
|
49
49
|
name.intern,
|
50
50
|
expand_dirs(extralibs() + modulepath),
|
51
|
-
manifest == NO_MANIFEST ? manifest :
|
51
|
+
manifest == NO_MANIFEST ? manifest : Puppet::FileSystem.expand_path(manifest),
|
52
52
|
config_version)
|
53
53
|
obj
|
54
54
|
end
|
@@ -166,6 +166,10 @@ class Puppet::Node::Environment
|
|
166
166
|
# (optional)
|
167
167
|
attr_reader :config_version
|
168
168
|
|
169
|
+
# Cached loaders - management of value handled by Puppet::Pops::Loaders
|
170
|
+
# @api private
|
171
|
+
attr_accessor :loaders
|
172
|
+
|
169
173
|
# Checks to make sure that this environment did not have a manifest set in
|
170
174
|
# its original environment.conf if Puppet is configured with
|
171
175
|
# +disable_per_environment_manifest+ set true. If it did, the environment's
|
@@ -467,7 +471,7 @@ class Puppet::Node::Environment
|
|
467
471
|
|
468
472
|
def self.expand_dirs(dirs)
|
469
473
|
dirs.collect do |dir|
|
470
|
-
|
474
|
+
Puppet::FileSystem.expand_path(dir)
|
471
475
|
end
|
472
476
|
end
|
473
477
|
|
@@ -521,7 +525,7 @@ class Puppet::Node::Environment
|
|
521
525
|
raise error
|
522
526
|
end
|
523
527
|
|
524
|
-
# Return an empty
|
528
|
+
# Return an empty top-level hostclass to indicate that no file was loaded
|
525
529
|
#
|
526
530
|
# @return [Puppet::Parser::AST::Hostclass]
|
527
531
|
def empty_parse_result
|
data/lib/puppet/node/facts.rb
CHANGED
@@ -59,7 +59,7 @@ class Puppet::Node::Facts
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
-
# Sanitize fact values by converting everything not a string,
|
62
|
+
# Sanitize fact values by converting everything not a string, Boolean
|
63
63
|
# numeric, array or hash into strings.
|
64
64
|
def sanitize
|
65
65
|
values.each do |fact, value|
|
data/lib/puppet/parameter.rb
CHANGED
@@ -295,6 +295,10 @@ class Puppet::Parameter
|
|
295
295
|
#
|
296
296
|
attr_accessor :parent
|
297
297
|
|
298
|
+
# @!attribute [rw] sensitive
|
299
|
+
# @return [true, false] If this parameter has been tagged as sensitive.
|
300
|
+
attr_accessor :sensitive
|
301
|
+
|
298
302
|
# Returns a string representation of the resource's containment path in
|
299
303
|
# the catalog.
|
300
304
|
# @return [String]
|
@@ -376,7 +380,7 @@ class Puppet::Parameter
|
|
376
380
|
tmp
|
377
381
|
end
|
378
382
|
|
379
|
-
# Returns an array of strings representing the containment
|
383
|
+
# Returns an array of strings representing the containment hierarchy
|
380
384
|
# (types/classes) that make up the path to the resource from the root
|
381
385
|
# of the catalog. This is mostly used for logging purposes.
|
382
386
|
#
|
@@ -479,7 +483,7 @@ class Puppet::Parameter
|
|
479
483
|
# calls both validate and munge on the given value, so no late binding.
|
480
484
|
#
|
481
485
|
# The given value is validated and then munged (if munging has been specified). The result is store
|
482
|
-
# as the value of this
|
486
|
+
# as the value of this parameter.
|
483
487
|
# @return [Object] The given `value` after munging.
|
484
488
|
# @raise (see #validate)
|
485
489
|
#
|
@@ -501,7 +505,7 @@ class Puppet::Parameter
|
|
501
505
|
|
502
506
|
# @return [Array<Symbol>] Returns an array of the associated resource's symbolic tags (including the parameter itself).
|
503
507
|
# Returns an array of the associated resource's symbolic tags (including the parameter itself).
|
504
|
-
# At a
|
508
|
+
# At a minimum, the array contains the name of the parameter. If the associated resource
|
505
509
|
# has tags, these tags are also included in the array.
|
506
510
|
# @todo The original comment says = _"The properties need to return tags so that logs correctly
|
507
511
|
# collect them."_ what if anything of that is of interest to document. Should tags and their relationship
|
@@ -522,6 +526,22 @@ class Puppet::Parameter
|
|
522
526
|
name.to_s
|
523
527
|
end
|
524
528
|
|
529
|
+
# Formats the given string and conditionally redacts the provided interpolation variables, depending on if
|
530
|
+
# this property is sensitive.
|
531
|
+
#
|
532
|
+
# @note Because the default implementation of Puppet::Property#is_to_s returns the current value as-is, it
|
533
|
+
# doesn't necessarily return a string. For the sake of sanity we just cast everything to a string for
|
534
|
+
# interpolation so we don't introduce issues with unexpected property values.
|
535
|
+
#
|
536
|
+
# @see String#format
|
537
|
+
# @param fmt [String] The format string to interpolate.
|
538
|
+
# @param args [Array<String>] One or more strings to conditionally redact and interpolate into the format string.
|
539
|
+
#
|
540
|
+
# @return [String]
|
541
|
+
def format(fmt, *args)
|
542
|
+
fmt % args.map { |arg| @sensitive ? "[redacted]" : arg.to_s }
|
543
|
+
end
|
544
|
+
|
525
545
|
# Produces a String with the value formatted for display to a human.
|
526
546
|
# When the parameter value is a:
|
527
547
|
#
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'puppet/coercion'
|
2
2
|
|
3
|
-
# This specialized {Puppet::Parameter} handles
|
3
|
+
# This specialized {Puppet::Parameter} handles Boolean options, accepting lots
|
4
4
|
# of strings and symbols for both truthiness and falsehood.
|
5
5
|
#
|
6
6
|
class Puppet::Parameter::Boolean < Puppet::Parameter
|
@@ -11,7 +11,7 @@ class Puppet::Parameter::Value
|
|
11
11
|
|
12
12
|
# Adds an alias for this value.
|
13
13
|
# Makes the given _name_ be an alias for this acceptable value.
|
14
|
-
# @param name [Symbol] the
|
14
|
+
# @param name [Symbol] the additional alias this value should be known as
|
15
15
|
# @api private
|
16
16
|
#
|
17
17
|
def alias(name)
|
data/lib/puppet/parser.rb
CHANGED
@@ -278,7 +278,7 @@ class Puppet::Parser::AST::PopsBridge
|
|
278
278
|
#
|
279
279
|
def instantiate_TypeMapping(type_mapping, modname)
|
280
280
|
loader = Puppet::Pops::Loaders.find_loader(modname)
|
281
|
-
tf = Puppet::Pops::Types::TypeParser.
|
281
|
+
tf = Puppet::Pops::Types::TypeParser.singleton
|
282
282
|
lhs = tf.interpret(type_mapping.type_expr, loader)
|
283
283
|
rhs = tf.interpret_any(type_mapping.mapping_expr, loader)
|
284
284
|
Puppet::Pops::Loaders.implementation_registry.register_type_mapping(lhs, rhs, loader)
|
@@ -5,6 +5,11 @@ class Puppet::Parser::AST::Resource < Puppet::Parser::AST::Branch
|
|
5
5
|
|
6
6
|
attr_accessor :type, :instances, :exported, :virtual
|
7
7
|
|
8
|
+
def initialize(argshash)
|
9
|
+
Puppet.warn_once('deprecation', 'AST::Resource', 'Use of Puppet::Parser::AST::Resource is deprecated and not fully functional')
|
10
|
+
super(argshash)
|
11
|
+
end
|
12
|
+
|
8
13
|
# Evaluates resources by adding them to the compiler for lazy evaluation
|
9
14
|
# and returning the produced resource references.
|
10
15
|
#
|