Sha256: b4feeb20fc0ab0bec2a2f9760c161c453b9b4684b853b046e47ebb281c34df92

Contents?: true

Size: 1.39 KB

Versions: 38

Compression:

Stored size: 1.39 KB

Contents

module Fog
  module Slicehost
    class Real

      # Reboot slice
      # ==== Parameters
      # * slice_id<~Integer> - Id of server to reboot
      # * type<~String> - Type of reboot, must be in ['HARD', 'SOFT']
      #
      # ==== Returns
      # * response<~Excon::Response>:
      #   * body<~Hash>:
      #     * 'addresses'<~Array> - Ip addresses for the slice
      #     * 'backup-id'<~Integer> - Id of backup slice was booted from
      #     * 'bw-in'<~Float> - Incoming bandwidth total for current billing cycle, in Gigabytes
      #     * 'bw-out'<~Float> - Outgoing bandwidth total for current billing cycle, in Gigabytes
      #     * 'flavor_id'<~Integer> - Id of flavor slice was booted from
      #     * 'id'<~Integer> - Id of the slice
      #     * 'image-id'<~Integer> - Id of image slice was booted from
      #     * 'name'<~String> - Name of the slice
      #     * 'progress'<~Integer> - Progress of current action, in percentage
      #     * 'status'<~String> - Current status of the slice
      def reboot_slice(slice_id, type = 'SOFT')
        request(
          :expects  => 200,
          :method   => 'PUT',
          :parser   => Fog::Parsers::Slicehost::GetSlice.new,
          :path     => "/slices/#{slice_id}/#{'hard_' if type == 'HARD'}reboot.xml"
        )
      end

    end

    class Mock

      def get_slice(id)
        Fog::Mock.not_implemented
      end

    end
  end
end

Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
fog-0.2.30 lib/fog/slicehost/requests/reboot_slice.rb
fog-0.2.28 lib/fog/slicehost/requests/reboot_slice.rb
fog-0.2.27 lib/fog/slicehost/requests/reboot_slice.rb
fog-0.2.26 lib/fog/slicehost/requests/reboot_slice.rb
fog-0.2.25 lib/fog/slicehost/requests/reboot_slice.rb
fog-0.2.24 lib/fog/slicehost/requests/reboot_slice.rb
tecnh-fog-0.2.23.vpc lib/fog/slicehost/requests/reboot_slice.rb
fog-0.2.23 lib/fog/slicehost/requests/reboot_slice.rb
fog-0.2.22 lib/fog/slicehost/requests/reboot_slice.rb
fog-0.2.21 lib/fog/slicehost/requests/reboot_slice.rb
fog-0.2.20 lib/fog/slicehost/requests/reboot_slice.rb
fog-0.2.19 lib/fog/slicehost/requests/reboot_slice.rb
fog-0.2.18 lib/fog/slicehost/requests/reboot_slice.rb
fog-0.2.17 lib/fog/slicehost/requests/reboot_slice.rb
fog-0.2.16 lib/fog/slicehost/requests/reboot_slice.rb
fog-0.2.15 lib/fog/slicehost/requests/reboot_slice.rb
fog-0.2.14 lib/fog/slicehost/requests/reboot_slice.rb
fog-0.2.13 lib/fog/slicehost/requests/reboot_slice.rb
fog-0.2.12 lib/fog/slicehost/requests/reboot_slice.rb
fog-0.2.11 lib/fog/slicehost/requests/reboot_slice.rb