1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

Merge remote-tracking branch 'origin/master' into show-zone-create

This commit is contained in:
Ross McFarland
2018-03-03 10:18:32 -08:00
35 changed files with 1419 additions and 164 deletions

View File

@@ -127,9 +127,10 @@ class GoogleCloudProvider(BaseProvider):
:type return: new google.cloud.dns.ManagedZone
"""
# Zone name must begin with a letter, end with a letter or digit,
# and only contain lowercase letters, digits or dashes
zone_name = '{}-{}'.format(
dns_name[:-1].replace('.', '-'), uuid4().hex)
# and only contain lowercase letters, digits or dashes,
# and be 63 characters or less
zone_name = 'zone-{}-{}'.format(
dns_name.replace('.', '-'), uuid4().hex)[:63]
gcloud_zone = self.gcloud_client.zone(
name=zone_name,