Class: Fog::Rackspace::Orchestration::Stack

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

Instance Method Summary collapse

Instance Method Details

#abandonObject



38
39
40
# File 'lib/fog/rackspace/models/orchestration/stack.rb', line 38

def abandon
  service.abandon_stack(self)
end

#deleteObject



42
43
44
# File 'lib/fog/rackspace/models/orchestration/stack.rb', line 42

def delete
  service.delete_stack(self)
end

#detailsObject



12
13
14
15
16
# File 'lib/fog/rackspace/models/orchestration/stack.rb', line 12

def details
  service.show_stack_details(self.stack_name, self.id).body['stack']
rescue Fog::Rackspace::Orchestration::NotFound
  nil
end

#events(options = {}) ⇒ Object



22
23
24
# File 'lib/fog/rackspace/models/orchestration/stack.rb', line 22

def events(options={})
  @events ||= service.events.all(self, options)
end

#resourcesObject



18
19
20
# File 'lib/fog/rackspace/models/orchestration/stack.rb', line 18

def resources
  @resources ||= service.resources.all(self)
end

#save(options = {}) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/fog/rackspace/models/orchestration/stack.rb', line 30

def save(options={})
  if persisted?
    service.update_stack(self, options).body['stack']
  else
    service.stacks.create(options)
  end
end

#templateObject



26
27
28
# File 'lib/fog/rackspace/models/orchestration/stack.rb', line 26

def template
  @template ||= service.templates.get(self)
end