Sha256: d8b06047259fc8e818c3da322b90ca0fb17cb510e82bb6f70f41311d143d7c8f

Contents?: true

Size: 663 Bytes

Versions: 12

Compression:

Stored size: 663 Bytes

Contents

require 'log4r'

module VagrantPlugins
  module OVirtProvider
    module Action
      class SnapshotSave
        def initialize(app, env)
          @logger = Log4r::Logger.new("vagrant_ovirt4::action::snapshot_save")
          @app = app
        end

        def call(env)
          env[:ui].info(I18n.t("vagrant_ovirt4.snapshot_save"))
          
          snapshots_service = env[:vms_service].vm_service(env[:machine].id).snapshots_service
          
          snapshots_service.add(
            OvirtSDK4::Snapshot.new(
              description: env[:snapshot_name]
            )
          )

          @app.call(env)
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
vagrant-ovirt4-2.2.0 lib/vagrant-ovirt4/action/snapshot_save.rb
vagrant-ovirt4-2.1.3 lib/vagrant-ovirt4/action/snapshot_save.rb
vagrant-ovirt4-2.1.0 lib/vagrant-ovirt4/action/snapshot_save.rb
vagrant-ovirt4-2.0.0 lib/vagrant-ovirt4/action/snapshot_save.rb
vagrant-ovirt4-1.2.3 lib/vagrant-ovirt4/action/snapshot_save.rb
vagrant-ovirt4-1.2.2 lib/vagrant-ovirt4/action/snapshot_save.rb
vagrant-ovirt4-1.2.1 lib/vagrant-ovirt4/action/snapshot_save.rb
vagrant-ovirt4-1.2.0 lib/vagrant-ovirt4/action/snapshot_save.rb
vagrant-ovirt4-1.1.0 lib/vagrant-ovirt4/action/snapshot_save.rb
vagrant-ovirt4-1.0.2 lib/vagrant-ovirt4/action/snapshot_save.rb
vagrant-ovirt4-1.0.1 lib/vagrant-ovirt4/action/snapshot_save.rb
vagrant-ovirt4-1.0.0 lib/vagrant-ovirt4/action/snapshot_save.rb