文件操作 - validator_factory_4_0.rb
返回文件管理
返回主菜单
删除本文件
文件: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/validation/validator_factory_4_0.rb
编辑文件内容
# frozen_string_literal: true module Puppet::Pops module Validation # Configures validation suitable for 4.0 # class ValidatorFactory_4_0 < Factory # Produces the checker to use def checker diagnostic_producer if Puppet[:tasks] require_relative 'tasks_checker' TasksChecker.new(diagnostic_producer) else Checker4_0.new(diagnostic_producer) end end # Produces the label provider to use def label_provider Model::ModelLabelProvider.new() end # Produces the severity producer to use def severity_producer p = super # Configure each issue that should **not** be an error # # Validate as per the current runtime configuration p[Issues::RT_NO_STORECONFIGS_EXPORT] = Puppet[:storeconfigs] ? :ignore : :warning p[Issues::RT_NO_STORECONFIGS] = Puppet[:storeconfigs] ? :ignore : :warning p[Issues::FUTURE_RESERVED_WORD] = :deprecation p[Issues::DUPLICATE_KEY] = Puppet[:strict] == :off ? :ignore : Puppet[:strict] p[Issues::NAME_WITH_HYPHEN] = :error p[Issues::EMPTY_RESOURCE_SPECIALIZATION] = :ignore p[Issues::CLASS_NOT_VIRTUALIZABLE] = :error p[Issues::ILLEGAL_NONLITERAL_PARAMETER_TYPE] = :deprecation p end end end end
修改文件时间
将文件时间修改为当前时间的前一年
删除文件