Class: OsCtld::Commands::Container::CopyState
- Inherits:
-
LocalTransfer::State
- Object
- Base
- Logged
- LocalTransfer::Base
- LocalTransfer::State
- OsCtld::Commands::Container::CopyState
- Defined in:
- lib/osctld/commands/container/copy_state.rb
Instance Attribute Summary
Attributes inherited from Base
#client, #client_handler, #id, #opts
Instance Method Summary collapse
- #after_state_snapshot(ct, running, stopped) ⇒ Object protected
- #operation ⇒ Object protected
- #stop_source_for_state?(running) ⇒ Boolean protected
Methods inherited from LocalTransfer::State
#after_target_complete, #execute, #prepare_state!
Methods inherited from LocalTransfer::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, #require_local_transfer_log!, #snapshot_datasets, #snapshot_name, #start_target!, #target_ct, #target_pool, #transfer_dataset, #validate_dataset_layout!
Methods inherited from Logged
Methods inherited from Base
#base_execute, #call_cmd, #call_cmd!, #error, #error!, #execute, handle, #handled, #indirect?, #initialize, #manipulate, #manipulation_holder, #ok, #progress, #request_stop, run, run!
Constructor Details
This class inherits a constructor from OsCtld::Commands::Base
Instance Method Details
#after_state_snapshot(ct, running, stopped) ⇒ Object (protected)
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/osctld/commands/container/copy_state.rb', line 17 def after_state_snapshot(ct, running, stopped) return unless stopped && opts.fetch(:restart, true) && running call_cmd!( Commands::Container::Start, id: ct.id, pool: ct.pool.name, force: true, wait: false ) end |
#operation ⇒ Object (protected)
9 10 11 |
# File 'lib/osctld/commands/container/copy_state.rb', line 9 def operation :copy end |
#stop_source_for_state?(running) ⇒ Boolean (protected)
13 14 15 |
# File 'lib/osctld/commands/container/copy_state.rb', line 13 def stop_source_for_state?(running) running && opts.fetch(:consistent, true) end |