def test_simple_availability_zone(self):
     self._config_az()
     az = nsx_az.NsxV3AvailabilityZone(self.az_name)
     self.assertEqual(self.az_name, az.name)
     self.assertEqual("metadata_proxy1", az.metadata_proxy)
     self.assertEqual("dhcp_profile1", az.dhcp_profile)
     self.assertEqual("2.2.2.2", az.native_metadata_route)
     self.assertEqual("aaa.com", az.dns_domain)
     self.assertEqual(["20.1.1.1"], az.nameservers)
     self.assertEqual("otz", az.default_overlay_tz)
     self.assertEqual("vtz", az.default_vlan_tz)
 def test_availability_zone_missing_profiles(self):
     self._config_az(switching_profiles=None)
     az = nsx_az.NsxV3AvailabilityZone(self.az_name)
     self.assertEqual(["uuid1"], az.switching_profiles)
 def test_availability_zone_missing_nameservers(self):
     self._config_az(nameservers=None)
     az = nsx_az.NsxV3AvailabilityZone(self.az_name)
     self.assertEqual(["10.1.1.1"], az.nameservers)
 def test_availability_zone_missing_dns_domain(self):
     self._config_az(dns_domain=None)
     az = nsx_az.NsxV3AvailabilityZone(self.az_name)
     self.assertEqual("xxx.com", az.dns_domain)
 def test_availability_zone_missing_md_route(self):
     self._config_az(native_metadata_route=None)
     az = nsx_az.NsxV3AvailabilityZone(self.az_name)
     self.assertEqual("1.1.1.1", az.native_metadata_route)