Sha256: b425e7c46e99403acbf112b15b829c855284157139f787dad7356653b17d5625

Contents?: true

Size: 1.08 KB

Versions: 2

Compression:

Stored size: 1.08 KB

Contents

# coding: utf-8
#
# Author:: Dangleterre Michaël
# © Copyright ArubaCloud.
#
# LICENSE: MIT (http://opensource.org/licenses/MIT)
#

require 'fog/arubacloud/service'
require 'fog/arubacloud/error'
require 'benchmark'


module Fog
  module ArubaCloud
    class Compute
      class Real
        def get_shared_storage
          body = self.body('GetSharedStorages')
          response = nil
          time = Benchmark.realtime {
            response = request(body, 'GetSharedStorages', 'GetSharedStorages Error')
          }
          Fog::Logger.debug("GetSharedStorages time: #{time}")
          if response['Success']
            response
          else
            raise Fog::ArubaCloud::Errors::RequestError.new('Error in request.')
          end
        end # get_shared_storage

        class Mock
          def get_shared_storage
            raise Fog::Errors::MockNotImplemented.new(
                      'Mock not implemented. Feel free to contribute.'
                  )
          end # get_shared_storage
        end # Mock
      end # Real

    end # Compute
  end # ArubaCloud
end # Fog

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-arubacloud-0.0.6 lib/fog/arubacloud/compute/requests/get_shared_storage.rb
fog-arubacloud-0.0.5 lib/fog/arubacloud/compute/requests/get_shared_storage.rb