Class: VagrantLXD::Provider
- Inherits:
-
Object
- Object
- VagrantLXD::Provider
- Defined in:
- lib/vagrant-lxd/provider.rb
Instance Method Summary collapse
- #action(name) ⇒ Object
-
#initialize(machine) ⇒ Provider
constructor
A new instance of Provider.
- #ssh_info ⇒ Object
- #state ⇒ Object
- #to_s ⇒ Object
Constructor Details
Instance Method Details
#action(name) ⇒ Object
29 30 31 |
# File 'lib/vagrant-lxd/provider.rb', line 29 def action(name) Action.send(name) if Action.respond_to?(name) end |
#ssh_info ⇒ Object
40 41 42 |
# File 'lib/vagrant-lxd/provider.rb', line 40 def ssh_info @driver.info end |
#state ⇒ Object
33 34 35 36 37 38 |
# File 'lib/vagrant-lxd/provider.rb', line 33 def state state = @driver.tap { |d| d.validate! }.state short = state.to_s.gsub('_', ' ') long = I18n.t("vagrant.commands.status.#{state}") Vagrant::MachineState.new(state, short, long) end |
#to_s ⇒ Object
44 45 46 |
# File 'lib/vagrant-lxd/provider.rb', line 44 def to_s 'LXD' end |