Module: Avm::Instances::Base::AutoValues::Install
- Defined in:
- lib/avm/instances/base/auto_values/install.rb
Instance Method Summary collapse
- #auto_access ⇒ Object
- #auto_install_hostname ⇒ Object
- #auto_install_port ⇒ Object
- #auto_install_url ⇒ Object
- #auto_install_url_by_parts ⇒ Object
- #auto_install_username ⇒ Object
Instance Method Details
#auto_access ⇒ Object
10 11 12 |
# File 'lib/avm/instances/base/auto_values/install.rb', line 10 def auto_access read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_URL).present? ? 'ssh' : 'local' end |
#auto_install_hostname ⇒ Object
14 15 16 17 |
# File 'lib/avm/instances/base/auto_values/install.rb', line 14 def auto_install_hostname inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID, ::Avm::Instances::EntryKeys::INSTALL_HOSTNAME) end |
#auto_install_port ⇒ Object
19 20 21 22 |
# File 'lib/avm/instances/base/auto_values/install.rb', line 19 def auto_install_port inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID, ::Avm::Instances::EntryKeys::INSTALL_PORT) || 22 end |
#auto_install_url ⇒ Object
29 30 31 32 33 |
# File 'lib/avm/instances/base/auto_values/install.rb', line 29 def auto_install_url inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID, ::Avm::Instances::EntryKeys::INSTALL_URL) || auto_install_url_by_parts end |
#auto_install_url_by_parts ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'lib/avm/instances/base/auto_values/install.rb', line 35 def auto_install_url_by_parts read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_HOSTNAME).if_present do |a| a = read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_USERNAME) .if_present(a) { |v| "#{v}@#{a}" } a = read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_PORT) .if_present(a) { |v| "#{a}:#{v}" } "ssh://#{a}" end end |