| OLD | NEW |
| 1 # Copyright 2015 The LUCI Authors. All rights reserved. | 1 # Copyright 2015 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed by the Apache v2.0 license that can be | 2 # Use of this source code is governed by the Apache v2.0 license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Internal bot API handlers.""" | 5 """Internal bot API handlers.""" |
| 6 | 6 |
| 7 import base64 | 7 import base64 |
| 8 import json | 8 import json |
| 9 import logging | 9 import logging |
| 10 import re | 10 import re |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 'manifest': { | 384 'manifest': { |
| 385 'bot_id': bot_id, | 385 'bot_id': bot_id, |
| 386 'command': cmd, | 386 'command': cmd, |
| 387 'dimensions': request.properties.dimensions, | 387 'dimensions': request.properties.dimensions, |
| 388 'env': request.properties.env, | 388 'env': request.properties.env, |
| 389 'extra_args': request.properties.extra_args, | 389 'extra_args': request.properties.extra_args, |
| 390 'grace_period': request.properties.grace_period_secs, | 390 'grace_period': request.properties.grace_period_secs, |
| 391 'hard_timeout': request.properties.execution_timeout_secs, | 391 'hard_timeout': request.properties.execution_timeout_secs, |
| 392 'host': utils.get_versioned_hosturl(), | 392 'host': utils.get_versioned_hosturl(), |
| 393 'io_timeout': request.properties.io_timeout_secs, | 393 'io_timeout': request.properties.io_timeout_secs, |
| 394 'inputs_ref': request.properties.inputs_ref, | 394 'isolated': { |
| 395 'input': request.properties.inputs_ref.isolated, |
| 396 'namespace': request.properties.inputs_ref.namespace, |
| 397 'server': request.properties.inputs_ref.isolatedserver, |
| 398 } if request.properties.inputs_ref else None, |
| 395 'packages': [ | 399 'packages': [ |
| 396 { | 400 { |
| 397 'package_name': p.package_name, | 401 'package_name': p.package_name, |
| 398 'version': p.version, | 402 'version': p.version, |
| 399 } | 403 } |
| 400 for p in request.properties.packages | 404 for p in request.properties.packages |
| 401 ], | 405 ], |
| 402 'task_id': task_pack.pack_run_result_key(run_result_key), | 406 'task_id': task_pack.pack_run_result_key(run_result_key), |
| 403 }, | 407 }, |
| 404 } | 408 } |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 ('/swarming/api/v1/bot/poll', BotPollHandler), | 675 ('/swarming/api/v1/bot/poll', BotPollHandler), |
| 672 ('/swarming/api/v1/bot/server_ping', ServerPingHandler), | 676 ('/swarming/api/v1/bot/server_ping', ServerPingHandler), |
| 673 ('/swarming/api/v1/bot/task_update', BotTaskUpdateHandler), | 677 ('/swarming/api/v1/bot/task_update', BotTaskUpdateHandler), |
| 674 ('/swarming/api/v1/bot/task_update/<task_id:[a-f0-9]+>', | 678 ('/swarming/api/v1/bot/task_update/<task_id:[a-f0-9]+>', |
| 675 BotTaskUpdateHandler), | 679 BotTaskUpdateHandler), |
| 676 ('/swarming/api/v1/bot/task_error', BotTaskErrorHandler), | 680 ('/swarming/api/v1/bot/task_error', BotTaskErrorHandler), |
| 677 ('/swarming/api/v1/bot/task_error/<task_id:[a-f0-9]+>', | 681 ('/swarming/api/v1/bot/task_error/<task_id:[a-f0-9]+>', |
| 678 BotTaskErrorHandler), | 682 BotTaskErrorHandler), |
| 679 ] | 683 ] |
| 680 return [webapp2.Route(*i) for i in routes] | 684 return [webapp2.Route(*i) for i in routes] |
| OLD | NEW |