Method: Eos::Host#puppet_agent_dev_package_info

Defined in:
lib/beaker/host/eos.rb

#puppet_agent_dev_package_info(puppet_collection = nil, puppet_agent_version = nil, opts = {}) ⇒ String

Note:

EOS doesn’t use any additional options at this time, but does require both puppet_collection & puppet_agent_version, & will fail without them

Gets the path & file name for the puppet agent dev package on EOS

Parameters:

  • puppet_collection (String) (defaults to: nil)

    Name of the puppet collection to use

  • puppet_agent_version (String) (defaults to: nil)

    Version of puppet agent to get

  • opts (Hash{Symbol=>String}) (defaults to: {})

    Options hash to provide extra values

Returns:

  • (String, String)

    Path to the directory and filename of the package, respectively

Raises:

  • (ArgumentError)

    If one of the two required parameters (puppet_collection, puppet_agent_version) is either not passed or set to nil



21
22
23
24
25
26
27
28
29
30
# File 'lib/beaker/host/eos.rb', line 21

def puppet_agent_dev_package_info( puppet_collection = nil, puppet_agent_version = nil, opts = {} )
  error_message = "Must provide %s argument to get puppet agent dev package information"
  raise ArgumentError, error_message % "puppet_collection" unless puppet_collection
  raise ArgumentError, error_message % "puppet_agent_version" unless puppet_agent_version

  variant, version, arch, _ = self['platform'].to_array
  release_path = "#{variant}/#{version}/#{puppet_collection}/#{arch}"
  release_file = "puppet-agent-#{puppet_agent_version}-1.#{variant}#{version}.#{arch}.swix"
  return release_path, release_file
end