class Fog::Orchestration::OpenStack::Stacks

Public Instance Methods

adopt(options={}) click to toggle source
# File lib/fog/openstack/models/orchestration/stacks.rb, line 36
def adopt(options={})
  service.create_stack(options)
end
all(options={}) click to toggle source
# File lib/fog/openstack/models/orchestration/stacks.rb, line 9
def all(options={})
  data = service.list_stack_data(options).body['stacks']
  load(data)
end
build_info() click to toggle source
# File lib/fog/openstack/models/orchestration/stacks.rb, line 49
def build_info
  service.build_info.body
end
create(options={}) click to toggle source
# File lib/fog/openstack/models/orchestration/stacks.rb, line 40
def create(options={})
  service.create_stack(options).body['stack']
end
find_by_id(id) click to toggle source

Deprecated

# File lib/fog/openstack/models/orchestration/stacks.rb, line 15
def find_by_id(id)
  Fog::Logger.deprecation("#find_by_id(id) is deprecated, use #get(name, id) instead [light_black](#{caller.first})[/]")
  self.find {|stack| stack.id == id}
end
get(arg1, arg2 = nil) click to toggle source
# File lib/fog/openstack/models/orchestration/stacks.rb, line 20
def get(arg1, arg2 = nil)
  if arg2.nil?
    # Deprecated: get(id)
    Fog::Logger.deprecation("#get(id) is deprecated, use #get(name, id) instead [light_black](#{caller.first})[/]")
    return find_by_id(arg1)
  end

  # Normal use: get(name, id)
  name = arg1
  id = arg2
  data = service.show_stack_details(name, id).body['stack']
  new(data)
rescue Fog::Compute::OpenStack::NotFound
  nil
end
preview(options={}) click to toggle source
# File lib/fog/openstack/models/orchestration/stacks.rb, line 44
def preview(options={})
  data = service.preview_stack(options).body['stack']
  new(data)
end