Sha256: 2a87408b7d78011710e6d7e7772935d664143cbd775df21a23fe499bdbee3418

Contents?: true

Size: 795 Bytes

Versions: 77

Compression:

Stored size: 795 Bytes

Contents

module Fog
  module Compute
    class XenServer
      class Real
        
        def clone_server( server_name, template_ref )
          # Clone the VM template
          if template_ref.kind_of? Fog::Compute::XenServer::Server
            template_ref = template_ref.reference
          end
          raise ArgumentError.new("Invalid template_ref") if template_ref.nil?
          raise ArgumentError.new("Invalid template_ref") if server_name.nil?

          ref = @connection.request(
            {:parser => Fog::Parsers::XenServer::Base.new, :method => 'VM.clone'},
            template_ref, server_name 
          )
        end

      end

      class Mock

        def clone_server( server_name, template_ref )
          Fog::Mock.not_implemented
        end
      end

    end
  end
end

Version data entries

77 entries across 77 versions & 12 rubygems

Version Path
fog-maestrodev-1.18.0.20131205181604 lib/fog/xenserver/requests/compute/clone_server.rb
fog-maestrodev-1.18.0.20131127194823 lib/fog/xenserver/requests/compute/clone_server.rb
fog-maestrodev-1.18.0.20131126183714 lib/fog/xenserver/requests/compute/clone_server.rb
fog-maestrodev-1.18.0.20131126122111 lib/fog/xenserver/requests/compute/clone_server.rb
fog-maestrodev-1.18.0.20131125111730 lib/fog/xenserver/requests/compute/clone_server.rb
fog-maestrodev-1.18.0.20131125083406 lib/fog/xenserver/requests/compute/clone_server.rb
fog-maestrodev-1.18.0.20131123105121 lib/fog/xenserver/requests/compute/clone_server.rb
fog-maestrodev-1.18.0.20131122203507 lib/fog/xenserver/requests/compute/clone_server.rb
fog-maestrodev-1.18.0.20131121075022 lib/fog/xenserver/requests/compute/clone_server.rb
fog-maestrodev-1.18.0.20131118164830 lib/fog/xenserver/requests/compute/clone_server.rb
fog-maestrodev-1.18.0.20131115184302 lib/fog/xenserver/requests/compute/clone_server.rb
fog-maestrodev-1.18.0.20131114200144 lib/fog/xenserver/requests/compute/clone_server.rb
gapinc-fog-1.12.1.2.1 lib/fog/xenserver/requests/compute/clone_server.rb
fog-maestrodev-1.18.0.20131112185232 lib/fog/xenserver/requests/compute/clone_server.rb
fog-maestrodev-1.18.0.20131111203459 lib/fog/xenserver/requests/compute/clone_server.rb
fog-1.18.0 lib/fog/xenserver/requests/compute/clone_server.rb
fog-1.17.0 lib/fog/xenserver/requests/compute/clone_server.rb
fog-1.16.0 lib/fog/xenserver/requests/compute/clone_server.rb
fog-maestrodev-1.15.0.20130927082724 lib/fog/xenserver/requests/compute/clone_server.rb
fog-maestrodev-1.15.0.20130829165835 lib/fog/xenserver/requests/compute/clone_server.rb