Sha256: 90d628db30c7d6a54b922ad4e5b5684432b7fe406cacd55e920d4389ae38fc59

Contents?: true

Size: 1.34 KB

Versions: 2

Compression:

Stored size: 1.34 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 edit_shared_storage(data)
          body = self.body('SetEnqueueModifySharedStorage').merge(
              {
                  :SharedStorage => {
                      :Quantity => data[:quantity],
                      :storageId => data[:id]
                  }
              }
          )
          response = nil
          time = Benchmark.realtime {
            response = request( body , 'SetEnqueueModifySharedStorage', 'SetEnqueueModifySharedStorage Error')
          }
          Fog::Logger.debug("SetEnqueueModifySharedStorage time: #{time}")
          if response['Success']
            response
          else
            raise Fog::ArubaCloud::Errors::RequestError.new('Error in request.')
          end
        end # edit_shared_storage

        class Mock
          def edit_shared_storage
            raise Fog::Errors::MockNotImplemented.new(
                      'Mock not implemented. Feel free to contribute.'
                  )
          end # edit_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/edit_shared_storage.rb
fog-arubacloud-0.0.5 lib/fog/arubacloud/compute/requests/edit_shared_storage.rb