Merge pull request #867 from 2rs2ts/flexible-route53-hostedzoneid-lookup
Be flexible with Route53 Hosted Zone IDs with /hostedzone/ prefix
This commit is contained in:
commit
a6e762340d
@ -277,7 +277,7 @@ class Route53Backend(BaseBackend):
|
|||||||
return self.zones.values()
|
return self.zones.values()
|
||||||
|
|
||||||
def get_hosted_zone(self, id_):
|
def get_hosted_zone(self, id_):
|
||||||
return self.zones.get(id_)
|
return self.zones.get(id_.replace("/hostedzone/", ""))
|
||||||
|
|
||||||
def get_hosted_zone_by_name(self, name):
|
def get_hosted_zone_by_name(self, name):
|
||||||
for zone in self.get_all_hosted_zones():
|
for zone in self.get_all_hosted_zones():
|
||||||
@ -285,10 +285,7 @@ class Route53Backend(BaseBackend):
|
|||||||
return zone
|
return zone
|
||||||
|
|
||||||
def delete_hosted_zone(self, id_):
|
def delete_hosted_zone(self, id_):
|
||||||
zone = self.zones.get(id_)
|
return self.zones.pop(id_.replace("/hostedzone/", ""), None)
|
||||||
if zone:
|
|
||||||
del self.zones[id_]
|
|
||||||
return zone
|
|
||||||
|
|
||||||
def create_health_check(self, health_check_args):
|
def create_health_check(self, health_check_args):
|
||||||
health_check_id = str(uuid.uuid4())
|
health_check_id = str(uuid.uuid4())
|
||||||
|
Loading…
Reference in New Issue
Block a user