Module: VpsAdminOS::Converter::Vz6::Migrator
- Defined in:
- lib/vpsadminos-converter/vz6/migrator.rb
Defined Under Namespace
Classes: Base, Ploop, Simfs, State, Zfs
Class Method Summary collapse
Class Method Details
.create(vz_ct, target_ct, opts) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/vpsadminos-converter/vz6/migrator.rb', line 15 def self.create(vz_ct, target_ct, opts) begin Vz6::Migrator::State.load(vz_ct.ctid) rescue Errno::ENOENT # ok else raise "migration for CT #{vz_ct.ctid} has already been started" end state = Vz6::Migrator::State.create(vz_ct, target_ct, opts) self.for(vz_ct, opts[:zfs]).new(state) end |