Class: VagrantPlugins::XenServer::Action::CloneDisk
- Inherits:
-
Object
- Object
- VagrantPlugins::XenServer::Action::CloneDisk
- Defined in:
- lib/vagrant-xenserver/action/clone_disk.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ CloneDisk
constructor
A new instance of CloneDisk.
Constructor Details
#initialize(app, env) ⇒ CloneDisk
Returns a new instance of CloneDisk.
11 12 13 14 |
# File 'lib/vagrant-xenserver/action/clone_disk.rb', line 11 def initialize(app, env) @app = app @logger = Log4r::Logger.new("vagrant::xenserver::actions::clone_disk") end |
Instance Method Details
#call(env) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/vagrant-xenserver/action/clone_disk.rb', line 16 def call(env) vdi_ref = env[:box_vdi] clone = env[:xc].VDI.clone(vdi_ref, {}) env[:my_vdi] = clone @logger.info("clone VDI=#{clone}") @app.call(env) end |