Sha256: 853e0696c41cddae9a65e72350a78d3be91c5dd17b52947e7102dd0b79504f15

Contents?: true

Size: 787 Bytes

Versions: 3

Compression:

Stored size: 787 Bytes

Contents

module HashiCorp

    module VagrantVMwareworkstation

        module Action

            class SnapshotTake

                def initialize(app, env)
                    @app = app
                end

                def call(env)

                    if env[:snap_name].nil?
                        env[:ui].info I18n.t("vagrant_snap.actions.vm.snapshot_take.taking")
                    else
                        env[:ui].info(I18n.t("vagrant_snap.actions.vm.snapshot_take.taking_named",
                            :snapshot => env[:snap_name]),
                        )
                    end

                    env[:machine].provider.driver.snapshot_take(env[:snap_name])

                    @app.call(env)

                end

            end

        end

    end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vagrant-multiprovider-snap-0.0.15 lib/vagrant-multiprovider-snap/providers/vmware_workstation/action/snapshot_take.rb
vagrant-multiprovider-snap-0.0.14 lib/vagrant-multiprovider-snap/providers/vmware_workstation/action/snapshot_take.rb
vagrant-multiprovider-snap-0.0.13 lib/vagrant-multiprovider-snap/providers/vmware_workstation/action/snapshot_take.rb