Class: OsCtld::Commands::Container::LocalTransfer::Cancel
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from Base
#build_dataset_map, #cleanup_target_container!, #clear_failed_state_snapshot, #complete_target!, #destroy_local_transfer_snapshots, #ensure_target_staged_or_complete!, #find, #force_writeout, #operation, #require_local_transfer_log!, #snapshot_datasets, #snapshot_name, #start_target!, #target_ct, #target_pool, #transfer_dataset, #validate_dataset_layout!
Methods inherited from Logged
Instance Method Details
#execute(ct) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/osctld/commands/container/local_transfer/cancel.rb', line 5 def execute(ct) manipulate(ct) do log = ct.exclusively do ret = require_local_transfer_log!(ct) error!('invalid local transfer sequence') unless ret.can_local_cancel?(opts[:force]) ret end destroy_local_transfer_snapshots(log) cleanup_target_container!(log) ct.close_local_transfer_log end ok end |