Module: Eclair::GCEProvider

Extended by:
GCEProvider, Provider
Included in:
GCEProvider
Defined in:
lib/eclair/providers/gce/gce_provider.rb

Instance Method Summary collapse

Methods included from Provider

filter_items, require_prepare

Instance Method Details

#group_classObject



12
13
14
# File 'lib/eclair/providers/gce/gce_provider.rb', line 12

def group_class
  GCEGroupItem
end

#item_classObject



16
17
18
# File 'lib/eclair/providers/gce/gce_provider.rb', line 16

def item_class
  GCEItem
end

#itemsObject



25
26
27
# File 'lib/eclair/providers/gce/gce_provider.rb', line 25

def items
  @items
end

#prepare(keyword) ⇒ Object



20
21
22
23
# File 'lib/eclair/providers/gce/gce_provider.rb', line 20

def prepare keyword
  instances = Oj.load(`gcloud compute instances list --format=json`)
  @items = instances.map{|i| GCEItem.new(i)}
end