Class: Aspera::Transfer::Spec
- Inherits:
-
Object
- Object
- Aspera::Transfer::Spec
- Defined in:
- lib/aspera/transfer/spec.rb
Overview
Parameters for Transfer Spec Parameters are generated from JSON Schema.
Constant Summary collapse
- ACCESS_KEY_TRANSFER_USER =
default transfer username for access key based transfers
'xfer'- SSH_PORT =
default ports for SSH and UDP
33_001- UDP_PORT =
33_001- AK_TSPEC_BASE =
base transfer spec for access keys
{ 'remote_user' => ACCESS_KEY_TRANSFER_USER, 'ssh_port' => SSH_PORT, 'fasp_port' => UDP_PORT }.freeze
- WSS_FIELDS =
fields for WSS
%w[wss_enabled wss_port].freeze
- TRANSPORT_FIELDS =
all fields for transport
%w[remote_host remote_user ssh_port fasp_port].concat(WSS_FIELDS).freeze
- TAG_RESERVED =
reserved tag for Aspera
'aspera'- SCHEMA =
CommandLineBuilder.read_schema(__FILE__, 'spec')
Class Method Summary collapse
-
.direction_to_transfer_type(direction) ⇒ Object
translate send/receive to upload/download.
- .fix_transferd_resume_policy(transfer_spec) ⇒ Object
-
.transfer_type_to_direction(transfer_type) ⇒ Object
translate upload/download to send/receive.
Class Method Details
.direction_to_transfer_type(direction) ⇒ Object
translate send/receive to upload/download
43 44 45 |
# File 'lib/aspera/transfer/spec.rb', line 43 def direction_to_transfer_type(direction) XFER_DIR_TO_TYPE.fetch(direction) end |
.fix_transferd_resume_policy(transfer_spec) ⇒ Object
47 48 49 50 |
# File 'lib/aspera/transfer/spec.rb', line 47 def fix_transferd_resume_policy(transfer_spec) # Fix discrepancy in transfer spec transfer_spec['resume_policy'] = POLICY_FIX[transfer_spec['resume_policy']] if transfer_spec.key?('resume_policy') end |
.transfer_type_to_direction(transfer_type) ⇒ Object
translate upload/download to send/receive
38 39 40 |
# File 'lib/aspera/transfer/spec.rb', line 38 def transfer_type_to_direction(transfer_type) XFER_TYPE_TO_DIR.fetch(transfer_type) end |