Module: Eclair::GCEProvider
Instance Method Summary
collapse
Methods included from Provider
filter_items, require_prepare
Instance Method Details
#group_class ⇒ Object
12
13
14
|
# File 'lib/eclair/providers/gce/gce_provider.rb', line 12
def group_class
GCEGroupItem
end
|
#item_class ⇒ Object
16
17
18
|
# File 'lib/eclair/providers/gce/gce_provider.rb', line 16
def item_class
GCEItem
end
|
#items ⇒ Object
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
|