Sha256: d8fbc2373fd79bbf195365278c6d2a95388fb8f4a2c8f72bac719988d7a95584

Contents?: true

Size: 1.13 KB

Versions: 17

Compression:

Stored size: 1.13 KB

Contents

module Fog
  module Orchestration
    class OpenStack
      class Real
        # Update a stack.
        #
        # @param [String] stack_id ID of the stack to update.
        # @param [String] stack_name Name of the stack to update.
        # @param [Hash] options
        #   * :template [String] Structure containing the template body.
        #   or (one of the two Template parameters is required)
        #   * :template_url [String] URL of file containing the template body.
        #   * :parameters [Hash] Hash of providers to supply to template.
        #
        def update_stack(stack_id, stack_name, options = {})
          params = {
            :stack_name => stack_name
          }.merge(options)

          request(
            :expects  => 202,
            :path => "stacks/#{stack_name}/#{stack_id}",
            :method => 'PUT',
            :body => Fog::JSON.encode(params)
          )
        end
      end

      class Mock
        def update_stack(stack_name, options = {})
          response = Excon::Response.new
          response.status = 202
          response.body = {}
          response
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 4 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/openstack/requests/orchestration/update_stack.rb
fog-1.27.0 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-1.26.0 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-1.25.0 lib/fog/openstack/requests/orchestration/update_stack.rb
nsidc-fog-1.24.1 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-1.24.0 lib/fog/openstack/requests/orchestration/update_stack.rb
ns-fog-1.22.11 lib/fog/openstack/requests/orchestration/update_stack.rb
ns-fog-1.22.10 lib/fog/openstack/requests/orchestration/update_stack.rb
ns-fog-1.22.9 lib/fog/openstack/requests/orchestration/update_stack.rb
ns-fog-1.22.8 lib/fog/openstack/requests/orchestration/update_stack.rb
ns-fog-1.22.7 lib/fog/openstack/requests/orchestration/update_stack.rb
ns-fog-1.22.6 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-1.23.0 lib/fog/openstack/requests/orchestration/update_stack.rb
ns-fog-1.22.4 lib/fog/openstack/requests/orchestration/update_stack.rb
ns-fog-1.22.3 lib/fog/openstack/requests/orchestration/update_stack.rb
ns-fog-1.22.2 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-1.22.1 lib/fog/openstack/requests/orchestration/update_stack.rb