| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import re | 5 import re |
| 6 | 6 |
| 7 from slave import recipe_api | 7 from recipe_engine import recipe_api |
| 8 from slave import recipe_util | |
| 9 | 8 |
| 10 class GSUtilApi(recipe_api.RecipeApi): | 9 class GSUtilApi(recipe_api.RecipeApi): |
| 11 def __call__(self, cmd, name=None, use_retry_wrapper=True, version='3.25', | 10 def __call__(self, cmd, name=None, use_retry_wrapper=True, version='3.25', |
| 12 **kwargs): | 11 **kwargs): |
| 13 """A step to run arbitrary gsutil commands. | 12 """A step to run arbitrary gsutil commands. |
| 14 | 13 |
| 15 Note that this assumes that gsutil authentication environment variables | 14 Note that this assumes that gsutil authentication environment variables |
| 16 (AWS_CREDENTIAL_FILE and BOTO_CONFIG) are already set, though if you want to | 15 (AWS_CREDENTIAL_FILE and BOTO_CONFIG) are already set, though if you want to |
| 17 set them to something else you can always do so using the env={} kwarg. | 16 set them to something else you can always do so using the env={} kwarg. |
| 18 | 17 |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 'Content-Language', | 196 'Content-Language', |
| 198 'Content-MD5', | 197 'Content-MD5', |
| 199 'Content-Type', | 198 'Content-Type', |
| 200 ): | 199 ): |
| 201 return name | 200 return name |
| 202 | 201 |
| 203 # Add provider prefix | 202 # Add provider prefix |
| 204 if not provider_prefix: | 203 if not provider_prefix: |
| 205 provider_prefix = 'x-goog-meta' | 204 provider_prefix = 'x-goog-meta' |
| 206 return '%s-%s' % (provider_prefix, name) | 205 return '%s-%s' % (provider_prefix, name) |
| OLD | NEW |