Class: Vagrant::Smartos::Zones::Cap::Zone::Base
- Inherits:
-
Base
- Object
- Base
- Vagrant::Smartos::Zones::Cap::Zone::Base
show all
- Defined in:
- lib/vagrant/smartos/zones/cap/zone/base.rb
Instance Attribute Summary
Attributes inherited from Base
#machine
Instance Method Summary
collapse
Methods inherited from Base
cap_method, #initialize, #sudo, #ui
Instance Method Details
#zone ⇒ Object
24
25
26
|
# File 'lib/vagrant/smartos/zones/cap/zone/base.rb', line 24
def zone
@zone ||= Models::Zone.find(machine, machine.config.zone.name)
end
|
#zone_exists? ⇒ Boolean
11
12
13
14
|
# File 'lib/vagrant/smartos/zones/cap/zone/base.rb', line 11
def zone_exists?
name = machine.config.zone.name
machine.communicate.gz_test("#{sudo} vmadm list -H | awk '{print $5}' | grep #{name}")
end
|
#zone_valid? ⇒ Boolean
16
17
18
|
# File 'lib/vagrant/smartos/zones/cap/zone/base.rb', line 16
def zone_valid?
machine.config.zone && machine.config.zone.image && machine.config.zone.name
end
|
#zones ⇒ Object
20
21
22
|
# File 'lib/vagrant/smartos/zones/cap/zone/base.rb', line 20
def zones
@zones ||= Util::Zones.new(machine)
end
|