Sha256: 2ddb66cac80dfcbde94ae4e728f3959c8d3f652a15b6c351ea632ae80ac445f3

Contents?: true

Size: 1.33 KB

Versions: 38

Compression:

Stored size: 1.33 KB

Contents

module Fog
  module Slicehost
    class Real

      require 'fog/slicehost/parsers/get_slice'

      # Get details of a slice
      #
      # ==== Parameters
      # * slice_id<~Integer> - Id of slice to lookup
      #
      # ==== 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 get_slice(slice_id)
        request(
          :expects  => 200,
          :method   => 'GET',
          :parser   => Fog::Parsers::Slicehost::GetSlice.new,
          :path     => "/slices/#{slice_id}.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/get_slice.rb
fog-0.2.28 lib/fog/slicehost/requests/get_slice.rb
fog-0.2.27 lib/fog/slicehost/requests/get_slice.rb
fog-0.2.26 lib/fog/slicehost/requests/get_slice.rb
fog-0.2.25 lib/fog/slicehost/requests/get_slice.rb
fog-0.2.24 lib/fog/slicehost/requests/get_slice.rb
tecnh-fog-0.2.23.vpc lib/fog/slicehost/requests/get_slice.rb
fog-0.2.23 lib/fog/slicehost/requests/get_slice.rb
fog-0.2.22 lib/fog/slicehost/requests/get_slice.rb
fog-0.2.21 lib/fog/slicehost/requests/get_slice.rb
fog-0.2.20 lib/fog/slicehost/requests/get_slice.rb
fog-0.2.19 lib/fog/slicehost/requests/get_slice.rb
fog-0.2.18 lib/fog/slicehost/requests/get_slice.rb
fog-0.2.17 lib/fog/slicehost/requests/get_slice.rb
fog-0.2.16 lib/fog/slicehost/requests/get_slice.rb
fog-0.2.15 lib/fog/slicehost/requests/get_slice.rb
fog-0.2.14 lib/fog/slicehost/requests/get_slice.rb
fog-0.2.13 lib/fog/slicehost/requests/get_slice.rb
fog-0.2.12 lib/fog/slicehost/requests/get_slice.rb
fog-0.2.11 lib/fog/slicehost/requests/get_slice.rb