Sha256: 778cf4afacb229ed98eda0b23359d3723ff7f5d2f769a7778a3da9216de548cc

Contents?: true

Size: 1023 Bytes

Versions: 58

Compression:

Stored size: 1023 Bytes

Contents

require 'json'
require 'optparse'

require_relative "push_shared"

module VagrantPlugins
  module CommandSnapshot
    module Command
      class Push < Vagrant.plugin("2", :command)
        include PushShared

        def execute
          opts = OptionParser.new do |o|
            o.banner = "Usage: vagrant snapshot push [options] [vm-name]"
            o.separator ""
            o.separator "Take a snapshot of the current state of the machine and 'push'"
            o.separator "it onto the stack of states. You can use `vagrant snapshot pop`"
            o.separator "to restore back to this state at any time."
            o.separator ""
            o.separator "If you use `vagrant snapshot save` or restore at any point after"
            o.separator "a push, pop will still bring you back to this pushed state."
          end

          # Parse the options
          argv = parse_options(opts)
          return if !argv

          return shared_exec(argv, method(:push))
        end
      end
    end
  end
end

Version data entries

58 entries across 54 versions & 6 rubygems

Version Path
vagrant-unbundled-2.3.6.0 plugins/commands/snapshot/command/push.rb
tamtam-vagrant-reload-1.2.1 vendor/cache/vagrant-2092df529ae7/plugins/commands/snapshot/command/push.rb
vagrant-unbundled-2.3.3.0 plugins/commands/snapshot/command/push.rb
vagrant-unbundled-2.3.2.0 plugins/commands/snapshot/command/push.rb
vagrant-unbundled-2.2.19.0 plugins/commands/snapshot/command/push.rb
vagrant-unbundled-2.2.18.0 plugins/commands/snapshot/command/push.rb
vagrant-unbundled-2.2.16.0 plugins/commands/snapshot/command/push.rb
vagrant-unbundled-2.2.14.0 plugins/commands/snapshot/command/push.rb
vagrant-aws-mkubenka-0.7.2.pre.24 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-22795b161bf6/plugins/commands/snapshot/command/push.rb
vagrant-unbundled-2.2.10.0 plugins/commands/snapshot/command/push.rb
vagrant-unbundled-2.2.9.0 plugins/commands/snapshot/command/push.rb
vagrant-unbundled-2.2.8.0 plugins/commands/snapshot/command/push.rb
vagrant-unbundled-2.2.7.0 plugins/commands/snapshot/command/push.rb
vagrant-unbundled-2.2.6.2 plugins/commands/snapshot/command/push.rb
vagrant-unbundled-2.2.6.1 plugins/commands/snapshot/command/push.rb
vagrant-unbundled-2.2.6.0 plugins/commands/snapshot/command/push.rb
vagrant-unbundled-2.2.5.0 plugins/commands/snapshot/command/push.rb
vagrant-unbundled-2.2.4.0 plugins/commands/snapshot/command/push.rb
vagrant-unbundled-2.2.3.0 plugins/commands/snapshot/command/push.rb
vagrant-unbundled-2.2.2.0 plugins/commands/snapshot/command/push.rb