Class: DockerCloud::NodeType

Inherits:
Type
  • Object
show all
Defined in:
lib/docker_cloud/node_type.rb

Instance Attribute Summary

Attributes inherited from Type

#info

Instance Method Summary collapse

Methods inherited from Type

#initialize, #reload, #uuid

Constructor Details

This class inherits a constructor from DockerCloud::Type

Instance Method Details

#availability_zonesObject



28
29
30
31
32
33
34
35
36
# File 'lib/docker_cloud/node_type.rb', line 28

def availability_zones
  if @az.nil?
    @az = []
    info[:availability_zones].each do |az|
      @az.push(client.availability_zones.get_from_uri(az))
    end
  end
  @az
end

#availableObject

def availability_zones; info; end



20
21
22
# File 'lib/docker_cloud/node_type.rb', line 20

def available
  info[:available]
end

#labelObject



11
12
13
# File 'lib/docker_cloud/node_type.rb', line 11

def label
  info[:label]
end

#nameObject



7
8
9
# File 'lib/docker_cloud/node_type.rb', line 7

def name
  info[:name]
end

#providerObject



24
25
26
# File 'lib/docker_cloud/node_type.rb', line 24

def provider
  @provider ||= client.providers.get_from_uri(info[:provider]) unless info[:provider].nil?
end

#regionsObject



15
16
17
# File 'lib/docker_cloud/node_type.rb', line 15

def regions
  info[:regions]
end

#resource_uriObject



3
4
5
# File 'lib/docker_cloud/node_type.rb', line 3

def resource_uri
  info[:resource_uri]
end