Sha256: b7f30ec7d343bb243247685f1d56d01a6f12d55060594a887c95f491f64eef05

Contents?: true

Size: 1.33 KB

Versions: 1

Compression:

Stored size: 1.33 KB

Contents

require "vagrant/action/builder"

module VagrantPlugins

    module ProviderVirtualBox

        module Action

            autoload :SnapshotTake,     File.expand_path("../action/snapshot_take.rb", __FILE__)
            autoload :SnapshotRollback, File.expand_path("../action/snapshot_rollback.rb", __FILE__)

            def self.action_snapshot_take
                Vagrant::Action::Builder.new.tap do |b|
                    b.use CheckVirtualbox
                    b.use Call, Created do |env, b2|
                        if env[:result]
                            b2.use CheckAccessible
                            b2.use SnapshotTake
                        else
                            b2.use MessageNotCreated
                        end
                    end
                end
            end

            def self.action_snapshot_rollback
                Vagrant::Action::Builder.new.tap do |b|
                    b.use CheckVirtualbox
                    b.use Call, Created do |env, b2|
                        if env[:result]
                            b2.use CheckAccessible
                            b2.use SnapshotRollback
                        else
                            b2.use MessageNotCreated
                        end
                    end
                end
            end

       end

    end

end

        

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-zz-multiprovider-snap-0.0.1 lib/vagrant-multiprovider-snap/providers/virtualbox/action.rb