puppet-retrospec 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.gitlab-ci.yml +8 -8
- data/.overcommit.yml +4 -4
- data/.rubocop_todo.yml +4 -4
- data/CHANGELOG.md +14 -0
- data/Gemfile +2 -1
- data/Gemfile.lock +5 -10
- data/README.md +7 -69
- data/lib/retrospec-puppet.rb +3 -1
- data/lib/retrospec/plugins/v1/plugin/generators/serializers/rspec_dumper.rb +86 -36
- data/lib/retrospec/plugins/v1/plugin/generators/task_generator.rb +17 -19
- data/lib/retrospec/plugins/v1/plugin/helpers.rb +6 -0
- data/lib/retrospec/plugins/v1/plugin/puppet.rb +86 -16
- data/lib/retrospec/plugins/v1/plugin/spec_object.rb +34 -16
- data/lib/retrospec/plugins/v1/plugin/template_helpers.rb +12 -6
- data/lib/retrospec/plugins/v1/plugin/version.rb +1 -1
- data/puppet-retrospec.gemspec +1 -1
- data/spec/fixtures/fixture_modules/one_resource_module/manifests/array_param.pp +15 -0
- data/spec/fixtures/parameters.txt +9 -9
- data/spec/integration/retrospec_spec.rb +26 -6
- data/spec/unit/generators/acceptance_generator_spec.rb +3 -2
- data/spec/unit/generators/definition_generator_spec.rb +3 -3
- data/spec/unit/generators/hostclass_generator_spec.rb +9 -1
- data/spec/unit/generators/provider_generator_spec.rb +3 -3
- data/spec/unit/generators/resource_base_generator_spec.rb +1 -0
- data/spec/unit/generators/serializers/rspec_dumper_spec.rb +2 -2
- data/spec/unit/generators/task_generator_spec.rb +46 -0
- data/vendor/pup410/lib/hiera/puppet_function.rb +81 -0
- data/vendor/pup410/lib/hiera/scope.rb +61 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/hiera_puppet.rb +0 -0
- data/vendor/pup410/lib/puppet.rb +353 -0
- data/vendor/pup410/lib/puppet/agent.rb +102 -0
- data/vendor/pup410/lib/puppet/application.rb +478 -0
- data/vendor/pup410/lib/puppet/application_support.rb +57 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/bindings.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/coercion.rb +0 -0
- data/vendor/pup410/lib/puppet/compilable_resource_type.rb +15 -0
- data/vendor/pup410/lib/puppet/configurer.rb +446 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/configurer/downloader.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/configurer/downloader_factory.rb +0 -0
- data/vendor/pup410/lib/puppet/configurer/fact_handler.rb +37 -0
- data/vendor/pup410/lib/puppet/configurer/plugin_handler.rb +25 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/confine.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/confine/any.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/confine/exists.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/confine/false.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/confine/feature.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/confine/true.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/confine/variable.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/confine_collection.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/confiner.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/context.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/context/trusted_information.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/daemon.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/data_binding.rb +0 -0
- data/vendor/pup410/lib/puppet/data_providers.rb +34 -0
- data/vendor/pup410/lib/puppet/data_providers/data_adapter.rb +37 -0
- data/vendor/pup410/lib/puppet/data_providers/data_function_support.rb +32 -0
- data/vendor/pup410/lib/puppet/data_providers/function_env_data_provider.rb +26 -0
- data/vendor/pup410/lib/puppet/data_providers/function_module_data_provider.rb +24 -0
- data/vendor/pup410/lib/puppet/data_providers/hiera_config.rb +151 -0
- data/vendor/pup410/lib/puppet/data_providers/hiera_env_data_provider.rb +25 -0
- data/vendor/pup410/lib/puppet/data_providers/hiera_interpolate.rb +21 -0
- data/vendor/pup410/lib/puppet/data_providers/hiera_module_data_provider.rb +30 -0
- data/vendor/pup410/lib/puppet/data_providers/hiera_support.rb +42 -0
- data/vendor/pup410/lib/puppet/data_providers/json_data_provider_factory.rb +38 -0
- data/vendor/pup410/lib/puppet/data_providers/yaml_data_provider_factory.rb +40 -0
- data/vendor/pup410/lib/puppet/defaults.rb +2011 -0
- data/vendor/pup410/lib/puppet/environments.rb +492 -0
- data/vendor/pup410/lib/puppet/error.rb +100 -0
- data/vendor/pup410/lib/puppet/etc.rb +161 -0
- data/vendor/pup410/lib/puppet/external/dot.rb +326 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/nagios.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/nagios/base.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/nagios/grammar.ry +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/nagios/makefile +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/nagios/parser.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/pson/common.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/pson/pure.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/pson/pure/generator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/pson/pure/parser.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/external/pson/version.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face.rb +0 -0
- data/vendor/pup410/lib/puppet/face/ca.rb +259 -0
- data/vendor/pup410/lib/puppet/face/catalog.rb +130 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/catalog/select.rb +0 -0
- data/vendor/pup410/lib/puppet/face/certificate.rb +165 -0
- data/vendor/pup410/lib/puppet/face/certificate_request.rb +56 -0
- data/vendor/pup410/lib/puppet/face/certificate_revocation_list.rb +56 -0
- data/vendor/pup410/lib/puppet/face/config.rb +119 -0
- data/vendor/pup410/lib/puppet/face/epp.rb +527 -0
- data/vendor/pup410/lib/puppet/face/facts.rb +38 -0
- data/vendor/pup410/lib/puppet/face/file.rb +50 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/file/download.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/file/store.rb +0 -0
- data/vendor/pup410/lib/puppet/face/generate.rb +64 -0
- data/vendor/pup410/lib/puppet/face/help.rb +201 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/help/action.erb +0 -0
- data/vendor/pup410/lib/puppet/face/help/face.erb +114 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/help/global.erb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/help/man.erb +0 -0
- data/vendor/pup410/lib/puppet/face/key.rb +16 -0
- data/vendor/pup410/lib/puppet/face/man.rb +101 -0
- data/vendor/pup410/lib/puppet/face/module.rb +19 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/module/build.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/module/changes.rb +0 -0
- data/vendor/pup410/lib/puppet/face/module/generate.rb +251 -0
- data/vendor/pup410/lib/puppet/face/module/install.rb +145 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/module/list.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/module/search.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/module/uninstall.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/module/upgrade.rb +0 -0
- data/vendor/pup410/lib/puppet/face/node.rb +42 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/face/node/clean.rb +0 -0
- data/vendor/pup410/lib/puppet/face/parser.rb +161 -0
- data/vendor/pup410/lib/puppet/face/plugin.rb +58 -0
- data/vendor/pup410/lib/puppet/face/report.rb +54 -0
- data/vendor/pup410/lib/puppet/face/resource.rb +53 -0
- data/vendor/pup410/lib/puppet/face/resource_type.rb +84 -0
- data/vendor/pup410/lib/puppet/face/status.rb +50 -0
- data/vendor/pup410/lib/puppet/feature/base.rb +94 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/cfacter.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/cfpropertylist.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/eventlog.rb +0 -0
- data/vendor/pup410/lib/puppet/feature/external_facts.rb +5 -0
- data/vendor/pup410/lib/puppet/feature/hiera_eyaml.rb +3 -0
- data/vendor/pup410/lib/puppet/feature/hocon.rb +3 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/libuser.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/msgpack.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/pe_license.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/rack.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/selinux.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/ssh.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/telnet.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/feature/zlib.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_bucket.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_bucket/dipper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_bucket/file.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/base.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/configuration.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/configuration/parser.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/content.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/fileset.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/http_metadata.rb +0 -0
- data/vendor/pup410/lib/puppet/file_serving/metadata.rb +163 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/mount.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/mount/file.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/mount/modules.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/mount/pluginfacts.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/mount/plugins.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/terminus_helper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_serving/terminus_selector.rb +0 -0
- data/vendor/pup410/lib/puppet/file_system.rb +404 -0
- data/vendor/pup410/lib/puppet/file_system/file_impl.rb +154 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_system/memory_file.rb +0 -0
- data/vendor/pup410/lib/puppet/file_system/memory_impl.rb +86 -0
- data/vendor/pup410/lib/puppet/file_system/path_pattern.rb +98 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_system/posix.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/file_system/uniquefile.rb +0 -0
- data/vendor/pup410/lib/puppet/file_system/windows.rb +130 -0
- data/vendor/pup410/lib/puppet/forge.rb +228 -0
- data/vendor/pup410/lib/puppet/forge/cache.rb +60 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/forge/errors.rb +0 -0
- data/vendor/pup410/lib/puppet/forge/repository.rb +155 -0
- data/vendor/pup410/lib/puppet/functions.rb +774 -0
- data/vendor/pup410/lib/puppet/functions/alert.rb +14 -0
- data/vendor/pup410/lib/puppet/functions/assert_type.rb +93 -0
- data/vendor/pup410/lib/puppet/functions/binary_file.rb +19 -0
- data/vendor/pup410/lib/puppet/functions/break.rb +22 -0
- data/vendor/pup410/lib/puppet/functions/contain.rb +33 -0
- data/vendor/pup410/lib/puppet/functions/crit.rb +14 -0
- data/vendor/pup410/lib/puppet/functions/debug.rb +14 -0
- data/vendor/pup410/lib/puppet/functions/defined.rb +160 -0
- data/vendor/pup410/lib/puppet/functions/dig.rb +23 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/each.rb +0 -0
- data/vendor/pup410/lib/puppet/functions/emerg.rb +14 -0
- data/vendor/pup410/lib/puppet/functions/epp.rb +48 -0
- data/vendor/pup410/lib/puppet/functions/err.rb +14 -0
- data/vendor/pup410/lib/puppet/functions/eyaml_lookup_key.rb +94 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/filter.rb +0 -0
- data/vendor/pup410/lib/puppet/functions/find_file.rb +31 -0
- data/vendor/pup410/lib/puppet/functions/hiera.rb +88 -0
- data/vendor/pup410/lib/puppet/functions/hiera_array.rb +81 -0
- data/vendor/pup410/lib/puppet/functions/hiera_hash.rb +92 -0
- data/vendor/pup410/lib/puppet/functions/hiera_include.rb +104 -0
- data/vendor/pup410/lib/puppet/functions/hocon_data.rb +41 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/import.rb +0 -0
- data/vendor/pup410/lib/puppet/functions/include.rb +21 -0
- data/vendor/pup410/lib/puppet/functions/info.rb +14 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/inline_epp.rb +0 -0
- data/vendor/pup410/lib/puppet/functions/json_data.rb +33 -0
- data/vendor/pup410/lib/puppet/functions/lest.rb +17 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/lookup.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/map.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/match.rb +0 -0
- data/vendor/pup410/lib/puppet/functions/new.rb +31 -0
- data/vendor/pup410/lib/puppet/functions/next.rb +23 -0
- data/vendor/pup410/lib/puppet/functions/notice.rb +14 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/reduce.rb +0 -0
- data/vendor/pup410/lib/puppet/functions/regsubst.rb +76 -0
- data/vendor/pup410/lib/puppet/functions/require.rb +37 -0
- data/vendor/pup410/lib/puppet/functions/return.rb +22 -0
- data/vendor/pup410/lib/puppet/functions/reverse_each.rb +25 -0
- data/vendor/pup410/lib/puppet/functions/scanf.rb +44 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/slice.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/split.rb +0 -0
- data/vendor/pup410/lib/puppet/functions/step.rb +26 -0
- data/vendor/pup410/lib/puppet/functions/strftime.rb +35 -0
- data/vendor/pup410/lib/puppet/functions/then.rb +14 -0
- data/vendor/pup410/lib/puppet/functions/type.rb +31 -0
- data/vendor/pup410/lib/puppet/functions/unwrap.rb +40 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/versioncmp.rb +0 -0
- data/vendor/pup410/lib/puppet/functions/warning.rb +14 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/functions/with.rb +0 -0
- data/vendor/pup410/lib/puppet/functions/yaml_data.rb +42 -0
- data/vendor/pup410/lib/puppet/generate/models/type/property.rb +70 -0
- data/vendor/pup410/lib/puppet/generate/models/type/type.rb +62 -0
- data/vendor/pup410/lib/puppet/generate/templates/type/pcore.erb +42 -0
- data/vendor/pup410/lib/puppet/generate/type.rb +239 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/graph.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/graph/key.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/graph/prioritizer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/graph/random_prioritizer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/graph/rb_tree_map.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/graph/relationship_graph.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/graph/sequential_prioritizer.rb +0 -0
- data/vendor/pup410/lib/puppet/graph/simple_graph.rb +560 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/graph/title_hash_prioritizer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector.rb +0 -0
- data/vendor/pup410/lib/puppet/indirector/catalog/compiler.rb +370 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/catalog/json.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/catalog/msgpack.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/catalog/rest.rb +0 -0
- data/vendor/pup410/lib/puppet/indirector/catalog/static_compiler.rb +232 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/catalog/store_configs.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/catalog/yaml.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate/ca.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate/disabled_ca.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate/file.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_request/ca.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_request/disabled_ca.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_request/file.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_request/memory.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_request/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_revocation_list/ca.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_revocation_list/disabled_ca.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_revocation_list/file.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_revocation_list/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_status.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_status/file.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/certificate_status/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/code.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/data_binding/hiera.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/data_binding/none.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/direct_file_server.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/envelope.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/errors.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/exec.rb +0 -0
- data/vendor/pup410/lib/puppet/indirector/face.rb +153 -0
- data/vendor/pup410/lib/puppet/indirector/facts/facter.rb +90 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/facts/memory.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/facts/network_device.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/facts/store_configs.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/facts/yaml.rb +0 -0
- data/vendor/pup410/lib/puppet/indirector/file_bucket_file/file.rb +254 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_bucket_file/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_bucket_file/selector.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_content.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_content/file.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_content/file_server.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_content/http.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_content/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_content/selector.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_metadata.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_metadata/file.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_metadata/file_server.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_metadata/http.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_metadata/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_metadata/selector.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/file_server.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/generic_http.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/hiera.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/indirection.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/json.rb +0 -0
- data/vendor/pup410/lib/puppet/indirector/key/ca.rb +16 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/key/disabled_ca.rb +0 -0
- data/vendor/pup410/lib/puppet/indirector/key/file.rb +50 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/key/memory.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/ldap.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/memory.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/msgpack.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/node/exec.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/node/ldap.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/node/memory.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/node/msgpack.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/node/plain.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/node/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/node/store_configs.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/node/write_only_yaml.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/node/yaml.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/none.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/plain.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/report/msgpack.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/report/processor.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/report/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/report/yaml.rb +0 -0
- data/vendor/pup410/lib/puppet/indirector/request.rb +282 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/resource/ral.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/resource/store_configs.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/resource/validator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/resource_type.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/resource_type/parser.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/resource_type/rest.rb +0 -0
- data/vendor/pup410/lib/puppet/indirector/rest.rb +330 -0
- data/vendor/pup410/lib/puppet/indirector/ssl_file.rb +201 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/status.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/status/local.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/status/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/store_configs.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/terminus.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/indirector/yaml.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/info_service.rb +0 -0
- data/vendor/pup410/lib/puppet/info_service/class_information_service.rb +111 -0
- data/vendor/pup410/lib/puppet/interface.rb +240 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/interface/action.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/interface/action_builder.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/interface/action_manager.rb +0 -0
- data/vendor/pup410/lib/puppet/interface/documentation.rb +342 -0
- data/vendor/pup410/lib/puppet/interface/face_collection.rb +125 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/interface/option.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/interface/option_builder.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/interface/option_manager.rb +0 -0
- data/vendor/pup410/lib/puppet/loaders.rb +25 -0
- data/vendor/pup410/lib/puppet/metatype/manager.rb +195 -0
- data/vendor/pup410/lib/puppet/module.rb +410 -0
- data/vendor/pup410/lib/puppet/module_tool.rb +192 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/applications.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/applications/application.rb +0 -0
- data/vendor/pup410/lib/puppet/module_tool/applications/builder.rb +149 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/applications/checksummer.rb +0 -0
- data/vendor/pup410/lib/puppet/module_tool/applications/installer.rb +351 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/applications/searcher.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/applications/uninstaller.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/applications/unpacker.rb +0 -0
- data/vendor/pup410/lib/puppet/module_tool/applications/upgrader.rb +277 -0
- data/vendor/pup410/lib/puppet/module_tool/checksums.rb +49 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/contents_description.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/dependency.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/errors.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/errors/base.rb +0 -0
- data/vendor/pup410/lib/puppet/module_tool/errors/installer.rb +95 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/errors/shared.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/errors/uninstaller.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/errors/upgrader.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/install_directory.rb +0 -0
- data/vendor/pup410/lib/puppet/module_tool/installed_modules.rb +96 -0
- data/vendor/pup410/lib/puppet/module_tool/local_tarball.rb +90 -0
- data/vendor/pup410/lib/puppet/module_tool/metadata.rb +221 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/shared_behaviors.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/skeleton/templates/generator/Gemfile +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/skeleton/templates/generator/README.md.erb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/skeleton/templates/generator/Rakefile +0 -0
- data/vendor/pup410/lib/puppet/module_tool/skeleton/templates/generator/examples/init.pp.erb +12 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/skeleton/templates/generator/manifests/init.pp.erb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/skeleton/templates/generator/metadata.json.erb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/skeleton/templates/generator/spec/classes/init_spec.rb.erb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/skeleton/templates/generator/spec/spec_helper.rb +0 -0
- data/vendor/pup410/lib/puppet/module_tool/tar.rb +17 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/tar/gnu.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/module_tool/tar/mini.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/auth_config_parser.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/authconfig.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/authorization.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/authstore.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/client_request.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/format.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/format_handler.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/format_support.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/formats.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/api.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/api/ca.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/api/ca/v1.rb +0 -0
- data/vendor/pup410/lib/puppet/network/http/api/indirected_routes.rb +239 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/api/indirection_type.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/api/master.rb +0 -0
- data/vendor/pup410/lib/puppet/network/http/api/master/v3.rb +28 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/api/master/v3/authorization.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/api/master/v3/environment.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/api/master/v3/environments.rb +0 -0
- data/vendor/pup410/lib/puppet/network/http/compression.rb +117 -0
- data/vendor/pup410/lib/puppet/network/http/connection.rb +235 -0
- data/vendor/pup410/lib/puppet/network/http/error.rb +69 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/factory.rb +0 -0
- data/vendor/pup410/lib/puppet/network/http/handler.rb +179 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/issues.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/memory_response.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/nocache_pool.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/pool.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/rack.rb +0 -0
- data/vendor/pup410/lib/puppet/network/http/rack/rest.rb +162 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/request.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/response.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/route.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/session.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/site.rb +0 -0
- data/vendor/pup410/lib/puppet/network/http/webrick.rb +125 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http/webrick/rest.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/http_pool.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/resolver.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/rest_controller.rb +0 -0
- data/vendor/pup410/lib/puppet/network/rights.rb +209 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/network/server.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/node.rb +0 -0
- data/vendor/pup410/lib/puppet/node/environment.rb +555 -0
- data/vendor/pup410/lib/puppet/node/facts.rb +133 -0
- data/vendor/pup410/lib/puppet/parameter.rb +592 -0
- data/vendor/pup410/lib/puppet/parameter/boolean.rb +15 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parameter/package_options.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parameter/path.rb +0 -0
- data/vendor/pup410/lib/puppet/parameter/value.rb +91 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parameter/value_collection.rb +0 -0
- data/vendor/pup410/lib/puppet/parser.rb +19 -0
- data/vendor/pup410/lib/puppet/parser/ast.rb +65 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/ast/block_expression.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/ast/branch.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/ast/hostclass.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/ast/leaf.rb +75 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/ast/node.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/ast/pops_bridge.rb +317 -0
- data/vendor/pup410/lib/puppet/parser/ast/resource.rb +66 -0
- data/vendor/pup410/lib/puppet/parser/ast/resource_instance.rb +10 -0
- data/vendor/pup410/lib/puppet/parser/ast/resourceparam.rb +31 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/ast/top_level_construct.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/compiler.rb +901 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/compiler/catalog_validator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/compiler/catalog_validator/env_relationship_validator.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/compiler/catalog_validator/relationship_validator.rb +60 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/compiler/catalog_validator/site_validator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/e4_parser_adapter.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/environment_compiler.rb +201 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/files.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions.rb +278 -0
- data/vendor/pup410/lib/puppet/parser/functions/assert_type.rb +60 -0
- data/vendor/pup410/lib/puppet/parser/functions/binary_file.rb +24 -0
- data/vendor/pup410/lib/puppet/parser/functions/break.rb +39 -0
- data/vendor/pup410/lib/puppet/parser/functions/contain.rb +30 -0
- data/vendor/pup410/lib/puppet/parser/functions/create_resources.rb +106 -0
- data/vendor/pup410/lib/puppet/parser/functions/defined.rb +107 -0
- data/vendor/pup410/lib/puppet/parser/functions/dig.rb +29 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/digest.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/each.rb +104 -0
- data/vendor/pup410/lib/puppet/parser/functions/epp.rb +39 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/fail.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/file.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/filter.rb +78 -0
- data/vendor/pup410/lib/puppet/parser/functions/find_file.rb +28 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/fqdn_rand.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/generate.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/hiera.rb +103 -0
- data/vendor/pup410/lib/puppet/parser/functions/hiera_array.rb +92 -0
- data/vendor/pup410/lib/puppet/parser/functions/hiera_hash.rb +102 -0
- data/vendor/pup410/lib/puppet/parser/functions/hiera_include.rb +102 -0
- data/vendor/pup410/lib/puppet/parser/functions/include.rb +33 -0
- data/vendor/pup410/lib/puppet/parser/functions/inline_epp.rb +51 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/inline_template.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/lest.rb +49 -0
- data/vendor/pup410/lib/puppet/parser/functions/lookup.rb +132 -0
- data/vendor/pup410/lib/puppet/parser/functions/map.rb +76 -0
- data/vendor/pup410/lib/puppet/parser/functions/match.rb +43 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/md5.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/new.rb +939 -0
- data/vendor/pup410/lib/puppet/parser/functions/next.rb +38 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/realize.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/reduce.rb +106 -0
- data/vendor/pup410/lib/puppet/parser/functions/regsubst.rb +62 -0
- data/vendor/pup410/lib/puppet/parser/functions/require.rb +40 -0
- data/vendor/pup410/lib/puppet/parser/functions/return.rb +71 -0
- data/vendor/pup410/lib/puppet/parser/functions/reverse_each.rb +83 -0
- data/vendor/pup410/lib/puppet/parser/functions/scanf.rb +38 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/sha1.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/shellquote.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/slice.rb +39 -0
- data/vendor/pup410/lib/puppet/parser/functions/split.rb +28 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/sprintf.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/step.rb +84 -0
- data/vendor/pup410/lib/puppet/parser/functions/strftime.rb +185 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/tag.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/tagged.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/template.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/then.rb +73 -0
- data/vendor/pup410/lib/puppet/parser/functions/type.rb +53 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/functions/versioncmp.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/functions/with.rb +28 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/parser_factory.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/relationship.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/resource.rb +388 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/resource/param.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/scope.rb +1138 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/templatewrapper.rb +0 -0
- data/vendor/pup410/lib/puppet/parser/type_loader.rb +149 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/parser/yaml_trimmer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/plugins.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/plugins/binding_schemes.rb +0 -0
- data/vendor/pup410/lib/puppet/plugins/configuration.rb +77 -0
- data/vendor/pup410/lib/puppet/plugins/data_providers.rb +45 -0
- data/vendor/pup410/lib/puppet/plugins/data_providers/data_provider.rb +406 -0
- data/vendor/pup410/lib/puppet/plugins/data_providers/registry.rb +51 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/plugins/syntax_checkers.rb +0 -0
- data/vendor/pup410/lib/puppet/pops.rb +150 -0
- data/vendor/pup410/lib/puppet/pops/adaptable.rb +201 -0
- data/vendor/pup410/lib/puppet/pops/adapters.rb +198 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/binder.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/binder_issues.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/bindings_checker.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/bindings_composer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/bindings_factory.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/bindings_label_provider.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/bindings_loader.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/bindings_model.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/bindings_model_dumper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/bindings_model_meta.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/bindings_validator_factory.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/config/binder_config.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/config/binder_config_checker.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/config/diagnostic_producer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/config/issues.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/injector.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/injector_entry.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/key_factory.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/binder/producers.rb +831 -0
- data/vendor/pup410/lib/puppet/pops/binder/scheme_handler/confdir_scheme.rb +34 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/scheme_handler/module_scheme.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/scheme_handler/symbolic_scheme.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/binder/system_bindings.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/containment.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/access_operator.rb +707 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/callable_signature.rb +107 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/closure.rb +365 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/collector_transformer.rb +238 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/evaluator/collectors/abstract_collector.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/collectors/catalog_collector.rb +29 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/collectors/exported_collector.rb +69 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/evaluator/collectors/fixed_set_collector.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/compare_operator.rb +252 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/evaluator/epp_evaluator.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/evaluator_impl.rb +1247 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/external_syntax_support.rb +52 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/json_strict_literal_evaluator.rb +84 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/literal_evaluator.rb +87 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/evaluator/puppet_proc.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/relationship_operator.rb +168 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/runtime3_converter.rb +184 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/runtime3_resource_support.rb +117 -0
- data/vendor/pup410/lib/puppet/pops/evaluator/runtime3_support.rb +554 -0
- data/vendor/pup410/lib/puppet/pops/functions/dispatch.rb +105 -0
- data/vendor/pup410/lib/puppet/pops/functions/dispatcher.rb +71 -0
- data/vendor/pup410/lib/puppet/pops/functions/function.rb +135 -0
- data/vendor/pup410/lib/puppet/pops/issue_reporter.rb +115 -0
- data/vendor/pup410/lib/puppet/pops/issues.rb +834 -0
- data/vendor/pup410/lib/puppet/pops/label_provider.rb +90 -0
- data/vendor/pup410/lib/puppet/pops/loader/base_loader.rb +156 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/loader/dependency_loader.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/loader/gem_support.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/loader/loader.rb +190 -0
- data/vendor/pup410/lib/puppet/pops/loader/loader_paths.rb +225 -0
- data/vendor/pup410/lib/puppet/pops/loader/module_loaders.rb +300 -0
- data/vendor/pup410/lib/puppet/pops/loader/null_loader.rb +60 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/loader/predefined_loader.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/loader/puppet_function_instantiator.rb +84 -0
- data/vendor/pup410/lib/puppet/pops/loader/puppet_resource_type_impl_instantiator.rb +80 -0
- data/vendor/pup410/lib/puppet/pops/loader/ruby_function_instantiator.rb +46 -0
- data/vendor/pup410/lib/puppet/pops/loader/runtime3_type_loader.rb +96 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/loader/simple_environment_loader.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/loader/static_loader.rb +180 -0
- data/vendor/pup410/lib/puppet/pops/loader/type_definition_instantiator.rb +93 -0
- data/vendor/pup410/lib/puppet/pops/loader/typed_name.rb +49 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/loader/uri_helper.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/loaders.rb +410 -0
- data/vendor/pup410/lib/puppet/pops/lookup.rb +94 -0
- data/vendor/pup410/lib/puppet/pops/lookup/configured_data_provider.rb +93 -0
- data/vendor/pup410/lib/puppet/pops/lookup/context.rb +200 -0
- data/vendor/pup410/lib/puppet/pops/lookup/data_adapter.rb +27 -0
- data/vendor/pup410/lib/puppet/pops/lookup/data_dig_function_provider.rb +145 -0
- data/vendor/pup410/lib/puppet/pops/lookup/data_hash_function_provider.rb +126 -0
- data/vendor/pup410/lib/puppet/pops/lookup/data_provider.rb +107 -0
- data/vendor/pup410/lib/puppet/pops/lookup/environment_data_provider.rb +35 -0
- data/vendor/pup410/lib/puppet/pops/lookup/explainer.rb +594 -0
- data/vendor/pup410/lib/puppet/pops/lookup/function_provider.rb +110 -0
- data/vendor/pup410/lib/puppet/pops/lookup/global_data_provider.rb +75 -0
- data/vendor/pup410/lib/puppet/pops/lookup/hiera_config.rb +784 -0
- data/vendor/pup410/lib/puppet/pops/lookup/interpolation.rb +153 -0
- data/vendor/pup410/lib/puppet/pops/lookup/invocation.rb +261 -0
- data/vendor/pup410/lib/puppet/pops/lookup/location_resolver.rb +99 -0
- data/vendor/pup410/lib/puppet/pops/lookup/lookup_adapter.rb +515 -0
- data/vendor/pup410/lib/puppet/pops/lookup/lookup_key.rb +99 -0
- data/vendor/pup410/lib/puppet/pops/lookup/lookup_key_function_provider.rb +92 -0
- data/vendor/pup410/lib/puppet/pops/lookup/module_data_provider.rb +89 -0
- data/vendor/pup410/lib/puppet/pops/lookup/sub_lookup.rb +91 -0
- data/vendor/pup410/lib/puppet/pops/merge_strategy.rb +419 -0
- data/vendor/pup410/lib/puppet/pops/migration/migration_checker.rb +58 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/model/ast_transformer.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/model/factory.rb +1151 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/model/model.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/model/model_label_provider.rb +130 -0
- data/vendor/pup410/lib/puppet/pops/model/model_meta.rb +629 -0
- data/vendor/pup410/lib/puppet/pops/model/model_tree_dumper.rb +451 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/model/tree_dumper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/parser/code_merger.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/parser/egrammar.ra +876 -0
- data/vendor/pup410/lib/puppet/pops/parser/eparser.rb +3243 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/parser/epp_parser.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/parser/epp_support.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/parser/evaluating_parser.rb +165 -0
- data/vendor/pup410/lib/puppet/pops/parser/heredoc_support.rb +143 -0
- data/vendor/pup410/lib/puppet/pops/parser/interpolation_support.rb +244 -0
- data/vendor/pup410/lib/puppet/pops/parser/lexer2.rb +798 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/parser/lexer_support.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/parser/locatable.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/parser/locator.rb +321 -0
- data/vendor/pup410/lib/puppet/pops/parser/parser_support.rb +251 -0
- data/vendor/pup410/lib/puppet/pops/parser/slurp_support.rb +120 -0
- data/vendor/pup410/lib/puppet/pops/patterns.rb +60 -0
- data/vendor/pup410/lib/puppet/pops/pcore.rb +96 -0
- data/vendor/pup410/lib/puppet/pops/puppet_stack.rb +43 -0
- data/vendor/pup410/lib/puppet/pops/resource/param.rb +55 -0
- data/vendor/pup410/lib/puppet/pops/resource/resource_type_impl.rb +314 -0
- data/vendor/pup410/lib/puppet/pops/resource/resource_type_set.pcore +22 -0
- data/vendor/pup410/lib/puppet/pops/semantic_error.rb +29 -0
- data/vendor/pup410/lib/puppet/pops/serialization.rb +17 -0
- data/vendor/pup410/lib/puppet/pops/serialization/abstract_reader.rb +176 -0
- data/vendor/pup410/lib/puppet/pops/serialization/abstract_writer.rb +207 -0
- data/vendor/pup410/lib/puppet/pops/serialization/deserializer.rb +80 -0
- data/vendor/pup410/lib/puppet/pops/serialization/extension.rb +157 -0
- data/vendor/pup410/lib/puppet/pops/serialization/instance_reader.rb +19 -0
- data/vendor/pup410/lib/puppet/pops/serialization/instance_writer.rb +14 -0
- data/vendor/pup410/lib/puppet/pops/serialization/json.rb +297 -0
- data/vendor/pup410/lib/puppet/pops/serialization/object.rb +71 -0
- data/vendor/pup410/lib/puppet/pops/serialization/rgen.rb +152 -0
- data/vendor/pup410/lib/puppet/pops/serialization/serializer.rb +125 -0
- data/vendor/pup410/lib/puppet/pops/serialization/time_factory.rb +67 -0
- data/vendor/pup410/lib/puppet/pops/time/timespan.rb +718 -0
- data/vendor/pup410/lib/puppet/pops/time/timestamp.rb +148 -0
- data/vendor/pup410/lib/puppet/pops/types/annotatable.rb +36 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/types/class_loader.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/types/enumeration.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/types/implementation_registry.rb +141 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/types/iterable.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/types/p_binary_type.rb +220 -0
- data/vendor/pup410/lib/puppet/pops/types/p_meta_type.rb +83 -0
- data/vendor/pup410/lib/puppet/pops/types/p_object_type.rb +886 -0
- data/vendor/pup410/lib/puppet/pops/types/p_runtime_type.rb +115 -0
- data/vendor/pup410/lib/puppet/pops/types/p_sem_ver_range_type.rb +187 -0
- data/vendor/pup410/lib/puppet/pops/types/p_sem_ver_type.rb +141 -0
- data/vendor/pup410/lib/puppet/pops/types/p_sensitive_type.rb +73 -0
- data/vendor/pup410/lib/puppet/pops/types/p_timespan_type.rb +141 -0
- data/vendor/pup410/lib/puppet/pops/types/p_timestamp_type.rb +69 -0
- data/vendor/pup410/lib/puppet/pops/types/p_type_set_type.rb +352 -0
- data/vendor/pup410/lib/puppet/pops/types/puppet_object.rb +16 -0
- data/vendor/pup410/lib/puppet/pops/types/recursion_guard.rb +136 -0
- data/vendor/pup410/lib/puppet/pops/types/ruby_generator.rb +275 -0
- data/vendor/pup410/lib/puppet/pops/types/string_converter.rb +1022 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/types/type_acceptor.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/types/type_asserter.rb +47 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/types/type_assertion_error.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/types/type_calculator.rb +836 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/types/type_conversion_error.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/types/type_factory.rb +538 -0
- data/vendor/pup410/lib/puppet/pops/types/type_formatter.rb +686 -0
- data/vendor/pup410/lib/puppet/pops/types/type_mismatch_describer.rb +1105 -0
- data/vendor/pup410/lib/puppet/pops/types/type_parser.rb +564 -0
- data/vendor/pup410/lib/puppet/pops/types/type_set_reference.rb +59 -0
- data/vendor/pup410/lib/puppet/pops/types/types.rb +3464 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/utils.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/validation.rb +470 -0
- data/vendor/pup410/lib/puppet/pops/validation/checker4_0.rb +980 -0
- data/vendor/pup410/lib/puppet/pops/validation/validator_factory_4_0.rb +39 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/pops/visitable.rb +0 -0
- data/vendor/pup410/lib/puppet/pops/visitor.rb +95 -0
- data/vendor/pup410/lib/puppet/property.rb +597 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/property/boolean.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/property/ensure.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/property/keyvalue.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/property/list.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/property/ordered_list.rb +0 -0
- data/vendor/pup410/lib/puppet/provider.rb +601 -0
- data/vendor/pup410/lib/puppet/provider/aixobject.rb +392 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/augeas/augeas.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/cisco.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/command.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/computer/computer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/confine.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/cron/crontab.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/exec.rb +98 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/exec/posix.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/exec/shell.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/exec/windows.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/file/posix.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/file/windows.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/group/aix.rb +141 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/group/directoryservice.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/group/groupadd.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/group/ldap.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/group/pw.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/group/windows_adsi.rb +109 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/host/parsed.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/interface/cisco.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/ldap.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/macauthorization/macauthorization.rb +298 -0
- data/vendor/pup410/lib/puppet/provider/mailalias/aliases.rb +50 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/maillist/mailman.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/mcx/mcxcontent.rb +173 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/mount.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/mount/parsed.rb +280 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/naginator.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/nameservice.rb +317 -0
- data/vendor/pup410/lib/puppet/provider/nameservice/directoryservice.rb +507 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/nameservice/objectadd.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/nameservice/pw.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/network_device.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/package/aix.rb +152 -0
- data/vendor/pup410/lib/puppet/provider/package/appdmg.rb +110 -0
- data/vendor/pup410/lib/puppet/provider/package/apple.rb +47 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/apt.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/aptitude.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/aptrpm.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/blastwave.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/package/dnf.rb +46 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/dpkg.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/fink.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/freebsd.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/package/gem.rb +174 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/hpux.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/macports.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/package/nim.rb +280 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/openbsd.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/opkg.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/package/pacman.rb +267 -0
- data/vendor/pup410/lib/puppet/provider/package/pip.rb +179 -0
- data/vendor/pup410/lib/puppet/provider/package/pip3.rb +20 -0
- data/vendor/pup410/lib/puppet/provider/package/pkg.rb +249 -0
- data/vendor/pup410/lib/puppet/provider/package/pkgdmg.rb +152 -0
- data/vendor/pup410/lib/puppet/provider/package/pkgin.rb +87 -0
- data/vendor/pup410/lib/puppet/provider/package/pkgng.rb +143 -0
- data/vendor/pup410/lib/puppet/provider/package/pkgutil.rb +186 -0
- data/vendor/pup410/lib/puppet/provider/package/portage.rb +193 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/ports.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/portupgrade.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/puppet_gem.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/package/rpm.rb +402 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/rug.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/package/sun.rb +132 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/sunfreeware.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/package/tdnf.rb +28 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/up2date.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/urpmi.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/windows.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/windows/exe_package.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/windows/msi_package.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/windows/package.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/package/yum.rb +270 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/package/zypper.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/parsedfile.rb +459 -0
- data/vendor/pup410/lib/puppet/provider/scheduled_task/win32_taskscheduler.rb +590 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/selboolean/getsetsebool.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/selmodule/semodule.rb +138 -0
- data/vendor/pup410/lib/puppet/provider/service/base.rb +121 -0
- data/vendor/pup410/lib/puppet/provider/service/bsd.rb +51 -0
- data/vendor/pup410/lib/puppet/provider/service/daemontools.rb +194 -0
- data/vendor/pup410/lib/puppet/provider/service/debian.rb +74 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/freebsd.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/gentoo.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/service/init.rb +193 -0
- data/vendor/pup410/lib/puppet/provider/service/launchd.rb +346 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/openbsd.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/openrc.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/openwrt.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/rcng.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/redhat.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/service/runit.rb +111 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/service.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/service/smf.rb +167 -0
- data/vendor/pup410/lib/puppet/provider/service/src.rb +147 -0
- data/vendor/pup410/lib/puppet/provider/service/systemd.rb +186 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/upstart.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/service/windows.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/ssh_authorized_key/parsed.rb +105 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/sshkey/parsed.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/user/aix.rb +375 -0
- data/vendor/pup410/lib/puppet/provider/user/directoryservice.rb +632 -0
- data/vendor/pup410/lib/puppet/provider/user/hpux.rb +95 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/user/ldap.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/user/openbsd.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/user/pw.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/user/user_role_add.rb +227 -0
- data/vendor/pup410/lib/puppet/provider/user/useradd.rb +231 -0
- data/vendor/pup410/lib/puppet/provider/user/windows_adsi.rb +148 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/provider/vlan/cisco.rb +0 -0
- data/vendor/pup410/lib/puppet/provider/yumrepo/inifile.rb +304 -0
- data/vendor/pup410/lib/puppet/provider/zfs/zfs.rb +84 -0
- data/vendor/pup410/lib/puppet/provider/zone/solaris.rb +364 -0
- data/vendor/pup410/lib/puppet/provider/zpool/zpool.rb +125 -0
- data/vendor/pup410/lib/puppet/reference/configuration.rb +82 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/reference/function.rb +0 -0
- data/vendor/pup410/lib/puppet/reference/indirection.rb +71 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/reference/metaparameter.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/reference/providers.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/reference/report.rb +0 -0
- data/vendor/pup410/lib/puppet/reference/type.rb +114 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/relationship.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/reports.rb +0 -0
- data/vendor/pup410/lib/puppet/reports/http.rb +33 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/reports/log.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/reports/store.rb +0 -0
- data/vendor/pup410/lib/puppet/resource.rb +728 -0
- data/vendor/pup410/lib/puppet/resource/capability_finder.rb +128 -0
- data/vendor/pup410/lib/puppet/resource/catalog.rb +675 -0
- data/vendor/pup410/lib/puppet/resource/status.rb +232 -0
- data/vendor/pup410/lib/puppet/resource/type.rb +572 -0
- data/vendor/pup410/lib/puppet/resource/type_collection.rb +257 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/scheduler.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/scheduler/job.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/scheduler/scheduler.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/scheduler/splay_job.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/scheduler/timer.rb +0 -0
- data/vendor/pup410/lib/puppet/settings.rb +1455 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/array_setting.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/autosign_setting.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/base_setting.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/boolean_setting.rb +0 -0
- data/vendor/pup410/lib/puppet/settings/config_file.rb +143 -0
- data/vendor/pup410/lib/puppet/settings/directory_setting.rb +18 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/duration_setting.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/enum_setting.rb +0 -0
- data/vendor/pup410/lib/puppet/settings/environment_conf.rb +204 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/errors.rb +0 -0
- data/vendor/pup410/lib/puppet/settings/file_or_directory_setting.rb +40 -0
- data/vendor/pup410/lib/puppet/settings/file_setting.rb +245 -0
- data/vendor/pup410/lib/puppet/settings/ini_file.rb +171 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/path_setting.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/priority_setting.rb +0 -0
- data/vendor/pup410/lib/puppet/settings/server_list_setting.rb +20 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/string_setting.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/symbolic_enum_setting.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/terminus_setting.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/ttl_setting.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/settings/value_translator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/ssl.rb +0 -0
- data/vendor/pup410/lib/puppet/ssl/base.rb +153 -0
- data/vendor/pup410/lib/puppet/ssl/certificate.rb +95 -0
- data/vendor/pup410/lib/puppet/ssl/certificate_authority.rb +553 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/ssl/certificate_authority/autosign_command.rb +0 -0
- data/vendor/pup410/lib/puppet/ssl/certificate_authority/interface.rb +324 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/ssl/certificate_factory.rb +0 -0
- data/vendor/pup410/lib/puppet/ssl/certificate_request.rb +327 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/ssl/certificate_request_attributes.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/ssl/certificate_revocation_list.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/ssl/certificate_signer.rb +0 -0
- data/vendor/pup410/lib/puppet/ssl/configuration.rb +61 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/ssl/digest.rb +0 -0
- data/vendor/pup410/lib/puppet/ssl/host.rb +387 -0
- data/vendor/pup410/lib/puppet/ssl/inventory.rb +55 -0
- data/vendor/pup410/lib/puppet/ssl/key.rb +63 -0
- data/vendor/pup410/lib/puppet/ssl/oids.rb +187 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/ssl/validator.rb +0 -0
- data/vendor/pup410/lib/puppet/ssl/validator/default_validator.rb +174 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/ssl/validator/no_validator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/status.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/syntax_checkers.rb +0 -0
- data/vendor/pup410/lib/puppet/syntax_checkers/base64.rb +41 -0
- data/vendor/pup410/lib/puppet/syntax_checkers/json.rb +35 -0
- data/vendor/pup410/lib/puppet/test/test_helper.rb +256 -0
- data/vendor/pup410/lib/puppet/transaction.rb +399 -0
- data/vendor/pup410/lib/puppet/transaction/additional_resource_generator.rb +219 -0
- data/vendor/pup410/lib/puppet/transaction/event.rb +133 -0
- data/vendor/pup410/lib/puppet/transaction/event_manager.rb +167 -0
- data/vendor/pup410/lib/puppet/transaction/persistence.rb +84 -0
- data/vendor/pup410/lib/puppet/transaction/report.rb +460 -0
- data/vendor/pup410/lib/puppet/transaction/resource_harness.rb +316 -0
- data/vendor/pup410/lib/puppet/type.rb +2670 -0
- data/vendor/pup410/lib/puppet/type/augeas.rb +211 -0
- data/vendor/pup410/lib/puppet/type/component.rb +88 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/computer.rb +0 -0
- data/vendor/pup410/lib/puppet/type/cron.rb +492 -0
- data/vendor/pup410/lib/puppet/type/exec.rb +622 -0
- data/vendor/pup410/lib/puppet/type/file.rb +1032 -0
- data/vendor/pup410/lib/puppet/type/file/checksum.rb +44 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/file/checksum_value.rb +0 -0
- data/vendor/pup410/lib/puppet/type/file/content.rb +160 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/file/ctime.rb +0 -0
- data/vendor/pup410/lib/puppet/type/file/data_sync.rb +92 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/file/ensure.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/file/group.rb +0 -0
- data/vendor/pup410/lib/puppet/type/file/mode.rb +177 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/file/mtime.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/file/owner.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/file/selcontext.rb +0 -0
- data/vendor/pup410/lib/puppet/type/file/source.rb +352 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/file/target.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/file/type.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/filebucket.rb +0 -0
- data/vendor/pup410/lib/puppet/type/group.rb +206 -0
- data/vendor/pup410/lib/puppet/type/host.rb +95 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/interface.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/k5login.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/macauthorization.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/mailalias.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/maillist.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/mcx.rb +0 -0
- data/vendor/pup410/lib/puppet/type/mount.rb +310 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_command.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_contact.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_contactgroup.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_host.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_hostdependency.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_hostescalation.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_hostextinfo.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_hostgroup.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_service.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_servicedependency.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_serviceescalation.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_serviceextinfo.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_servicegroup.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/nagios_timeperiod.rb +0 -0
- data/vendor/pup410/lib/puppet/type/notify.rb +44 -0
- data/vendor/pup410/lib/puppet/type/package.rb +571 -0
- data/vendor/pup410/lib/puppet/type/resources.rb +180 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/router.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/schedule.rb +0 -0
- data/vendor/pup410/lib/puppet/type/scheduled_task.rb +184 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/selboolean.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/selmodule.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/service.rb +0 -0
- data/vendor/pup410/lib/puppet/type/ssh_authorized_key.rb +159 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/sshkey.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/stage.rb +0 -0
- data/vendor/pup410/lib/puppet/type/tidy.rb +332 -0
- data/vendor/pup410/lib/puppet/type/user.rb +768 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/vlan.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/whit.rb +0 -0
- data/vendor/pup410/lib/puppet/type/yumrepo.rb +409 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/zfs.rb +0 -0
- data/vendor/pup410/lib/puppet/type/zone.rb +382 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/type/zpool.rb +0 -0
- data/vendor/pup410/lib/puppet/util.rb +701 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/autoload.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/backups.rb +0 -0
- data/vendor/pup410/lib/puppet/util/character_encoding.rb +98 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/checksums.rb +0 -0
- data/vendor/pup410/lib/puppet/util/classgen.rb +228 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/colors.rb +0 -0
- data/vendor/pup410/lib/puppet/util/command_line.rb +185 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/command_line/puppet_option_parser.rb +0 -0
- data/vendor/pup410/lib/puppet/util/command_line/trollop.rb +824 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/constant_inflector.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/diff.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/docs.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/errors.rb +0 -0
- data/vendor/pup410/lib/puppet/util/execution.rb +359 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/execution_stub.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/feature.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/file_watcher.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/fileparsing.rb +0 -0
- data/vendor/pup410/lib/puppet/util/filetype.rb +309 -0
- data/vendor/pup410/lib/puppet/util/http_proxy.rb +197 -0
- data/vendor/pup410/lib/puppet/util/inifile.rb +341 -0
- data/vendor/pup410/lib/puppet/util/instance_loader.rb +81 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/json_lockfile.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/ldap.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/ldap/connection.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/ldap/generator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/ldap/manager.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/libuser.conf +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/libuser.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/limits.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/lockfile.rb +0 -0
- data/vendor/pup410/lib/puppet/util/log.rb +411 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/log/destination.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/log/destinations.rb +0 -0
- data/vendor/pup410/lib/puppet/util/logging.rb +311 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/metaid.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/methodhelper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/metric.rb +0 -0
- data/vendor/pup410/lib/puppet/util/monkey_patches.rb +147 -0
- data/vendor/pup410/lib/puppet/util/multi_match.rb +51 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/nagios_maker.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/base.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/cisco.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/cisco/device.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/cisco/facts.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/cisco/interface.rb +0 -0
- data/vendor/pup410/lib/puppet/util/network_device/config.rb +98 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/ipcalc.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/transport.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/transport/base.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/transport/ssh.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/network_device/transport/telnet.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/package.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/pidlock.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/platform.rb +0 -0
- data/vendor/pup410/lib/puppet/util/plist.rb +151 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/posix.rb +0 -0
- data/vendor/pup410/lib/puppet/util/profiler.rb +53 -0
- data/vendor/pup410/lib/puppet/util/profiler/aggregate.rb +85 -0
- data/vendor/pup410/lib/puppet/util/profiler/around_profiler.rb +67 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/profiler/logging.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/profiler/object_counts.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/profiler/wall_clock.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/provider_features.rb +0 -0
- data/vendor/pup410/lib/puppet/util/psych_support.rb +38 -0
- data/vendor/pup410/lib/puppet/util/rdoc.rb +60 -0
- data/vendor/pup410/lib/puppet/util/reference.rb +126 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/resource_template.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/retry_action.rb +0 -0
- data/vendor/pup410/lib/puppet/util/rubygems.rb +75 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/run_mode.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/selinux.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/skip_tags.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/splayer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/ssl.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/storage.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/suidmanager.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/symbolic_file_mode.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/tag_set.rb +0 -0
- data/vendor/pup410/lib/puppet/util/tagging.rb +118 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/terminal.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/user_attr.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/warnings.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/watched_file.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/watcher.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/watcher/change_watcher.rb +0 -0
- data/vendor/pup410/lib/puppet/util/watcher/periodic_watcher.rb +37 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/watcher/timer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows.rb +0 -0
- data/vendor/pup410/lib/puppet/util/windows/access_control_entry.rb +84 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows/access_control_list.rb +0 -0
- data/vendor/pup410/lib/puppet/util/windows/adsi.rb +548 -0
- data/vendor/pup410/lib/puppet/util/windows/api_types.rb +282 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows/com.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows/error.rb +0 -0
- data/vendor/pup410/lib/puppet/util/windows/file.rb +488 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows/principal.rb +0 -0
- data/vendor/pup410/lib/puppet/util/windows/process.rb +497 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows/registry.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows/root_certs.rb +0 -0
- data/vendor/pup410/lib/puppet/util/windows/security.rb +857 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows/security_descriptor.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows/sid.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/util/windows/string.rb +0 -0
- data/vendor/pup410/lib/puppet/util/windows/taskscheduler.rb +1276 -0
- data/vendor/pup410/lib/puppet/util/windows/user.rb +309 -0
- data/vendor/pup410/lib/puppet/util/yaml.rb +36 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/CHANGELOG +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/Gemfile +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/LICENSE +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/PUPPET_README.md +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/README.md +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/Rakefile +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/deep_merge.gemspec +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/lib/deep_merge.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/lib/deep_merge/core.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/lib/deep_merge/deep_merge_hash.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/deep_merge/lib/deep_merge/rails_compat.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/load_deep_merge.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/load_pathspec.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/load_rgen.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/load_semantic.rb +0 -0
- data/vendor/pup410/lib/puppet/vendor/load_semantic_puppet.rb +1 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/pathspec/CHANGELOG.md +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/pathspec/LICENSE +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/pathspec/PUPPET_README.md +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/pathspec/README.md +0 -0
- data/vendor/pup410/lib/puppet/vendor/pathspec/lib/pathspec.rb +122 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/pathspec/lib/pathspec/gitignorespec.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/pathspec/lib/pathspec/regexspec.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/pathspec/lib/pathspec/spec.rb +0 -0
- data/vendor/pup410/lib/puppet/vendor/require_vendored.rb +6 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/CHANGELOG +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/MIT-LICENSE +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/PUPPET_README.md +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/README.rdoc +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/Rakefile +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/TODO +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/anounce.txt +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/design_rationale.txt +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/ea_support/ea_support.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/ea_support/id_store.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/ea_support/uml13_ea_metamodel.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/ea_support/uml13_ea_metamodel_ext.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/ea_support/uml13_ea_metamodel_generator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/ea_support/uml13_ea_to_uml13.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/ea_support/uml13_to_uml13_ea.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/metamodels/uml13_metamodel.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/metamodels/uml13_metamodel_ext.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/mmgen/metamodel_generator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/mmgen/mm_ext/ecore_mmgen_ext.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/mmgen/mmgen.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/mmgen/templates/annotations.tpl +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/mmgen/templates/metamodel_generator.tpl +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/array_extensions.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/ecore/ecore.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/ecore/ecore_builder_methods.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/ecore/ecore_ext.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/ecore/ecore_interface.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/ecore/ecore_to_ruby.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/ecore/ruby_to_ecore.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/environment.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/fragment/dump_file_cache.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/fragment/fragmented_model.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/fragment/model_fragment.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/abstract_instantiator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/abstract_xml_instantiator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/default_xml_instantiator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/ecore_xml_instantiator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/json_instantiator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/json_parser.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/json_parser.y +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/nodebased_xml_instantiator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/qualified_name_resolver.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/reference_resolver.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/resolution_helper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/instantiator/xmi11_instantiator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/builder_extensions.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/builder_runtime.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/constant_order_helper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/data_types.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/intermediate/annotation.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/intermediate/feature.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/mm_multiple.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/model_builder.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/model_builder/builder_context.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/model_builder/model_serializer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/model_builder/reference_resolver.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/serializer/json_serializer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/serializer/opposite_reference_filter.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/serializer/qualified_name_provider.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/serializer/xmi11_serializer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/serializer/xmi20_serializer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/serializer/xml_serializer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/template_language.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/template_language/directory_template_container.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/template_language/output_handler.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/template_language/template_container.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/template_language/template_helper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/transformer.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/auto_class_creator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/cached_glob.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/file_cache_map.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/file_change_detector.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/method_delegation.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/model_comparator.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/model_comparator_base.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/model_dumper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/name_helper.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/rgen/util/pattern_matcher.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/transformers/ecore_to_uml13.rb +0 -0
- data/vendor/{gems/puppet-4.5.2 → pup410}/lib/puppet/vendor/rgen/lib/transformers/uml13_to_ecore.rb +0 -0
- data/vendor/pup410/lib/puppet/vendor/rgen_patch.rb +132 -0
- data/vendor/pup410/lib/puppet/vendor/semantic/lib/semantic.rb +5 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet.rb +17 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency.rb +181 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/graph.rb +60 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/graph_node.rb +117 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/module_release.rb +58 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/source.rb +25 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/unsatisfiable_graph.rb +31 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/gem_version.rb +3 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/locales/config.yaml +21 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version.rb +195 -0
- data/vendor/pup410/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version_range.rb +422 -0
- data/vendor/pup410/lib/puppet/version.rb +93 -0
- data/vendor/pup410/lib/puppet_x.rb +14 -0
- data/vendor/pup410/lib/semver.rb +146 -0
- data/vendor/pup410/locales/config.yaml +29 -0
- data/vendor/pup410/locales/puppet.pot +180 -0
- data/vendor/pup410/puppet-4.10.8.gemspec +17 -0
- metadata +1161 -1321
- data/vendor/gems/puppet-4.5.2/Gemfile +0 -92
- data/vendor/gems/puppet-4.5.2/bin/extlookup2hiera +0 -56
- data/vendor/gems/puppet-4.5.2/bin/puppet +0 -9
- data/vendor/gems/puppet-4.5.2/conf/auth.conf +0 -124
- data/vendor/gems/puppet-4.5.2/conf/environment.conf +0 -18
- data/vendor/gems/puppet-4.5.2/conf/fileserver.conf +0 -42
- data/vendor/gems/puppet-4.5.2/conf/puppet.conf +0 -6
- data/vendor/gems/puppet-4.5.2/ext/README.environment +0 -8
- data/vendor/gems/puppet-4.5.2/ext/autotest/Rakefile +0 -8
- data/vendor/gems/puppet-4.5.2/ext/autotest/config +0 -43
- data/vendor/gems/puppet-4.5.2/ext/autotest/readme.rst +0 -16
- data/vendor/gems/puppet-4.5.2/ext/build_defaults.yaml +0 -20
- data/vendor/gems/puppet-4.5.2/ext/cert_inspector +0 -140
- data/vendor/gems/puppet-4.5.2/ext/dbfix.sql +0 -132
- data/vendor/gems/puppet-4.5.2/ext/debian/README.Debian +0 -8
- data/vendor/gems/puppet-4.5.2/ext/debian/README.source +0 -2
- data/vendor/gems/puppet-4.5.2/ext/debian/TODO.Debian +0 -1
- data/vendor/gems/puppet-4.5.2/ext/debian/changelog.erb +0 -1122
- data/vendor/gems/puppet-4.5.2/ext/debian/compat +0 -1
- data/vendor/gems/puppet-4.5.2/ext/debian/control +0 -146
- data/vendor/gems/puppet-4.5.2/ext/debian/copyright +0 -361
- data/vendor/gems/puppet-4.5.2/ext/debian/docs +0 -1
- data/vendor/gems/puppet-4.5.2/ext/debian/fileserver.conf +0 -41
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-common.dirs +0 -13
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-common.install +0 -4
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-common.lintian-overrides +0 -5
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-common.manpages +0 -30
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-common.postinst +0 -35
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-common.postrm +0 -33
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-el.dirs +0 -1
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-el.emacsen-install +0 -25
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-el.emacsen-remove +0 -11
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-el.emacsen-startup +0 -9
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-el.install +0 -1
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-testsuite.install +0 -2
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet-testsuite.lintian-overrides +0 -4
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet.default +0 -4
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet.init +0 -113
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet.lintian-overrides +0 -3
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet.logrotate +0 -20
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet.postinst +0 -20
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet.postrm +0 -20
- data/vendor/gems/puppet-4.5.2/ext/debian/puppet.preinst +0 -20
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster-common.install +0 -2
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster-common.manpages +0 -2
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster-common.postinst +0 -6
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster-passenger.dirs +0 -4
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster-passenger.postinst +0 -162
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster-passenger.postrm +0 -61
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster.README.debian +0 -17
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster.default +0 -14
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster.init +0 -137
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster.lintian-overrides +0 -3
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster.postinst +0 -20
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster.postrm +0 -5
- data/vendor/gems/puppet-4.5.2/ext/debian/puppetmaster.preinst +0 -22
- data/vendor/gems/puppet-4.5.2/ext/debian/rules +0 -132
- data/vendor/gems/puppet-4.5.2/ext/debian/source/format +0 -1
- data/vendor/gems/puppet-4.5.2/ext/debian/source/options +0 -1
- data/vendor/gems/puppet-4.5.2/ext/debian/vim-puppet.README.Debian +0 -13
- data/vendor/gems/puppet-4.5.2/ext/debian/vim-puppet.dirs +0 -5
- data/vendor/gems/puppet-4.5.2/ext/debian/vim-puppet.yaml +0 -7
- data/vendor/gems/puppet-4.5.2/ext/debian/watch +0 -2
- data/vendor/gems/puppet-4.5.2/ext/emacs/puppet-mode-init.el +0 -6
- data/vendor/gems/puppet-4.5.2/ext/emacs/puppet-mode.el +0 -433
- data/vendor/gems/puppet-4.5.2/ext/envpuppet +0 -139
- data/vendor/gems/puppet-4.5.2/ext/envpuppet.bat +0 -14
- data/vendor/gems/puppet-4.5.2/ext/freebsd/puppetd +0 -26
- data/vendor/gems/puppet-4.5.2/ext/freebsd/puppetmasterd +0 -26
- data/vendor/gems/puppet-4.5.2/ext/gentoo/conf.d/puppet +0 -5
- data/vendor/gems/puppet-4.5.2/ext/gentoo/conf.d/puppetmaster +0 -12
- data/vendor/gems/puppet-4.5.2/ext/gentoo/init.d/puppet +0 -38
- data/vendor/gems/puppet-4.5.2/ext/gentoo/init.d/puppetmaster +0 -51
- data/vendor/gems/puppet-4.5.2/ext/gentoo/puppet/fileserver.conf +0 -41
- data/vendor/gems/puppet-4.5.2/ext/ips/puppet-agent +0 -44
- data/vendor/gems/puppet-4.5.2/ext/ips/puppet-master +0 -44
- data/vendor/gems/puppet-4.5.2/ext/ips/puppet.p5m.erb +0 -12
- data/vendor/gems/puppet-4.5.2/ext/ips/puppetagent.xml +0 -42
- data/vendor/gems/puppet-4.5.2/ext/ips/puppetmaster.xml +0 -42
- data/vendor/gems/puppet-4.5.2/ext/ips/rules +0 -19
- data/vendor/gems/puppet-4.5.2/ext/ips/transforms +0 -34
- data/vendor/gems/puppet-4.5.2/ext/ldap/puppet.schema +0 -24
- data/vendor/gems/puppet-4.5.2/ext/logcheck/puppet +0 -23
- data/vendor/gems/puppet-4.5.2/ext/nagios/check_puppet.rb +0 -123
- data/vendor/gems/puppet-4.5.2/ext/osx/file_mapping.yaml +0 -33
- data/vendor/gems/puppet-4.5.2/ext/osx/postflight.erb +0 -109
- data/vendor/gems/puppet-4.5.2/ext/osx/preflight.erb +0 -52
- data/vendor/gems/puppet-4.5.2/ext/osx/prototype.plist.erb +0 -38
- data/vendor/gems/puppet-4.5.2/ext/osx/puppet.plist +0 -30
- data/vendor/gems/puppet-4.5.2/ext/project_data.yaml +0 -59
- data/vendor/gems/puppet-4.5.2/ext/puppet-test +0 -500
- data/vendor/gems/puppet-4.5.2/ext/puppetlisten/puppetlisten.rb +0 -77
- data/vendor/gems/puppet-4.5.2/ext/puppetlisten/puppetrun.rb +0 -38
- data/vendor/gems/puppet-4.5.2/ext/pure_ruby_dsl/dsl_test.rb +0 -7
- data/vendor/gems/puppet-4.5.2/ext/rack/config.ru +0 -44
- data/vendor/gems/puppet-4.5.2/ext/rack/example-passenger-vhost.conf +0 -57
- data/vendor/gems/puppet-4.5.2/ext/redhat/client.init +0 -169
- data/vendor/gems/puppet-4.5.2/ext/redhat/client.sysconfig +0 -2
- data/vendor/gems/puppet-4.5.2/ext/redhat/fileserver.conf +0 -41
- data/vendor/gems/puppet-4.5.2/ext/redhat/logrotate +0 -21
- data/vendor/gems/puppet-4.5.2/ext/redhat/puppet.spec.erb +0 -849
- data/vendor/gems/puppet-4.5.2/ext/redhat/server.init +0 -128
- data/vendor/gems/puppet-4.5.2/ext/redhat/server.sysconfig +0 -13
- data/vendor/gems/puppet-4.5.2/ext/regexp_nodes/classes/databases +0 -2
- data/vendor/gems/puppet-4.5.2/ext/regexp_nodes/classes/webservers +0 -2
- data/vendor/gems/puppet-4.5.2/ext/regexp_nodes/environment/development +0 -2
- data/vendor/gems/puppet-4.5.2/ext/regexp_nodes/parameters/service/prod +0 -1
- data/vendor/gems/puppet-4.5.2/ext/regexp_nodes/parameters/service/qa +0 -3
- data/vendor/gems/puppet-4.5.2/ext/regexp_nodes/parameters/service/sandbox +0 -1
- data/vendor/gems/puppet-4.5.2/ext/regexp_nodes/regexp_nodes.rb +0 -271
- data/vendor/gems/puppet-4.5.2/ext/solaris/pkginfo +0 -6
- data/vendor/gems/puppet-4.5.2/ext/solaris/smf/puppet +0 -44
- data/vendor/gems/puppet-4.5.2/ext/solaris/smf/puppet.xml +0 -44
- data/vendor/gems/puppet-4.5.2/ext/solaris/smf/puppetd.xml +0 -77
- data/vendor/gems/puppet-4.5.2/ext/solaris/smf/puppetmasterd.xml +0 -77
- data/vendor/gems/puppet-4.5.2/ext/solaris/smf/svc-puppetd +0 -64
- data/vendor/gems/puppet-4.5.2/ext/solaris/smf/svc-puppetmasterd +0 -60
- data/vendor/gems/puppet-4.5.2/ext/suse/client.init +0 -141
- data/vendor/gems/puppet-4.5.2/ext/suse/puppet.spec +0 -310
- data/vendor/gems/puppet-4.5.2/ext/suse/server.init +0 -173
- data/vendor/gems/puppet-4.5.2/ext/systemd/puppet.service +0 -15
- data/vendor/gems/puppet-4.5.2/ext/upload_facts.rb +0 -119
- data/vendor/gems/puppet-4.5.2/ext/vim/README +0 -3
- data/vendor/gems/puppet-4.5.2/ext/vim/ftdetect/puppet.vim +0 -2
- data/vendor/gems/puppet-4.5.2/ext/vim/ftplugin/puppet.vim +0 -94
- data/vendor/gems/puppet-4.5.2/ext/vim/indent/puppet.vim +0 -76
- data/vendor/gems/puppet-4.5.2/ext/vim/syntax/puppet.vim +0 -115
- data/vendor/gems/puppet-4.5.2/ext/windows/eventlog/Rakefile +0 -32
- data/vendor/gems/puppet-4.5.2/ext/windows/eventlog/puppetres.dll +0 -0
- data/vendor/gems/puppet-4.5.2/ext/windows/eventlog/puppetres.mc +0 -18
- data/vendor/gems/puppet-4.5.2/ext/windows/puppet_interactive.bat +0 -6
- data/vendor/gems/puppet-4.5.2/ext/windows/puppet_shell.bat +0 -9
- data/vendor/gems/puppet-4.5.2/ext/windows/run_puppet_interactive.bat +0 -9
- data/vendor/gems/puppet-4.5.2/ext/windows/service/daemon.bat +0 -6
- data/vendor/gems/puppet-4.5.2/ext/windows/service/daemon.rb +0 -192
- data/vendor/gems/puppet-4.5.2/ext/yaml_nodes.rb +0 -105
- data/vendor/gems/puppet-4.5.2/install.rb +0 -477
- data/vendor/gems/puppet-4.5.2/lib/hiera/puppet_function.rb +0 -82
- data/vendor/gems/puppet-4.5.2/lib/hiera/scope.rb +0 -63
- data/vendor/gems/puppet-4.5.2/lib/puppet.rb +0 -286
- data/vendor/gems/puppet-4.5.2/lib/puppet/agent.rb +0 -102
- data/vendor/gems/puppet-4.5.2/lib/puppet/agent/disabler.rb +0 -53
- data/vendor/gems/puppet-4.5.2/lib/puppet/agent/locker.rb +0 -52
- data/vendor/gems/puppet-4.5.2/lib/puppet/application.rb +0 -462
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/agent.rb +0 -456
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/apply.rb +0 -352
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/ca.rb +0 -11
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/catalog.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/cert.rb +0 -297
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/certificate.rb +0 -17
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/certificate_request.rb +0 -7
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/certificate_revocation_list.rb +0 -7
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/config.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/describe.rb +0 -254
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/device.rb +0 -256
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/doc.rb +0 -226
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/epp.rb +0 -5
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/face_base.rb +0 -269
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/facts.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/file.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/filebucket.rb +0 -258
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/help.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/indirection_base.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/inspect.rb +0 -179
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/key.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/lookup.rb +0 -342
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/man.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/master.rb +0 -321
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/module.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/node.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/parser.rb +0 -5
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/plugin.rb +0 -3
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/report.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/resource.rb +0 -224
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/resource_type.rb +0 -7
- data/vendor/gems/puppet-4.5.2/lib/puppet/application/status.rb +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/application_support.rb +0 -57
- data/vendor/gems/puppet-4.5.2/lib/puppet/configurer.rb +0 -389
- data/vendor/gems/puppet-4.5.2/lib/puppet/configurer/fact_handler.rb +0 -37
- data/vendor/gems/puppet-4.5.2/lib/puppet/configurer/plugin_handler.rb +0 -27
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers.rb +0 -30
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/data_adapter.rb +0 -30
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/data_function_support.rb +0 -24
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/function_env_data_provider.rb +0 -18
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/function_module_data_provider.rb +0 -17
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/hiera_config.rb +0 -129
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/hiera_env_data_provider.rb +0 -18
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/hiera_interpolate.rb +0 -19
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/hiera_module_data_provider.rb +0 -23
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/hiera_support.rb +0 -37
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/json_data_provider_factory.rb +0 -24
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/lookup_adapter.rb +0 -254
- data/vendor/gems/puppet-4.5.2/lib/puppet/data_providers/yaml_data_provider_factory.rb +0 -26
- data/vendor/gems/puppet-4.5.2/lib/puppet/defaults.rb +0 -1902
- data/vendor/gems/puppet-4.5.2/lib/puppet/environments.rb +0 -487
- data/vendor/gems/puppet-4.5.2/lib/puppet/error.rb +0 -100
- data/vendor/gems/puppet-4.5.2/lib/puppet/external/dot.rb +0 -326
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/ca.rb +0 -254
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/catalog.rb +0 -130
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/certificate.rb +0 -159
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/certificate_request.rb +0 -54
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/certificate_revocation_list.rb +0 -54
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/config.rb +0 -119
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/epp.rb +0 -479
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/facts.rb +0 -38
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/file.rb +0 -47
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/help.rb +0 -193
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/help/face.erb +0 -111
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/key.rb +0 -15
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/man.rb +0 -99
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/module.rb +0 -19
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/module/generate.rb +0 -251
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/module/install.rb +0 -145
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/node.rb +0 -42
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/parser.rb +0 -161
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/plugin.rb +0 -58
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/report.rb +0 -54
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/resource.rb +0 -53
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/resource_type.rb +0 -84
- data/vendor/gems/puppet-4.5.2/lib/puppet/face/status.rb +0 -48
- data/vendor/gems/puppet-4.5.2/lib/puppet/feature/base.rb +0 -87
- data/vendor/gems/puppet-4.5.2/lib/puppet/feature/external_facts.rb +0 -5
- data/vendor/gems/puppet-4.5.2/lib/puppet/file_serving/metadata.rb +0 -163
- data/vendor/gems/puppet-4.5.2/lib/puppet/file_system.rb +0 -376
- data/vendor/gems/puppet-4.5.2/lib/puppet/file_system/file_impl.rb +0 -149
- data/vendor/gems/puppet-4.5.2/lib/puppet/file_system/memory_impl.rb +0 -82
- data/vendor/gems/puppet-4.5.2/lib/puppet/file_system/path_pattern.rb +0 -97
- data/vendor/gems/puppet-4.5.2/lib/puppet/file_system/windows.rb +0 -103
- data/vendor/gems/puppet-4.5.2/lib/puppet/forge.rb +0 -226
- data/vendor/gems/puppet-4.5.2/lib/puppet/forge/cache.rb +0 -59
- data/vendor/gems/puppet-4.5.2/lib/puppet/forge/repository.rb +0 -155
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions.rb +0 -732
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/assert_type.rb +0 -95
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/defined.rb +0 -161
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/dig.rb +0 -39
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/epp.rb +0 -45
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/hiera.rb +0 -81
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/hiera_array.rb +0 -74
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/hiera_hash.rb +0 -84
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/hiera_include.rb +0 -90
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/lest.rb +0 -53
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/new.rb +0 -502
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/regsubst.rb +0 -80
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/reverse_each.rb +0 -82
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/scanf.rb +0 -44
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/step.rb +0 -88
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/then.rb +0 -74
- data/vendor/gems/puppet-4.5.2/lib/puppet/functions/type.rb +0 -70
- data/vendor/gems/puppet-4.5.2/lib/puppet/graph/simple_graph.rb +0 -562
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/catalog/compiler.rb +0 -367
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/catalog/static_compiler.rb +0 -229
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/face.rb +0 -148
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/facts/facter.rb +0 -90
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/file_bucket_file/file.rb +0 -199
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/key/ca.rb +0 -16
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/key/file.rb +0 -49
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/request.rb +0 -256
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/rest.rb +0 -260
- data/vendor/gems/puppet-4.5.2/lib/puppet/indirector/ssl_file.rb +0 -180
- data/vendor/gems/puppet-4.5.2/lib/puppet/info_service/class_information_service.rb +0 -112
- data/vendor/gems/puppet-4.5.2/lib/puppet/interface.rb +0 -228
- data/vendor/gems/puppet-4.5.2/lib/puppet/interface/documentation.rb +0 -342
- data/vendor/gems/puppet-4.5.2/lib/puppet/interface/face_collection.rb +0 -125
- data/vendor/gems/puppet-4.5.2/lib/puppet/loaders.rb +0 -23
- data/vendor/gems/puppet-4.5.2/lib/puppet/metatype/manager.rb +0 -195
- data/vendor/gems/puppet-4.5.2/lib/puppet/module.rb +0 -355
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool.rb +0 -192
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/applications/builder.rb +0 -148
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/applications/installer.rb +0 -351
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/applications/upgrader.rb +0 -277
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/checksums.rb +0 -49
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/errors/installer.rb +0 -95
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/installed_modules.rb +0 -96
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/local_tarball.rb +0 -90
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/metadata.rb +0 -221
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/skeleton/templates/generator/examples/init.pp.erb +0 -12
- data/vendor/gems/puppet-4.5.2/lib/puppet/module_tool/tar.rb +0 -17
- data/vendor/gems/puppet-4.5.2/lib/puppet/network/http/api/indirected_routes.rb +0 -248
- data/vendor/gems/puppet-4.5.2/lib/puppet/network/http/api/master/v3.rb +0 -28
- data/vendor/gems/puppet-4.5.2/lib/puppet/network/http/compression.rb +0 -116
- data/vendor/gems/puppet-4.5.2/lib/puppet/network/http/connection.rb +0 -233
- data/vendor/gems/puppet-4.5.2/lib/puppet/network/http/error.rb +0 -69
- data/vendor/gems/puppet-4.5.2/lib/puppet/network/http/handler.rb +0 -178
- data/vendor/gems/puppet-4.5.2/lib/puppet/network/http/rack/rest.rb +0 -147
- data/vendor/gems/puppet-4.5.2/lib/puppet/network/http/webrick.rb +0 -124
- data/vendor/gems/puppet-4.5.2/lib/puppet/network/rights.rb +0 -219
- data/vendor/gems/puppet-4.5.2/lib/puppet/node/environment.rb +0 -540
- data/vendor/gems/puppet-4.5.2/lib/puppet/node/facts.rb +0 -133
- data/vendor/gems/puppet-4.5.2/lib/puppet/parameter.rb +0 -572
- data/vendor/gems/puppet-4.5.2/lib/puppet/parameter/boolean.rb +0 -15
- data/vendor/gems/puppet-4.5.2/lib/puppet/parameter/value.rb +0 -91
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser.rb +0 -20
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/ast.rb +0 -60
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/ast/leaf.rb +0 -75
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/ast/pops_bridge.rb +0 -304
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/ast/resource.rb +0 -61
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/ast/resource_instance.rb +0 -6
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/ast/resourceparam.rb +0 -26
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/compiler.rb +0 -895
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/compiler/catalog_validator/relationship_validator.rb +0 -60
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/environment_compiler.rb +0 -164
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions.rb +0 -272
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/assert_type.rb +0 -60
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/contain.rb +0 -38
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/create_resources.rb +0 -83
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/defined.rb +0 -131
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/each.rb +0 -104
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/epp.rb +0 -36
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/filter.rb +0 -78
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/hiera.rb +0 -89
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/hiera_array.rb +0 -78
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/hiera_hash.rb +0 -88
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/hiera_include.rb +0 -88
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/include.rb +0 -37
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/inline_epp.rb +0 -51
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/lookup.rb +0 -130
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/map.rb +0 -76
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/match.rb +0 -43
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/reduce.rb +0 -106
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/regsubst.rb +0 -60
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/require.rb +0 -63
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/scanf.rb +0 -33
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/slice.rb +0 -39
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/split.rb +0 -28
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/functions/with.rb +0 -28
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/resource.rb +0 -367
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/scope.rb +0 -1082
- data/vendor/gems/puppet-4.5.2/lib/puppet/parser/type_loader.rb +0 -149
- data/vendor/gems/puppet-4.5.2/lib/puppet/plugins/configuration.rb +0 -69
- data/vendor/gems/puppet-4.5.2/lib/puppet/plugins/data_providers.rb +0 -42
- data/vendor/gems/puppet-4.5.2/lib/puppet/plugins/data_providers/data_provider.rb +0 -336
- data/vendor/gems/puppet-4.5.2/lib/puppet/plugins/data_providers/registry.rb +0 -84
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops.rb +0 -136
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/adaptable.rb +0 -204
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/adapters.rb +0 -193
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/binder/producers.rb +0 -831
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/binder/scheme_handler/confdir_scheme.rb +0 -34
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/access_operator.rb +0 -639
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/callable_signature.rb +0 -100
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/closure.rb +0 -270
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/collector_transformer.rb +0 -229
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/collectors/catalog_collector.rb +0 -29
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/collectors/exported_collector.rb +0 -69
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/compare_operator.rb +0 -229
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/evaluator_impl.rb +0 -1218
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/external_syntax_support.rb +0 -52
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/json_strict_literal_evaluator.rb +0 -85
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/literal_evaluator.rb +0 -88
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/relationship_operator.rb +0 -169
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/runtime3_converter.rb +0 -192
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/evaluator/runtime3_support.rb +0 -537
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/functions/dispatch.rb +0 -85
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/functions/dispatcher.rb +0 -76
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/functions/function.rb +0 -113
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/issue_reporter.rb +0 -115
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/issues.rb +0 -729
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/label_provider.rb +0 -76
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/base_loader.rb +0 -143
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/loader.rb +0 -204
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/loader_paths.rb +0 -194
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/module_loaders.rb +0 -273
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/null_loader.rb +0 -44
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/puppet_function_instantiator.rb +0 -83
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/ruby_function_instantiator.rb +0 -47
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/runtime3_type_loader.rb +0 -57
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/static_loader.rb +0 -166
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loader/type_definition_instantiator.rb +0 -77
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/loaders.rb +0 -352
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/lookup.rb +0 -79
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/lookup/explainer.rb +0 -509
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/lookup/interpolation.rb +0 -115
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/lookup/invocation.rb +0 -119
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/lookup/sub_lookup.rb +0 -86
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/merge_strategy.rb +0 -338
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/migration/migration_checker.rb +0 -54
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/model/factory.rb +0 -1139
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/model/model_label_provider.rb +0 -125
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/model/model_meta.rb +0 -627
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/model/model_tree_dumper.rb +0 -437
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/parser/egrammar.ra +0 -866
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/parser/eparser.rb +0 -3157
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/parser/evaluating_parser.rb +0 -165
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/parser/heredoc_support.rb +0 -144
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/parser/interpolation_support.rb +0 -237
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/parser/lexer2.rb +0 -768
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/parser/locator.rb +0 -292
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/parser/parser_support.rb +0 -254
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/parser/slurp_support.rb +0 -119
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/patterns.rb +0 -47
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/pcore.rb +0 -30
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/semantic_error.rb +0 -17
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/implementation_registry.rb +0 -146
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/p_object_type.rb +0 -846
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/p_runtime_type.rb +0 -102
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/p_sem_ver_range_type.rb +0 -164
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/p_sem_ver_type.rb +0 -113
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/puppet_object.rb +0 -21
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/recursion_guard.rb +0 -92
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/ruby_generator.rb +0 -258
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/string_converter.rb +0 -922
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/type_asserter.rb +0 -47
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/type_calculator.rb +0 -807
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/type_factory.rb +0 -491
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/type_formatter.rb +0 -569
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/type_mismatch_describer.rb +0 -1039
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/type_parser.rb +0 -525
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/types/types.rb +0 -2855
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/validation.rb +0 -462
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/validation/checker4_0.rb +0 -956
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/validation/validator_factory_4_0.rb +0 -37
- data/vendor/gems/puppet-4.5.2/lib/puppet/pops/visitor.rb +0 -94
- data/vendor/gems/puppet-4.5.2/lib/puppet/property.rb +0 -537
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider.rb +0 -604
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/aixobject.rb +0 -392
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/exec.rb +0 -96
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/group/aix.rb +0 -141
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/group/windows_adsi.rb +0 -106
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/macauthorization/macauthorization.rb +0 -298
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/mailalias/aliases.rb +0 -50
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/mcx/mcxcontent.rb +0 -172
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/mount/parsed.rb +0 -280
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/nameservice.rb +0 -292
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/nameservice/directoryservice.rb +0 -499
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/aix.rb +0 -152
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/appdmg.rb +0 -110
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/apple.rb +0 -47
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/dnf.rb +0 -41
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/gem.rb +0 -169
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/nim.rb +0 -280
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/pacman.rb +0 -267
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/pip.rb +0 -178
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/pip3.rb +0 -20
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/pkg.rb +0 -245
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/pkgdmg.rb +0 -152
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/pkgin.rb +0 -87
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/pkgng.rb +0 -143
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/pkgutil.rb +0 -186
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/portage.rb +0 -153
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/rpm.rb +0 -402
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/sun.rb +0 -132
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/package/yum.rb +0 -241
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/parsedfile.rb +0 -459
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/scheduled_task/win32_taskscheduler.rb +0 -583
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/selmodule/semodule.rb +0 -134
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/base.rb +0 -121
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/bsd.rb +0 -51
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/daemontools.rb +0 -194
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/debian.rb +0 -74
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/init.rb +0 -191
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/launchd.rb +0 -331
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/runit.rb +0 -111
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/smf.rb +0 -160
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/src.rb +0 -147
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/service/systemd.rb +0 -149
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/ssh_authorized_key/parsed.rb +0 -105
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/user/aix.rb +0 -369
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/user/directoryservice.rb +0 -630
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/user/hpux.rb +0 -95
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/user/user_role_add.rb +0 -212
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/user/useradd.rb +0 -231
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/user/windows_adsi.rb +0 -142
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/yumrepo/inifile.rb +0 -304
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/zfs/zfs.rb +0 -84
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/zone/solaris.rb +0 -361
- data/vendor/gems/puppet-4.5.2/lib/puppet/provider/zpool/zpool.rb +0 -125
- data/vendor/gems/puppet-4.5.2/lib/puppet/reference/configuration.rb +0 -80
- data/vendor/gems/puppet-4.5.2/lib/puppet/reference/indirection.rb +0 -71
- data/vendor/gems/puppet-4.5.2/lib/puppet/reference/type.rb +0 -114
- data/vendor/gems/puppet-4.5.2/lib/puppet/reports/http.rb +0 -31
- data/vendor/gems/puppet-4.5.2/lib/puppet/resource.rb +0 -623
- data/vendor/gems/puppet-4.5.2/lib/puppet/resource/capability_finder.rb +0 -102
- data/vendor/gems/puppet-4.5.2/lib/puppet/resource/catalog.rb +0 -652
- data/vendor/gems/puppet-4.5.2/lib/puppet/resource/status.rb +0 -223
- data/vendor/gems/puppet-4.5.2/lib/puppet/resource/type.rb +0 -562
- data/vendor/gems/puppet-4.5.2/lib/puppet/resource/type_collection.rb +0 -256
- data/vendor/gems/puppet-4.5.2/lib/puppet/resource/type_collection_helper.rb +0 -7
- data/vendor/gems/puppet-4.5.2/lib/puppet/settings.rb +0 -1431
- data/vendor/gems/puppet-4.5.2/lib/puppet/settings/config_file.rb +0 -142
- data/vendor/gems/puppet-4.5.2/lib/puppet/settings/directory_setting.rb +0 -12
- data/vendor/gems/puppet-4.5.2/lib/puppet/settings/environment_conf.rb +0 -192
- data/vendor/gems/puppet-4.5.2/lib/puppet/settings/file_or_directory_setting.rb +0 -34
- data/vendor/gems/puppet-4.5.2/lib/puppet/settings/file_setting.rb +0 -235
- data/vendor/gems/puppet-4.5.2/lib/puppet/settings/ini_file.rb +0 -171
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/base.rb +0 -140
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/certificate.rb +0 -95
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/certificate_authority.rb +0 -517
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/certificate_authority/interface.rb +0 -184
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/certificate_request.rb +0 -327
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/configuration.rb +0 -58
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/host.rb +0 -365
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/inventory.rb +0 -48
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/key.rb +0 -59
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/oids.rb +0 -177
- data/vendor/gems/puppet-4.5.2/lib/puppet/ssl/validator/default_validator.rb +0 -174
- data/vendor/gems/puppet-4.5.2/lib/puppet/syntax_checkers/json.rb +0 -37
- data/vendor/gems/puppet-4.5.2/lib/puppet/test/test_helper.rb +0 -253
- data/vendor/gems/puppet-4.5.2/lib/puppet/transaction.rb +0 -381
- data/vendor/gems/puppet-4.5.2/lib/puppet/transaction/additional_resource_generator.rb +0 -207
- data/vendor/gems/puppet-4.5.2/lib/puppet/transaction/event.rb +0 -106
- data/vendor/gems/puppet-4.5.2/lib/puppet/transaction/event_manager.rb +0 -167
- data/vendor/gems/puppet-4.5.2/lib/puppet/transaction/report.rb +0 -408
- data/vendor/gems/puppet-4.5.2/lib/puppet/transaction/resource_harness.rb +0 -236
- data/vendor/gems/puppet-4.5.2/lib/puppet/type.rb +0 -2615
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/augeas.rb +0 -211
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/component.rb +0 -77
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/cron.rb +0 -492
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/exec.rb +0 -601
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/file.rb +0 -995
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/file/checksum.rb +0 -43
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/file/content.rb +0 -160
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/file/data_sync.rb +0 -84
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/file/mode.rb +0 -173
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/file/source.rb +0 -346
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/group.rb +0 -200
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/host.rb +0 -95
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/mount.rb +0 -314
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/notify.rb +0 -44
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/package.rb +0 -571
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/resources.rb +0 -180
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/scheduled_task.rb +0 -184
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/ssh_authorized_key.rb +0 -153
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/tidy.rb +0 -329
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/user.rb +0 -747
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/yumrepo.rb +0 -409
- data/vendor/gems/puppet-4.5.2/lib/puppet/type/zone.rb +0 -382
- data/vendor/gems/puppet-4.5.2/lib/puppet/util.rb +0 -579
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/classgen.rb +0 -228
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/command_line.rb +0 -181
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/command_line/trollop.rb +0 -824
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/execution.rb +0 -356
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/filetype.rb +0 -303
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/http_proxy.rb +0 -197
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/inifile.rb +0 -341
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/instance_loader.rb +0 -81
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/log.rb +0 -386
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/logging.rb +0 -310
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/monkey_patches.rb +0 -145
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/multi_match.rb +0 -51
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/network_device/config.rb +0 -98
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/plist.rb +0 -130
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/profiler.rb +0 -53
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/profiler/aggregate.rb +0 -85
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/profiler/around_profiler.rb +0 -67
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/psych_support.rb +0 -38
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/rdoc.rb +0 -60
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/reference.rb +0 -124
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/rubygems.rb +0 -75
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/tagging.rb +0 -118
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/watcher/periodic_watcher.rb +0 -37
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/windows/access_control_entry.rb +0 -84
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/windows/adsi.rb +0 -523
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/windows/api_types.rb +0 -275
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/windows/file.rb +0 -425
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/windows/process.rb +0 -479
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/windows/security.rb +0 -857
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/windows/taskscheduler.rb +0 -1220
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/windows/user.rb +0 -291
- data/vendor/gems/puppet-4.5.2/lib/puppet/util/yaml.rb +0 -24
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/deep_merge/test/test_deep_merge.rb +0 -608
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/pathspec/lib/pathspec.rb +0 -121
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/require_vendored.rb +0 -7
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/array_extensions_test.rb +0 -64
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/ea_instantiator_test.rb +0 -35
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/ea_serializer_test.rb +0 -23
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/ecore_self_test.rb +0 -54
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/environment_test.rb +0 -90
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/json_test.rb +0 -171
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/metamodel_builder_test.rb +0 -1482
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/metamodel_from_ecore_test.rb +0 -57
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/metamodel_order_test.rb +0 -131
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/metamodel_roundtrip_test.rb +0 -98
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/metamodel_roundtrip_test/TestModel.rb +0 -70
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/metamodel_roundtrip_test/houseMetamodel.ecore +0 -42
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/metamodel_roundtrip_test/houseMetamodel_from_ecore.rb +0 -44
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/metamodel_roundtrip_test/using_builtin_types.ecore +0 -9
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/method_delegation_test.rb +0 -178
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_builder/builder_context_test.rb +0 -59
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_builder/builder_test.rb +0 -242
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_builder/ecore_original.rb +0 -163
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_builder/ecore_original_regenerated.rb +0 -163
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_builder/reference_resolver_test.rb +0 -156
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_builder/serializer_test.rb +0 -94
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_builder/statemachine_metamodel.rb +0 -42
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_builder/test_model/statemachine1.rb +0 -23
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_builder_test.rb +0 -6
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/model_fragment_test.rb +0 -30
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/output_handler_test.rb +0 -58
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/qualified_name_provider_test.rb +0 -48
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/qualified_name_resolver_test.rb +0 -102
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/reference_resolver_test.rb +0 -117
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/rgen_test.rb +0 -26
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test.rb +0 -163
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/expected_result1.txt +0 -29
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/expected_result2.txt +0 -9
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/expected_result3.txt +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/indentStringTestDefaultIndent.out +0 -1
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/indentStringTestTabIndent.out +0 -1
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/callback_indent_test/a.tpl +0 -12
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/callback_indent_test/b.tpl +0 -5
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/code/array.tpl +0 -11
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/content/author.tpl +0 -7
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/content/chapter.tpl +0 -5
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/define_local_test/local.tpl +0 -8
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/define_local_test/test.tpl +0 -8
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/evaluate_test/test.tpl +0 -7
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/indent_string_test.tpl +0 -12
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/index/c/cmod.tpl +0 -1
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/index/chapter.tpl +0 -3
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/no_backslash_r_test.tpl +0 -5
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/no_indent_test/no_indent.tpl +0 -3
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/no_indent_test/sub1/no_indent.tpl +0 -3
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/no_indent_test/test.tpl +0 -24
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/no_indent_test/test2.tpl +0 -13
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/no_indent_test/test3.tpl +0 -10
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/null_context_test.tpl +0 -17
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/root.tpl +0 -31
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/template_resolution_test/sub1.tpl +0 -9
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/template_resolution_test/sub1/sub1.tpl +0 -3
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/templates/template_resolution_test/test.tpl +0 -4
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/template_language_test/testout.txt +0 -29
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/testmodel/class_model_checker.rb +0 -119
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/testmodel/ea_testmodel.eap +0 -0
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/testmodel/ea_testmodel.xml +0 -1029
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/testmodel/ea_testmodel_partial.xml +0 -317
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/testmodel/ecore_model_checker.rb +0 -101
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/testmodel/manual_testmodel.xml +0 -22
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/testmodel/object_model_checker.rb +0 -67
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/transformer_test.rb +0 -254
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/util/file_cache_map_test.rb +0 -99
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/util/pattern_matcher_test.rb +0 -97
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/util_test.rb +0 -5
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/xml_instantiator_test.rb +0 -160
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/xml_instantiator_test/simple_ecore_model_checker.rb +0 -94
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/xml_instantiator_test/simple_xmi_ecore_instantiator.rb +0 -53
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/xml_instantiator_test/simple_xmi_metamodel.rb +0 -49
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/test/xml_instantiator_test/simple_xmi_to_ecore.rb +0 -75
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen_patch.rb +0 -132
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/Gemfile +0 -20
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/PUPPET_README.md +0 -6
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/Rakefile +0 -69
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/lib/semantic.rb +0 -7
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/lib/semantic/dependency.rb +0 -181
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/lib/semantic/dependency/graph.rb +0 -60
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/lib/semantic/dependency/graph_node.rb +0 -117
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/lib/semantic/dependency/module_release.rb +0 -60
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/lib/semantic/dependency/source.rb +0 -25
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/lib/semantic/dependency/unsatisfiable_graph.rb +0 -31
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/lib/semantic/version.rb +0 -168
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/lib/semantic/version_range.rb +0 -424
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/spec/spec_helper.rb +0 -24
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/spec/unit/semantic/dependency/graph_node_spec.rb +0 -141
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/spec/unit/semantic/dependency/graph_spec.rb +0 -162
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/spec/unit/semantic/dependency/module_release_spec.rb +0 -143
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/spec/unit/semantic/dependency/source_spec.rb +0 -5
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/spec/unit/semantic/dependency/unsatisfiable_graph_spec.rb +0 -44
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/spec/unit/semantic/dependency_spec.rb +0 -383
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/spec/unit/semantic/version_range_spec.rb +0 -307
- data/vendor/gems/puppet-4.5.2/lib/puppet/vendor/semantic/spec/unit/semantic/version_spec.rb +0 -608
- data/vendor/gems/puppet-4.5.2/lib/puppet/version.rb +0 -89
- data/vendor/gems/puppet-4.5.2/lib/puppet_x.rb +0 -8
- data/vendor/gems/puppet-4.5.2/lib/semver.rb +0 -139
- data/vendor/gems/puppet-4.5.2/puppet-4.5.2.gemspec +0 -104
@@ -0,0 +1,316 @@
|
|
1
|
+
require 'puppet/resource/status'
|
2
|
+
|
3
|
+
class Puppet::Transaction::ResourceHarness
|
4
|
+
NO_ACTION = Object.new
|
5
|
+
|
6
|
+
extend Forwardable
|
7
|
+
def_delegators :@transaction, :relationship_graph
|
8
|
+
|
9
|
+
attr_reader :transaction
|
10
|
+
|
11
|
+
def initialize(transaction)
|
12
|
+
@transaction = transaction
|
13
|
+
@persistence = transaction.persistence
|
14
|
+
end
|
15
|
+
|
16
|
+
def evaluate(resource)
|
17
|
+
status = Puppet::Resource::Status.new(resource)
|
18
|
+
|
19
|
+
begin
|
20
|
+
context = ResourceApplicationContext.from_resource(resource, status)
|
21
|
+
perform_changes(resource, context)
|
22
|
+
|
23
|
+
if status.changed? && ! resource.noop?
|
24
|
+
cache(resource, :synced, Time.now)
|
25
|
+
resource.flush if resource.respond_to?(:flush)
|
26
|
+
end
|
27
|
+
rescue => detail
|
28
|
+
status.failed_because(detail)
|
29
|
+
ensure
|
30
|
+
status.evaluation_time = Time.now - status.time
|
31
|
+
end
|
32
|
+
|
33
|
+
status
|
34
|
+
end
|
35
|
+
|
36
|
+
def scheduled?(resource)
|
37
|
+
return true if Puppet[:ignoreschedules]
|
38
|
+
return true unless schedule = schedule(resource)
|
39
|
+
|
40
|
+
# We use 'checked' here instead of 'synced' because otherwise we'll
|
41
|
+
# end up checking most resources most times, because they will generally
|
42
|
+
# have been synced a long time ago (e.g., a file only gets updated
|
43
|
+
# once a month on the server and its schedule is daily; the last sync time
|
44
|
+
# will have been a month ago, so we'd end up checking every run).
|
45
|
+
schedule.match?(cached(resource, :checked).to_i)
|
46
|
+
end
|
47
|
+
|
48
|
+
def schedule(resource)
|
49
|
+
unless resource.catalog
|
50
|
+
resource.warning "Cannot schedule without a schedule-containing catalog"
|
51
|
+
return nil
|
52
|
+
end
|
53
|
+
|
54
|
+
return nil unless name = resource[:schedule]
|
55
|
+
resource.catalog.resource(:schedule, name) || resource.fail("Could not find schedule #{name}")
|
56
|
+
end
|
57
|
+
|
58
|
+
# Used mostly for scheduling and auditing at this point.
|
59
|
+
def cached(resource, name)
|
60
|
+
Puppet::Util::Storage.cache(resource)[name]
|
61
|
+
end
|
62
|
+
|
63
|
+
# Used mostly for scheduling and auditing at this point.
|
64
|
+
def cache(resource, name, value)
|
65
|
+
Puppet::Util::Storage.cache(resource)[name] = value
|
66
|
+
end
|
67
|
+
|
68
|
+
private
|
69
|
+
|
70
|
+
def perform_changes(resource, context)
|
71
|
+
cache(resource, :checked, Time.now)
|
72
|
+
|
73
|
+
# Record the current state in state.yml.
|
74
|
+
context.audited_params.each do |param|
|
75
|
+
cache(resource, param, context.current_values[param])
|
76
|
+
end
|
77
|
+
|
78
|
+
ensure_param = resource.parameter(:ensure)
|
79
|
+
if ensure_param && ensure_param.should
|
80
|
+
ensure_event = sync_if_needed(ensure_param, context)
|
81
|
+
else
|
82
|
+
ensure_event = NO_ACTION
|
83
|
+
end
|
84
|
+
|
85
|
+
if ensure_event == NO_ACTION
|
86
|
+
if context.resource_present?
|
87
|
+
resource.properties.each do |param|
|
88
|
+
sync_if_needed(param, context)
|
89
|
+
end
|
90
|
+
else
|
91
|
+
resource.debug("Nothing to manage: no ensure and the resource doesn't exist")
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
capture_audit_events(resource, context)
|
96
|
+
persist_system_values(resource, context)
|
97
|
+
end
|
98
|
+
|
99
|
+
# We persist the last known values for the properties of a resource after resource
|
100
|
+
# application.
|
101
|
+
# @param [Puppet::Type] resource resource whose values we are to persist.
|
102
|
+
# @param [ResourceApplicationContent] context the application context to operate on.
|
103
|
+
def persist_system_values(resource, context)
|
104
|
+
param_to_event = {}
|
105
|
+
context.status.events.each do |ev|
|
106
|
+
param_to_event[ev.property] = ev
|
107
|
+
end
|
108
|
+
|
109
|
+
context.system_value_params.each do |pname, param|
|
110
|
+
@persistence.set_system_value(resource.ref, pname.to_s,
|
111
|
+
new_system_value(param,
|
112
|
+
param_to_event[pname.to_s],
|
113
|
+
@persistence.get_system_value(resource.ref, pname.to_s)))
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
def sync_if_needed(param, context)
|
118
|
+
historical_value = context.historical_values[param.name]
|
119
|
+
current_value = context.current_values[param.name]
|
120
|
+
do_audit = context.audited_params.include?(param.name)
|
121
|
+
|
122
|
+
begin
|
123
|
+
if param.should && !param.safe_insync?(current_value)
|
124
|
+
event = create_change_event(param, current_value, historical_value)
|
125
|
+
if do_audit
|
126
|
+
event = audit_event(event, param, context)
|
127
|
+
end
|
128
|
+
|
129
|
+
brief_audit_message = audit_message(param, do_audit, historical_value, current_value)
|
130
|
+
|
131
|
+
if param.noop
|
132
|
+
noop(event, param, current_value, brief_audit_message)
|
133
|
+
else
|
134
|
+
sync(event, param, current_value, brief_audit_message)
|
135
|
+
end
|
136
|
+
|
137
|
+
event
|
138
|
+
else
|
139
|
+
NO_ACTION
|
140
|
+
end
|
141
|
+
rescue => detail
|
142
|
+
# Execution will continue on StandardErrors, just store the event
|
143
|
+
Puppet.log_exception(detail)
|
144
|
+
|
145
|
+
event = create_change_event(param, current_value, historical_value)
|
146
|
+
event.status = "failure"
|
147
|
+
event.message = param.format("change from %s to %s failed: #{detail}",
|
148
|
+
param.is_to_s(current_value),
|
149
|
+
param.should_to_s(param.should))
|
150
|
+
event
|
151
|
+
rescue Exception => detail
|
152
|
+
# Execution will halt on Exceptions, they get raised to the application
|
153
|
+
event = create_change_event(param, current_value, historical_value)
|
154
|
+
event.status = "failure"
|
155
|
+
event.message = param.format("change from %s to %s failed: #{detail}",
|
156
|
+
param.is_to_s(current_value),
|
157
|
+
param.should_to_s(param.should))
|
158
|
+
raise
|
159
|
+
ensure
|
160
|
+
if event
|
161
|
+
event.calculate_corrective_change(@persistence.get_system_value(context.resource.ref, param.name.to_s))
|
162
|
+
context.record(event)
|
163
|
+
event.send_log
|
164
|
+
context.synced_params << param.name
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
def create_change_event(property, current_value, historical_value)
|
170
|
+
options = {}
|
171
|
+
should = property.should
|
172
|
+
|
173
|
+
if property.sensitive
|
174
|
+
options[:previous_value] = current_value.nil? ? nil : '[redacted]'
|
175
|
+
options[:desired_value] = should.nil? ? nil : '[redacted]'
|
176
|
+
options[:historical_value] = historical_value.nil? ? nil : '[redacted]'
|
177
|
+
else
|
178
|
+
options[:previous_value] = current_value
|
179
|
+
options[:desired_value] = should
|
180
|
+
options[:historical_value] = historical_value
|
181
|
+
end
|
182
|
+
|
183
|
+
property.event(options)
|
184
|
+
end
|
185
|
+
|
186
|
+
# This method is an ugly hack because, given a Time object with nanosecond
|
187
|
+
# resolution, roundtripped through YAML serialization, the Time object will
|
188
|
+
# be truncated to microseconds.
|
189
|
+
# For audit purposes, this code special cases this comparison, and compares
|
190
|
+
# the two objects by their second and microsecond components. tv_sec is the
|
191
|
+
# number of seconds since the epoch, and tv_usec is only the microsecond
|
192
|
+
# portion of time.
|
193
|
+
def are_audited_values_equal(a, b)
|
194
|
+
a == b || (a.is_a?(Time) && b.is_a?(Time) && a.tv_sec == b.tv_sec && a.tv_usec == b.tv_usec)
|
195
|
+
end
|
196
|
+
private :are_audited_values_equal
|
197
|
+
|
198
|
+
# Populate an existing event with audit information.
|
199
|
+
#
|
200
|
+
# @param event [Puppet::Transaction::Event] The event to be populated.
|
201
|
+
# @param property [Puppet::Property] The property being audited.
|
202
|
+
# @param context [ResourceApplicationContext]
|
203
|
+
#
|
204
|
+
# @return [Puppet::Transaction::Event] The given event, populated with the audit information.
|
205
|
+
def audit_event(event, property, context)
|
206
|
+
event.audited = true
|
207
|
+
event.status = "audit"
|
208
|
+
|
209
|
+
# The event we've been provided might have been redacted so we need to use the state stored within
|
210
|
+
# the resource application context to see if an event was actually generated.
|
211
|
+
if !are_audited_values_equal(context.historical_values[property.name], context.current_values[property.name])
|
212
|
+
event.message = property.format("audit change: previously recorded value %s has been changed to %s",
|
213
|
+
property.is_to_s(event.historical_value),
|
214
|
+
property.is_to_s(event.previous_value))
|
215
|
+
end
|
216
|
+
|
217
|
+
event
|
218
|
+
end
|
219
|
+
|
220
|
+
def audit_message(param, do_audit, historical_value, current_value)
|
221
|
+
if do_audit && historical_value && !are_audited_values_equal(historical_value, current_value)
|
222
|
+
param.format(" (previously recorded value was %s)", param.is_to_s(historical_value))
|
223
|
+
else
|
224
|
+
""
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
def noop(event, param, current_value, audit_message)
|
229
|
+
event.message = param.format("current_value %s, should be %s (noop)#{audit_message}",
|
230
|
+
param.is_to_s(current_value),
|
231
|
+
param.should_to_s(param.should))
|
232
|
+
event.status = "noop"
|
233
|
+
end
|
234
|
+
|
235
|
+
def sync(event, param, current_value, audit_message)
|
236
|
+
param.sync
|
237
|
+
if param.sensitive
|
238
|
+
event.message = param.format("changed %s to %s#{audit_message}", param.is_to_s(current_value), param.should_to_s(param.should))
|
239
|
+
else
|
240
|
+
event.message = "#{param.change_to_s(current_value, param.should)}#{audit_message}"
|
241
|
+
end
|
242
|
+
event.status = "success"
|
243
|
+
end
|
244
|
+
|
245
|
+
def capture_audit_events(resource, context)
|
246
|
+
context.audited_params.each do |param_name|
|
247
|
+
if context.historical_values.include?(param_name)
|
248
|
+
if !are_audited_values_equal(context.historical_values[param_name], context.current_values[param_name]) && !context.synced_params.include?(param_name)
|
249
|
+
parameter = resource.parameter(param_name)
|
250
|
+
event = audit_event(create_change_event(parameter,
|
251
|
+
context.current_values[param_name],
|
252
|
+
context.historical_values[param_name]),
|
253
|
+
parameter, context)
|
254
|
+
event.send_log
|
255
|
+
context.record(event)
|
256
|
+
end
|
257
|
+
else
|
258
|
+
property = resource.property(param_name)
|
259
|
+
property.notice(property.format("audit change: newly-recorded value %s", context.current_values[param_name]))
|
260
|
+
end
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
# Given an event and its property, calculate the system_value to persist
|
265
|
+
# for future calculations.
|
266
|
+
# @param [Puppet::Transaction::Event] event event to use for processing
|
267
|
+
# @param [Puppet::Property] property correlating property
|
268
|
+
# @param [Object] old_system_value system_value from last transaction
|
269
|
+
# @return [Object] system_value to be used for next transaction
|
270
|
+
def new_system_value(property, event, old_system_value)
|
271
|
+
if event && event.status != "success"
|
272
|
+
# For non-success events, we persist the old_system_value if it is defined,
|
273
|
+
# or use the event previous_value.
|
274
|
+
# If we're using the event previous_value, we ensure that it's
|
275
|
+
# an array. This is needed because properties assume that their
|
276
|
+
# `should` value is an array, and we will use this value later
|
277
|
+
# on in property insync? logic.
|
278
|
+
event_value = [event.previous_value] unless event.previous_value.is_a?(Array)
|
279
|
+
old_system_value.nil? ? event_value : old_system_value
|
280
|
+
else
|
281
|
+
# For non events, or for success cases, we just want to store
|
282
|
+
# the parameters agent value.
|
283
|
+
# We use instance_variable_get here because we want this process to bypass any
|
284
|
+
# munging/unmunging or validation that the property might try to do, since those
|
285
|
+
# operations may not be correctly implemented for custom types.
|
286
|
+
property.instance_variable_get(:@should)
|
287
|
+
end
|
288
|
+
end
|
289
|
+
|
290
|
+
# @api private
|
291
|
+
ResourceApplicationContext = Struct.new(:resource,
|
292
|
+
:current_values,
|
293
|
+
:historical_values,
|
294
|
+
:audited_params,
|
295
|
+
:synced_params,
|
296
|
+
:status,
|
297
|
+
:system_value_params) do
|
298
|
+
def self.from_resource(resource, status)
|
299
|
+
ResourceApplicationContext.new(resource,
|
300
|
+
resource.retrieve_resource.to_hash,
|
301
|
+
Puppet::Util::Storage.cache(resource).dup,
|
302
|
+
(resource[:audit] || []).map { |p| p.to_sym },
|
303
|
+
[],
|
304
|
+
status,
|
305
|
+
resource.parameters.select { |n,p| p.is_a?(Puppet::Property) && !p.sensitive })
|
306
|
+
end
|
307
|
+
|
308
|
+
def resource_present?
|
309
|
+
resource.present?(current_values)
|
310
|
+
end
|
311
|
+
|
312
|
+
def record(event)
|
313
|
+
status << event
|
314
|
+
end
|
315
|
+
end
|
316
|
+
end
|
@@ -0,0 +1,2670 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require 'puppet'
|
3
|
+
require 'puppet/util/log'
|
4
|
+
require 'puppet/util/metric'
|
5
|
+
require 'puppet/property'
|
6
|
+
require 'puppet/parameter'
|
7
|
+
require 'puppet/util'
|
8
|
+
require 'puppet/util/autoload'
|
9
|
+
require 'puppet/metatype/manager'
|
10
|
+
require 'puppet/util/errors'
|
11
|
+
require 'puppet/util/logging'
|
12
|
+
require 'puppet/util/tagging'
|
13
|
+
|
14
|
+
# see the bottom of the file for the rest of the inclusions
|
15
|
+
|
16
|
+
|
17
|
+
module Puppet
|
18
|
+
# The base class for all Puppet types.
|
19
|
+
#
|
20
|
+
# A type describes:
|
21
|
+
#--
|
22
|
+
# * **Attributes** - properties, parameters, and meta-parameters are different types of attributes of a type.
|
23
|
+
# * **Properties** - these are the properties of the managed resource (attributes of the entity being managed; like
|
24
|
+
# a file's owner, group and mode). A property describes two states; the 'is' (current state) and the 'should' (wanted
|
25
|
+
# state).
|
26
|
+
# * **Ensurable** - a set of traits that control the lifecycle (create, remove, etc.) of a managed entity.
|
27
|
+
# There is a default set of operations associated with being _ensurable_, but this can be changed.
|
28
|
+
# * **Name/Identity** - one property is the name/identity of a resource, the _namevar_ that uniquely identifies
|
29
|
+
# one instance of a type from all others.
|
30
|
+
# * **Parameters** - additional attributes of the type (that does not directly related to an instance of the managed
|
31
|
+
# resource; if an operation is recursive or not, where to look for things, etc.). A Parameter (in contrast to Property)
|
32
|
+
# has one current value where a Property has two (current-state and wanted-state).
|
33
|
+
# * **Meta-Parameters** - parameters that are available across all types. A meta-parameter typically has
|
34
|
+
# additional semantics; like the `require` meta-parameter. A new type typically does not add new meta-parameters,
|
35
|
+
# but you need to be aware of their existence so you do not inadvertently shadow an existing meta-parameters.
|
36
|
+
# * **Parent** - a type can have a super type (that it inherits from).
|
37
|
+
# * **Validation** - If not just a basic data type, or an enumeration of symbolic values, it is possible to provide
|
38
|
+
# validation logic for a type, properties and parameters.
|
39
|
+
# * **Munging** - munging/unmunging is the process of turning a value in external representation (as used
|
40
|
+
# by a provider) into an internal representation and vice versa. A Type supports adding custom logic for these.
|
41
|
+
# * **Auto Requirements** - a type can specify automatic relationships to resources to ensure that if they are being
|
42
|
+
# managed, they will be processed before this type.
|
43
|
+
# * **Providers** - a provider is an implementation of a type's behavior - the management of a resource in the
|
44
|
+
# system being managed. A provider is often platform specific and is selected at runtime based on
|
45
|
+
# criteria/predicates specified in the configured providers. See {Puppet::Provider} for details.
|
46
|
+
# * **Device Support** - A type has some support for being applied to a device; i.e. something that is managed
|
47
|
+
# by running logic external to the device itself. There are several methods that deals with type
|
48
|
+
# applicability for these special cases such as {apply_to_device}.
|
49
|
+
#
|
50
|
+
# Additional Concepts:
|
51
|
+
# --
|
52
|
+
# * **Resource-type** - A _resource type_ is a term used to denote the type of a resource; internally a resource
|
53
|
+
# is really an instance of a Ruby class i.e. {Puppet::Resource} which defines its behavior as "resource data".
|
54
|
+
# Conceptually however, a resource is an instance of a subclass of Type (e.g. File), where such a class describes
|
55
|
+
# its interface (what can be said/what is known about a resource of this type),
|
56
|
+
# * **Managed Entity** - This is not a term in general use, but is used here when there is a need to make
|
57
|
+
# a distinction between a resource (a description of what/how something should be managed), and what it is
|
58
|
+
# managing (a file in the file system). The term _managed entity_ is a reference to the "file in the file system"
|
59
|
+
# * **Isomorphism** - the quality of being _isomorphic_ means that two resource instances with the same name
|
60
|
+
# refers to the same managed entity. Or put differently; _an isomorphic name is the identity of a resource_.
|
61
|
+
# As an example, `exec` resources (that executes some command) have the command (i.e. the command line string) as
|
62
|
+
# their name, and these resources are said to be non-isomorphic.
|
63
|
+
#
|
64
|
+
# @note The Type class deals with multiple concerns; some methods provide an internal DSL for convenient definition
|
65
|
+
# of types, other methods deal with various aspects while running; wiring up a resource (expressed in Puppet DSL)
|
66
|
+
# with its _resource type_ (i.e. an instance of Type) to enable validation, transformation of values
|
67
|
+
# (munge/unmunge), etc. Lastly, Type is also responsible for dealing with Providers; the concrete implementations
|
68
|
+
# of the behavior that constitutes how a particular Type behaves on a particular type of system (e.g. how
|
69
|
+
# commands are executed on a flavor of Linux, on Windows, etc.). This means that as you are reading through the
|
70
|
+
# documentation of this class, you will be switching between these concepts, as well as switching between
|
71
|
+
# the conceptual level "a resource is an instance of a resource-type" and the actual implementation classes
|
72
|
+
# (Type, Resource, Provider, and various utility and helper classes).
|
73
|
+
#
|
74
|
+
# @api public
|
75
|
+
#
|
76
|
+
#
|
77
|
+
class Type
|
78
|
+
extend Puppet::CompilableResourceType
|
79
|
+
include Puppet::Util
|
80
|
+
include Puppet::Util::Errors
|
81
|
+
include Puppet::Util::Logging
|
82
|
+
include Puppet::Util::Tagging
|
83
|
+
|
84
|
+
# Comparing type instances.
|
85
|
+
include Comparable
|
86
|
+
|
87
|
+
# Compares this type against the given _other_ (type) and returns -1, 0, or +1 depending on the order.
|
88
|
+
# @param other [Object] the object to compare against (produces nil, if not kind of Type}
|
89
|
+
# @return [-1, 0, +1, nil] produces -1 if this type is before the given _other_ type, 0 if equals, and 1 if after.
|
90
|
+
# Returns nil, if the given _other_ is not a kind of Type.
|
91
|
+
# @see Comparable
|
92
|
+
#
|
93
|
+
def <=>(other)
|
94
|
+
# Order is only maintained against other types, not arbitrary objects.
|
95
|
+
# The natural order is based on the reference name used when comparing
|
96
|
+
return nil unless other.is_a?(Puppet::CompilableResourceType) || other.class.is_a?(Puppet::CompilableResourceType)
|
97
|
+
# against other type instances.
|
98
|
+
self.ref <=> other.ref
|
99
|
+
end
|
100
|
+
|
101
|
+
# Code related to resource type attributes.
|
102
|
+
class << self
|
103
|
+
include Puppet::Util::ClassGen
|
104
|
+
include Puppet::Util::Warnings
|
105
|
+
|
106
|
+
# @return [Array<Puppet::Property>] The list of declared properties for the resource type.
|
107
|
+
# The returned lists contains instances if Puppet::Property or its subclasses.
|
108
|
+
attr_reader :properties
|
109
|
+
end
|
110
|
+
|
111
|
+
# Allow declaring that a type is actually a capability
|
112
|
+
class << self
|
113
|
+
attr_accessor :is_capability
|
114
|
+
|
115
|
+
def is_capability?
|
116
|
+
c = is_capability
|
117
|
+
c.nil? ? false : c
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
# Returns whether this type represents an application instance; since
|
122
|
+
# only defined types, i.e., instances of Puppet::Resource::Type can
|
123
|
+
# represent application instances, this implementation always returns
|
124
|
+
# +false+. Having this method though makes code checking whether a
|
125
|
+
# resource is an application instance simpler
|
126
|
+
def self.application?
|
127
|
+
false
|
128
|
+
end
|
129
|
+
|
130
|
+
# Returns all the attribute names of the type in the appropriate order.
|
131
|
+
# The {key_attributes} come first, then the {provider}, then the {properties}, and finally
|
132
|
+
# the {parameters} and {metaparams},
|
133
|
+
# all in the order they were specified in the respective files.
|
134
|
+
# @return [Array<String>] all type attribute names in a defined order.
|
135
|
+
#
|
136
|
+
def self.allattrs
|
137
|
+
key_attributes | (parameters & [:provider]) | properties.collect { |property| property.name } | parameters | metaparams
|
138
|
+
end
|
139
|
+
|
140
|
+
# Returns the class associated with the given attribute name.
|
141
|
+
# @param name [String] the name of the attribute to obtain the class for
|
142
|
+
# @return [Class, nil] the class for the given attribute, or nil if the name does not refer to an existing attribute
|
143
|
+
#
|
144
|
+
def self.attrclass(name)
|
145
|
+
@attrclasses ||= {}
|
146
|
+
|
147
|
+
# We cache the value, since this method gets called such a huge number
|
148
|
+
# of times (as in, hundreds of thousands in a given run).
|
149
|
+
unless @attrclasses.include?(name)
|
150
|
+
@attrclasses[name] = case self.attrtype(name)
|
151
|
+
when :property; @validproperties[name]
|
152
|
+
when :meta; @@metaparamhash[name]
|
153
|
+
when :param; @paramhash[name]
|
154
|
+
end
|
155
|
+
end
|
156
|
+
@attrclasses[name]
|
157
|
+
end
|
158
|
+
|
159
|
+
# Returns the attribute type (`:property`, `;param`, `:meta`).
|
160
|
+
# @comment What type of parameter are we dealing with? Cache the results, because
|
161
|
+
# this method gets called so many times.
|
162
|
+
# @return [Symbol] a symbol describing the type of attribute (`:property`, `;param`, `:meta`)
|
163
|
+
#
|
164
|
+
def self.attrtype(attr)
|
165
|
+
@attrtypes ||= {}
|
166
|
+
unless @attrtypes.include?(attr)
|
167
|
+
@attrtypes[attr] = case
|
168
|
+
when @validproperties.include?(attr); :property
|
169
|
+
when @paramhash.include?(attr); :param
|
170
|
+
when @@metaparamhash.include?(attr); :meta
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
@attrtypes[attr]
|
175
|
+
end
|
176
|
+
|
177
|
+
# Provides iteration over meta-parameters.
|
178
|
+
# @yieldparam p [Puppet::Parameter] each meta parameter
|
179
|
+
# @return [void]
|
180
|
+
#
|
181
|
+
def self.eachmetaparam
|
182
|
+
@@metaparams.each { |p| yield p.name }
|
183
|
+
end
|
184
|
+
|
185
|
+
# Creates a new `ensure` property with configured default values or with configuration by an optional block.
|
186
|
+
# This method is a convenience method for creating a property `ensure` with default accepted values.
|
187
|
+
# If no block is specified, the new `ensure` property will accept the default symbolic
|
188
|
+
# values `:present`, and `:absent` - see {Puppet::Property::Ensure}.
|
189
|
+
# If something else is wanted, pass a block and make calls to {Puppet::Property.newvalue} from this block
|
190
|
+
# to define each possible value. If a block is passed, the defaults are not automatically added to the set of
|
191
|
+
# valid values.
|
192
|
+
#
|
193
|
+
# @note This method will be automatically called without a block if the type implements the methods
|
194
|
+
# specified by {ensurable?}. It is recommended to always call this method and not rely on this automatic
|
195
|
+
# specification to clearly state that the type is ensurable.
|
196
|
+
#
|
197
|
+
# @overload ensurable()
|
198
|
+
# @overload ensurable({|| ... })
|
199
|
+
# @yield [ ] A block evaluated in scope of the new Parameter
|
200
|
+
# @yieldreturn [void]
|
201
|
+
# @return [void]
|
202
|
+
# @dsl type
|
203
|
+
# @api public
|
204
|
+
#
|
205
|
+
def self.ensurable(&block)
|
206
|
+
if block_given?
|
207
|
+
self.newproperty(:ensure, :parent => Puppet::Property::Ensure, &block)
|
208
|
+
else
|
209
|
+
self.newproperty(:ensure, :parent => Puppet::Property::Ensure) do
|
210
|
+
self.defaultvalues
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
# Returns true if the type implements the default behavior expected by being _ensurable_ "by default".
|
216
|
+
# A type is _ensurable_ by default if it responds to `:exists`, `:create`, and `:destroy`.
|
217
|
+
# If a type implements these methods and have not already specified that it is _ensurable_, it will be
|
218
|
+
# made so with the defaults specified in {ensurable}.
|
219
|
+
# @return [Boolean] whether the type is _ensurable_ or not.
|
220
|
+
#
|
221
|
+
def self.ensurable?
|
222
|
+
# If the class has all three of these methods defined, then it's
|
223
|
+
# ensurable.
|
224
|
+
[:exists?, :create, :destroy].all? { |method|
|
225
|
+
self.public_method_defined?(method)
|
226
|
+
}
|
227
|
+
end
|
228
|
+
|
229
|
+
# @comment These `apply_to` methods are horrible. They should really be implemented
|
230
|
+
# as part of the usual system of constraints that apply to a type and
|
231
|
+
# provider pair, but were implemented as a separate shadow system.
|
232
|
+
#
|
233
|
+
# @comment We should rip them out in favour of a real constraint pattern around the
|
234
|
+
# target device - whatever that looks like - and not have this additional
|
235
|
+
# magic here. --daniel 2012-03-08
|
236
|
+
#
|
237
|
+
# Makes this type applicable to `:device`.
|
238
|
+
# @return [Symbol] Returns `:device`
|
239
|
+
# @api private
|
240
|
+
#
|
241
|
+
def self.apply_to_device
|
242
|
+
@apply_to = :device
|
243
|
+
end
|
244
|
+
|
245
|
+
# Makes this type applicable to `:host`.
|
246
|
+
# @return [Symbol] Returns `:host`
|
247
|
+
# @api private
|
248
|
+
#
|
249
|
+
def self.apply_to_host
|
250
|
+
@apply_to = :host
|
251
|
+
end
|
252
|
+
|
253
|
+
# Makes this type applicable to `:both` (i.e. `:host` and `:device`).
|
254
|
+
# @return [Symbol] Returns `:both`
|
255
|
+
# @api private
|
256
|
+
#
|
257
|
+
def self.apply_to_all
|
258
|
+
@apply_to = :both
|
259
|
+
end
|
260
|
+
|
261
|
+
# Makes this type apply to `:host` if not already applied to something else.
|
262
|
+
# @return [Symbol] a `:device`, `:host`, or `:both` enumeration
|
263
|
+
# @api private
|
264
|
+
def self.apply_to
|
265
|
+
@apply_to ||= :host
|
266
|
+
end
|
267
|
+
|
268
|
+
# Returns true if this type is applicable to the given target.
|
269
|
+
# @param target [Symbol] should be :device, :host or :target, if anything else, :host is enforced
|
270
|
+
# @return [Boolean] true
|
271
|
+
# @api private
|
272
|
+
#
|
273
|
+
def self.can_apply_to(target)
|
274
|
+
[ target == :device ? :device : :host, :both ].include?(apply_to)
|
275
|
+
end
|
276
|
+
|
277
|
+
# Processes the options for a named parameter.
|
278
|
+
# @param name [String] the name of a parameter
|
279
|
+
# @param options [Hash] a hash of options
|
280
|
+
# @option options [Boolean] :boolean if option set to true, an access method on the form _name_? is added for the param
|
281
|
+
# @return [void]
|
282
|
+
#
|
283
|
+
def self.handle_param_options(name, options)
|
284
|
+
# If it's a boolean parameter, create a method to test the value easily
|
285
|
+
if options[:boolean]
|
286
|
+
define_method(name.to_s + "?") do
|
287
|
+
val = self[name]
|
288
|
+
if val == :true or val == true
|
289
|
+
return true
|
290
|
+
end
|
291
|
+
end
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
295
|
+
# Is the given parameter a meta-parameter?
|
296
|
+
# @return [Boolean] true if the given parameter is a meta-parameter.
|
297
|
+
#
|
298
|
+
def self.metaparam?(param)
|
299
|
+
@@metaparamhash.include?(param.intern)
|
300
|
+
end
|
301
|
+
|
302
|
+
# Returns the meta-parameter class associated with the given meta-parameter name.
|
303
|
+
# Accepts a `nil` name, and return nil.
|
304
|
+
# @param name [String, nil] the name of a meta-parameter
|
305
|
+
# @return [Class,nil] the class for the given meta-parameter, or `nil` if no such meta-parameter exists, (or if
|
306
|
+
# the given meta-parameter name is `nil`.
|
307
|
+
#
|
308
|
+
def self.metaparamclass(name)
|
309
|
+
return nil if name.nil?
|
310
|
+
@@metaparamhash[name.intern]
|
311
|
+
end
|
312
|
+
|
313
|
+
# Returns all meta-parameter names.
|
314
|
+
# @return [Array<String>] all meta-parameter names
|
315
|
+
#
|
316
|
+
def self.metaparams
|
317
|
+
@@metaparams.collect { |param| param.name }
|
318
|
+
end
|
319
|
+
|
320
|
+
# Returns the documentation for a given meta-parameter of this type.
|
321
|
+
# @param metaparam [Puppet::Parameter] the meta-parameter to get documentation for.
|
322
|
+
# @return [String] the documentation associated with the given meta-parameter, or nil of no such documentation
|
323
|
+
# exists.
|
324
|
+
# @raise if the given metaparam is not a meta-parameter in this type
|
325
|
+
#
|
326
|
+
def self.metaparamdoc(metaparam)
|
327
|
+
@@metaparamhash[metaparam].doc
|
328
|
+
end
|
329
|
+
|
330
|
+
# Creates a new meta-parameter.
|
331
|
+
# This creates a new meta-parameter that is added to this and all inheriting types.
|
332
|
+
# @param name [Symbol] the name of the parameter
|
333
|
+
# @param options [Hash] a hash with options.
|
334
|
+
# @option options [Class<inherits Puppet::Parameter>] :parent (Puppet::Parameter) the super class of this parameter
|
335
|
+
# @option options [Hash{String => Object}] :attributes a hash that is applied to the generated class
|
336
|
+
# by calling setter methods corresponding to this hash's keys/value pairs. This is done before the given
|
337
|
+
# block is evaluated.
|
338
|
+
# @option options [Boolean] :boolean (false) specifies if this is a boolean parameter
|
339
|
+
# @option options [Boolean] :namevar (false) specifies if this parameter is the namevar
|
340
|
+
# @option options [Symbol, Array<Symbol>] :required_features specifies required provider features by name
|
341
|
+
# @return [Class<inherits Puppet::Parameter>] the created parameter
|
342
|
+
# @yield [ ] a required block that is evaluated in the scope of the new meta-parameter
|
343
|
+
# @api public
|
344
|
+
# @dsl type
|
345
|
+
# @todo Verify that this description is ok
|
346
|
+
#
|
347
|
+
def self.newmetaparam(name, options = {}, &block)
|
348
|
+
@@metaparams ||= []
|
349
|
+
@@metaparamhash ||= {}
|
350
|
+
name = name.intern
|
351
|
+
|
352
|
+
param = genclass(
|
353
|
+
name,
|
354
|
+
:parent => options[:parent] || Puppet::Parameter,
|
355
|
+
:prefix => "MetaParam",
|
356
|
+
:hash => @@metaparamhash,
|
357
|
+
:array => @@metaparams,
|
358
|
+
:attributes => options[:attributes],
|
359
|
+
&block
|
360
|
+
)
|
361
|
+
|
362
|
+
# Grr.
|
363
|
+
param.required_features = options[:required_features] if options[:required_features]
|
364
|
+
|
365
|
+
handle_param_options(name, options)
|
366
|
+
|
367
|
+
param.metaparam = true
|
368
|
+
|
369
|
+
param
|
370
|
+
end
|
371
|
+
|
372
|
+
# Returns the list of parameters that comprise the composite key / "uniqueness key".
|
373
|
+
# All parameters that return true from #isnamevar? or is named `:name` are included in the returned result.
|
374
|
+
# @see uniqueness_key
|
375
|
+
# @return [Array<Puppet::Parameter>] WARNING: this return type is uncertain
|
376
|
+
def self.key_attribute_parameters
|
377
|
+
@key_attribute_parameters ||= (
|
378
|
+
@parameters.find_all { |param|
|
379
|
+
param.isnamevar? or param.name == :name
|
380
|
+
}
|
381
|
+
)
|
382
|
+
end
|
383
|
+
|
384
|
+
# Returns cached {key_attribute_parameters} names.
|
385
|
+
# Key attributes are properties and parameters that comprise a composite key
|
386
|
+
# or "uniqueness key".
|
387
|
+
# @return [Array<String>] cached key_attribute names
|
388
|
+
#
|
389
|
+
def self.key_attributes
|
390
|
+
# This is a cache miss around 0.05 percent of the time. --daniel 2012-07-17
|
391
|
+
@key_attributes_cache ||= key_attribute_parameters.collect { |p| p.name }
|
392
|
+
end
|
393
|
+
|
394
|
+
# Returns a mapping from the title string to setting of attribute value(s).
|
395
|
+
# This default implementation provides a mapping of title to the one and only _namevar_ present
|
396
|
+
# in the type's definition.
|
397
|
+
# @note Advanced: some logic requires this mapping to be done differently, using a different
|
398
|
+
# validation/pattern, breaking up the title
|
399
|
+
# into several parts assigning each to an individual attribute, or even use a composite identity where
|
400
|
+
# all namevars are seen as part of the unique identity (such computation is done by the {#uniqueness} method.
|
401
|
+
# These advanced options are rarely used (only one of the built in puppet types use this, and then only
|
402
|
+
# a small part of the available functionality), and the support for these advanced mappings is not
|
403
|
+
# implemented in a straight forward way. For these reasons, this method has been marked as private).
|
404
|
+
#
|
405
|
+
# @raise [Puppet::DevError] if there is no title pattern and there are two or more key attributes
|
406
|
+
# @return [Array<Array<Regexp, Array<Array <Symbol, Proc>>>>, nil] a structure with a regexp and the first key_attribute ???
|
407
|
+
# @comment This wonderful piece of logic creates a structure used by Resource.parse_title which
|
408
|
+
# has the capability to assign parts of the title to one or more attributes; It looks like an implementation
|
409
|
+
# of a composite identity key (all parts of the key_attributes array are in the key). This can also
|
410
|
+
# be seen in the method uniqueness_key.
|
411
|
+
# The implementation in this method simply assigns the title to the one and only namevar (which is name
|
412
|
+
# or a variable marked as namevar).
|
413
|
+
# If there are multiple namevars (any in addition to :name?) then this method MUST be implemented
|
414
|
+
# as it raises an exception if there is more than 1. Note that in puppet, it is only File that uses this
|
415
|
+
# to create a different pattern for assigning to the :path attribute
|
416
|
+
# This requires further digging.
|
417
|
+
# The entire construct is somewhat strange, since resource checks if the method "title_patterns" is
|
418
|
+
# implemented (it seems it always is) - why take this more expensive regexp mathching route for all
|
419
|
+
# other types?
|
420
|
+
# @api private
|
421
|
+
#
|
422
|
+
def self.title_patterns
|
423
|
+
case key_attributes.length
|
424
|
+
when 0; []
|
425
|
+
when 1;
|
426
|
+
[ [ /(.*)/m, [ [key_attributes.first] ] ] ]
|
427
|
+
else
|
428
|
+
raise Puppet::DevError,"you must specify title patterns when there are two or more key attributes"
|
429
|
+
end
|
430
|
+
end
|
431
|
+
|
432
|
+
# Produces a resource's _uniqueness_key_ (or composite key).
|
433
|
+
# This key is an array of all key attributes' values. Each distinct tuple must be unique for each resource type.
|
434
|
+
# @see key_attributes
|
435
|
+
# @return [Object] an object that is a _uniqueness_key_ for this object
|
436
|
+
#
|
437
|
+
def uniqueness_key
|
438
|
+
self.class.key_attributes.sort_by { |attribute_name| attribute_name.to_s }.map{ |attribute_name| self[attribute_name] }
|
439
|
+
end
|
440
|
+
|
441
|
+
# Creates a new parameter.
|
442
|
+
# @param name [Symbol] the name of the parameter
|
443
|
+
# @param options [Hash] a hash with options.
|
444
|
+
# @option options [Class<inherits Puppet::Parameter>] :parent (Puppet::Parameter) the super class of this parameter
|
445
|
+
# @option options [Hash{String => Object}] :attributes a hash that is applied to the generated class
|
446
|
+
# by calling setter methods corresponding to this hash's keys/value pairs. This is done before the given
|
447
|
+
# block is evaluated.
|
448
|
+
# @option options [Boolean] :boolean (false) specifies if this is a boolean parameter
|
449
|
+
# @option options [Boolean] :namevar (false) specifies if this parameter is the namevar
|
450
|
+
# @option options [Symbol, Array<Symbol>] :required_features specifies required provider features by name
|
451
|
+
# @return [Class<inherits Puppet::Parameter>] the created parameter
|
452
|
+
# @yield [ ] a required block that is evaluated in the scope of the new parameter
|
453
|
+
# @api public
|
454
|
+
# @dsl type
|
455
|
+
#
|
456
|
+
def self.newparam(name, options = {}, &block)
|
457
|
+
options[:attributes] ||= {}
|
458
|
+
|
459
|
+
param = genclass(
|
460
|
+
name,
|
461
|
+
:parent => options[:parent] || Puppet::Parameter,
|
462
|
+
:attributes => options[:attributes],
|
463
|
+
:block => block,
|
464
|
+
:prefix => "Parameter",
|
465
|
+
:array => @parameters,
|
466
|
+
:hash => @paramhash
|
467
|
+
)
|
468
|
+
|
469
|
+
handle_param_options(name, options)
|
470
|
+
|
471
|
+
# Grr.
|
472
|
+
param.required_features = options[:required_features] if options[:required_features]
|
473
|
+
|
474
|
+
param.isnamevar if options[:namevar]
|
475
|
+
|
476
|
+
param
|
477
|
+
end
|
478
|
+
|
479
|
+
# Creates a new property.
|
480
|
+
# @param name [Symbol] the name of the property
|
481
|
+
# @param options [Hash] a hash with options.
|
482
|
+
# @option options [Symbol] :array_matching (:first) specifies how the current state is matched against
|
483
|
+
# the wanted state. Use `:first` if the property is single valued, and (`:all`) otherwise.
|
484
|
+
# @option options [Class<inherits Puppet::Property>] :parent (Puppet::Property) the super class of this property
|
485
|
+
# @option options [Hash{String => Object}] :attributes a hash that is applied to the generated class
|
486
|
+
# by calling setter methods corresponding to this hash's keys/value pairs. This is done before the given
|
487
|
+
# block is evaluated.
|
488
|
+
# @option options [Boolean] :boolean (false) specifies if this is a boolean parameter
|
489
|
+
# @option options [Symbol] :retrieve the method to call on the provider (or `parent` if `provider` is not set)
|
490
|
+
# to retrieve the current value of this property.
|
491
|
+
# @option options [Symbol, Array<Symbol>] :required_features specifies required provider features by name
|
492
|
+
# @return [Class<inherits Puppet::Property>] the created property
|
493
|
+
# @yield [ ] a required block that is evaluated in the scope of the new property
|
494
|
+
# @api public
|
495
|
+
# @dsl type
|
496
|
+
#
|
497
|
+
def self.newproperty(name, options = {}, &block)
|
498
|
+
name = name.intern
|
499
|
+
|
500
|
+
# This is here for types that might still have the old method of defining
|
501
|
+
# a parent class.
|
502
|
+
unless options.is_a? Hash
|
503
|
+
raise Puppet::DevError,
|
504
|
+
"Options must be a hash, not #{options.inspect}"
|
505
|
+
end
|
506
|
+
|
507
|
+
raise Puppet::DevError, "Class #{self.name} already has a property named #{name}" if @validproperties.include?(name)
|
508
|
+
|
509
|
+
if parent = options[:parent]
|
510
|
+
options.delete(:parent)
|
511
|
+
else
|
512
|
+
parent = Puppet::Property
|
513
|
+
end
|
514
|
+
|
515
|
+
# We have to create our own, new block here because we want to define
|
516
|
+
# an initial :retrieve method, if told to, and then eval the passed
|
517
|
+
# block if available.
|
518
|
+
prop = genclass(name, :parent => parent, :hash => @validproperties, :attributes => options) do
|
519
|
+
# If they've passed a retrieve method, then override the retrieve
|
520
|
+
# method on the class.
|
521
|
+
if options[:retrieve]
|
522
|
+
define_method(:retrieve) do
|
523
|
+
provider.send(options[:retrieve])
|
524
|
+
end
|
525
|
+
end
|
526
|
+
|
527
|
+
class_eval(&block) if block
|
528
|
+
end
|
529
|
+
|
530
|
+
# If it's the 'ensure' property, always put it first.
|
531
|
+
if name == :ensure
|
532
|
+
@properties.unshift prop
|
533
|
+
else
|
534
|
+
@properties << prop
|
535
|
+
end
|
536
|
+
|
537
|
+
prop
|
538
|
+
end
|
539
|
+
|
540
|
+
def self.paramdoc(param)
|
541
|
+
@paramhash[param].doc
|
542
|
+
end
|
543
|
+
|
544
|
+
# @return [Array<String>] Returns the parameter names
|
545
|
+
def self.parameters
|
546
|
+
return [] unless defined?(@parameters)
|
547
|
+
@parameters.collect { |klass| klass.name }
|
548
|
+
end
|
549
|
+
|
550
|
+
# @return [Puppet::Parameter] Returns the parameter class associated with the given parameter name.
|
551
|
+
def self.paramclass(name)
|
552
|
+
@paramhash[name]
|
553
|
+
end
|
554
|
+
|
555
|
+
# @return [Puppet::Property] Returns the property class ??? associated with the given property name
|
556
|
+
def self.propertybyname(name)
|
557
|
+
@validproperties[name]
|
558
|
+
end
|
559
|
+
|
560
|
+
# Returns whether or not the given name is the name of a property, parameter or meta-parameter
|
561
|
+
# @return [Boolean] true if the given attribute name is the name of an existing property, parameter or meta-parameter
|
562
|
+
#
|
563
|
+
def self.validattr?(name)
|
564
|
+
name = name.intern
|
565
|
+
return true if name == :name
|
566
|
+
@validattrs ||= {}
|
567
|
+
|
568
|
+
unless @validattrs.include?(name)
|
569
|
+
@validattrs[name] = !!(self.validproperty?(name) or self.validparameter?(name) or self.metaparam?(name))
|
570
|
+
end
|
571
|
+
|
572
|
+
@validattrs[name]
|
573
|
+
end
|
574
|
+
|
575
|
+
# @return [Boolean] Returns true if the given name is the name of an existing property
|
576
|
+
def self.validproperty?(name)
|
577
|
+
name = name.intern
|
578
|
+
@validproperties.include?(name) && @validproperties[name]
|
579
|
+
end
|
580
|
+
|
581
|
+
# @return [Array<Symbol>, {}] Returns a list of valid property names, or an empty hash if there are none.
|
582
|
+
# @todo An empty hash is returned if there are no defined parameters (not an empty array). This looks like
|
583
|
+
# a bug.
|
584
|
+
#
|
585
|
+
def self.validproperties
|
586
|
+
return {} unless defined?(@parameters)
|
587
|
+
|
588
|
+
@validproperties.keys
|
589
|
+
end
|
590
|
+
|
591
|
+
# @return [Boolean] Returns true if the given name is the name of an existing parameter
|
592
|
+
def self.validparameter?(name)
|
593
|
+
raise Puppet::DevError, "Class #{self} has not defined parameters" unless defined?(@parameters)
|
594
|
+
!!(@paramhash.include?(name) or @@metaparamhash.include?(name))
|
595
|
+
end
|
596
|
+
|
597
|
+
# (see validattr?)
|
598
|
+
# @note see comment in code - how should this be documented? Are some of the other query methods deprecated?
|
599
|
+
# (or should be).
|
600
|
+
# @comment This is a forward-compatibility method - it's the validity interface we'll use in Puppet::Resource.
|
601
|
+
def self.valid_parameter?(name)
|
602
|
+
validattr?(name)
|
603
|
+
end
|
604
|
+
|
605
|
+
# @return [Boolean] Returns true if the wanted state of the resource is that it should be absent (i.e. to be deleted).
|
606
|
+
def deleting?
|
607
|
+
obj = @parameters[:ensure] and obj.should == :absent
|
608
|
+
end
|
609
|
+
|
610
|
+
# Creates a new property value holder for the resource if it is valid and does not already exist
|
611
|
+
# @return [Boolean] true if a new parameter was added, false otherwise
|
612
|
+
def add_property_parameter(prop_name)
|
613
|
+
if self.class.validproperty?(prop_name) && !@parameters[prop_name]
|
614
|
+
self.newattr(prop_name)
|
615
|
+
return true
|
616
|
+
end
|
617
|
+
false
|
618
|
+
end
|
619
|
+
|
620
|
+
# @return [Symbol, Boolean] Returns the name of the namevar if there is only one or false otherwise.
|
621
|
+
# @comment This is really convoluted and part of the support for multiple namevars (?).
|
622
|
+
# If there is only one namevar, the produced value is naturally this namevar, but if there are several?
|
623
|
+
# The logic caches the name of the namevar if it is a single name, but otherwise always
|
624
|
+
# calls key_attributes, and then caches the first if there was only one, otherwise it returns
|
625
|
+
# false and caches this (which is then subsequently returned as a cache hit).
|
626
|
+
#
|
627
|
+
def name_var
|
628
|
+
return @name_var_cache unless @name_var_cache.nil?
|
629
|
+
key_attributes = self.class.key_attributes
|
630
|
+
@name_var_cache = (key_attributes.length == 1) && key_attributes.first
|
631
|
+
end
|
632
|
+
|
633
|
+
# Gets the 'should' (wanted state) value of a parameter or property by name.
|
634
|
+
# To explicitly get the 'is' (current state) value use `o.is(:name)`, and to explicitly get the 'should' value
|
635
|
+
# use `o.should(:name)`
|
636
|
+
# @param name [String] the name of the attribute to obtain the 'should' value for.
|
637
|
+
# @return [Object] 'should'/wanted value of the given attribute
|
638
|
+
def [](name)
|
639
|
+
name = name.intern
|
640
|
+
fail("Invalid parameter #{name}(#{name.inspect})") unless self.class.validattr?(name)
|
641
|
+
|
642
|
+
if name == :name && nv = name_var
|
643
|
+
name = nv
|
644
|
+
end
|
645
|
+
|
646
|
+
if obj = @parameters[name]
|
647
|
+
# Note that if this is a property, then the value is the "should" value,
|
648
|
+
# not the current value.
|
649
|
+
obj.value
|
650
|
+
else
|
651
|
+
return nil
|
652
|
+
end
|
653
|
+
end
|
654
|
+
|
655
|
+
# Sets the 'should' (wanted state) value of a property, or the value of a parameter.
|
656
|
+
# @return
|
657
|
+
# @raise [Puppet::Error] if the setting of the value fails, or if the given name is nil.
|
658
|
+
# @raise [Puppet::ResourceError] when the parameter validation raises Puppet::Error or
|
659
|
+
# ArgumentError
|
660
|
+
def []=(name,value)
|
661
|
+
name = name.intern
|
662
|
+
|
663
|
+
fail("no parameter named '#{name}'") unless self.class.validattr?(name)
|
664
|
+
|
665
|
+
if name == :name && nv = name_var
|
666
|
+
name = nv
|
667
|
+
end
|
668
|
+
raise Puppet::Error.new("Got nil value for #{name}") if value.nil?
|
669
|
+
|
670
|
+
property = self.newattr(name)
|
671
|
+
|
672
|
+
if property
|
673
|
+
begin
|
674
|
+
# make sure the parameter doesn't have any errors
|
675
|
+
property.value = value
|
676
|
+
rescue Puppet::Error, ArgumentError => detail
|
677
|
+
error = Puppet::ResourceError.new("Parameter #{name} failed on #{ref}: #{detail}")
|
678
|
+
adderrorcontext(error, detail)
|
679
|
+
raise error
|
680
|
+
end
|
681
|
+
end
|
682
|
+
|
683
|
+
nil
|
684
|
+
end
|
685
|
+
|
686
|
+
# Removes an attribute from the object; useful in testing or in cleanup
|
687
|
+
# when an error has been encountered
|
688
|
+
# @todo Don't know what the attr is (name or Property/Parameter?). Guessing it is a String name...
|
689
|
+
# @todo Is it possible to delete a meta-parameter?
|
690
|
+
# @todo What does delete mean? Is it deleted from the type or is its value state 'is'/'should' deleted?
|
691
|
+
# @param attr [String] the attribute to delete from this object. WHAT IS THE TYPE?
|
692
|
+
# @raise [Puppet::DecError] when an attempt is made to delete an attribute that does not exists.
|
693
|
+
#
|
694
|
+
def delete(attr)
|
695
|
+
attr = attr.intern
|
696
|
+
if @parameters.has_key?(attr)
|
697
|
+
@parameters.delete(attr)
|
698
|
+
else
|
699
|
+
raise Puppet::DevError.new("Undefined attribute '#{attr}' in #{self}")
|
700
|
+
end
|
701
|
+
end
|
702
|
+
|
703
|
+
# Iterates over the properties that were set on this resource.
|
704
|
+
# @yieldparam property [Puppet::Property] each property
|
705
|
+
# @return [void]
|
706
|
+
def eachproperty
|
707
|
+
# properties is a private method
|
708
|
+
properties.each { |property|
|
709
|
+
yield property
|
710
|
+
}
|
711
|
+
end
|
712
|
+
|
713
|
+
# Return the parameters, metaparams, and properties that have a value or were set by a default. Properties are
|
714
|
+
# included since they are a subclass of parameter.
|
715
|
+
# @return [Array<Puppet::Parameter>] Array of parameter objects ( or subclass thereof )
|
716
|
+
def parameters_with_value
|
717
|
+
self.class.allattrs.collect { |attr| parameter(attr) }.compact
|
718
|
+
end
|
719
|
+
|
720
|
+
# Iterates over all parameters with value currently set.
|
721
|
+
# @yieldparam parameter [Puppet::Parameter] or a subclass thereof
|
722
|
+
# @return [void]
|
723
|
+
def eachparameter
|
724
|
+
parameters_with_value.each { |parameter| yield parameter }
|
725
|
+
end
|
726
|
+
|
727
|
+
# Creates a transaction event.
|
728
|
+
# Called by Transaction or by a property.
|
729
|
+
# Merges the given options with the options `:resource`, `:file`, `:line`, and `:tags`, initialized from
|
730
|
+
# values in this object. For possible options to pass (if any ????) see {Puppet::Transaction::Event}.
|
731
|
+
# @todo Needs a better explanation "Why should I care who is calling this method?", What do I need to know
|
732
|
+
# about events and how they work? Where can I read about them?
|
733
|
+
# @param options [Hash] options merged with a fixed set of options defined by this method, passed on to {Puppet::Transaction::Event}.
|
734
|
+
# @return [Puppet::Transaction::Event] the created event
|
735
|
+
def event(options = {})
|
736
|
+
Puppet::Transaction::Event.new({:resource => self, :file => file, :line => line, :tags => tags}.merge(options))
|
737
|
+
end
|
738
|
+
|
739
|
+
# @return [Object, nil] Returns the 'should' (wanted state) value for a specified property, or nil if the
|
740
|
+
# given attribute name is not a property (i.e. if it is a parameter, meta-parameter, or does not exist).
|
741
|
+
def should(name)
|
742
|
+
name = name.intern
|
743
|
+
(prop = @parameters[name] and prop.is_a?(Puppet::Property)) ? prop.should : nil
|
744
|
+
end
|
745
|
+
|
746
|
+
# Registers an attribute to this resource type instance.
|
747
|
+
# Requires either the attribute name or class as its argument.
|
748
|
+
# This is a noop if the named property/parameter is not supported
|
749
|
+
# by this resource. Otherwise, an attribute instance is created
|
750
|
+
# and kept in this resource's parameters hash.
|
751
|
+
# @overload newattr(name)
|
752
|
+
# @param name [Symbol] symbolic name of the attribute
|
753
|
+
# @overload newattr(klass)
|
754
|
+
# @param klass [Class] a class supported as an attribute class, i.e. a subclass of
|
755
|
+
# Parameter or Property
|
756
|
+
# @return [Object] An instance of the named Parameter or Property class associated
|
757
|
+
# to this resource type instance, or nil if the attribute is not supported
|
758
|
+
#
|
759
|
+
def newattr(name)
|
760
|
+
if name.is_a?(Class)
|
761
|
+
klass = name
|
762
|
+
name = klass.name
|
763
|
+
end
|
764
|
+
|
765
|
+
unless klass = self.class.attrclass(name)
|
766
|
+
raise Puppet::Error, "Resource type #{self.class.name} does not support parameter #{name}"
|
767
|
+
end
|
768
|
+
|
769
|
+
if provider and ! provider.class.supports_parameter?(klass)
|
770
|
+
missing = klass.required_features.find_all { |f| ! provider.class.feature?(f) }
|
771
|
+
debug "Provider %s does not support features %s; not managing attribute %s" % [provider.class.name, missing.join(", "), name]
|
772
|
+
return nil
|
773
|
+
end
|
774
|
+
|
775
|
+
return @parameters[name] if @parameters.include?(name)
|
776
|
+
|
777
|
+
@parameters[name] = klass.new(:resource => self)
|
778
|
+
end
|
779
|
+
|
780
|
+
# Returns a string representation of the resource's containment path in
|
781
|
+
# the catalog.
|
782
|
+
# @return [String]
|
783
|
+
def path
|
784
|
+
@path ||= '/' + pathbuilder.join('/')
|
785
|
+
end
|
786
|
+
|
787
|
+
# Returns the value of this object's parameter given by name
|
788
|
+
# @param name [String] the name of the parameter
|
789
|
+
# @return [Object] the value
|
790
|
+
def parameter(name)
|
791
|
+
@parameters[name.to_sym]
|
792
|
+
end
|
793
|
+
|
794
|
+
# Returns a shallow copy of this object's hash of attributes by name.
|
795
|
+
# Note that his not only comprises parameters, but also properties and metaparameters.
|
796
|
+
# Changes to the contained parameters will have an effect on the parameters of this type, but changes to
|
797
|
+
# the returned hash does not.
|
798
|
+
# @return [Hash{String => Object}] a new hash being a shallow copy of the parameters map name to parameter
|
799
|
+
def parameters
|
800
|
+
@parameters.dup
|
801
|
+
end
|
802
|
+
|
803
|
+
# @return [Boolean] Returns whether the attribute given by name has been added
|
804
|
+
# to this resource or not.
|
805
|
+
def propertydefined?(name)
|
806
|
+
name = name.intern unless name.is_a? Symbol
|
807
|
+
@parameters.include?(name)
|
808
|
+
end
|
809
|
+
|
810
|
+
# Returns a {Puppet::Property} instance by name.
|
811
|
+
# To return the value, use 'resource[param]'
|
812
|
+
# @todo LAK:NOTE(20081028) Since the 'parameter' method is now a superset of this method,
|
813
|
+
# this one should probably go away at some point. - Does this mean it should be deprecated ?
|
814
|
+
# @return [Puppet::Property] the property with the given name, or nil if not a property or does not exist.
|
815
|
+
def property(name)
|
816
|
+
(obj = @parameters[name.intern] and obj.is_a?(Puppet::Property)) ? obj : nil
|
817
|
+
end
|
818
|
+
|
819
|
+
# @todo comment says "For any parameters or properties that have defaults and have not yet been
|
820
|
+
# set, set them now. This method can be handed a list of attributes,
|
821
|
+
# and if so it will only set defaults for those attributes."
|
822
|
+
# @todo Needs a better explanation, and investigation about the claim an array can be passed (it is passed
|
823
|
+
# to self.class.attrclass to produce a class on which a check is made if it has a method class :default (does
|
824
|
+
# not seem to support an array...
|
825
|
+
# @return [void]
|
826
|
+
#
|
827
|
+
def set_default(attr)
|
828
|
+
return unless klass = self.class.attrclass(attr)
|
829
|
+
return unless klass.method_defined?(:default)
|
830
|
+
return if @parameters.include?(klass.name)
|
831
|
+
|
832
|
+
return unless parameter = newattr(klass.name)
|
833
|
+
|
834
|
+
if value = parameter.default and ! value.nil?
|
835
|
+
parameter.value = value
|
836
|
+
else
|
837
|
+
@parameters.delete(parameter.name)
|
838
|
+
end
|
839
|
+
end
|
840
|
+
|
841
|
+
# @todo the comment says: "Convert our object to a hash. This just includes properties."
|
842
|
+
# @todo this is confused, again it is the @parameters instance variable that is consulted, and
|
843
|
+
# each value is copied - does it contain "properties" and "parameters" or both? Does it contain
|
844
|
+
# meta-parameters?
|
845
|
+
#
|
846
|
+
# @return [Hash{ ??? => ??? }] a hash of WHAT?. The hash is a shallow copy, any changes to the
|
847
|
+
# objects returned in this hash will be reflected in the original resource having these attributes.
|
848
|
+
#
|
849
|
+
def to_hash
|
850
|
+
rethash = {}
|
851
|
+
|
852
|
+
@parameters.each do |name, obj|
|
853
|
+
rethash[name] = obj.value
|
854
|
+
end
|
855
|
+
|
856
|
+
rethash
|
857
|
+
end
|
858
|
+
|
859
|
+
# @return [String] the name of this object's class
|
860
|
+
# @todo Would that be "file" for the "File" resource type? of "File" or something else?
|
861
|
+
#
|
862
|
+
def type
|
863
|
+
self.class.name
|
864
|
+
end
|
865
|
+
|
866
|
+
# @todo Comment says "Return a specific value for an attribute.", as opposed to what "An unspecific value"???
|
867
|
+
# @todo is this the 'is' or the 'should' value?
|
868
|
+
# @todo why is the return restricted to things that respond to :value? (Only non structural basic data types
|
869
|
+
# supported?
|
870
|
+
#
|
871
|
+
# @return [Object, nil] the value of the attribute having the given name, or nil if the given name is not
|
872
|
+
# an attribute, or the referenced attribute does not respond to `:value`.
|
873
|
+
def value(name)
|
874
|
+
name = name.intern
|
875
|
+
|
876
|
+
(obj = @parameters[name] and obj.respond_to?(:value)) ? obj.value : nil
|
877
|
+
end
|
878
|
+
|
879
|
+
# @todo What is this used for? Needs a better explanation.
|
880
|
+
# @return [???] the version of the catalog or 0 if there is no catalog.
|
881
|
+
def version
|
882
|
+
return 0 unless catalog
|
883
|
+
catalog.version
|
884
|
+
end
|
885
|
+
|
886
|
+
# @return [Array<Puppet::Property>] Returns all of the property objects, in the order specified in the
|
887
|
+
# class.
|
888
|
+
# @todo "what does the 'order specified in the class' mean? The order the properties where added in the
|
889
|
+
# ruby file adding a new type with new properties?
|
890
|
+
#
|
891
|
+
def properties
|
892
|
+
self.class.properties.collect { |prop| @parameters[prop.name] }.compact
|
893
|
+
end
|
894
|
+
|
895
|
+
# Returns true if the type's notion of name is the identity of a resource.
|
896
|
+
# See the overview of this class for a longer explanation of the concept _isomorphism_.
|
897
|
+
# Defaults to true.
|
898
|
+
#
|
899
|
+
# @return [Boolean] true, if this type's name is isomorphic with the object
|
900
|
+
def self.isomorphic?
|
901
|
+
if defined?(@isomorphic)
|
902
|
+
return @isomorphic
|
903
|
+
else
|
904
|
+
return true
|
905
|
+
end
|
906
|
+
end
|
907
|
+
|
908
|
+
# @todo check that this gets documentation (it is at the class level as well as instance).
|
909
|
+
# (see isomorphic?)
|
910
|
+
def isomorphic?
|
911
|
+
self.class.isomorphic?
|
912
|
+
end
|
913
|
+
|
914
|
+
# Returns true if the instance is a managed instance.
|
915
|
+
# A 'yes' here means that the instance was created from the language, vs. being created
|
916
|
+
# in order resolve other questions, such as finding a package in a list.
|
917
|
+
# @note An object that is managed always stays managed, but an object that is not managed
|
918
|
+
# may become managed later in its lifecycle.
|
919
|
+
# @return [Boolean] true if the object is managed
|
920
|
+
def managed?
|
921
|
+
# Once an object is managed, it always stays managed; but an object
|
922
|
+
# that is listed as unmanaged might become managed later in the process,
|
923
|
+
# so we have to check that every time
|
924
|
+
if @managed
|
925
|
+
return @managed
|
926
|
+
else
|
927
|
+
@managed = false
|
928
|
+
properties.each { |property|
|
929
|
+
s = property.should
|
930
|
+
if s and ! property.class.unmanaged
|
931
|
+
@managed = true
|
932
|
+
break
|
933
|
+
end
|
934
|
+
}
|
935
|
+
return @managed
|
936
|
+
end
|
937
|
+
end
|
938
|
+
|
939
|
+
###############################
|
940
|
+
# Code related to the container behaviour.
|
941
|
+
|
942
|
+
# Returns true if the search should be done in depth-first order.
|
943
|
+
# This implementation always returns false.
|
944
|
+
# @todo What is this used for?
|
945
|
+
#
|
946
|
+
# @return [Boolean] true if the search should be done in depth first order.
|
947
|
+
#
|
948
|
+
def depthfirst?
|
949
|
+
false
|
950
|
+
end
|
951
|
+
|
952
|
+
# Removes this object (FROM WHERE?)
|
953
|
+
# @todo removes if from where?
|
954
|
+
# @return [void]
|
955
|
+
def remove()
|
956
|
+
# This is hackish (mmm, cut and paste), but it works for now, and it's
|
957
|
+
# better than warnings.
|
958
|
+
@parameters.each do |name, obj|
|
959
|
+
obj.remove
|
960
|
+
end
|
961
|
+
@parameters.clear
|
962
|
+
|
963
|
+
@parent = nil
|
964
|
+
|
965
|
+
# Remove the reference to the provider.
|
966
|
+
if self.provider
|
967
|
+
@provider.clear
|
968
|
+
@provider = nil
|
969
|
+
end
|
970
|
+
end
|
971
|
+
|
972
|
+
###############################
|
973
|
+
# Code related to evaluating the resources.
|
974
|
+
|
975
|
+
# Returns the ancestors - WHAT?
|
976
|
+
# This implementation always returns an empty list.
|
977
|
+
# @todo WHAT IS THIS ?
|
978
|
+
# @return [Array<???>] returns a list of ancestors.
|
979
|
+
def ancestors
|
980
|
+
[]
|
981
|
+
end
|
982
|
+
|
983
|
+
# Lifecycle method for a resource. This is called during graph creation.
|
984
|
+
# It should perform any consistency checking of the catalog and raise a
|
985
|
+
# Puppet::Error if the transaction should be aborted.
|
986
|
+
#
|
987
|
+
# It differs from the validate method, since it is called later during
|
988
|
+
# initialization and can rely on self.catalog to have references to all
|
989
|
+
# resources that comprise the catalog.
|
990
|
+
#
|
991
|
+
# @see Puppet::Transaction#add_vertex
|
992
|
+
# @raise [Puppet::Error] If the pre-run check failed.
|
993
|
+
# @return [void]
|
994
|
+
# @abstract a resource type may implement this method to perform
|
995
|
+
# validation checks that can query the complete catalog
|
996
|
+
def pre_run_check
|
997
|
+
end
|
998
|
+
|
999
|
+
# Flushes the provider if supported by the provider, else no action.
|
1000
|
+
# This is called by the transaction.
|
1001
|
+
# @todo What does Flushing the provider mean? Why is it interesting to know that this is
|
1002
|
+
# called by the transaction? (It is not explained anywhere what a transaction is).
|
1003
|
+
#
|
1004
|
+
# @return [???, nil] WHAT DOES IT RETURN? GUESS IS VOID
|
1005
|
+
def flush
|
1006
|
+
self.provider.flush if self.provider and self.provider.respond_to?(:flush)
|
1007
|
+
end
|
1008
|
+
|
1009
|
+
# Returns true if all contained objects are in sync.
|
1010
|
+
# @todo "contained in what?" in the given "in" parameter?
|
1011
|
+
#
|
1012
|
+
# @todo deal with the comment _"FIXME I don't think this is used on the type instances any more,
|
1013
|
+
# it's really only used for testing"_
|
1014
|
+
# @return [Boolean] true if in sync, false otherwise.
|
1015
|
+
#
|
1016
|
+
def insync?(is)
|
1017
|
+
insync = true
|
1018
|
+
|
1019
|
+
if property = @parameters[:ensure]
|
1020
|
+
unless is.include? property
|
1021
|
+
raise Puppet::DevError,
|
1022
|
+
"The is value is not in the is array for '#{property.name}'"
|
1023
|
+
end
|
1024
|
+
ensureis = is[property]
|
1025
|
+
if property.safe_insync?(ensureis) and property.should == :absent
|
1026
|
+
return true
|
1027
|
+
end
|
1028
|
+
end
|
1029
|
+
|
1030
|
+
properties.each { |prop|
|
1031
|
+
unless is.include? prop
|
1032
|
+
raise Puppet::DevError,
|
1033
|
+
"The is value is not in the is array for '#{prop.name}'"
|
1034
|
+
end
|
1035
|
+
|
1036
|
+
propis = is[prop]
|
1037
|
+
unless prop.safe_insync?(propis)
|
1038
|
+
prop.debug("Not in sync: #{propis.inspect} vs #{prop.should.inspect}")
|
1039
|
+
insync = false
|
1040
|
+
#else
|
1041
|
+
# property.debug("In sync")
|
1042
|
+
end
|
1043
|
+
}
|
1044
|
+
|
1045
|
+
#self.debug("#{self} sync status is #{insync}")
|
1046
|
+
insync
|
1047
|
+
end
|
1048
|
+
|
1049
|
+
# Says if the ensure property should be retrieved if the resource is ensurable
|
1050
|
+
# Defaults to true. Some resource type classes can override it
|
1051
|
+
def self.needs_ensure_retrieved
|
1052
|
+
true
|
1053
|
+
end
|
1054
|
+
|
1055
|
+
# Retrieves the current value of all contained properties.
|
1056
|
+
# Parameters and meta-parameters are not included in the result.
|
1057
|
+
# @todo As opposed to all non contained properties? How is this different than any of the other
|
1058
|
+
# methods that also "gets" properties/parameters/etc. ?
|
1059
|
+
# @return [Puppet::Resource] array of all property values (mix of types)
|
1060
|
+
# @raise [fail???] if there is a provider and it is not suitable for the host this is evaluated for.
|
1061
|
+
def retrieve
|
1062
|
+
fail "Provider #{provider.class.name} is not functional on this host" if self.provider.is_a?(Puppet::Provider) and ! provider.class.suitable?
|
1063
|
+
|
1064
|
+
result = Puppet::Resource.new(self.class, title)
|
1065
|
+
|
1066
|
+
# Provide the name, so we know we'll always refer to a real thing
|
1067
|
+
result[:name] = self[:name] unless self[:name] == title
|
1068
|
+
|
1069
|
+
if ensure_prop = property(:ensure) or (self.class.needs_ensure_retrieved and self.class.validattr?(:ensure) and ensure_prop = newattr(:ensure))
|
1070
|
+
result[:ensure] = ensure_state = ensure_prop.retrieve
|
1071
|
+
else
|
1072
|
+
ensure_state = nil
|
1073
|
+
end
|
1074
|
+
|
1075
|
+
properties.each do |property|
|
1076
|
+
next if property.name == :ensure
|
1077
|
+
if ensure_state == :absent
|
1078
|
+
result[property] = :absent
|
1079
|
+
else
|
1080
|
+
result[property] = property.retrieve
|
1081
|
+
end
|
1082
|
+
end
|
1083
|
+
|
1084
|
+
result
|
1085
|
+
end
|
1086
|
+
|
1087
|
+
# Retrieve the current state of the system as a Puppet::Resource. For
|
1088
|
+
# the base Puppet::Type this does the same thing as #retrieve, but
|
1089
|
+
# specific types are free to implement #retrieve as returning a hash,
|
1090
|
+
# and this will call #retrieve and convert the hash to a resource.
|
1091
|
+
# This is used when determining when syncing a resource.
|
1092
|
+
#
|
1093
|
+
# @return [Puppet::Resource] A resource representing the current state
|
1094
|
+
# of the system.
|
1095
|
+
#
|
1096
|
+
# @api private
|
1097
|
+
def retrieve_resource
|
1098
|
+
resource = retrieve
|
1099
|
+
resource = Resource.new(self.class, title, :parameters => resource) if resource.is_a? Hash
|
1100
|
+
resource
|
1101
|
+
end
|
1102
|
+
|
1103
|
+
# Given the hash of current properties, should this resource be treated as if it
|
1104
|
+
# currently exists on the system. May need to be overridden by types that offer up
|
1105
|
+
# more than just :absent and :present.
|
1106
|
+
def present?(current_values)
|
1107
|
+
current_values[:ensure] != :absent
|
1108
|
+
end
|
1109
|
+
|
1110
|
+
# Returns a hash of the current properties and their values.
|
1111
|
+
# If a resource is absent, its value is the symbol `:absent`
|
1112
|
+
# @return [Hash{Puppet::Property => Object}] mapping of property instance to its value
|
1113
|
+
#
|
1114
|
+
def currentpropvalues
|
1115
|
+
# It's important to use the 'properties' method here, as it follows the order
|
1116
|
+
# in which they're defined in the class. It also guarantees that 'ensure'
|
1117
|
+
# is the first property, which is important for skipping 'retrieve' on
|
1118
|
+
# all the properties if the resource is absent.
|
1119
|
+
ensure_state = false
|
1120
|
+
return properties.inject({}) do | prophash, property|
|
1121
|
+
if property.name == :ensure
|
1122
|
+
ensure_state = property.retrieve
|
1123
|
+
prophash[property] = ensure_state
|
1124
|
+
else
|
1125
|
+
if ensure_state == :absent
|
1126
|
+
prophash[property] = :absent
|
1127
|
+
else
|
1128
|
+
prophash[property] = property.retrieve
|
1129
|
+
end
|
1130
|
+
end
|
1131
|
+
prophash
|
1132
|
+
end
|
1133
|
+
end
|
1134
|
+
|
1135
|
+
# Returns the `noop` run mode status of this.
|
1136
|
+
# @return [Boolean] true if running in noop mode.
|
1137
|
+
def noop?
|
1138
|
+
# If we're not a host_config, we're almost certainly part of
|
1139
|
+
# Settings, and we want to ignore 'noop'
|
1140
|
+
return false if catalog and ! catalog.host_config?
|
1141
|
+
|
1142
|
+
if defined?(@noop)
|
1143
|
+
@noop
|
1144
|
+
else
|
1145
|
+
Puppet[:noop]
|
1146
|
+
end
|
1147
|
+
end
|
1148
|
+
|
1149
|
+
# (see #noop?)
|
1150
|
+
def noop
|
1151
|
+
noop?
|
1152
|
+
end
|
1153
|
+
|
1154
|
+
# Retrieves all known instances.
|
1155
|
+
# @todo Retrieves them from where? Known to whom?
|
1156
|
+
# Either requires providers or must be overridden.
|
1157
|
+
# @raise [Puppet::DevError] when there are no providers and the implementation has not overridden this method.
|
1158
|
+
def self.instances
|
1159
|
+
raise Puppet::DevError, "#{self.name} has no providers and has not overridden 'instances'" if provider_hash.empty?
|
1160
|
+
|
1161
|
+
# Put the default provider first, then the rest of the suitable providers.
|
1162
|
+
provider_instances = {}
|
1163
|
+
providers_by_source.collect do |provider|
|
1164
|
+
self.properties.find_all do |property|
|
1165
|
+
provider.supports_parameter?(property)
|
1166
|
+
end.collect do |property|
|
1167
|
+
property.name
|
1168
|
+
end
|
1169
|
+
|
1170
|
+
provider.instances.collect do |instance|
|
1171
|
+
# We always want to use the "first" provider instance we find, unless the resource
|
1172
|
+
# is already managed and has a different provider set
|
1173
|
+
if other = provider_instances[instance.name]
|
1174
|
+
Puppet.debug "%s %s found in both %s and %s; skipping the %s version" %
|
1175
|
+
[self.name.to_s.capitalize, instance.name, other.class.name, instance.class.name, instance.class.name]
|
1176
|
+
next
|
1177
|
+
end
|
1178
|
+
provider_instances[instance.name] = instance
|
1179
|
+
|
1180
|
+
result = new(:name => instance.name, :provider => instance)
|
1181
|
+
properties.each { |name| result.newattr(name) }
|
1182
|
+
result
|
1183
|
+
end
|
1184
|
+
end.flatten.compact
|
1185
|
+
end
|
1186
|
+
|
1187
|
+
# Returns a list of one suitable provider per source, with the default provider first.
|
1188
|
+
# @todo Needs better explanation; what does "source" mean in this context?
|
1189
|
+
# @return [Array<Puppet::Provider>] list of providers
|
1190
|
+
#
|
1191
|
+
def self.providers_by_source
|
1192
|
+
# Put the default provider first (can be nil), then the rest of the suitable providers.
|
1193
|
+
sources = []
|
1194
|
+
[defaultprovider, suitableprovider].flatten.uniq.collect do |provider|
|
1195
|
+
next if provider.nil?
|
1196
|
+
next if sources.include?(provider.source)
|
1197
|
+
|
1198
|
+
sources << provider.source
|
1199
|
+
provider
|
1200
|
+
end.compact
|
1201
|
+
end
|
1202
|
+
|
1203
|
+
# Converts a simple hash into a Resource instance.
|
1204
|
+
# @todo as opposed to a complex hash? Other raised exceptions?
|
1205
|
+
# @param [Hash{Symbol, String => Object}] hash resource attribute to value map to initialize the created resource from
|
1206
|
+
# @return [Puppet::Resource] the resource created from the hash
|
1207
|
+
# @raise [Puppet::Error] if a title is missing in the given hash
|
1208
|
+
def self.hash2resource(hash)
|
1209
|
+
hash = hash.inject({}) { |result, ary| result[ary[0].to_sym] = ary[1]; result }
|
1210
|
+
|
1211
|
+
title = hash.delete(:title)
|
1212
|
+
title ||= hash[:name]
|
1213
|
+
title ||= hash[key_attributes.first] if key_attributes.length == 1
|
1214
|
+
|
1215
|
+
raise Puppet::Error, "Title or name must be provided" unless title
|
1216
|
+
|
1217
|
+
# Now create our resource.
|
1218
|
+
resource = Puppet::Resource.new(self, title)
|
1219
|
+
resource.catalog = hash.delete(:catalog)
|
1220
|
+
|
1221
|
+
if sensitive = hash.delete(:sensitive_parameters)
|
1222
|
+
resource.sensitive_parameters = sensitive
|
1223
|
+
end
|
1224
|
+
|
1225
|
+
hash.each do |param, value|
|
1226
|
+
resource[param] = value
|
1227
|
+
end
|
1228
|
+
resource
|
1229
|
+
end
|
1230
|
+
|
1231
|
+
|
1232
|
+
# Returns an array of strings representing the containment hierarchy
|
1233
|
+
# (types/classes) that make up the path to the resource from the root
|
1234
|
+
# of the catalog. This is mostly used for logging purposes.
|
1235
|
+
#
|
1236
|
+
# @api private
|
1237
|
+
def pathbuilder
|
1238
|
+
if p = parent
|
1239
|
+
[p.pathbuilder, self.ref].flatten
|
1240
|
+
else
|
1241
|
+
[self.ref]
|
1242
|
+
end
|
1243
|
+
end
|
1244
|
+
|
1245
|
+
###############################
|
1246
|
+
# Add all of the meta-parameters.
|
1247
|
+
newmetaparam(:noop) do
|
1248
|
+
desc "Whether to apply this resource in noop mode.
|
1249
|
+
|
1250
|
+
When applying a resource in noop mode, Puppet will check whether it is in sync,
|
1251
|
+
like it does when running normally. However, if a resource attribute is not in
|
1252
|
+
the desired state (as declared in the catalog), Puppet will take no
|
1253
|
+
action, and will instead report the changes it _would_ have made. These
|
1254
|
+
simulated changes will appear in the report sent to the puppet master, or
|
1255
|
+
be shown on the console if running puppet agent or puppet apply in the
|
1256
|
+
foreground. The simulated changes will not send refresh events to any
|
1257
|
+
subscribing or notified resources, although Puppet will log that a refresh
|
1258
|
+
event _would_ have been sent.
|
1259
|
+
|
1260
|
+
**Important note:**
|
1261
|
+
[The `noop` setting](https://docs.puppetlabs.com/puppet/latest/reference/configuration.html#noop)
|
1262
|
+
allows you to globally enable or disable noop mode, but it will _not_ override
|
1263
|
+
the `noop` metaparameter on individual resources. That is, the value of the
|
1264
|
+
global `noop` setting will _only_ affect resources that do not have an explicit
|
1265
|
+
value set for their `noop` attribute."
|
1266
|
+
|
1267
|
+
newvalues(:true, :false)
|
1268
|
+
munge do |value|
|
1269
|
+
case value
|
1270
|
+
when true, :true, "true"; @resource.noop = true
|
1271
|
+
when false, :false, "false"; @resource.noop = false
|
1272
|
+
end
|
1273
|
+
end
|
1274
|
+
end
|
1275
|
+
|
1276
|
+
newmetaparam(:schedule) do
|
1277
|
+
desc "A schedule to govern when Puppet is allowed to manage this resource.
|
1278
|
+
The value of this metaparameter must be the `name` of a `schedule`
|
1279
|
+
resource. This means you must declare a schedule resource, then
|
1280
|
+
refer to it by name; see
|
1281
|
+
[the docs for the `schedule` type](https://docs.puppetlabs.com/puppet/latest/reference/type.html#schedule)
|
1282
|
+
for more info.
|
1283
|
+
|
1284
|
+
schedule { 'everyday':
|
1285
|
+
period => daily,
|
1286
|
+
range => \"2-4\"
|
1287
|
+
}
|
1288
|
+
|
1289
|
+
exec { \"/usr/bin/apt-get update\":
|
1290
|
+
schedule => 'everyday'
|
1291
|
+
}
|
1292
|
+
|
1293
|
+
Note that you can declare the schedule resource anywhere in your
|
1294
|
+
manifests, as long as it ends up in the final compiled catalog."
|
1295
|
+
end
|
1296
|
+
|
1297
|
+
newmetaparam(:audit) do
|
1298
|
+
desc "(This metaparameter is deprecated and will be ignored in a future release.)
|
1299
|
+
|
1300
|
+
Marks a subset of this resource's unmanaged attributes for auditing. Accepts an
|
1301
|
+
attribute name, an array of attribute names, or `all`.
|
1302
|
+
|
1303
|
+
Auditing a resource attribute has two effects: First, whenever a catalog
|
1304
|
+
is applied with puppet apply or puppet agent, Puppet will check whether
|
1305
|
+
that attribute of the resource has been modified, comparing its current
|
1306
|
+
value to the previous run; any change will be logged alongside any actions
|
1307
|
+
performed by Puppet while applying the catalog.
|
1308
|
+
|
1309
|
+
Secondly, marking a resource attribute for auditing will include that
|
1310
|
+
attribute in inspection reports generated by puppet inspect; see the
|
1311
|
+
puppet inspect documentation for more details.
|
1312
|
+
|
1313
|
+
Managed attributes for a resource can also be audited, but note that
|
1314
|
+
changes made by Puppet will be logged as additional modifications. (I.e.
|
1315
|
+
if a user manually edits a file whose contents are audited and managed,
|
1316
|
+
puppet agent's next two runs will both log an audit notice: the first run
|
1317
|
+
will log the user's edit and then revert the file to the desired state,
|
1318
|
+
and the second run will log the edit made by Puppet.)"
|
1319
|
+
|
1320
|
+
validate do |list|
|
1321
|
+
if Puppet.settings[:strict] != :off
|
1322
|
+
# Only warn if `audit` metaparam came from a manifest
|
1323
|
+
if file && line
|
1324
|
+
puppet_deprecation_warning(_("The `audit` metaparameter is deprecated and will be ignored in a future release."), { :line => line, :file => file })
|
1325
|
+
end
|
1326
|
+
end
|
1327
|
+
list = Array(list).collect {|p| p.to_sym}
|
1328
|
+
unless list == [:all]
|
1329
|
+
list.each do |param|
|
1330
|
+
next if @resource.class.validattr?(param)
|
1331
|
+
fail "Cannot audit #{param}: not a valid attribute for #{resource}"
|
1332
|
+
end
|
1333
|
+
end
|
1334
|
+
end
|
1335
|
+
|
1336
|
+
munge do |args|
|
1337
|
+
properties_to_audit(args).each do |param|
|
1338
|
+
next unless resource.class.validproperty?(param)
|
1339
|
+
resource.newattr(param)
|
1340
|
+
end
|
1341
|
+
end
|
1342
|
+
|
1343
|
+
def all_properties
|
1344
|
+
resource.class.properties.find_all do |property|
|
1345
|
+
resource.provider.nil? or resource.provider.class.supports_parameter?(property)
|
1346
|
+
end.collect do |property|
|
1347
|
+
property.name
|
1348
|
+
end
|
1349
|
+
end
|
1350
|
+
|
1351
|
+
def properties_to_audit(list)
|
1352
|
+
if !list.kind_of?(Array) && list.to_sym == :all
|
1353
|
+
list = all_properties
|
1354
|
+
else
|
1355
|
+
list = Array(list).collect { |p| p.to_sym }
|
1356
|
+
end
|
1357
|
+
end
|
1358
|
+
end
|
1359
|
+
|
1360
|
+
newmetaparam(:loglevel) do
|
1361
|
+
desc "Sets the level that information will be logged.
|
1362
|
+
The log levels have the biggest impact when logs are sent to
|
1363
|
+
syslog (which is currently the default).
|
1364
|
+
|
1365
|
+
The order of the log levels, in decreasing priority, is:
|
1366
|
+
|
1367
|
+
* `crit`
|
1368
|
+
* `emerg`
|
1369
|
+
* `alert`
|
1370
|
+
* `err`
|
1371
|
+
* `warning`
|
1372
|
+
* `notice`
|
1373
|
+
* `info` / `verbose`
|
1374
|
+
* `debug`
|
1375
|
+
"
|
1376
|
+
defaultto :notice
|
1377
|
+
|
1378
|
+
newvalues(*Puppet::Util::Log.levels)
|
1379
|
+
newvalues(:verbose)
|
1380
|
+
|
1381
|
+
munge do |loglevel|
|
1382
|
+
val = super(loglevel)
|
1383
|
+
if val == :verbose
|
1384
|
+
val = :info
|
1385
|
+
end
|
1386
|
+
val
|
1387
|
+
end
|
1388
|
+
end
|
1389
|
+
|
1390
|
+
newmetaparam(:alias) do
|
1391
|
+
desc %q{Creates an alias for the resource. Puppet uses this internally when you
|
1392
|
+
provide a symbolic title and an explicit namevar value:
|
1393
|
+
|
1394
|
+
file { 'sshdconfig':
|
1395
|
+
path => $operatingsystem ? {
|
1396
|
+
solaris => '/usr/local/etc/ssh/sshd_config',
|
1397
|
+
default => '/etc/ssh/sshd_config',
|
1398
|
+
},
|
1399
|
+
source => '...'
|
1400
|
+
}
|
1401
|
+
|
1402
|
+
service { 'sshd':
|
1403
|
+
subscribe => File['sshdconfig'],
|
1404
|
+
}
|
1405
|
+
|
1406
|
+
When you use this feature, the parser sets `sshdconfig` as the title,
|
1407
|
+
and the library sets that as an alias for the file so the dependency
|
1408
|
+
lookup in `Service['sshd']` works. You can use this metaparameter yourself,
|
1409
|
+
but note that aliases generally only work for creating relationships; anything
|
1410
|
+
else that refers to an existing resource (such as amending or overriding
|
1411
|
+
resource attributes in an inherited class) must use the resource's exact
|
1412
|
+
title. For example, the following code will not work:
|
1413
|
+
|
1414
|
+
file { '/etc/ssh/sshd_config':
|
1415
|
+
owner => root,
|
1416
|
+
group => root,
|
1417
|
+
alias => 'sshdconfig',
|
1418
|
+
}
|
1419
|
+
|
1420
|
+
File['sshdconfig'] {
|
1421
|
+
mode => '0644',
|
1422
|
+
}
|
1423
|
+
|
1424
|
+
There's no way here for the Puppet parser to know that these two stanzas
|
1425
|
+
should be affecting the same file.
|
1426
|
+
|
1427
|
+
}
|
1428
|
+
|
1429
|
+
munge do |aliases|
|
1430
|
+
aliases = [aliases] unless aliases.is_a?(Array)
|
1431
|
+
|
1432
|
+
raise(ArgumentError, "Cannot add aliases without a catalog") unless @resource.catalog
|
1433
|
+
|
1434
|
+
aliases.each do |other|
|
1435
|
+
if obj = @resource.catalog.resource(@resource.class.name, other)
|
1436
|
+
unless obj.object_id == @resource.object_id
|
1437
|
+
self.fail("#{@resource.title} can not create alias #{other}: object already exists")
|
1438
|
+
end
|
1439
|
+
next
|
1440
|
+
end
|
1441
|
+
|
1442
|
+
# Newschool, add it to the catalog.
|
1443
|
+
@resource.catalog.alias(@resource, other)
|
1444
|
+
end
|
1445
|
+
end
|
1446
|
+
end
|
1447
|
+
|
1448
|
+
newmetaparam(:tag) do
|
1449
|
+
desc "Add the specified tags to the associated resource. While all resources
|
1450
|
+
are automatically tagged with as much information as possible
|
1451
|
+
(e.g., each class and definition containing the resource), it can
|
1452
|
+
be useful to add your own tags to a given resource.
|
1453
|
+
|
1454
|
+
Multiple tags can be specified as an array:
|
1455
|
+
|
1456
|
+
file {'/etc/hosts':
|
1457
|
+
ensure => file,
|
1458
|
+
source => 'puppet:///modules/site/hosts',
|
1459
|
+
mode => '0644',
|
1460
|
+
tag => ['bootstrap', 'minimumrun', 'mediumrun'],
|
1461
|
+
}
|
1462
|
+
|
1463
|
+
Tags are useful for things like applying a subset of a host's configuration
|
1464
|
+
with [the `tags` setting](/puppet/latest/reference/configuration.html#tags)
|
1465
|
+
(e.g. `puppet agent --test --tags bootstrap`)."
|
1466
|
+
|
1467
|
+
munge do |tags|
|
1468
|
+
tags = [tags] unless tags.is_a? Array
|
1469
|
+
|
1470
|
+
tags.each do |tag|
|
1471
|
+
@resource.tag(tag)
|
1472
|
+
end
|
1473
|
+
end
|
1474
|
+
end
|
1475
|
+
|
1476
|
+
# RelationshipMetaparam is an implementation supporting the meta-parameters `:require`, `:subscribe`,
|
1477
|
+
# `:notify`, and `:before`.
|
1478
|
+
#
|
1479
|
+
#
|
1480
|
+
class RelationshipMetaparam < Puppet::Parameter
|
1481
|
+
class << self
|
1482
|
+
attr_accessor :direction, :events, :callback, :subclasses
|
1483
|
+
end
|
1484
|
+
|
1485
|
+
@subclasses = []
|
1486
|
+
|
1487
|
+
def self.inherited(sub)
|
1488
|
+
@subclasses << sub
|
1489
|
+
end
|
1490
|
+
|
1491
|
+
# @return [Array<Puppet::Resource>] turns attribute value(s) into list of resources
|
1492
|
+
def munge(references)
|
1493
|
+
references = [references] unless references.is_a?(Array)
|
1494
|
+
references.collect do |ref|
|
1495
|
+
if ref.is_a?(Puppet::Resource)
|
1496
|
+
ref
|
1497
|
+
else
|
1498
|
+
Puppet::Resource.new(ref)
|
1499
|
+
end
|
1500
|
+
end
|
1501
|
+
end
|
1502
|
+
|
1503
|
+
# Checks each reference to assert that what it references exists in the catalog.
|
1504
|
+
#
|
1505
|
+
# @raise [???fail] if the referenced resource can not be found
|
1506
|
+
# @return [void]
|
1507
|
+
def validate_relationship
|
1508
|
+
@value.each do |ref|
|
1509
|
+
unless @resource.catalog.resource(ref.to_s)
|
1510
|
+
description = self.class.direction == :in ? "dependency" : "dependent"
|
1511
|
+
fail ResourceError, "Could not find #{description} #{ref} for #{resource.ref}"
|
1512
|
+
end
|
1513
|
+
end
|
1514
|
+
end
|
1515
|
+
|
1516
|
+
# Creates edges for all relationships.
|
1517
|
+
# The `:in` relationships are specified by the event-receivers, and `:out`
|
1518
|
+
# relationships are specified by the event generator.
|
1519
|
+
# @todo references to "event-receivers" and "event generator" means in this context - are those just
|
1520
|
+
# the resources at the two ends of the relationship?
|
1521
|
+
# This way 'source' and 'target' are consistent terms in both edges
|
1522
|
+
# and events, i.e. an event targets edges whose source matches
|
1523
|
+
# the event's source. The direction of the relationship determines
|
1524
|
+
# which resource is applied first and which resource is considered
|
1525
|
+
# to be the event generator.
|
1526
|
+
# @return [Array<Puppet::Relationship>]
|
1527
|
+
# @raise [???fail] when a reference can not be resolved
|
1528
|
+
#
|
1529
|
+
def to_edges
|
1530
|
+
@value.collect do |reference|
|
1531
|
+
reference.catalog = resource.catalog
|
1532
|
+
|
1533
|
+
# Either of the two retrieval attempts could have returned
|
1534
|
+
# nil.
|
1535
|
+
unless related_resource = reference.resolve
|
1536
|
+
self.fail "Could not retrieve dependency '#{reference}' of #{@resource.ref}"
|
1537
|
+
end
|
1538
|
+
|
1539
|
+
# Are we requiring them, or vice versa? See the method docs
|
1540
|
+
# for further info on this.
|
1541
|
+
if self.class.direction == :in
|
1542
|
+
source = related_resource
|
1543
|
+
target = @resource
|
1544
|
+
else
|
1545
|
+
source = @resource
|
1546
|
+
target = related_resource
|
1547
|
+
end
|
1548
|
+
|
1549
|
+
if method = self.class.callback
|
1550
|
+
subargs = {
|
1551
|
+
:event => self.class.events,
|
1552
|
+
:callback => method
|
1553
|
+
}
|
1554
|
+
self.debug { "subscribes to #{related_resource.ref}" }
|
1555
|
+
else
|
1556
|
+
# If there's no callback, there's no point in even adding
|
1557
|
+
# a label.
|
1558
|
+
subargs = nil
|
1559
|
+
self.debug { "subscribes to #{related_resource.ref}" }
|
1560
|
+
end
|
1561
|
+
|
1562
|
+
Puppet::Relationship.new(source, target, subargs)
|
1563
|
+
end
|
1564
|
+
end
|
1565
|
+
end
|
1566
|
+
|
1567
|
+
# @todo document this, have no clue what this does... it returns "RelationshipMetaparam.subclasses"
|
1568
|
+
#
|
1569
|
+
def self.relationship_params
|
1570
|
+
RelationshipMetaparam.subclasses
|
1571
|
+
end
|
1572
|
+
|
1573
|
+
|
1574
|
+
# Note that the order in which the relationships params is defined
|
1575
|
+
# matters. The labeled params (notify and subscribe) must be later,
|
1576
|
+
# so that if both params are used, those ones win. It's a hackish
|
1577
|
+
# solution, but it works.
|
1578
|
+
|
1579
|
+
newmetaparam(:require, :parent => RelationshipMetaparam, :attributes => {:direction => :in, :events => :NONE}) do
|
1580
|
+
desc "One or more resources that this resource depends on, expressed as
|
1581
|
+
[resource references](https://docs.puppetlabs.com/puppet/latest/reference/lang_data_resource_reference.html).
|
1582
|
+
Multiple resources can be specified as an array of references. When this
|
1583
|
+
attribute is present:
|
1584
|
+
|
1585
|
+
* The required resource(s) will be applied **before** this resource.
|
1586
|
+
|
1587
|
+
This is one of the four relationship metaparameters, along with
|
1588
|
+
`before`, `notify`, and `subscribe`. For more context, including the
|
1589
|
+
alternate chaining arrow (`->` and `~>`) syntax, see
|
1590
|
+
[the language page on relationships](https://docs.puppetlabs.com/puppet/latest/reference/lang_relationships.html)."
|
1591
|
+
end
|
1592
|
+
|
1593
|
+
newmetaparam(:subscribe, :parent => RelationshipMetaparam, :attributes => {:direction => :in, :events => :ALL_EVENTS, :callback => :refresh}) do
|
1594
|
+
desc "One or more resources that this resource depends on, expressed as
|
1595
|
+
[resource references](https://docs.puppetlabs.com/puppet/latest/reference/lang_data_resource_reference.html).
|
1596
|
+
Multiple resources can be specified as an array of references. When this
|
1597
|
+
attribute is present:
|
1598
|
+
|
1599
|
+
* The subscribed resource(s) will be applied _before_ this resource.
|
1600
|
+
* If Puppet makes changes to any of the subscribed resources, it will cause
|
1601
|
+
this resource to _refresh._ (Refresh behavior varies by resource
|
1602
|
+
type: services will restart, mounts will unmount and re-mount, etc. Not
|
1603
|
+
all types can refresh.)
|
1604
|
+
|
1605
|
+
This is one of the four relationship metaparameters, along with
|
1606
|
+
`before`, `require`, and `notify`. For more context, including the
|
1607
|
+
alternate chaining arrow (`->` and `~>`) syntax, see
|
1608
|
+
[the language page on relationships](https://docs.puppetlabs.com/puppet/latest/reference/lang_relationships.html)."
|
1609
|
+
end
|
1610
|
+
|
1611
|
+
newmetaparam(:before, :parent => RelationshipMetaparam, :attributes => {:direction => :out, :events => :NONE}) do
|
1612
|
+
desc "One or more resources that depend on this resource, expressed as
|
1613
|
+
[resource references](https://docs.puppetlabs.com/puppet/latest/reference/lang_data_resource_reference.html).
|
1614
|
+
Multiple resources can be specified as an array of references. When this
|
1615
|
+
attribute is present:
|
1616
|
+
|
1617
|
+
* This resource will be applied _before_ the dependent resource(s).
|
1618
|
+
|
1619
|
+
This is one of the four relationship metaparameters, along with
|
1620
|
+
`require`, `notify`, and `subscribe`. For more context, including the
|
1621
|
+
alternate chaining arrow (`->` and `~>`) syntax, see
|
1622
|
+
[the language page on relationships](https://docs.puppetlabs.com/puppet/latest/reference/lang_relationships.html)."
|
1623
|
+
end
|
1624
|
+
|
1625
|
+
newmetaparam(:notify, :parent => RelationshipMetaparam, :attributes => {:direction => :out, :events => :ALL_EVENTS, :callback => :refresh}) do
|
1626
|
+
desc "One or more resources that depend on this resource, expressed as
|
1627
|
+
[resource references](https://docs.puppetlabs.com/puppet/latest/reference/lang_data_resource_reference.html).
|
1628
|
+
Multiple resources can be specified as an array of references. When this
|
1629
|
+
attribute is present:
|
1630
|
+
|
1631
|
+
* This resource will be applied _before_ the notified resource(s).
|
1632
|
+
* If Puppet makes changes to this resource, it will cause all of the
|
1633
|
+
notified resources to _refresh._ (Refresh behavior varies by resource
|
1634
|
+
type: services will restart, mounts will unmount and re-mount, etc. Not
|
1635
|
+
all types can refresh.)
|
1636
|
+
|
1637
|
+
This is one of the four relationship metaparameters, along with
|
1638
|
+
`before`, `require`, and `subscribe`. For more context, including the
|
1639
|
+
alternate chaining arrow (`->` and `~>`) syntax, see
|
1640
|
+
[the language page on relationships](https://docs.puppetlabs.com/puppet/latest/reference/lang_relationships.html)."
|
1641
|
+
end
|
1642
|
+
|
1643
|
+
newmetaparam(:stage) do
|
1644
|
+
desc %{Which run stage this class should reside in.
|
1645
|
+
|
1646
|
+
**Note: This metaparameter can only be used on classes,** and only when
|
1647
|
+
declaring them with the resource-like syntax. It cannot be used on normal
|
1648
|
+
resources or on classes declared with `include`.
|
1649
|
+
|
1650
|
+
By default, all classes are declared in the `main` stage. To assign a class
|
1651
|
+
to a different stage, you must:
|
1652
|
+
|
1653
|
+
* Declare the new stage as a [`stage` resource](https://docs.puppetlabs.com/puppet/latest/reference/type.html#stage).
|
1654
|
+
* Declare an order relationship between the new stage and the `main` stage.
|
1655
|
+
* Use the resource-like syntax to declare the class, and set the `stage`
|
1656
|
+
metaparameter to the name of the desired stage.
|
1657
|
+
|
1658
|
+
For example:
|
1659
|
+
|
1660
|
+
stage { 'pre':
|
1661
|
+
before => Stage['main'],
|
1662
|
+
}
|
1663
|
+
|
1664
|
+
class { 'apt-updates':
|
1665
|
+
stage => 'pre',
|
1666
|
+
}
|
1667
|
+
}
|
1668
|
+
end
|
1669
|
+
|
1670
|
+
newmetaparam(:export, :parent => RelationshipMetaparam, :attributes => {:direction => :out, :events => :NONE}) do
|
1671
|
+
desc <<EOS
|
1672
|
+
Export a capability resource.
|
1673
|
+
|
1674
|
+
The value of this parameter must be a reference to a capability resource,
|
1675
|
+
or an array of such references. Each capability resource referenced here
|
1676
|
+
will be instantiated in the node catalog and exported to consumers of this
|
1677
|
+
resource. The title of the capability resource will be the title given in
|
1678
|
+
the reference, and all other attributes of the resource will be filled
|
1679
|
+
according to the corresponding produces statement.
|
1680
|
+
|
1681
|
+
It is an error if this metaparameter references resources whose type is not
|
1682
|
+
a capability type, or of there is no produces clause for the type of the
|
1683
|
+
current resource and the capability resource mentioned in this parameter.
|
1684
|
+
|
1685
|
+
For example:
|
1686
|
+
|
1687
|
+
define web(..) { .. }
|
1688
|
+
Web produces Http { .. }
|
1689
|
+
web { server:
|
1690
|
+
export => Http[main_server]
|
1691
|
+
}
|
1692
|
+
EOS
|
1693
|
+
end
|
1694
|
+
|
1695
|
+
newmetaparam(:consume, :parent => RelationshipMetaparam, :attributes => {:direction => :in, :events => :NONE}) do
|
1696
|
+
desc <<EOS
|
1697
|
+
Consume a capability resource.
|
1698
|
+
|
1699
|
+
The value of this parameter must be a reference to a capability resource,
|
1700
|
+
or an array of such references. Each capability resource referenced here
|
1701
|
+
must have been exported by another resource in the same environment.
|
1702
|
+
|
1703
|
+
The referenced capability resource(s) will be looked up, added to the
|
1704
|
+
current node catalog, and processed following the underlying consumes
|
1705
|
+
clause.
|
1706
|
+
|
1707
|
+
It is an error if this metaparameter references resources whose type is not
|
1708
|
+
a capability type, or of there is no consumes clause for the type of the
|
1709
|
+
current resource and the capability resource mentioned in this parameter.
|
1710
|
+
|
1711
|
+
For example:
|
1712
|
+
|
1713
|
+
define web(..) { .. }
|
1714
|
+
Web consumes Sql { .. }
|
1715
|
+
web { server:
|
1716
|
+
consume => Sql[my_db]
|
1717
|
+
}
|
1718
|
+
EOS
|
1719
|
+
end
|
1720
|
+
|
1721
|
+
###############################
|
1722
|
+
# All of the provider plumbing for the resource types.
|
1723
|
+
require 'puppet/provider'
|
1724
|
+
require 'puppet/util/provider_features'
|
1725
|
+
|
1726
|
+
# Add the feature handling module.
|
1727
|
+
extend Puppet::Util::ProviderFeatures
|
1728
|
+
|
1729
|
+
# The provider that has been selected for the instance of the resource type.
|
1730
|
+
# @return [Puppet::Provider,nil] the selected provider or nil, if none has been selected
|
1731
|
+
#
|
1732
|
+
attr_reader :provider
|
1733
|
+
|
1734
|
+
# the Type class attribute accessors
|
1735
|
+
class << self
|
1736
|
+
# The loader of providers to use when loading providers from disk.
|
1737
|
+
# Although it looks like this attribute provides a way to operate with different loaders of
|
1738
|
+
# providers that is not the case; the attribute is written when a new type is created,
|
1739
|
+
# and should not be changed thereafter.
|
1740
|
+
# @api private
|
1741
|
+
#
|
1742
|
+
attr_accessor :providerloader
|
1743
|
+
|
1744
|
+
# @todo Don't know if this is a name, or a reference to a Provider instance (now marked up as an instance
|
1745
|
+
# of Provider.
|
1746
|
+
# @return [Puppet::Provider, nil] The default provider for this type, or nil if non is defines
|
1747
|
+
#
|
1748
|
+
attr_writer :defaultprovider
|
1749
|
+
end
|
1750
|
+
|
1751
|
+
# The default provider, or the most suitable provider if no default provider was set.
|
1752
|
+
# @note a warning will be issued if no default provider has been configured and a search for the most
|
1753
|
+
# suitable provider returns more than one equally suitable provider.
|
1754
|
+
# @return [Puppet::Provider, nil] the default or most suitable provider, or nil if no provider was found
|
1755
|
+
#
|
1756
|
+
def self.defaultprovider
|
1757
|
+
return @defaultprovider if @defaultprovider
|
1758
|
+
|
1759
|
+
suitable = suitableprovider
|
1760
|
+
|
1761
|
+
# Find which providers are a default for this system.
|
1762
|
+
defaults = suitable.find_all { |provider| provider.default? }
|
1763
|
+
|
1764
|
+
# If we don't have any default we use suitable providers
|
1765
|
+
defaults = suitable if defaults.empty?
|
1766
|
+
max = defaults.collect { |provider| provider.specificity }.max
|
1767
|
+
defaults = defaults.find_all { |provider| provider.specificity == max }
|
1768
|
+
|
1769
|
+
if defaults.length > 1
|
1770
|
+
Puppet.warning(
|
1771
|
+
"Found multiple default providers for #{self.name}: #{defaults.collect { |i| i.name.to_s }.join(", ")}; using #{defaults[0].name}"
|
1772
|
+
)
|
1773
|
+
end
|
1774
|
+
|
1775
|
+
@defaultprovider = defaults.shift unless defaults.empty?
|
1776
|
+
end
|
1777
|
+
|
1778
|
+
# @return [Hash{??? => Puppet::Provider}] Returns a hash of WHAT EXACTLY for the given type
|
1779
|
+
# @todo what goes into this hash?
|
1780
|
+
def self.provider_hash_by_type(type)
|
1781
|
+
@provider_hashes ||= {}
|
1782
|
+
@provider_hashes[type] ||= {}
|
1783
|
+
end
|
1784
|
+
|
1785
|
+
# @return [Hash{ ??? => Puppet::Provider}] Returns a hash of WHAT EXACTLY for this type.
|
1786
|
+
# @see provider_hash_by_type method to get the same for some other type
|
1787
|
+
def self.provider_hash
|
1788
|
+
Puppet::Type.provider_hash_by_type(self.name)
|
1789
|
+
end
|
1790
|
+
|
1791
|
+
# Returns the provider having the given name.
|
1792
|
+
# This will load a provider if it is not already loaded. The returned provider is the first found provider
|
1793
|
+
# having the given name, where "first found" semantics is defined by the {providerloader} in use.
|
1794
|
+
#
|
1795
|
+
# @param name [String] the name of the provider to get
|
1796
|
+
# @return [Puppet::Provider, nil] the found provider, or nil if no provider of the given name was found
|
1797
|
+
#
|
1798
|
+
def self.provider(name)
|
1799
|
+
name = name.intern
|
1800
|
+
|
1801
|
+
# If we don't have it yet, try loading it.
|
1802
|
+
@providerloader.load(name) unless provider_hash.has_key?(name)
|
1803
|
+
provider_hash[name]
|
1804
|
+
end
|
1805
|
+
|
1806
|
+
# Returns a list of loaded providers by name.
|
1807
|
+
# This method will not load/search for available providers.
|
1808
|
+
# @return [Array<String>] list of loaded provider names
|
1809
|
+
#
|
1810
|
+
def self.providers
|
1811
|
+
provider_hash.keys
|
1812
|
+
end
|
1813
|
+
|
1814
|
+
# Returns true if the given name is a reference to a provider and if this is a suitable provider for
|
1815
|
+
# this type.
|
1816
|
+
# @todo How does the provider know if it is suitable for the type? Is it just suitable for the platform/
|
1817
|
+
# environment where this method is executing?
|
1818
|
+
# @param name [String] the name of the provider for which validity is checked
|
1819
|
+
# @return [Boolean] true if the given name references a provider that is suitable
|
1820
|
+
#
|
1821
|
+
def self.validprovider?(name)
|
1822
|
+
name = name.intern
|
1823
|
+
|
1824
|
+
(provider_hash.has_key?(name) && provider_hash[name].suitable?)
|
1825
|
+
end
|
1826
|
+
|
1827
|
+
# Creates a new provider of a type.
|
1828
|
+
# This method must be called directly on the type that it's implementing.
|
1829
|
+
# @todo Fix Confusing Explanations!
|
1830
|
+
# Is this a new provider of a Type (metatype), or a provider of an instance of Type (a resource), or
|
1831
|
+
# a Provider (the implementation of a Type's behavior). CONFUSED. It calls magically named methods like
|
1832
|
+
# "providify" ...
|
1833
|
+
# @param name [String, Symbol] the name of the WHAT? provider? type?
|
1834
|
+
# @param options [Hash{Symbol => Object}] a hash of options, used by this method, and passed on to {#genclass}, (see
|
1835
|
+
# it for additional options to pass).
|
1836
|
+
# @option options [Puppet::Provider] :parent the parent provider (what is this?)
|
1837
|
+
# @option options [Puppet::Type] :resource_type the resource type, defaults to this type if unspecified
|
1838
|
+
# @return [Puppet::Provider] a provider ???
|
1839
|
+
# @raise [Puppet::DevError] when the parent provider could not be found.
|
1840
|
+
#
|
1841
|
+
def self.provide(name, options = {}, &block)
|
1842
|
+
name = name.intern
|
1843
|
+
|
1844
|
+
if unprovide(name)
|
1845
|
+
Puppet.debug "Reloading #{name} #{self.name} provider"
|
1846
|
+
end
|
1847
|
+
|
1848
|
+
parent = if pname = options[:parent]
|
1849
|
+
options.delete(:parent)
|
1850
|
+
if pname.is_a? Class
|
1851
|
+
pname
|
1852
|
+
else
|
1853
|
+
if provider = self.provider(pname)
|
1854
|
+
provider
|
1855
|
+
else
|
1856
|
+
raise Puppet::DevError,
|
1857
|
+
"Could not find parent provider #{pname} of #{name}"
|
1858
|
+
end
|
1859
|
+
end
|
1860
|
+
else
|
1861
|
+
Puppet::Provider
|
1862
|
+
end
|
1863
|
+
|
1864
|
+
options[:resource_type] ||= self
|
1865
|
+
|
1866
|
+
self.providify
|
1867
|
+
|
1868
|
+
provider = genclass(
|
1869
|
+
name,
|
1870
|
+
:parent => parent,
|
1871
|
+
:hash => provider_hash,
|
1872
|
+
:prefix => "Provider",
|
1873
|
+
:block => block,
|
1874
|
+
:include => feature_module,
|
1875
|
+
:extend => feature_module,
|
1876
|
+
:attributes => options
|
1877
|
+
)
|
1878
|
+
|
1879
|
+
provider
|
1880
|
+
end
|
1881
|
+
|
1882
|
+
# Ensures there is a `:provider` parameter defined.
|
1883
|
+
# Should only be called if there are providers.
|
1884
|
+
# @return [void]
|
1885
|
+
def self.providify
|
1886
|
+
return if @paramhash.has_key? :provider
|
1887
|
+
|
1888
|
+
param = newparam(:provider) do
|
1889
|
+
# We're using a hacky way to get the name of our type, since there doesn't
|
1890
|
+
# seem to be a correct way to introspect this at the time this code is run.
|
1891
|
+
# We expect that the class in which this code is executed will be something
|
1892
|
+
# like Puppet::Type::Ssh_authorized_key::ParameterProvider.
|
1893
|
+
desc <<-EOT
|
1894
|
+
The specific backend to use for this `#{self.to_s.split('::')[2].downcase}`
|
1895
|
+
resource. You will seldom need to specify this --- Puppet will usually
|
1896
|
+
discover the appropriate provider for your platform.
|
1897
|
+
EOT
|
1898
|
+
|
1899
|
+
# This is so we can refer back to the type to get a list of
|
1900
|
+
# providers for documentation.
|
1901
|
+
class << self
|
1902
|
+
# The reference to a parent type for the parameter `:provider` used to get a list of
|
1903
|
+
# providers for documentation purposes.
|
1904
|
+
#
|
1905
|
+
attr_accessor :parenttype
|
1906
|
+
end
|
1907
|
+
|
1908
|
+
# Provides the ability to add documentation to a provider.
|
1909
|
+
#
|
1910
|
+
def self.doc
|
1911
|
+
# Since we're mixing @doc with text from other sources, we must normalize
|
1912
|
+
# its indentation with scrub. But we don't need to manually scrub the
|
1913
|
+
# provider's doc string, since markdown_definitionlist sanitizes its inputs.
|
1914
|
+
scrub(@doc) + "Available providers are:\n\n" + parenttype.providers.sort { |a,b|
|
1915
|
+
a.to_s <=> b.to_s
|
1916
|
+
}.collect { |i|
|
1917
|
+
markdown_definitionlist( i, scrub(parenttype().provider(i).doc) )
|
1918
|
+
}.join
|
1919
|
+
end
|
1920
|
+
|
1921
|
+
# For each resource, the provider param defaults to
|
1922
|
+
# the type's default provider
|
1923
|
+
defaultto {
|
1924
|
+
prov = @resource.class.defaultprovider
|
1925
|
+
prov.name if prov
|
1926
|
+
}
|
1927
|
+
|
1928
|
+
validate do |provider_class|
|
1929
|
+
provider_class = provider_class[0] if provider_class.is_a? Array
|
1930
|
+
provider_class = provider_class.class.name if provider_class.is_a?(Puppet::Provider)
|
1931
|
+
|
1932
|
+
unless @resource.class.provider(provider_class)
|
1933
|
+
raise ArgumentError, "Invalid #{@resource.class.name} provider '#{provider_class}'"
|
1934
|
+
end
|
1935
|
+
end
|
1936
|
+
|
1937
|
+
munge do |provider|
|
1938
|
+
provider = provider[0] if provider.is_a? Array
|
1939
|
+
provider = provider.intern if provider.is_a? String
|
1940
|
+
@resource.provider = provider
|
1941
|
+
|
1942
|
+
if provider.is_a?(Puppet::Provider)
|
1943
|
+
provider.class.name
|
1944
|
+
else
|
1945
|
+
provider
|
1946
|
+
end
|
1947
|
+
end
|
1948
|
+
end
|
1949
|
+
param.parenttype = self
|
1950
|
+
end
|
1951
|
+
|
1952
|
+
# @todo this needs a better explanation
|
1953
|
+
# Removes the implementation class of a given provider.
|
1954
|
+
# @return [Object] returns what {Puppet::Util::ClassGen#rmclass} returns
|
1955
|
+
def self.unprovide(name)
|
1956
|
+
if @defaultprovider and @defaultprovider.name == name
|
1957
|
+
@defaultprovider = nil
|
1958
|
+
end
|
1959
|
+
|
1960
|
+
rmclass(name, :hash => provider_hash, :prefix => "Provider")
|
1961
|
+
end
|
1962
|
+
|
1963
|
+
# Returns a list of suitable providers for the given type.
|
1964
|
+
# A call to this method will load all providers if not already loaded and ask each if it is
|
1965
|
+
# suitable - those that are are included in the result.
|
1966
|
+
# @note This method also does some special processing which rejects a provider named `:fake` (for testing purposes).
|
1967
|
+
# @return [Array<Puppet::Provider>] Returns an array of all suitable providers.
|
1968
|
+
#
|
1969
|
+
def self.suitableprovider
|
1970
|
+
providerloader.loadall if provider_hash.empty?
|
1971
|
+
provider_hash.find_all { |name, provider|
|
1972
|
+
provider.suitable?
|
1973
|
+
}.collect { |name, provider|
|
1974
|
+
provider
|
1975
|
+
}.reject { |p| p.name == :fake } # For testing
|
1976
|
+
end
|
1977
|
+
|
1978
|
+
# @return [Boolean] Returns true if this is something else than a `:provider`, or if it
|
1979
|
+
# is a provider and it is suitable, or if there is a default provider. Otherwise, false is returned.
|
1980
|
+
#
|
1981
|
+
def suitable?
|
1982
|
+
# If we don't use providers, then we consider it suitable.
|
1983
|
+
return true unless self.class.paramclass(:provider)
|
1984
|
+
|
1985
|
+
# We have a provider and it is suitable.
|
1986
|
+
return true if provider && provider.class.suitable?
|
1987
|
+
|
1988
|
+
# We're using the default provider and there is one.
|
1989
|
+
if !provider and self.class.defaultprovider
|
1990
|
+
self.provider = self.class.defaultprovider.name
|
1991
|
+
return true
|
1992
|
+
end
|
1993
|
+
|
1994
|
+
# We specified an unsuitable provider, or there isn't any suitable
|
1995
|
+
# provider.
|
1996
|
+
false
|
1997
|
+
end
|
1998
|
+
|
1999
|
+
# Sets the provider to the given provider/name.
|
2000
|
+
# @overload provider=(name)
|
2001
|
+
# Sets the provider to the result of resolving the name to an instance of Provider.
|
2002
|
+
# @param name [String] the name of the provider
|
2003
|
+
# @overload provider=(provider)
|
2004
|
+
# Sets the provider to the given instances of Provider.
|
2005
|
+
# @param provider [Puppet::Provider] the provider to set
|
2006
|
+
# @return [Puppet::Provider] the provider set
|
2007
|
+
# @raise [ArgumentError] if the provider could not be found/resolved.
|
2008
|
+
#
|
2009
|
+
def provider=(name)
|
2010
|
+
if name.is_a?(Puppet::Provider)
|
2011
|
+
@provider = name
|
2012
|
+
@provider.resource = self
|
2013
|
+
elsif klass = self.class.provider(name)
|
2014
|
+
@provider = klass.new(self)
|
2015
|
+
else
|
2016
|
+
raise ArgumentError, "Could not find #{name} provider of #{self.class.name}"
|
2017
|
+
end
|
2018
|
+
end
|
2019
|
+
|
2020
|
+
###############################
|
2021
|
+
# All of the relationship code.
|
2022
|
+
|
2023
|
+
# Adds a block producing a single name (or list of names) of the given
|
2024
|
+
# resource type name to autorelate.
|
2025
|
+
#
|
2026
|
+
# The four relationship types require, before, notify, and subscribe are all
|
2027
|
+
# supported.
|
2028
|
+
#
|
2029
|
+
# Be *careful* with notify and subscribe as they may have unintended
|
2030
|
+
# consequences.
|
2031
|
+
#
|
2032
|
+
# Resources in the catalog that have the named type and a title that is
|
2033
|
+
# included in the result will be linked to the calling resource as a
|
2034
|
+
# requirement.
|
2035
|
+
#
|
2036
|
+
# @example Autorequire the files File['foo', 'bar']
|
2037
|
+
# autorequire( 'file', {|| ['foo', 'bar'] })
|
2038
|
+
#
|
2039
|
+
# @example Autobefore the files File['foo', 'bar']
|
2040
|
+
# autobefore( 'file', {|| ['foo', 'bar'] })
|
2041
|
+
#
|
2042
|
+
# @example Autosubscribe the files File['foo', 'bar']
|
2043
|
+
# autosubscribe( 'file', {|| ['foo', 'bar'] })
|
2044
|
+
#
|
2045
|
+
# @example Autonotify the files File['foo', 'bar']
|
2046
|
+
# autonotify( 'file', {|| ['foo', 'bar'] })
|
2047
|
+
#
|
2048
|
+
# @param name [String] the name of a type of which one or several resources should be autorelated e.g. "file"
|
2049
|
+
# @yield [ ] a block returning list of names of given type to auto require
|
2050
|
+
# @yieldreturn [String, Array<String>] one or several resource names for the named type
|
2051
|
+
# @return [void]
|
2052
|
+
# @dsl type
|
2053
|
+
# @api public
|
2054
|
+
#
|
2055
|
+
def self.autorequire(name, &block)
|
2056
|
+
@autorequires ||= {}
|
2057
|
+
@autorequires[name] = block
|
2058
|
+
end
|
2059
|
+
|
2060
|
+
def self.autobefore(name, &block)
|
2061
|
+
@autobefores ||= {}
|
2062
|
+
@autobefores[name] = block
|
2063
|
+
end
|
2064
|
+
|
2065
|
+
def self.autosubscribe(name, &block)
|
2066
|
+
@autosubscribes ||= {}
|
2067
|
+
@autosubscribes[name] = block
|
2068
|
+
end
|
2069
|
+
|
2070
|
+
def self.autonotify(name, &block)
|
2071
|
+
@autonotifies ||= {}
|
2072
|
+
@autonotifies[name] = block
|
2073
|
+
end
|
2074
|
+
|
2075
|
+
# Provides iteration over added auto-requirements (see {autorequire}).
|
2076
|
+
# @yieldparam type [String] the name of the type to autorequire an instance of
|
2077
|
+
# @yieldparam block [Proc] a block producing one or several dependencies to auto require (see {autorequire}).
|
2078
|
+
# @yieldreturn [void]
|
2079
|
+
# @return [void]
|
2080
|
+
def self.eachautorequire
|
2081
|
+
@autorequires ||= {}
|
2082
|
+
@autorequires.each { |type, block|
|
2083
|
+
yield(type, block)
|
2084
|
+
}
|
2085
|
+
end
|
2086
|
+
|
2087
|
+
# Provides iteration over added auto-requirements (see {autobefore}).
|
2088
|
+
# @yieldparam type [String] the name of the type to autorequire an instance of
|
2089
|
+
# @yieldparam block [Proc] a block producing one or several dependencies to auto require (see {autobefore}).
|
2090
|
+
# @yieldreturn [void]
|
2091
|
+
# @return [void]
|
2092
|
+
def self.eachautobefore
|
2093
|
+
@autobefores ||= {}
|
2094
|
+
@autobefores.each { |type,block|
|
2095
|
+
yield(type, block)
|
2096
|
+
}
|
2097
|
+
end
|
2098
|
+
|
2099
|
+
# Provides iteration over added auto-requirements (see {autosubscribe}).
|
2100
|
+
# @yieldparam type [String] the name of the type to autorequire an instance of
|
2101
|
+
# @yieldparam block [Proc] a block producing one or several dependencies to auto require (see {autosubscribe}).
|
2102
|
+
# @yieldreturn [void]
|
2103
|
+
# @return [void]
|
2104
|
+
def self.eachautosubscribe
|
2105
|
+
@autosubscribes ||= {}
|
2106
|
+
@autosubscribes.each { |type,block|
|
2107
|
+
yield(type, block)
|
2108
|
+
}
|
2109
|
+
end
|
2110
|
+
|
2111
|
+
# Provides iteration over added auto-requirements (see {autonotify}).
|
2112
|
+
# @yieldparam type [String] the name of the type to autorequire an instance of
|
2113
|
+
# @yieldparam block [Proc] a block producing one or several dependencies to auto require (see {autonotify}).
|
2114
|
+
# @yieldreturn [void]
|
2115
|
+
# @return [void]
|
2116
|
+
def self.eachautonotify
|
2117
|
+
@autonotifies ||= {}
|
2118
|
+
@autonotifies.each { |type,block|
|
2119
|
+
yield(type, block)
|
2120
|
+
}
|
2121
|
+
end
|
2122
|
+
|
2123
|
+
# Adds dependencies to the catalog from added autorelations.
|
2124
|
+
# See {autorequire} for how to add an auto-requirement.
|
2125
|
+
# @todo needs details - see the param rel_catalog, and type of this param
|
2126
|
+
# @param rel_catalog [Puppet::Resource::Catalog, nil] the catalog to
|
2127
|
+
# add dependencies to. Defaults to the current catalog (set when the
|
2128
|
+
# type instance was added to a catalog)
|
2129
|
+
# @raise [Puppet::DevError] if there is no catalog
|
2130
|
+
#
|
2131
|
+
def autorelation(rel_type, rel_catalog = nil)
|
2132
|
+
rel_catalog ||= catalog
|
2133
|
+
raise(Puppet::DevError, "You cannot add relationships without a catalog") unless rel_catalog
|
2134
|
+
|
2135
|
+
reqs = []
|
2136
|
+
|
2137
|
+
auto_rel = "eachauto#{rel_type}".to_sym
|
2138
|
+
|
2139
|
+
self.class.send(auto_rel) { |type, block|
|
2140
|
+
# Ignore any types we can't find, although that would be a bit odd.
|
2141
|
+
next unless Puppet::Type.type(type)
|
2142
|
+
|
2143
|
+
# Retrieve the list of names from the block.
|
2144
|
+
next unless list = self.instance_eval(&block)
|
2145
|
+
list = [list] unless list.is_a?(Array)
|
2146
|
+
|
2147
|
+
# Collect the current prereqs
|
2148
|
+
list.each { |dep|
|
2149
|
+
next if dep.nil?
|
2150
|
+
|
2151
|
+
# Support them passing objects directly, to save some effort.
|
2152
|
+
unless dep.is_a?(Puppet::Type)
|
2153
|
+
# Skip autorelation that we aren't managing
|
2154
|
+
unless dep = rel_catalog.resource(type, dep)
|
2155
|
+
next
|
2156
|
+
end
|
2157
|
+
end
|
2158
|
+
|
2159
|
+
if [:require, :subscribe].include?(rel_type)
|
2160
|
+
reqs << Puppet::Relationship.new(dep, self)
|
2161
|
+
else
|
2162
|
+
reqs << Puppet::Relationship.new(self, dep)
|
2163
|
+
end
|
2164
|
+
}
|
2165
|
+
}
|
2166
|
+
|
2167
|
+
reqs
|
2168
|
+
end
|
2169
|
+
|
2170
|
+
def autorequire(rel_catalog = nil)
|
2171
|
+
autorelation(:require, rel_catalog)
|
2172
|
+
end
|
2173
|
+
|
2174
|
+
def autobefore(rel_catalog = nil)
|
2175
|
+
autorelation(:before, rel_catalog)
|
2176
|
+
end
|
2177
|
+
|
2178
|
+
def autosubscribe(rel_catalog = nil)
|
2179
|
+
autorelation(:subscribe, rel_catalog)
|
2180
|
+
end
|
2181
|
+
|
2182
|
+
def autonotify(rel_catalog = nil)
|
2183
|
+
autorelation(:notify, rel_catalog)
|
2184
|
+
end
|
2185
|
+
|
2186
|
+
# Builds the dependencies associated with this resource.
|
2187
|
+
#
|
2188
|
+
# @return [Array<Puppet::Relationship>] list of relationships to other resources
|
2189
|
+
def builddepends
|
2190
|
+
# Handle the requires
|
2191
|
+
self.class.relationship_params.collect do |klass|
|
2192
|
+
if param = @parameters[klass.name]
|
2193
|
+
param.to_edges
|
2194
|
+
end
|
2195
|
+
end.flatten.reject { |r| r.nil? }
|
2196
|
+
end
|
2197
|
+
|
2198
|
+
# Sets the initial list of tags to associate to this resource.
|
2199
|
+
#
|
2200
|
+
# @return [void] ???
|
2201
|
+
def tags=(list)
|
2202
|
+
tag(self.class.name)
|
2203
|
+
tag(*list)
|
2204
|
+
end
|
2205
|
+
|
2206
|
+
# @comment - these two comments were floating around here, and turned up as documentation
|
2207
|
+
# for the attribute "title", much to my surprise and amusement. Clearly these comments
|
2208
|
+
# are orphaned ... I think they can just be removed as what they say should be covered
|
2209
|
+
# by the now added yardoc. <irony>(Yo! to quote some of the other actual awesome specific comments applicable
|
2210
|
+
# to objects called from elsewhere, or not. ;-)</irony>
|
2211
|
+
#
|
2212
|
+
# @comment Types (which map to resources in the languages) are entirely composed of
|
2213
|
+
# attribute value pairs. Generally, Puppet calls any of these things an
|
2214
|
+
# 'attribute', but these attributes always take one of three specific
|
2215
|
+
# forms: parameters, metaparams, or properties.
|
2216
|
+
|
2217
|
+
# @comment In naming methods, I have tried to consistently name the method so
|
2218
|
+
# that it is clear whether it operates on all attributes (thus has 'attr' in
|
2219
|
+
# the method name, or whether it operates on a specific type of attributes.
|
2220
|
+
|
2221
|
+
# The title attribute of WHAT ???
|
2222
|
+
# @todo Figure out what this is the title attribute of (it appears on line 1926 currently).
|
2223
|
+
# @return [String] the title
|
2224
|
+
attr_writer :title
|
2225
|
+
|
2226
|
+
# The noop attribute of WHAT ??? does WHAT???
|
2227
|
+
# @todo Figure out what this is the noop attribute of (it appears on line 1931 currently).
|
2228
|
+
# @return [???] the noop WHAT ??? (mode? if so of what, or noop for an instance of the type, or for all
|
2229
|
+
# instances of a type, or for what???
|
2230
|
+
#
|
2231
|
+
attr_writer :noop
|
2232
|
+
|
2233
|
+
include Enumerable
|
2234
|
+
|
2235
|
+
# class methods dealing with Type management
|
2236
|
+
|
2237
|
+
public
|
2238
|
+
|
2239
|
+
# The Type class attribute accessors
|
2240
|
+
class << self
|
2241
|
+
# @return [String] the name of the resource type; e.g., "File"
|
2242
|
+
#
|
2243
|
+
attr_reader :name
|
2244
|
+
|
2245
|
+
# @return [Boolean] true if the type should send itself a refresh event on change.
|
2246
|
+
#
|
2247
|
+
attr_accessor :self_refresh
|
2248
|
+
include Enumerable, Puppet::Util::ClassGen
|
2249
|
+
include Puppet::MetaType::Manager
|
2250
|
+
|
2251
|
+
include Puppet::Util
|
2252
|
+
include Puppet::Util::Logging
|
2253
|
+
end
|
2254
|
+
|
2255
|
+
# Initializes all of the variables that must be initialized for each subclass.
|
2256
|
+
# @todo Does the explanation make sense?
|
2257
|
+
# @return [void]
|
2258
|
+
def self.initvars
|
2259
|
+
# all of the instances of this class
|
2260
|
+
@objects = Hash.new
|
2261
|
+
@aliases = Hash.new
|
2262
|
+
|
2263
|
+
@defaults = {}
|
2264
|
+
|
2265
|
+
@parameters ||= []
|
2266
|
+
|
2267
|
+
@validproperties = {}
|
2268
|
+
@properties = []
|
2269
|
+
@parameters = []
|
2270
|
+
@paramhash = {}
|
2271
|
+
|
2272
|
+
@paramdoc = Hash.new { |hash,key|
|
2273
|
+
key = key.intern if key.is_a?(String)
|
2274
|
+
if hash.include?(key)
|
2275
|
+
hash[key]
|
2276
|
+
else
|
2277
|
+
"Param Documentation for #{key} not found"
|
2278
|
+
end
|
2279
|
+
}
|
2280
|
+
|
2281
|
+
@doc ||= ""
|
2282
|
+
|
2283
|
+
end
|
2284
|
+
|
2285
|
+
# Returns the name of this type (if specified) or the parent type #to_s.
|
2286
|
+
# The returned name is on the form "Puppet::Type::<name>", where the first letter of name is
|
2287
|
+
# capitalized.
|
2288
|
+
# @return [String] the fully qualified name Puppet::Type::<name> where the first letter of name is capitalized
|
2289
|
+
#
|
2290
|
+
def self.to_s
|
2291
|
+
if defined?(@name)
|
2292
|
+
"Puppet::Type::#{@name.to_s.capitalize}"
|
2293
|
+
else
|
2294
|
+
super
|
2295
|
+
end
|
2296
|
+
end
|
2297
|
+
|
2298
|
+
# Creates a `validate` method that is used to validate a resource before it is operated on.
|
2299
|
+
# The validation should raise exceptions if the validation finds errors. (It is not recommended to
|
2300
|
+
# issue warnings as this typically just ends up in a logfile - you should fail if a validation fails).
|
2301
|
+
# The easiest way to raise an appropriate exception is to call the method {Puppet::Util::Errors.fail} with
|
2302
|
+
# the message as an argument.
|
2303
|
+
#
|
2304
|
+
# @yield [ ] a required block called with self set to the instance of a Type class representing a resource.
|
2305
|
+
# @return [void]
|
2306
|
+
# @dsl type
|
2307
|
+
# @api public
|
2308
|
+
#
|
2309
|
+
def self.validate(&block)
|
2310
|
+
define_method(:validate, &block)
|
2311
|
+
end
|
2312
|
+
|
2313
|
+
# @return [String] The file from which this type originates from
|
2314
|
+
attr_accessor :file
|
2315
|
+
|
2316
|
+
# @return [Integer] The line in {#file} from which this type originates from
|
2317
|
+
attr_accessor :line
|
2318
|
+
|
2319
|
+
# @todo what does this mean "this resource" (sounds like this if for an instance of the type, not the meta Type),
|
2320
|
+
# but not sure if this is about the catalog where the meta Type is included)
|
2321
|
+
# @return [??? TODO] The catalog that this resource is stored in.
|
2322
|
+
attr_accessor :catalog
|
2323
|
+
|
2324
|
+
# @return [Boolean] Flag indicating if this type is exported
|
2325
|
+
attr_accessor :exported
|
2326
|
+
|
2327
|
+
# @return [Boolean] Flag indicating if the type is virtual (it should not be).
|
2328
|
+
attr_accessor :virtual
|
2329
|
+
|
2330
|
+
# Creates a log entry with the given message at the log level specified by the parameter `loglevel`
|
2331
|
+
# @return [void]
|
2332
|
+
#
|
2333
|
+
def log(msg)
|
2334
|
+
|
2335
|
+
Puppet::Util::Log.create(
|
2336
|
+
|
2337
|
+
:level => @parameters[:loglevel].value,
|
2338
|
+
:message => msg,
|
2339
|
+
|
2340
|
+
:source => self
|
2341
|
+
)
|
2342
|
+
end
|
2343
|
+
|
2344
|
+
|
2345
|
+
# instance methods related to instance intrinsics
|
2346
|
+
# e.g., initialize and name
|
2347
|
+
|
2348
|
+
public
|
2349
|
+
|
2350
|
+
# @return [Hash] hash of parameters originally defined
|
2351
|
+
# @api private
|
2352
|
+
attr_reader :original_parameters
|
2353
|
+
|
2354
|
+
# Creates an instance of Type from a hash or a {Puppet::Resource}.
|
2355
|
+
# @todo Unclear if this is a new Type or a new instance of a given type (the initialization ends
|
2356
|
+
# with calling validate - which seems like validation of an instance of a given type, not a new
|
2357
|
+
# meta type.
|
2358
|
+
#
|
2359
|
+
# @todo Explain what the Hash and Resource are. There seems to be two different types of
|
2360
|
+
# resources; one that causes the title to be set to resource.title, and one that
|
2361
|
+
# causes the title to be resource.ref ("for components") - what is a component?
|
2362
|
+
#
|
2363
|
+
# @overload initialize(hash)
|
2364
|
+
# @param [Hash] hash
|
2365
|
+
# @raise [Puppet::ResourceError] when the type validation raises
|
2366
|
+
# Puppet::Error or ArgumentError
|
2367
|
+
# @overload initialize(resource)
|
2368
|
+
# @param resource [Puppet:Resource]
|
2369
|
+
# @raise [Puppet::ResourceError] when the type validation raises
|
2370
|
+
# Puppet::Error or ArgumentError
|
2371
|
+
#
|
2372
|
+
def initialize(resource)
|
2373
|
+
resource = self.class.hash2resource(resource) unless resource.is_a?(Puppet::Resource)
|
2374
|
+
|
2375
|
+
# The list of parameter/property instances.
|
2376
|
+
@parameters = {}
|
2377
|
+
|
2378
|
+
# Set the title first, so any failures print correctly.
|
2379
|
+
if resource.type.to_s.downcase.to_sym == self.class.name
|
2380
|
+
self.title = resource.title
|
2381
|
+
else
|
2382
|
+
# This should only ever happen for components
|
2383
|
+
self.title = resource.ref
|
2384
|
+
end
|
2385
|
+
|
2386
|
+
[:file, :line, :catalog, :exported, :virtual].each do |getter|
|
2387
|
+
setter = getter.to_s + "="
|
2388
|
+
if val = resource.send(getter)
|
2389
|
+
self.send(setter, val)
|
2390
|
+
end
|
2391
|
+
end
|
2392
|
+
|
2393
|
+
@tags = resource.tags
|
2394
|
+
|
2395
|
+
@original_parameters = resource.to_hash
|
2396
|
+
|
2397
|
+
set_name(@original_parameters)
|
2398
|
+
|
2399
|
+
set_default(:provider)
|
2400
|
+
|
2401
|
+
set_parameters(@original_parameters)
|
2402
|
+
|
2403
|
+
begin
|
2404
|
+
self.validate if self.respond_to?(:validate)
|
2405
|
+
rescue Puppet::Error, ArgumentError => detail
|
2406
|
+
error = Puppet::ResourceError.new("Validation of #{ref} failed: #{detail}")
|
2407
|
+
adderrorcontext(error, detail)
|
2408
|
+
raise error
|
2409
|
+
end
|
2410
|
+
|
2411
|
+
set_sensitive_parameters(resource.sensitive_parameters)
|
2412
|
+
end
|
2413
|
+
|
2414
|
+
protected
|
2415
|
+
|
2416
|
+
# Mark parameters associated with this type as sensitive, based on the associated resource.
|
2417
|
+
#
|
2418
|
+
# Currently, only instances of `Puppet::Property` can be easily marked for sensitive data handling
|
2419
|
+
# and information redaction is limited to redacting events generated while synchronizing
|
2420
|
+
# properties. While support for redaction will be broadened in the future we can't automatically
|
2421
|
+
# deduce how to redact arbitrary parameters, so if a parameter is marked for redaction the best
|
2422
|
+
# we can do is warn that we can't handle treating that parameter as sensitive and move on.
|
2423
|
+
#
|
2424
|
+
# In some unusual cases a given parameter will be marked as sensitive but that sensitive context
|
2425
|
+
# needs to be transferred to another parameter. In this case resource types may need to override
|
2426
|
+
# this method in order to copy the sensitive context from one parameter to another (and in the
|
2427
|
+
# process force the early generation of a parameter that might otherwise be lazily generated.)
|
2428
|
+
# See `Puppet::Type.type(:file)#set_sensitive_parameters` for an example of this.
|
2429
|
+
#
|
2430
|
+
# @note This method visibility is protected since it should only be called by #initialize, but is
|
2431
|
+
# marked as public as subclasses may need to override this method.
|
2432
|
+
#
|
2433
|
+
# @api public
|
2434
|
+
#
|
2435
|
+
# @param sensitive_parameters [Array<Symbol>] A list of parameters to mark as sensitive.
|
2436
|
+
#
|
2437
|
+
# @return [void]
|
2438
|
+
def set_sensitive_parameters(sensitive_parameters)
|
2439
|
+
sensitive_parameters.each do |name|
|
2440
|
+
p = parameter(name)
|
2441
|
+
if p.is_a?(Puppet::Property)
|
2442
|
+
p.sensitive = true
|
2443
|
+
elsif p.is_a?(Puppet::Parameter)
|
2444
|
+
warning("Unable to mark '#{name}' as sensitive: #{name} is a parameter and not a property, and cannot be automatically redacted.")
|
2445
|
+
elsif self.class.attrclass(name)
|
2446
|
+
warning("Unable to mark '#{name}' as sensitive: the property itself was not assigned a value.")
|
2447
|
+
else
|
2448
|
+
err("Unable to mark '#{name}' as sensitive: the property itself is not defined on #{type}.")
|
2449
|
+
end
|
2450
|
+
end
|
2451
|
+
end
|
2452
|
+
|
2453
|
+
private
|
2454
|
+
|
2455
|
+
# Sets the name of the resource from a hash containing a mapping of `name_var` to value.
|
2456
|
+
# Sets the value of the property/parameter appointed by the `name_var` (if it is defined). The value set is
|
2457
|
+
# given by the corresponding entry in the given hash - e.g. if name_var appoints the name `:path` the value
|
2458
|
+
# of `:path` is set to the value at the key `:path` in the given hash. As a side effect this key/value is then
|
2459
|
+
# removed from the given hash.
|
2460
|
+
#
|
2461
|
+
# @note This method mutates the given hash by removing the entry with a key equal to the value
|
2462
|
+
# returned from name_var!
|
2463
|
+
# @param hash [Hash] a hash of what
|
2464
|
+
# @return [void]
|
2465
|
+
def set_name(hash)
|
2466
|
+
self[name_var] = hash.delete(name_var) if name_var
|
2467
|
+
end
|
2468
|
+
|
2469
|
+
# Sets parameters from the given hash.
|
2470
|
+
# Values are set in _attribute order_ i.e. higher priority attributes before others, otherwise in
|
2471
|
+
# the order they were specified (as opposed to just setting them in the order they happen to appear in
|
2472
|
+
# when iterating over the given hash).
|
2473
|
+
#
|
2474
|
+
# Attributes that are not included in the given hash are set to their default value.
|
2475
|
+
#
|
2476
|
+
# @todo Is this description accurate? Is "ensure" an example of such a higher priority attribute?
|
2477
|
+
# @return [void]
|
2478
|
+
# @raise [Puppet::DevError] when impossible to set the value due to some problem
|
2479
|
+
# @raise [ArgumentError, TypeError, Puppet::Error] when faulty arguments have been passed
|
2480
|
+
#
|
2481
|
+
def set_parameters(hash)
|
2482
|
+
# Use the order provided by allattrs, but add in any
|
2483
|
+
# extra attributes from the resource so we get failures
|
2484
|
+
# on invalid attributes.
|
2485
|
+
no_values = []
|
2486
|
+
(self.class.allattrs + hash.keys).uniq.each do |attr|
|
2487
|
+
begin
|
2488
|
+
# Set any defaults immediately. This is mostly done so
|
2489
|
+
# that the default provider is available for any other
|
2490
|
+
# property validation.
|
2491
|
+
if hash.has_key?(attr)
|
2492
|
+
self[attr] = hash[attr]
|
2493
|
+
else
|
2494
|
+
no_values << attr
|
2495
|
+
end
|
2496
|
+
rescue ArgumentError, Puppet::Error, TypeError
|
2497
|
+
raise
|
2498
|
+
rescue => detail
|
2499
|
+
error = Puppet::DevError.new( "Could not set #{attr} on #{self.class.name}: #{detail}")
|
2500
|
+
error.set_backtrace(detail.backtrace)
|
2501
|
+
raise error
|
2502
|
+
end
|
2503
|
+
end
|
2504
|
+
no_values.each do |attr|
|
2505
|
+
set_default(attr)
|
2506
|
+
end
|
2507
|
+
end
|
2508
|
+
|
2509
|
+
public
|
2510
|
+
|
2511
|
+
# Finishes any outstanding processing.
|
2512
|
+
# This method should be called as a final step in setup,
|
2513
|
+
# to allow the parameters that have associated auto-require needs to be processed.
|
2514
|
+
#
|
2515
|
+
# @todo what is the expected sequence here - who is responsible for calling this? When?
|
2516
|
+
# Is the returned type correct?
|
2517
|
+
# @return [Array<Puppet::Parameter>] the validated list/set of attributes
|
2518
|
+
#
|
2519
|
+
def finish
|
2520
|
+
# Call post_compile hook on every parameter that implements it. This includes all subclasses
|
2521
|
+
# of parameter including, but not limited to, regular parameters, metaparameters, relationship
|
2522
|
+
# parameters, and properties.
|
2523
|
+
eachparameter do |parameter|
|
2524
|
+
parameter.post_compile if parameter.respond_to? :post_compile
|
2525
|
+
end
|
2526
|
+
|
2527
|
+
# Make sure all of our relationships are valid. Again, must be done
|
2528
|
+
# when the entire catalog is instantiated.
|
2529
|
+
self.class.relationship_params.collect do |klass|
|
2530
|
+
if param = @parameters[klass.name]
|
2531
|
+
param.validate_relationship
|
2532
|
+
end
|
2533
|
+
end.flatten.reject { |r| r.nil? }
|
2534
|
+
end
|
2535
|
+
|
2536
|
+
# @comment For now, leave the 'name' method functioning like it used to. Once 'title'
|
2537
|
+
# works everywhere, I'll switch it.
|
2538
|
+
# Returns the resource's name
|
2539
|
+
# @todo There is a comment in source that this is not quite the same as ':title' and that a switch should
|
2540
|
+
# be made...
|
2541
|
+
# @return [String] the name of a resource
|
2542
|
+
def name
|
2543
|
+
self[:name]
|
2544
|
+
end
|
2545
|
+
|
2546
|
+
# Returns the parent of this in the catalog. In case of an erroneous catalog
|
2547
|
+
# where multiple parents have been produced, the first found (non
|
2548
|
+
# deterministic) parent is returned.
|
2549
|
+
# @return [Puppet::Type, nil] the
|
2550
|
+
# containing resource or nil if there is no catalog or no containing
|
2551
|
+
# resource.
|
2552
|
+
def parent
|
2553
|
+
return nil unless catalog
|
2554
|
+
|
2555
|
+
@parent ||=
|
2556
|
+
if parents = catalog.adjacent(self, :direction => :in)
|
2557
|
+
parents.shift
|
2558
|
+
else
|
2559
|
+
nil
|
2560
|
+
end
|
2561
|
+
end
|
2562
|
+
|
2563
|
+
# Returns a reference to this as a string in "Type[name]" format.
|
2564
|
+
# @return [String] a reference to this object on the form 'Type[name]'
|
2565
|
+
#
|
2566
|
+
def ref
|
2567
|
+
# memoizing this is worthwhile ~ 3 percent of calls are the "first time
|
2568
|
+
# around" in an average run of Puppet. --daniel 2012-07-17
|
2569
|
+
@ref ||= "#{self.class.name.to_s.capitalize}[#{self.title}]"
|
2570
|
+
end
|
2571
|
+
|
2572
|
+
# (see self_refresh)
|
2573
|
+
# @todo check that meaningful yardoc is produced - this method delegates to "self.class.self_refresh"
|
2574
|
+
# @return [Boolean] - ??? returns true when ... what?
|
2575
|
+
#
|
2576
|
+
def self_refresh?
|
2577
|
+
self.class.self_refresh
|
2578
|
+
end
|
2579
|
+
|
2580
|
+
# Marks the object as "being purged".
|
2581
|
+
# This method is used by transactions to forbid deletion when there are dependencies.
|
2582
|
+
# @todo what does this mean; "mark that we are purging" (purging what from where). How to use/when?
|
2583
|
+
# Is this internal API in transactions?
|
2584
|
+
# @see purging?
|
2585
|
+
def purging
|
2586
|
+
@purging = true
|
2587
|
+
end
|
2588
|
+
|
2589
|
+
# Returns whether this resource is being purged or not.
|
2590
|
+
# This method is used by transactions to forbid deletion when there are dependencies.
|
2591
|
+
# @return [Boolean] the current "purging" state
|
2592
|
+
#
|
2593
|
+
def purging?
|
2594
|
+
if defined?(@purging)
|
2595
|
+
@purging
|
2596
|
+
else
|
2597
|
+
false
|
2598
|
+
end
|
2599
|
+
end
|
2600
|
+
|
2601
|
+
# Returns the title of this object, or its name if title was not explicitly set.
|
2602
|
+
# If the title is not already set, it will be computed by looking up the {#name_var} and using
|
2603
|
+
# that value as the title.
|
2604
|
+
# @todo it is somewhat confusing that if the name_var is a valid parameter, it is assumed to
|
2605
|
+
# be the name_var called :name, but if it is a property, it uses the name_var.
|
2606
|
+
# It is further confusing as Type in some respects supports multiple namevars.
|
2607
|
+
#
|
2608
|
+
# @return [String] Returns the title of this object, or its name if title was not explicitly set.
|
2609
|
+
# @raise [??? devfail] if title is not set, and name_var can not be found.
|
2610
|
+
def title
|
2611
|
+
unless @title
|
2612
|
+
if self.class.validparameter?(name_var)
|
2613
|
+
@title = self[:name]
|
2614
|
+
elsif self.class.validproperty?(name_var)
|
2615
|
+
@title = self.should(name_var)
|
2616
|
+
else
|
2617
|
+
self.devfail "Could not find namevar #{name_var} for #{self.class.name}"
|
2618
|
+
end
|
2619
|
+
end
|
2620
|
+
|
2621
|
+
@title
|
2622
|
+
end
|
2623
|
+
|
2624
|
+
# Produces a reference to this in reference format.
|
2625
|
+
# @see #ref
|
2626
|
+
#
|
2627
|
+
def to_s
|
2628
|
+
self.ref
|
2629
|
+
end
|
2630
|
+
|
2631
|
+
# Convert this resource type instance to a Puppet::Resource.
|
2632
|
+
# @return [Puppet::Resource] Returns a serializable representation of this resource
|
2633
|
+
#
|
2634
|
+
def to_resource
|
2635
|
+
resource = self.retrieve_resource
|
2636
|
+
resource.tag(*self.tags)
|
2637
|
+
|
2638
|
+
@parameters.each do |name, param|
|
2639
|
+
# Avoid adding each instance name twice
|
2640
|
+
next if param.class.isnamevar? and param.value == self.title
|
2641
|
+
|
2642
|
+
# We've already got property values
|
2643
|
+
next if param.is_a?(Puppet::Property)
|
2644
|
+
resource[name] = param.value
|
2645
|
+
end
|
2646
|
+
|
2647
|
+
resource
|
2648
|
+
end
|
2649
|
+
|
2650
|
+
# @return [Boolean] Returns whether the resource is virtual or not
|
2651
|
+
def virtual?; !!@virtual; end
|
2652
|
+
# @return [Boolean] Returns whether the resource is exported or not
|
2653
|
+
def exported?; !!@exported; end
|
2654
|
+
|
2655
|
+
# @return [Boolean] Returns whether the resource is applicable to `:device`
|
2656
|
+
# Returns true if a resource of this type can be evaluated on a 'network device' kind
|
2657
|
+
# of hosts.
|
2658
|
+
# @api private
|
2659
|
+
def appliable_to_device?
|
2660
|
+
self.class.can_apply_to(:device)
|
2661
|
+
end
|
2662
|
+
|
2663
|
+
# @return [Boolean] Returns whether the resource is applicable to `:host`
|
2664
|
+
# Returns true if a resource of this type can be evaluated on a regular generalized computer (ie not an appliance like a network device)
|
2665
|
+
# @api private
|
2666
|
+
def appliable_to_host?
|
2667
|
+
self.class.can_apply_to(:host)
|
2668
|
+
end
|
2669
|
+
end
|
2670
|
+
end
|