Sha256: c2b624c926ff535a3adce614e7f876c273794cf0c17ecac8a048590ad5f03362

Contents?: true

Size: 1.22 KB

Versions: 2

Compression:

Stored size: 1.22 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 suspend_scheduled_operations(operationid)
          body = self.body('SetUpdateServerScheduledOperation').merge({:operationid => operationid})
          response = nil
          time = Benchmark.realtime {
            response = request(body , 'SetUpdateServerScheduledOperation', 'SetUpdateServerScheduledOperation Error')
          }
          Fog::Logger.debug("SetUpdateServerScheduledOperation time: #{time}")
          if response['Success']
            response
          else
            raise Fog::ArubaCloud::Errors::RequestError.new('Error in request.')
          end
        end # suspend_scheduled_operations

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