Class: VagrantPlugins::DigitalOcean::Commands::Rebuild

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-digitalocean/commands/rebuild.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.synopsisObject

Show description when ‘vagrant list-commands` is triggered



9
10
11
# File 'lib/vagrant-digitalocean/commands/rebuild.rb', line 9

def self.synopsis
  "plugin: vagrant-digitalocean: destroys and ups the vm with the same ip address"
end

Instance Method Details

#executeObject



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/vagrant-digitalocean/commands/rebuild.rb', line 13

def execute
  opts = OptionParser.new do |o|
    o.banner = 'Usage: vagrant rebuild [vm-name]'
  end

  argv = parse_options(opts)

  with_target_vms(argv) do |machine|
    machine.action(:rebuild)
  end

  0
end