Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: appengine/swarming/handlers_endpoints.py

Issue 2013943002: Changing license header, again! (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Fixed third parties Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « appengine/swarming/handlers_bot_test.py ('k') | appengine/swarming/handlers_endpoints_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 under the Apache License, Version 2.0
3 # found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 """This module defines Swarming Server endpoints handlers.""" 5 """This module defines Swarming Server endpoints handlers."""
6 6
7 import datetime 7 import datetime
8 import json 8 import json
9 import logging 9 import logging
10 10
11 from google.appengine.api import datastore_errors 11 from google.appengine.api import datastore_errors
12 from google.appengine.ext import ndb 12 from google.appengine.ext import ndb
13 import endpoints 13 import endpoints
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 parts = d.split(':', 1) 627 parts = d.split(':', 1)
628 if len(parts) != 2 or any(i.strip() != i or not i for i in parts): 628 if len(parts) != 2 or any(i.strip() != i or not i for i in parts):
629 raise endpoints.BadRequestException('Invalid dimensions') 629 raise endpoints.BadRequestException('Invalid dimensions')
630 q = q.filter(bot_management.BotInfo.dimensions_flat == d) 630 q = q.filter(bot_management.BotInfo.dimensions_flat == d)
631 bots, cursor = datastore_utils.fetch_page(q, request.limit, request.cursor) 631 bots, cursor = datastore_utils.fetch_page(q, request.limit, request.cursor)
632 return swarming_rpcs.BotList( 632 return swarming_rpcs.BotList(
633 cursor=cursor, 633 cursor=cursor,
634 death_timeout=config.settings().bot_death_timeout_secs, 634 death_timeout=config.settings().bot_death_timeout_secs,
635 items=[message_conversion.bot_info_to_rpc(bot, now) for bot in bots], 635 items=[message_conversion.bot_info_to_rpc(bot, now) for bot in bots],
636 now=now) 636 now=now)
OLDNEW
« no previous file with comments | « appengine/swarming/handlers_bot_test.py ('k') | appengine/swarming/handlers_endpoints_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698