Sha256: 41dedfec45eca59bdfbb267247555dcb3cb48a5fece18dddcb100574490738bd

Contents?: true

Size: 1.14 KB

Versions: 30

Compression:

Stored size: 1.14 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

30 entries across 30 versions & 2 rubygems

Version Path
fog-1.22.0 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-1.21.0 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-maestrodev-1.20.0.20140305101839 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-1.20.0 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-1.19.0 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/openstack/requests/orchestration/update_stack.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/openstack/requests/orchestration/update_stack.rb