NSX|V: return default AZ if name AZ not found

Ensure that a AZ is returned. There may be an edge case after a
migration that there is no AZ configured.

Change-Id: I56c33f5f331781c1874b8d3fed73f6c2ad90095c
This commit is contained in:
Gary Kotton 2016-08-30 06:44:32 -07:00
parent 4098386065
commit e72ee70590

View File

@ -102,6 +102,7 @@ class ConfiguredAvailabilityZones(object):
"""
if name in self.availability_zones.keys():
return self.availability_zones[name]
return self.get_default_availability_zone()
def get_default_availability_zone(self):
"""Return the default availability zone object