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 """Provides info about projects (service tenants).""" | 5 """Provides info about projects (service tenants).""" |
6 | 6 |
7 import logging | 7 import logging |
8 | 8 |
9 from google.appengine.ext import ndb | 9 from google.appengine.ext import ndb |
10 from google.appengine.ext.ndb import msgprop | 10 from google.appengine.ext.ndb import msgprop |
11 from protorpc import messages | 11 from protorpc import messages |
12 | 12 |
13 from components import utils | 13 from components import utils |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 # TODO(nodir): take into account regexes here when they are supported. | 119 # TODO(nodir): take into account regexes here when they are supported. |
120 if ref.name == ref_name: | 120 if ref.name == ref_name: |
121 return ref | 121 return ref |
122 return None | 122 return None |
123 | 123 |
124 | 124 |
125 def _get_project_config(project_id, path, message_factory): | 125 def _get_project_config(project_id, path, message_factory): |
126 assert project_id | 126 assert project_id |
127 return storage.get_latest_as_message_async( | 127 return storage.get_latest_as_message_async( |
128 'projects/%s' % project_id, path, message_factory).get_result() | 128 'projects/%s' % project_id, path, message_factory).get_result() |
OLD | NEW |