| Index: gslib/addlhelp/projects.py
|
| ===================================================================
|
| --- gslib/addlhelp/projects.py (revision 33376)
|
| +++ gslib/addlhelp/projects.py (working copy)
|
| @@ -1,3 +1,4 @@
|
| +# -*- coding: utf-8 -*-
|
| # Copyright 2012 Google Inc. All Rights Reserved.
|
| #
|
| # Licensed under the Apache License, Version 2.0 (the "License");
|
| @@ -11,16 +12,13 @@
|
| # 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 about Google Cloud Storage projects."""
|
|
|
| -from gslib.help_provider import HELP_NAME
|
| -from gslib.help_provider import HELP_NAME_ALIASES
|
| -from gslib.help_provider import HELP_ONE_LINE_SUMMARY
|
| +from __future__ import absolute_import
|
| +
|
| from gslib.help_provider import HelpProvider
|
| -from gslib.help_provider import HELP_TEXT
|
| -from gslib.help_provider import HelpType
|
| -from gslib.help_provider import HELP_TYPE
|
|
|
| -_detailed_help_text = ("""
|
| +_DETAILED_HELP_TEXT = ("""
|
| <B>OVERVIEW</B>
|
| This section discusses how to work with projects in Google Cloud Storage.
|
|
|
| @@ -41,8 +39,8 @@
|
| These projects make it easy to set up a bucket and start uploading objects
|
| with access control appropriate for a project at your company, as the three
|
| group memberships can be configured by your administrative staff. Control
|
| - over projects and their associated memberships is provided by the
|
| - `Google Cloud Console <https://cloud.google.com/console#/project>`_.
|
| + over projects and their associated memberships is provided by the
|
| + `Google Developers Console <https://cloud.google.com/console#/project>`_.
|
|
|
|
|
| <B>HOW PROJECT MEMBERSHIP IS REFLECTED IN BUCKET ACLS</B>
|
| @@ -50,79 +48,56 @@
|
| "project-private" ACL, which grants the permissions described in the previous
|
| section. Here's an example of such an ACL:
|
|
|
| - <AccessControlList>
|
| - <Owner>
|
| - <ID>
|
| - 00b4903a9740e42c29800f53bd5a9a62a2f96eb3f64a4313a115df3f3a776bf7
|
| - </ID>
|
| - </Owner>
|
| - <Entries>
|
| - <Entry>
|
| - <Scope type="GroupById">
|
| - <ID>
|
| - 00b4903a9740e42c29800f53bd5a9a62a2f96eb3f64a4313a115df3f3a776bf7
|
| - </ID>
|
| - </Scope>
|
| - <Permission>
|
| - FULL_CONTROL
|
| - </Permission>
|
| - </Entry>
|
| - <Entry>
|
| - <Scope type="GroupById">
|
| - <ID>
|
| - 00b4903a977fd817e9da167bc81306489181a110456bb635f466d71cf90a0d51
|
| - </ID>
|
| - </Scope>
|
| - <Permission>
|
| - FULL_CONTROL
|
| - </Permission>
|
| - </Entry>
|
| - <Entry>
|
| - <Scope type="GroupById">
|
| - <ID>
|
| - 00b4903a974898cc8fc309f2f2835308ba3d3df1b889d3fc7e33e187d52d8e71
|
| - </ID>
|
| - </Scope>
|
| - <Permission>
|
| - READ
|
| - </Permission>
|
| - </Entry>
|
| - </Entries>
|
| - </AccessControlList>
|
| + [
|
| + {
|
| + "entity": "group-00b4903a9740e42c29800f53bd5a9a62a2f96eb3f64a4313a115df3f3a776bf7",
|
| + "entityId": "00b4903a9740e42c29800f53bd5a9a62a2f96eb3f64a4313a115df3f3a776bf7",
|
| + "role": "OWNER"
|
| + },
|
| + {
|
| + "entity": "group-00b4903a977fd817e9da167bc81306489181a110456bb635f466d71cf90a0d51",
|
| + "entityId": "00b4903a977fd817e9da167bc81306489181a110456bb635f466d71cf90a0d51",
|
| + "role": "OWNER"
|
| + },
|
| + {
|
| + "entity": "00b4903a974898cc8fc309f2f2835308ba3d3df1b889d3fc7e33e187d52d8e71",
|
| + "entityId": "00b4903a974898cc8fc309f2f2835308ba3d3df1b889d3fc7e33e187d52d8e71",
|
| + "role": "READER"
|
| + }
|
| + ]
|
|
|
| - The three "GroupById" scopes are the canonical IDs for the Project Owners,
|
| + The three "entityId"s are the canonical IDs for the Project Owners,
|
| Project Editors, and All Project Team Members groups.
|
|
|
| You can edit the bucket ACL if you want to (see "gsutil help acl"),
|
| but for many cases you'll never need to, and instead can change group
|
| membership via the
|
| - `Google Cloud Console <https://cloud.google.com/console#/project>`_.
|
| + `Google Developers Console <https://cloud.google.com/console#/project>`_.
|
|
|
|
|
| <B>IDENTIFYING PROJECTS WHEN CREATING AND LISTING BUCKETS</B>
|
| When you create a bucket or list your buckets, you need to provide the
|
| - project ID that want to create or list (using the gsutil mb -p option or
|
| + project ID that you want to create or list (using the gsutil mb -p option or
|
| the gsutil ls -p option, respectively). The project's name shown in the
|
| - Google Cloud Console is a user-friendly name that you can choose; this is
|
| + Google Developers Console is a user-friendly name that you can choose; this is
|
| not the project ID required by the gsutil mb and ls commands. To find the
|
| - project ID, go to the Storage Access pane in the Google Cloud Console. Your
|
| - project ID is listed under Identifying your project.
|
| + project ID, go to the Cloud Storage pane in the Google Developers Console.
|
| + The project ID is listed as "Project Number" in the Overview pane of your
|
| + project.
|
| """)
|
|
|
|
|
| class CommandOptions(HelpProvider):
|
| - """Additional help about Access Control Lists."""
|
| + """Additional help about Google Cloud Storage projects."""
|
|
|
| - help_spec = {
|
| - # Name of command or auxiliary help info for which this help applies.
|
| - HELP_NAME : 'projects',
|
| - # List of help name aliases.
|
| - HELP_NAME_ALIASES : ['apis console', 'cloud console', 'console',
|
| - 'dev console', 'project', 'proj', 'project-id'],
|
| - # Type of help:
|
| - HELP_TYPE : HelpType.ADDITIONAL_HELP,
|
| - # One line summary of this help.
|
| - HELP_ONE_LINE_SUMMARY : 'Working With Projects',
|
| - # The full help text.
|
| - HELP_TEXT : _detailed_help_text,
|
| - }
|
| + # Help specification. See help_provider.py for documentation.
|
| + help_spec = HelpProvider.HelpSpec(
|
| + help_name='projects',
|
| + help_name_aliases=[
|
| + 'apis console', 'cloud console', 'console', 'dev console', 'project',
|
| + 'proj', 'project-id'],
|
| + help_type='additional_help',
|
| + help_one_line_summary='Working With Projects',
|
| + help_text=_DETAILED_HELP_TEXT,
|
| + subcommand_help_text={},
|
| + )
|
|
|