Class: CloudstackSpec::Resource::Zone

Inherits:
Base
  • Object
show all
Defined in:
lib/cloudstack_spec/resource/zone.rb

Instance Attribute Summary

Attributes inherited from Base

#name

Instance Method Summary collapse

Methods inherited from Base

#get_zone, #initialize, #inspect, #job_status?, #to_ary, #to_s

Constructor Details

This class inherits a constructor from CloudstackSpec::Resource::Base

Instance Method Details

#allocated?Boolean

Returns:

  • (Boolean)


14
15
16
17
18
19
20
# File 'lib/cloudstack_spec/resource/zone.rb', line 14

def allocated?
  if @zonename['allocationstate'] == 'Enabled'
    return true
  else
    return @zonename['allocationstate']
  end
end

#exist?Boolean

All about zone…

Returns:

  • (Boolean)


5
6
7
8
9
10
11
12
# File 'lib/cloudstack_spec/resource/zone.rb', line 5

def exist?
  #zone = @connection.list_zone(:name => name)
  if @zonename.nil?
    return false
  else
    return true
  end
end

#local_storageObject



22
23
24
# File 'lib/cloudstack_spec/resource/zone.rb', line 22

def local_storage
  return @zonename['localstorageenabled']
end

#network_typeObject



30
31
32
33
# File 'lib/cloudstack_spec/resource/zone.rb', line 30

def network_type
  # return "Basic" or "Advanced"
  return @zonename['networktype']
end

#security_groupObject



26
27
28
# File 'lib/cloudstack_spec/resource/zone.rb', line 26

def security_group
  return @zonename['securitygroupsenabled']
end