Sha256: 03445b6ae9ca4269f4e0002c00b467776a26e62b58efe20aed9d7b1da78345c4

Contents?: true

Size: 714 Bytes

Versions: 54

Compression:

Stored size: 714 Bytes

Contents

# frozen_string_literal: true

module VagrantPlugins
  module ProviderZone
    module Command
      # This is used to shutdown the guest from inside the guest
      class ShutdownGuest < Vagrant.plugin('2', :command)
        def execute
          opts = OptionParser.new do |o|
            o.banner = 'Usage: vagrant zone control shutdown [options]'
          end

          argv = parse_options(opts)
          return unless argv

          unless argv.empty?
            @env.ui.info(opts.help)
            return
          end

          ## Wait for VM up
          with_target_vms(argv, provider: :zone) do |machine|
            machine.action('shutdown')
          end
        end
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
vagrant-zones-0.1.77 lib/vagrant-zones/command/shutdown_guest.rb
vagrant-zones-0.1.76 lib/vagrant-zones/command/shutdown_guest.rb
vagrant-zones-0.1.75 lib/vagrant-zones/command/shutdown_guest.rb
vagrant-zones-0.1.73 lib/vagrant-zones/command/shutdown_guest.rb
vagrant-zones-0.1.72 lib/vagrant-zones/command/shutdown_guest.rb
vagrant-zones-0.1.71 lib/vagrant-zones/command/shutdown_guest.rb
vagrant-zones-0.1.70 lib/vagrant-zones/command/shutdown_guest.rb
vagrant-zones-0.1.69 lib/vagrant-zones/command/shutdown_guest.rb
vagrant-zones-0.1.67 lib/vagrant-zones/command/shutdown_guest.rb
vagrant-zones-0.1.66 lib/vagrant-zones/command/shutdown_guest.rb
vagrant-zones-0.1.65 lib/vagrant-zones/command/shutdown_guest.rb
vagrant-zones-0.1.64 lib/vagrant-zones/command/shutdown_guest.rb
vagrant-zones-0.1.63 lib/vagrant-zones/command/shutdown_guest.rb
vagrant-zones-0.1.62 lib/vagrant-zones/command/shutdown_guest.rb
vagrant-zones-0.1.61 lib/vagrant-zones/command/shutdown_guest.rb
vagrant-zones-0.1.60 lib/vagrant-zones/command/shutdown_guest.rb
vagrant-zones-0.1.59 lib/vagrant-zones/command/shutdown_guest.rb
vagrant-zones-0.1.58 lib/vagrant-zones/command/shutdown_guest.rb
vagrant-zones-0.1.57 lib/vagrant-zones/command/shutdown_guest.rb
vagrant-zones-0.1.56 lib/vagrant-zones/command/shutdown_guest.rb