    # File lib/fog/openstack/requests/compute/rebuild_server.rb, line 6
            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