Sha256: c76f8741423edf70891f82dca2463da08bd207fc15ee62865e6034dff23712e6

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

module Fog
  module Terremark
    class Real

      # Shutdown a vapp
      #
      # ==== Parameters
      # * vapp_id<~Integer> - Id of vapp to shutdown
      #
      # ==== Returns
      # * response<~Excon::Response>:
      #   * body<~Hash>:
      #     * 'endTime'<~String> - endTime of task
      #     * 'href'<~String> - link to task
      #     * 'startTime'<~String> - startTime of task
      #     * 'status'<~String> - status of task
      #     * 'type'<~String> - type of task
      #     * 'Owner'<~String> -
      #       * 'href'<~String> - href of owner
      #       * 'name'<~String> - name of owner
      #       * 'type'<~String> - type of owner
      def shutdown(vapp_id)
        request(
          :expects  => 202,
          :method   => 'POST',
          :parser   => Fog::Parsers::Terremark::Task.new,
          :path     => "vApp/#{vapp_id}/power/action/shutdown"
        )
      end

    end

    class Mock

      def shutdown(vapp_id)
        raise MockNotImplemented.new("Contributions welcome!")
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fog-0.0.73 lib/fog/terremark/requests/shutdown.rb