Class: VagrantPlugins::CommandDns::Command::Host::Create

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-command-dns/command/host/create.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/vagrant-command-dns/command/host/create.rb', line 9

def execute
  opts = OptionParser.new do |o|
    o.banner = 'Usage: vagrant dns host create'
    o.separator ''
    o.separator 'Additional documentation can be found on the plugin homepage'
    o.separator ''
  end

  argv = parse_options(opts)
  return if !argv

  with_target_vms(argv) do |machine|
    @env.action_runner.run(Action::Host.host_create, {
        machine: machine,
        ui: Vagrant::UI::Prefixed.new(@env.ui, 'dns host'),
    })
  end

  0
end