Sha256: d309c9c97b200c76be43f0e36e74a8a620cfa50e7a90abc6e9a36ecb164df57a

Contents?: true

Size: 775 Bytes

Versions: 53

Compression:

Stored size: 775 Bytes

Contents

module Fog
  module Compute
    class CloudSigma
      class Real
        def clone_libvolume(vol_id, clone_params={})
          request(:path => "libdrives/#{vol_id}/action/",
                  :method => 'POST',
                  :query => {:do => :clone},
                  :body => clone_params,
                  :expects => [200, 202])
        end
      end

      class Mock
        def clone_libvolume(vol_id, clone_params={})
          volume = self.data[:libvolumes][vol_id].dup
          uuid = self.class.random_uuid
          volume['uuid'] = uuid

          self.data[:volumes][uuid] = volume

          response = Excon::Response.new
          response.status = 200
          response.body = volume

          response
        end
      end

    end
  end
end

Version data entries

53 entries across 53 versions & 3 rubygems

Version Path
fog-maestrodev-1.15.0.20130927082724 lib/fog/cloudsigma/requests/clone_libvolume.rb
fog-maestrodev-1.15.0.20130829165835 lib/fog/cloudsigma/requests/clone_libvolume.rb
fog-1.15.0 lib/fog/cloudsigma/requests/clone_libvolume.rb
gapinc-fog-1.14.0 lib/fog/cloudsigma/requests/clone_libvolume.rb
fog-maestrodev-1.14.0.20130806165225 lib/fog/cloudsigma/requests/clone_libvolume.rb
fog-1.14.0 lib/fog/cloudsigma/requests/clone_libvolume.rb
fog-1.13.0 lib/fog/cloudsigma/requests/clone_libvolume.rb
gapinc-fog-1.12.1.2 lib/fog/cloudsigma/requests/clone_libvolume.rb
gapinc-fog-1.12.1.1 lib/fog/cloudsigma/requests/clone_libvolume.rb
gapinc-fog-1.12.1a lib/fog/cloudsigma/requests/clone_libvolume.rb
gapinc-fog-1.12.1 lib/fog/cloudsigma/requests/clone_libvolume.rb
fog-1.12.1 lib/fog/cloudsigma/requests/clone_libvolume.rb
fog-1.12.0 lib/fog/cloudsigma/requests/clone_libvolume.rb