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_puppet_agent_package_info(puppet_collection = nil, puppet_agent_version = nil, opts = {}) ⇒ String
Gets the path & file name for the puppet agent package on EOS.
-
#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.
Methods inherited from Unix::Host
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, #pkg_initialize, #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, #get_env_var, #get_ip, #mirror_env_to_profile_d, #mkdir_p, #mv, #path, #ping, #reboot, #rm_rf, #ssh_permit_user_environment, #ssh_service_restart, #ssh_set_user_environment, #touch
Methods included from Unix::File
#file_exist?, #path_split, #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, #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, #reachable_name, #to_s, #to_str, #up?, #use_service_scripts?, #uses_passenger!
Constructor Details
This class inherits a constructor from Beaker::Host
Instance Method Details
#get_puppet_agent_package_info(puppet_collection = nil, puppet_agent_version = nil, opts = {}) ⇒ String
Gets the path & file name for the puppet agent package on EOS
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/beaker/host/eos.rb', line 18 def get_puppet_agent_package_info( puppet_collection = nil, puppet_agent_version = nil, opts = {} ) = "Must provide %s argument to get puppet agent 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 |
#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
38 39 40 41 42 |
# File 'lib/beaker/host/eos.rb', line 38 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
49 50 51 52 53 |
# File 'lib/beaker/host/eos.rb', line 49 def install_from_file( filename ) commands = ['enable', "extension #{filename}"] command = commands.join("\n") execute("Cli -c '#{command}'") end |