Sha256: adf992f498db46bcd569f138d277be15f0e3c0bd97f26320d15c444a09a84e93

Contents?: true

Size: 834 Bytes

Versions: 48

Compression:

Stored size: 834 Bytes

Contents

module Fog
  module Compute
    class OpenStack
      class Real

        def rebuild_server(server_id, image_ref, name, admin_pass=nil, metadata=nil, personality=nil)

          body = { 'rebuild' => {
            'imageRef' => image_ref,
            'name' => name
          }}
          body['rebuild']['adminPass'] = admin_pass if admin_pass
          body['rebuild']['metadata'] = metadata if metadata
          body['rebuild']['personality'] = personality if personality
          server_action(server_id, body, 202)
        end

      end

      class Mock

        def rebuild_server(server_id, image_ref, name, admin_pass=nil, metadata=nil, personality=nil)
          response = get_server_details(server_id)
          response.body['server']['status'] = "REBUILD"
          response
        end

      end
    end
  end
end

Version data entries

48 entries across 48 versions & 15 rubygems

Version Path
cifrado-0.2.1 vendor/fog/lib/fog/openstack/requests/compute/rebuild_server.rb
cifrado-0.2.0 vendor/fog/lib/fog/openstack/requests/compute/rebuild_server.rb
fog-nirvanix-1.8.2 lib/fog/openstack/requests/compute/rebuild_server.rb
fog-nirvanix-1.8.1 lib/fog/openstack/requests/compute/rebuild_server.rb
fog-parser-fix-1.6.1 lib/fog/openstack/requests/compute/rebuild_server.rb
fog-test-again-1.6.0 lib/fog/openstack/requests/compute/rebuild_server.rb
fog-parser-fix-1.6.0 lib/fog/openstack/requests/compute/rebuild_server.rb
cifrado-0.1.3 vendor/fog/lib/fog/openstack/requests/compute/rebuild_server.rb
fog-1.10.0 lib/fog/openstack/requests/compute/rebuild_server.rb
cifrado-0.1.2 vendor/fog/lib/fog/openstack/requests/compute/rebuild_server.rb
cifrado-0.1.1 vendor/fog/lib/fog/openstack/requests/compute/rebuild_server.rb
cifrado-0.1 vendor/fog/lib/fog/openstack/requests/compute/rebuild_server.rb
fog-1.9.0 lib/fog/openstack/requests/compute/rebuild_server.rb
fog-maestrodev-1.8.0.20130114204828 lib/fog/openstack/requests/compute/rebuild_server.rb
fog-maestrodev-1.8.0.20130111070250 lib/fog/openstack/requests/compute/rebuild_server.rb
fog-maestrodev-1.8.0.20130109172219 lib/fog/openstack/requests/compute/rebuild_server.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/openstack/requests/compute/rebuild_server.rb
fog-sgonyea-1.8.1 lib/fog/openstack/requests/compute/rebuild_server.rb
fog-1.8.0 lib/fog/openstack/requests/compute/rebuild_server.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/openstack/requests/compute/rebuild_server.rb