Sha256: 92f0187edd3f03faf562d91f0980f9987f58b16730fdfe8d11b259ffc94dc096

Contents?: true

Size: 945 Bytes

Versions: 4

Compression:

Stored size: 945 Bytes

Contents

module Fog
  module SharedFileSystem
    class HuaweiCloud
      class Real
        # For older versions v1.0-2.8 the export locations are responsed as an attribute of share (export_locations). 
        # For newer API versions (>= 2.9) it is available in separate APIs.
        # This method returns the export location detail.
        def get_share_export_location(share_id,export_location_id)
          request(
            :expects => 200,
            :method  => 'GET',
            :path    => "shares/#{share_id}/export_locations/​{export_location_id}​"
          )
        end
      end

      class Mock
        def get_share_export_location(id)
          response = Excon::Response.new
          response.status = 200
          share_export_location = data[:export_locations].first
          share_export_location['id'] = id
          response.body = share_export_location
          response
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fog-huaweicloud-0.0.3 lib/fog/shared_file_system/huaweicloud/requests/get_share_export_location.rb
fog-huaweicloud-0.0.2 lib/fog/shared_file_system/huaweicloud/requests/get_share_export_location.rb
fog-huaweicloud-0.1.3 lib/fog/shared_file_system/huaweicloud/requests/get_share_export_location.rb
fog-huaweicloud-0.1.2 lib/fog/shared_file_system/huaweicloud/requests/get_share_export_location.rb