Sha256: 6e8f8e348b593d521ccb34cf49cd5fb3e3333999f7450b6bbffcdb24e90bf51f

Contents?: true

Size: 774 Bytes

Versions: 4

Compression:

Stored size: 774 Bytes

Contents

module Fog
  module Network
    class HuaweiCloud
      class Real
        def delete_lbaas_healthmonitor(healthmonitor_id)
          request(
            :expects => 204,
            :method  => 'DELETE',
            :path    => "lbaas/healthmonitors/#{healthmonitor_id}"
          )
        end
      end

      class Mock
        def delete_lbaas_healthmonitor(healthmonitor_id)
          response = Excon::Response.new
          if list_lbaas_healthmonitors.body['healthmonitors'].map { |r| r['id'] }.include? healthmonitor_id
            data[:lbaas_healthmonitors].delete(healthmonitor_id)
            response.status = 204
            response
          else
            raise Fog::Network::HuaweiCloud::NotFound
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fog-huaweicloud-0.0.3 lib/fog/network/huaweicloud/requests/delete_lbaas_healthmonitor.rb
fog-huaweicloud-0.0.2 lib/fog/network/huaweicloud/requests/delete_lbaas_healthmonitor.rb
fog-huaweicloud-0.1.3 lib/fog/network/huaweicloud/requests/delete_lbaas_healthmonitor.rb
fog-huaweicloud-0.1.2 lib/fog/network/huaweicloud/requests/delete_lbaas_healthmonitor.rb