Class: VagrantPlugins::Openstack::Command::Reset

Inherits:
AbstractCommand show all
Includes:
Utils
Defined in:
lib/vagrant-openstack-provider/command/reset.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Utils

#display_item_list, #display_table

Methods inherited from AbstractCommand

#execute, #initialize, #normalize_args

Constructor Details

This class inherits a constructor from VagrantPlugins::Openstack::Command::AbstractCommand

Class Method Details

.synopsisObject



10
11
12
# File 'lib/vagrant-openstack-provider/command/reset.rb', line 10

def self.synopsis
  I18n.t('vagrant_openstack.command.reset')
end

Instance Method Details

#cmd(name, argv, env) ⇒ Object



13
14
15
16
17
# File 'lib/vagrant-openstack-provider/command/reset.rb', line 13

def cmd(name, argv, env)
  fail Errors::NoArgRequiredForCommand, cmd: name unless argv.size == 0
  FileUtils.remove_dir("#{env[:machine].data_dir}")
  env[:ui].info 'Vagrant OpenStack Provider has been reset'
end