Sha256: 1fea0737874f02785353c25c92be16720893bcf40afff09dd105501db2574eaa

Contents?: true

Size: 641 Bytes

Versions: 4

Compression:

Stored size: 641 Bytes

Contents

module Fog
  module Network
    class HuaweiCloud
      class Real
        def get_network(network_id)
          request(
            :expects => [200],
            :method  => 'GET',
            :path    => "networks/#{network_id}"
          )
        end
      end

      class Mock
        def get_network(network_id)
          response = Excon::Response.new
          if data = self.data[:networks][network_id]
            response.status = 200
            response.body = {'network' => 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_network.rb
fog-huaweicloud-0.0.2 lib/fog/network/huaweicloud/requests/get_network.rb
fog-huaweicloud-0.1.3 lib/fog/network/huaweicloud/requests/get_network.rb
fog-huaweicloud-0.1.2 lib/fog/network/huaweicloud/requests/get_network.rb