Class: Eos::Host
- Inherits:
-
Unix::Host
- Object
- Beaker::Host
- Unix::Host
- Eos::Host
- Defined in:
- lib/beaker/host/eos.rb
Constant Summary
Constants inherited from Beaker::Host
Instance Attribute Summary
Attributes included from Beaker::CommandFactory
Attributes inherited from Beaker::Host
#host_hash, #logger, #name, #options
Instance Method Summary collapse
-
#get_remote_file(remote_url, host_directory = '') ⇒ Result
Copies a remote file to the host location specified.
-
#install_from_file(filename) ⇒ Result
Installs an extension file already copied via #get_remote_file or something similar.
-
#puppet_agent_dev_package_info(puppet_collection = nil, puppet_agent_version = nil, opts = {}) ⇒ String
Gets the path & file name for the puppet agent dev package on EOS.
Methods inherited from Unix::Host
#determine_ssh_server, #external_copy_base, #initialize, #platform_defaults, #skip_set_env?, #validate_setup
Methods included from Unix::Pkg
#check_for_command, #check_for_package, #deploy_apt_repo, #deploy_package_repo, #deploy_yum_repo, #deploy_zyp_repo, #determine_if_x86_64, #extract_rpm_proxy_options, #install_package, #install_package_with_rpm, #pe_puppet_agent_promoted_package_info, #pe_puppet_agent_promoted_package_install, #pkg_initialize, #solaris_install_local_package, #solaris_puppet_agent_dev_package_info, #uninstall_package, #update_apt_if_needed, #upgrade_package
Methods included from Beaker::CommandFactory
Methods included from Unix::Exec
#add_env_var, #clear_env_var, #delete_env_var, #echo, #environment_string, #environment_variable_string_pair_array, #get_env_var, #get_ip, #mirror_env_to_profile_d, #mkdir_p, #mv, #path, #ping, #prepend_commands, #reboot, #rm_rf, #ssh_permit_user_environment, #ssh_service_restart, #ssh_set_user_environment, #touch
Methods included from Unix::File
#file_exist?, #noask_file_text, #package_config_dir, #path_split, #repo_filename, #repo_type, #scp_path, #system_temp_path, #tmpdir, #tmpfile
Methods included from Unix::Group
#group_absent, #group_get, #group_gid, #group_list, #group_present
Methods included from Unix::User
#user_absent, #user_get, #user_list, #user_present
Methods inherited from Beaker::Host
#+, #[], #[]=, #close, #connection, create, #delete, #do_rsync_to, #do_scp_from, #do_scp_to, #exec, #get_ip, #get_public_ip, #graceful_restarts?, #has_key?, #hostname, #initialize, #ip, #is_cygwin?, #is_pe?, #is_powershell?, #is_using_passenger?, #is_x86_64?, #log_prefix, #node_name, #pkg_initialize, #platform, #port_open?, #puppet_configprint, #reachable_name, #to_s, #to_str, #up?, #use_service_scripts?, #uses_passenger!
Methods included from Beaker::DSL::Patterns
Methods included from Beaker::DSL::Helpers::WebHelpers
#link_exists?, #port_open_within?
Methods included from Beaker::DSL::Helpers::TKHelpers
Methods included from Beaker::DSL::Helpers::TestHelpers
#current_step_name, #current_test_filename, #current_test_name, #set_current_step_name, #set_current_test_filename, #set_current_test_name
Methods included from Beaker::DSL::Helpers::PuppetHelpers
#apply_manifest, #apply_manifest_on, #create_tmpdir_for_user, #puppet_group, #puppet_user, #run_agent_on, #sign_certificate, #sign_certificate_for, #sleep_until_nc_started, #sleep_until_puppetdb_started, #sleep_until_puppetserver_started, #stop_agent, #stop_agent_on, #stub_forge, #stub_forge_on, #stub_hosts, #stub_hosts_on, #wait_for_host_in_dashboard, #with_forge_stubbed, #with_forge_stubbed_on, #with_host_stubbed_on, #with_puppet_running, #with_puppet_running_on
Methods included from Beaker::DSL::Helpers::HostHelpers
#add_system32_hosts_entry, #archive_file_from, #backup_the_file, #check_for_package, #create_remote_file, #create_tmpdir_on, #curl_on, #curl_with_retries, #deploy_package_repo, #echo_on, #execute_powershell_script_on, #exit_code, #install_package, #on, #retry_on, #rsync_to, #run_script, #run_script_on, #scp_from, #scp_to, #shell, #stderr, #stdout, #upgrade_package
Methods included from Beaker::DSL::Helpers::FacterHelpers
Constructor Details
This class inherits a constructor from Unix::Host
Instance Method Details
#get_remote_file(remote_url, host_directory = '') ⇒ Result
in EOS, you just copy the file as an extension, you don’t worry about location, so that parameter is ignored
Copies a remote file to the host location specified
41 42 43 44 45 |
# File 'lib/beaker/host/eos.rb', line 41 def get_remote_file( remote_url, host_directory = '' ) commands = ['enable', "copy #{remote_url} extension:"] command = commands.join("\n") execute("Cli -c '#{command}'") end |
#install_from_file(filename) ⇒ Result
Installs an extension file already copied via #get_remote_file or something similar
52 53 54 55 56 |
# File 'lib/beaker/host/eos.rb', line 52 def install_from_file( filename ) commands = ['enable', "extension #{filename}"] command = commands.join("\n") execute("Cli -c '#{command}'") end |
#puppet_agent_dev_package_info(puppet_collection = nil, puppet_agent_version = nil, opts = {}) ⇒ String
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
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 = {} ) = "Must provide %s argument to get puppet agent dev package information" raise ArgumentError, % "puppet_collection" unless puppet_collection raise ArgumentError, % "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 |