Sha256: f0ae229557219643a5a717a1c17e1c3ab72d4ca7116dc9172ad19df4ffbd2273

Contents?: true

Size: 620 Bytes

Versions: 10

Compression:

Stored size: 620 Bytes

Contents

module Fog
  module OpenStack
    class Volume
      module Real
        private

        def _create_volume(data, options = {})
          vanilla_options = [:snapshot_id, :imageRef, :volume_type,
                             :source_volid, :availability_zone, :metadata]
          vanilla_options.select { |o| options[o] }.each do |key|
            data['volume'][key] = options[key]
          end
          request(
            :body    => Fog::JSON.encode(data),
            :expects => [200, 202],
            :method  => 'POST',
            :path    => "volumes"
          )
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fog-openstack-1.0.8 lib/fog/openstack/volume/requests/create_volume.rb
fog-openstack-1.0.7 lib/fog/openstack/volume/requests/create_volume.rb
fog-openstack-1.0.6 lib/fog/openstack/volume/requests/create_volume.rb
fog-openstack-1.0.5 lib/fog/openstack/volume/requests/create_volume.rb
fog-openstack-1.0.4 lib/fog/openstack/volume/requests/create_volume.rb
fog-openstack-1.0.3 lib/fog/openstack/volume/requests/create_volume.rb
fog-openstack-1.0.2 lib/fog/openstack/volume/requests/create_volume.rb
fog-openstack-1.0.1 lib/fog/openstack/volume/requests/create_volume.rb
fog-openstack-1.0.0 lib/fog/openstack/volume/requests/create_volume.rb
fog-openstack-0.3.1 lib/fog/openstack/volume/requests/create_volume.rb