Translate multi-part TLD zone names

Convert periods to hyphens in multi-part TLDs when using them as a zone name
(cloud-dns doesn't allow periods in zone names).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172007089
This commit is contained in:
mmuller 2017-10-12 13:53:30 -07:00 committed by jianglai
parent 7e85ae9964
commit bf818a0139
2 changed files with 19 additions and 4 deletions

View file

@ -99,7 +99,7 @@ public class CloudDnsWriter extends BaseDnsWriter {
Retrier retrier) {
this.dnsConnection = dnsConnection;
this.projectId = projectId;
this.zoneName = zoneName;
this.zoneName = zoneName.replace('.', '-');
this.defaultATtl = defaultATtl;
this.defaultNsTtl = defaultNsTtl;
this.defaultDsTtl = defaultDsTtl;