Sha256: 7b10837147a6c7b2763b74ca5da34ab65671fe7576106139ac08505a47a538fa

Contents?: true

Size: 704 Bytes

Versions: 4

Compression:

Stored size: 704 Bytes

Contents

module Fog
  module Network
    class HuaweiCloud
      class Real
        def get_lbaas_l7rule(l7policy_id, l7rule_id)
          request(
            :expects => [200],
            :method  => 'GET',
            :path    => "lbaas/l7policies/#{l7policy_id}/rules/#{l7rule_id}"
          )
        end
      end

      class Mock
        def get_lbaas_l7rule(l7policy_id, l7rule_id)
          response = Excon::Response.new
          if data = self.data[:lbaas_l7rules][l7rule_id]
            response.status = 200
            response.body = {'rule' => data}
            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/get_lbaas_l7rule.rb
fog-huaweicloud-0.0.2 lib/fog/network/huaweicloud/requests/get_lbaas_l7rule.rb
fog-huaweicloud-0.1.3 lib/fog/network/huaweicloud/requests/get_lbaas_l7rule.rb
fog-huaweicloud-0.1.2 lib/fog/network/huaweicloud/requests/get_lbaas_l7rule.rb