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 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 """Cloud endpoints for the Machine Provider API.""" | 5 """Cloud endpoints for the Machine Provider API.""" |
6 | 6 |
7 import hashlib | 7 import hashlib |
8 import json | 8 import json |
9 import logging | 9 import logging |
10 | 10 |
11 import endpoints | 11 import endpoints |
12 from google.appengine import runtime | 12 from google.appengine import runtime |
13 from google.appengine.api import app_identity | 13 from google.appengine.api import app_identity |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 request_hash, | 509 request_hash, |
510 ) | 510 ) |
511 return rpc_messages.LeaseReleaseRequestError.ALREADY_RECLAIMED | 511 return rpc_messages.LeaseReleaseRequestError.ALREADY_RECLAIMED |
512 logging.info('Releasing LeaseRequest: %s', request_hash) | 512 logging.info('Releasing LeaseRequest: %s', request_hash) |
513 request.released = True | 513 request.released = True |
514 request.put() | 514 request.put() |
515 | 515 |
516 | 516 |
517 def create_endpoints_app(): | 517 def create_endpoints_app(): |
518 return endpoints.api_server([CatalogEndpoints, MachineProviderEndpoints]) | 518 return endpoints.api_server([CatalogEndpoints, MachineProviderEndpoints]) |
OLD | NEW |