文件操作 - network_device.rb
返回文件管理
返回主菜单
删除本文件
文件: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/facts/network_device.rb
编辑文件内容
# frozen_string_literal: true require_relative '../../../puppet/node/facts' require_relative '../../../puppet/indirector/code' class Puppet::Node::Facts::NetworkDevice < Puppet::Indirector::Code desc "Retrieve facts from a network device." def allow_remote_requests? false end # Look a device's facts up through the current device. def find(request) result = Puppet::Node::Facts.new(request.key, Puppet::Util::NetworkDevice.current.facts) result.add_local_facts result.sanitize result end def destroy(facts) raise Puppet::DevError, _("You cannot destroy facts in the code store; it is only used for getting facts from a remote device") end def save(facts) raise Puppet::DevError, _("You cannot save facts to the code store; it is only used for getting facts from a remote device") end end
修改文件时间
将文件时间修改为当前时间的前一年
删除文件