Method: VagrantPlugins::Openstack::HeatClient#create_stack

Defined in:
lib/vagrant-openstack-provider/client/heat.rb

#create_stack(env, options) ⇒ Object



19
20
21
22
23
24
25
26
# File 'lib/vagrant-openstack-provider/client/heat.rb', line 19

def create_stack(env, options)
  stack = {}.tap do |s|
    s['stack_name'] = options[:name] if options[:name]
    s['template'] = options[:template]
  end
  stack_res = post(env, "#{@session.endpoints[:orchestration]}/stacks", stack.to_json)
  JSON.parse(stack_res)['stack']['id']
end