| OLD | NEW |
| 1 # -*- coding: utf-8 -*- |
| 1 # Copyright 2012 Google Inc. All Rights Reserved. | 2 # Copyright 2012 Google Inc. All Rights Reserved. |
| 2 # | 3 # |
| 3 # Licensed under the Apache License, Version 2.0 (the "License"); | 4 # 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 not use this file except in compliance with the License. |
| 5 # You may obtain a copy of the License at | 6 # You may obtain a copy of the License at |
| 6 # | 7 # |
| 7 # http://www.apache.org/licenses/LICENSE-2.0 | 8 # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 # | 9 # |
| 9 # Unless required by applicable law or agreed to in writing, software | 10 # Unless required by applicable law or agreed to in writing, software |
| 10 # distributed under the License is distributed on an "AS IS" BASIS, | 11 # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 # See the License for the specific language governing permissions and | 13 # See the License for the specific language governing permissions and |
| 13 # limitations under the License. | 14 # limitations under the License. |
| 15 """Additional help about gsutil object and bucket naming.""" |
| 14 | 16 |
| 15 from gslib.help_provider import HELP_NAME | 17 from __future__ import absolute_import |
| 16 from gslib.help_provider import HELP_NAME_ALIASES | 18 |
| 17 from gslib.help_provider import HELP_ONE_LINE_SUMMARY | |
| 18 from gslib.help_provider import HelpProvider | 19 from gslib.help_provider import HelpProvider |
| 19 from gslib.help_provider import HELP_TEXT | |
| 20 from gslib.help_provider import HelpType | |
| 21 from gslib.help_provider import HELP_TYPE | |
| 22 | 20 |
| 23 _detailed_help_text = (""" | 21 _DETAILED_HELP_TEXT = (""" |
| 24 <B>BUCKET NAME REQUIREMENTS</B> | 22 <B>BUCKET NAME REQUIREMENTS</B> |
| 25 Google Cloud Storage has a single namespace, so you will not be allowed | 23 Google Cloud Storage has a single namespace, so you will not be allowed |
| 26 to create a bucket with a name already in use by another user. You can, | 24 to create a bucket with a name already in use by another user. You can, |
| 27 however, carve out parts of the bucket name space corresponding to your | 25 however, carve out parts of the bucket name space corresponding to your |
| 28 company's domain name (see "DOMAIN NAMED BUCKETS"). | 26 company's domain name (see "DOMAIN NAMED BUCKETS"). |
| 29 | 27 |
| 30 Bucket names must conform to standard DNS naming conventions. This is | 28 Bucket names must conform to standard DNS naming conventions. This is |
| 31 because a bucket name can appear in a DNS record as part of a CNAME | 29 because a bucket name can appear in a DNS record as part of a CNAME |
| 32 redirect. In addition to meeting DNS naming requirements, Google Cloud | 30 redirect. In addition to meeting DNS naming requirements, Google Cloud |
| 33 Storage imposes other requirements on bucket naming. At a minimum, your | 31 Storage imposes other requirements on bucket naming. At a minimum, your |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 present. If you want to create a CNAME resource record for a domain, you must | 166 present. If you want to create a CNAME resource record for a domain, you must |
| 169 use the Meta tag verification method or the HTML file verification method. | 167 use the Meta tag verification method or the HTML file verification method. |
| 170 | 168 |
| 171 | 169 |
| 172 """) | 170 """) |
| 173 | 171 |
| 174 | 172 |
| 175 class CommandOptions(HelpProvider): | 173 class CommandOptions(HelpProvider): |
| 176 """Additional help about gsutil object and bucket naming.""" | 174 """Additional help about gsutil object and bucket naming.""" |
| 177 | 175 |
| 178 help_spec = { | 176 # Help specification. See help_provider.py for documentation. |
| 179 # Name of command or auxiliary help info for which this help applies. | 177 help_spec = HelpProvider.HelpSpec( |
| 180 HELP_NAME : 'naming', | 178 help_name='naming', |
| 181 # List of help name aliases. | 179 help_name_aliases=['domain', 'limits', 'name', 'names'], |
| 182 HELP_NAME_ALIASES : ['domain', 'limits', 'name', 'names'], | 180 help_type='additional_help', |
| 183 # Type of help: | 181 help_one_line_summary='Object and Bucket Naming', |
| 184 HELP_TYPE : HelpType.ADDITIONAL_HELP, | 182 help_text=_DETAILED_HELP_TEXT, |
| 185 # One line summary of this help. | 183 subcommand_help_text={}, |
| 186 HELP_ONE_LINE_SUMMARY : 'Object and Bucket Naming', | 184 ) |
| 187 # The full help text. | |
| 188 HELP_TEXT : _detailed_help_text, | |
| 189 } | |
| OLD | NEW |