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

Side by Side Diff: third_party/gsutil/gslib/commands/getacl.py

Issue 12042069: Scripts to download files from google storage based on sha1 sums (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Removed gsutil/tests and gsutil/docs Created 7 years, 10 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
OLDNEW
(Empty)
1 # Copyright 2011 Google Inc.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 from gslib.command import Command
16 from gslib.command import COMMAND_NAME
17 from gslib.command import COMMAND_NAME_ALIASES
18 from gslib.command import CONFIG_REQUIRED
19 from gslib.command import FILE_URIS_OK
20 from gslib.command import MAX_ARGS
21 from gslib.command import MIN_ARGS
22 from gslib.command import PROVIDER_URIS_OK
23 from gslib.command import SUPPORTED_SUB_ARGS
24 from gslib.command import URIS_START_ARG
25 from gslib.help_provider import HELP_NAME
26 from gslib.help_provider import HELP_NAME_ALIASES
27 from gslib.help_provider import HELP_ONE_LINE_SUMMARY
28 from gslib.help_provider import HELP_TEXT
29 from gslib.help_provider import HelpType
30 from gslib.help_provider import HELP_TYPE
31
32 _detailed_help_text = ("""
33 <B>SYNOPSIS</B>
34 gsutil getacl uri
35
36 <B>DESCRIPTION</B>
37 Gets ACL XML for a bucket or object, which you can save and edit for the
38 setacl command.
39
40
41 <B>OPTIONS</B>
42 -v Parses uris for version / generation numbers (only applicable in
43 version-enabled buckets). For example:
44
45 gsutil getacl -v gs://bucket/object#1348772910166013
46
47 Note that wildcards are not permitted while using this flag.
48 """)
49
50
51 class GetAclCommand(Command):
52 """Implementation of gsutil getacl command."""
53
54 # Command specification (processed by parent class).
55 command_spec = {
56 # Name of command.
57 COMMAND_NAME : 'getacl',
58 # List of command name aliases.
59 COMMAND_NAME_ALIASES : [],
60 # Min number of args required by this command.
61 MIN_ARGS : 1,
62 # Max number of args required by this command, or NO_MAX.
63 MAX_ARGS : 1,
64 # Getopt-style string specifying acceptable sub args.
65 SUPPORTED_SUB_ARGS : 'v',
66 # True if file URIs acceptable for this command.
67 FILE_URIS_OK : False,
68 # True if provider-only URIs acceptable for this command.
69 PROVIDER_URIS_OK : False,
70 # Index in args of first URI arg.
71 URIS_START_ARG : 0,
72 # True if must configure gsutil before running command.
73 CONFIG_REQUIRED : True,
74 }
75 help_spec = {
76 # Name of command or auxiliary help info for which this help applies.
77 HELP_NAME : 'getacl',
78 # List of help name aliases.
79 HELP_NAME_ALIASES : [],
80 # Type of help:
81 HELP_TYPE : HelpType.COMMAND_HELP,
82 # One line summary of this help.
83 HELP_ONE_LINE_SUMMARY : 'Get ACL XML for a bucket or object',
84 # The full help text.
85 HELP_TEXT : _detailed_help_text,
86 }
87
88 # Command entry point.
89 def RunCommand(self):
90 self.GetAclCommandHelper()
91 return 0
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698