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

Unified Diff: third_party/gsutil/gslib/addlhelp/anon.py

Issue 1377933002: [catapult] - Copy Telemetry's gsutilz over to third_party. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: Rename to gsutil. Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/gsutil/gslib/addlhelp/acls.py ('k') | third_party/gsutil/gslib/addlhelp/apis.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/gsutil/gslib/addlhelp/anon.py
diff --git a/third_party/gsutil/gslib/addlhelp/anon.py b/third_party/gsutil/gslib/addlhelp/anon.py
new file mode 100644
index 0000000000000000000000000000000000000000..fdd319dbac057ec2f0b67bf869ada2280e3e15f2
--- /dev/null
+++ b/third_party/gsutil/gslib/addlhelp/anon.py
@@ -0,0 +1,51 @@
+# -*- coding: utf-8 -*-
+# Copyright 2012 Google Inc. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""Additional help text for anonymous access."""
+
+from __future__ import absolute_import
+
+from gslib.help_provider import HelpProvider
+
+_DETAILED_HELP_TEXT = ("""
+<B>OVERVIEW</B>
+ gsutil users can access publicly readable data without obtaining
+ credentials. For example, the gs://uspto-pair bucket contains a number
+ of publicly readable objects, so any user can run the following command
+ without first obtaining credentials:
+
+ gsutil ls gs://uspto-pair/applications/0800401*
+
+ Users can similarly download objects they find via the above gsutil ls
+ command.
+
+ If a user without credentials attempts to access protected data using gsutil,
+ they will be prompted to run "gsutil config" to obtain credentials.
+
+ See "gsutil help acls" for more details about data protection.
+""")
+
+
+class CommandOptions(HelpProvider):
+ """Additional help text for anonymous access."""
+
+ # Help specification. See help_provider.py for documentation.
+ help_spec = HelpProvider.HelpSpec(
+ help_name='anon',
+ help_name_aliases=['anonymous', 'public'],
+ help_type='additional_help',
+ help_one_line_summary='Accessing Public Data Without Credentials',
+ help_text=_DETAILED_HELP_TEXT,
+ subcommand_help_text={},
+ )
« no previous file with comments | « third_party/gsutil/gslib/addlhelp/acls.py ('k') | third_party/gsutil/gslib/addlhelp/apis.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698