Class: Vagrant::Smartos::Zones::Cap::Zone::Start

Inherits:
Base
  • Object
show all
Defined in:
lib/vagrant/smartos/zones/cap/zone/start.rb

Instance Attribute Summary

Attributes inherited from Base

#machine

Instance Method Summary collapse

Methods inherited from Base

#zone, #zone_exists?, #zone_valid?, #zones

Methods inherited from Base

cap_method, #initialize, #sudo, #ui

Constructor Details

This class inherits a constructor from Vagrant::Smartos::Zones::Cap::Base

Instance Method Details

#executeObject



11
12
13
14
15
16
# File 'lib/vagrant/smartos/zones/cap/zone/start.rb', line 11

def execute
  return unless zone_valid?
  return unless zone_exists?

  start_zone
end

#start_zoneObject



18
19
20
21
22
23
# File 'lib/vagrant/smartos/zones/cap/zone/start.rb', line 18

def start_zone
  return if zone.running?
  name = machine.config.zone.name
  ui.info "Starting zone #{name}"
  zone.start
end