Sha256: 919831c2ce1aad9f88288e917f02380fb36db340885280812495059e8f872551

Contents?: true

Size: 859 Bytes

Versions: 79

Compression:

Stored size: 859 Bytes

Contents

module Fog
  module Compute
    class HP
      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.status = 202
          response
        end

      end
    end
  end
end

Version data entries

79 entries across 79 versions & 12 rubygems

Version Path
fog-1.22.0 lib/fog/hp/requests/compute/rebuild_server.rb
fog-1.21.0 lib/fog/hp/requests/compute/rebuild_server.rb
fog-maestrodev-1.20.0.20140305101839 lib/fog/hp/requests/compute/rebuild_server.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/hp/requests/compute/rebuild_server.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/hp/requests/compute/rebuild_server.rb
fog-1.20.0 lib/fog/hp/requests/compute/rebuild_server.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/hp/requests/compute/rebuild_server.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/hp/requests/compute/rebuild_server.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/hp/requests/compute/rebuild_server.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/hp/requests/compute/rebuild_server.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/hp/requests/compute/rebuild_server.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/hp/requests/compute/rebuild_server.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/hp/requests/compute/rebuild_server.rb
fog-1.19.0 lib/fog/hp/requests/compute/rebuild_server.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/hp/requests/compute/rebuild_server.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/hp/requests/compute/rebuild_server.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/hp/requests/compute/rebuild_server.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/hp/requests/compute/rebuild_server.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/hp/requests/compute/rebuild_server.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/hp/requests/compute/rebuild_server.rb