Sha256: ff40e71db663ae5e9ae28c850ad38e62a9e0225e90d2e511ad9b5f878eb04aa5

Contents?: true

Size: 880 Bytes

Versions: 4

Compression:

Stored size: 880 Bytes

Contents

require 'fog/huaweicloud/models/collection'
require 'fog/shared_file_system/huaweicloud/models/share_access_rule'

module Fog
  module SharedFileSystem
    class HuaweiCloud
      class ShareExportLocations < Fog::HuaweiCloud::Collection
        model Fog::SharedFileSystem::HuaweiCloud::ShareExportLocation

        attr_accessor :share
        
        def all
          requires :share
          load_response(service.list_share_export_locations(@share.id), 'export_locations')
        end

        def find_by_id(id)
          location_hash = service.get_share_export_location(@share.id,id).body['export_location']
          new(location_hash.merge(:service => service))
        end

        alias get find_by_id
        
        def new(attributes = {})
          requires :share
          super({:share => @share}.merge!(attributes))
        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/models/share_export_locations.rb
fog-huaweicloud-0.0.2 lib/fog/shared_file_system/huaweicloud/models/share_export_locations.rb
fog-huaweicloud-0.1.3 lib/fog/shared_file_system/huaweicloud/models/share_export_locations.rb
fog-huaweicloud-0.1.2 lib/fog/shared_file_system/huaweicloud/models/share_export_locations.rb