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

Add support for geo-targeting of CA provinces

- For providers that support such
This commit is contained in:
Dan Hanks
2020-06-03 09:36:33 -04:00
parent cd14300665
commit 1569d94513
3 changed files with 12 additions and 5 deletions

View File

@ -8,8 +8,8 @@ from pycountry_convert import country_alpha2_to_continent_code
subs = defaultdict(dict)
for subdivision in subdivisions:
# Route53 only supports US states, Dyn supports US states and CA provinces, but for now we'll just do US
if subdivision.country_code not in ('US'):
# Route53 only supports US states, Dyn (and others) support US states and CA provinces
if subdivision.country_code not in ('US', 'CA'):
continue
subs[subdivision.country_code][subdivision.code[3:]] = {
'name': subdivision.name