Class: Fog::Rackspace::Orchestration::Stacks

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/rackspace/models/orchestration/stacks.rb

Instance Method Summary collapse

Instance Method Details

#adopt(options = {}) ⇒ Object



21
22
23
# File 'lib/fog/rackspace/models/orchestration/stacks.rb', line 21

def adopt(options={})
  service.create_stack(options)
end

#all(options = {}) ⇒ Object



9
10
11
12
# File 'lib/fog/rackspace/models/orchestration/stacks.rb', line 9

def all(options={})
  data = service.list_stack_data(options).body['stacks']
  load(data)
end

#build_infoObject



34
35
36
# File 'lib/fog/rackspace/models/orchestration/stacks.rb', line 34

def build_info
  service.build_info.body
end

#create(options = {}) ⇒ Object



25
26
27
# File 'lib/fog/rackspace/models/orchestration/stacks.rb', line 25

def create(options={})
  service.create_stack(options).body['stack']
end

#get(name, id) ⇒ Object



14
15
16
17
18
19
# File 'lib/fog/rackspace/models/orchestration/stacks.rb', line 14

def get(name, id)
  data = service.show_stack_details(name, id).body['stack']
  new(data)
rescue Fog::Rackspace::Orchestration::NotFound
  nil
end

#preview(options = {}) ⇒ Object



29
30
31
32
# File 'lib/fog/rackspace/models/orchestration/stacks.rb', line 29

def preview(options={})
  data = service.preview_stack(options).body['stack']
  new(data)
end