Sha256: bd43fd8fc3bccc9a0cf05ae5f5f9667fc11810944ac0230b07429bcfa6b01e81

Contents?: true

Size: 870 Bytes

Versions: 30

Compression:

Stored size: 870 Bytes

Contents

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

module Fog
  module SharedFileSystem
    class OpenStack
      class ShareExportLocations < Fog::OpenStack::Collection
        model Fog::SharedFileSystem::OpenStack::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

30 entries across 28 versions & 3 rubygems

Version Path
fog-openstack-0.1.31 lib/fog/shared_file_system/openstack/models/share_export_locations.rb
fog-openstack-0.3.10 lib/fog/shared_file_system/openstack/models/share_export_locations.rb
fog-openstack-0.1.30 lib/fog/shared_file_system/openstack/models/share_export_locations.rb
fog-openstack-0.1.29 lib/fog/shared_file_system/openstack/models/share_export_locations.rb
fog-openstack-0.3.9 lib/fog/shared_file_system/openstack/models/share_export_locations.rb
fog-openstack-0.1.28 lib/fog/shared_file_system/openstack/models/share_export_locations.rb
fog-openstack-0.3.8 lib/fog/shared_file_system/openstack/models/share_export_locations.rb
fog-openstack-0.3.7 lib/fog/shared_file_system/openstack/models/share_export_locations.rb
fog-openstack-0.3.6 lib/fog/shared_file_system/openstack/models/share_export_locations.rb
fog-openstack-0.3.5 lib/fog/shared_file_system/openstack/models/share_export_locations.rb
fog-openstack-0.3.4 lib/fog/shared_file_system/openstack/models/share_export_locations.rb
fog-openstack-0.3.3 lib/fog/shared_file_system/openstack/models/share_export_locations.rb
fog-openstack-0.3.2 lib/fog/shared_file_system/openstack/models/share_export_locations.rb
fog-openstack-0.3.0 lib/fog/shared_file_system/openstack/models/share_export_locations.rb
fog-openstack-0.2.4 lib/fog/shared_file_system/openstack/models/share_export_locations.rb
fog-openstack-0.2.3 lib/fog/shared_file_system/openstack/models/share_export_locations.rb
fog-openstack-0.2.2 lib/fog/shared_file_system/openstack/models/share_export_locations.rb
fog-openstack-0.2.1 lib/fog/shared_file_system/openstack/models/share_export_locations.rb
fog-openstack-0.2.0 lib/fog/shared_file_system/openstack/models/share_export_locations.rb
fog-zj-0.1.28 lib/fog/shared_file_system/openstack/models/share_export_locations.rb