Module: Avm::Instances::Base::AutoValues::Filesystem
- Defined in:
- lib/avm/instances/base/auto_values/filesystem.rb
Instance Method Summary collapse
- #auto_data_fs_path ⇒ Object
- #auto_fs_path ⇒ Object
- #auto_fs_url ⇒ Object
- #auto_fs_url_with_ssh ⇒ Object
- #auto_fs_url_without_ssh ⇒ Object
Instance Method Details
#auto_data_fs_path ⇒ Object
15 16 17 18 |
# File 'lib/avm/instances/base/auto_values/filesystem.rb', line 15 def auto_data_fs_path inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID, ::Avm::Instances::EntryKeys::DATA_FS_PATH) { |v| v + '/' + id } end |
#auto_fs_path ⇒ Object
10 11 12 13 |
# File 'lib/avm/instances/base/auto_values/filesystem.rb', line 10 def auto_fs_path inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID, ::Avm::Instances::EntryKeys::FS_PATH) { |v| v + '/' + id } end |
#auto_fs_url ⇒ Object
20 21 22 |
# File 'lib/avm/instances/base/auto_values/filesystem.rb', line 20 def auto_fs_url auto_fs_url_with_ssh || auto_fs_url_without_ssh end |
#auto_fs_url_with_ssh ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/avm/instances/base/auto_values/filesystem.rb', line 24 def auto_fs_url_with_ssh read_entry_optional('ssh.url').if_present do |ssh_url| read_entry_optional('fs_path').if_present do |fs_path| "#{ssh_url}#{fs_path}" end end end |
#auto_fs_url_without_ssh ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/avm/instances/base/auto_values/filesystem.rb', line 32 def auto_fs_url_without_ssh return nil if read_entry_optional('ssh.url').present? read_entry_optional('fs_path').if_present do |fs_path| "file://#{fs_path}" end end |