403Webshell
Server IP : 172.67.158.161  /  Your IP : 18.118.141.81
Web Server : LiteSpeed
System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : giankuin ( 1871)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/info_service/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/info_service/plan_information_service.rb
class Puppet::InfoService::PlanInformationService
  require_relative '../../puppet/module'

  def self.plans_per_environment(environment_name)
    # get the actual environment object, raise error if the named env doesn't exist
    env = Puppet.lookup(:environments).get!(environment_name)
    env.modules.map do |mod|
      mod.plans.map do |plan|
        {:module => {:name => plan.module.name}, :name => plan.name}
      end
    end.flatten
  end

  def self.plan_data(environment_name, module_name, plan_name)
    # raise EnvironmentNotFound if applicable
    Puppet.lookup(:environments).get!(environment_name)

    pup_module = Puppet::Module.find(module_name, environment_name)
    if pup_module.nil?
      raise Puppet::Module::MissingModule, _("Module %{module_name} not found in environment %{environment_name}.") %
                                            {module_name: module_name, environment_name: environment_name}
    end

    plan = pup_module.plans.find { |t| t.name == plan_name }
    if plan.nil?
      raise Puppet::Module::Plan::PlanNotFound.new(plan_name, module_name)
    end

    begin
      plan.validate
      {:metadata => plan.metadata, :files => plan.files}
    rescue Puppet::Module::Plan::Error => err
      { :metadata => nil, :files => [], :error => err.to_h }
    end
  end
end

Youez - 2016 - github.com/yon3zu
LinuXploit