Sha256: cceaa198741791e7d034750ed2571a60f8d35560b135e023b152761cc7dbd8d5

Contents?: true

Size: 770 Bytes

Versions: 4

Compression:

Stored size: 770 Bytes

Contents

module Fog
  module Network
    class HuaweiCloud
      class Real
        def delete_lb_health_monitor(health_monitor_id)
          request(
            :expects => 204,
            :method  => 'DELETE',
            :path    => "lb/health_monitors/#{health_monitor_id}"
          )
        end
      end

      class Mock
        def delete_lb_health_monitor(health_monitor_id)
          response = Excon::Response.new
          if list_lb_health_monitors.body['health_monitors'].map { |r| r['id'] }.include? health_monitor_id
            data[:lb_health_monitors].delete(health_monitor_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_lb_health_monitor.rb
fog-huaweicloud-0.0.2 lib/fog/network/huaweicloud/requests/delete_lb_health_monitor.rb
fog-huaweicloud-0.1.3 lib/fog/network/huaweicloud/requests/delete_lb_health_monitor.rb
fog-huaweicloud-0.1.2 lib/fog/network/huaweicloud/requests/delete_lb_health_monitor.rb