Move dns_zone from CROS section to CLIENT in the global_config.ini
to make host_is_in_lab_zone() of client/common_lib/site_utils.py work.
For details, refer to the bug.
BUG=chromium:408458
TEST=manually print out fqdn in host_is_in_lab_zone(), run the
display_ClientChameleonConnection test and observe that the
retrieved dns_zone value is correct.
Change-Id: I7caa6a5e06af59bde8373ef3d10339bed3c6e85a
Reviewed-on: https://chromium-review.googlesource.com/216091
Tested-by: Hung-ying Tyan <tyanh@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Hung-ying Tyan <tyanh@chromium.org>
diff --git a/client/common_lib/site_utils.py b/client/common_lib/site_utils.py
index 9c21ff0..28cf03c 100644
--- a/client/common_lib/site_utils.py
+++ b/client/common_lib/site_utils.py
@@ -52,13 +52,13 @@
def host_is_in_lab_zone(hostname):
- """Check if the host is in the CROS.dns_zone.
+ """Check if the host is in the CLIENT.dns_zone.
@param hostname: The hostname to check.
@returns True if hostname.dns_zone resolves, otherwise False.
"""
host_parts = hostname.split('.')
- dns_zone = global_config.global_config.get_config_value('CROS', 'dns_zone',
+ dns_zone = global_config.global_config.get_config_value('CLIENT', 'dns_zone',
default=None)
fqdn = '%s.%s' % (host_parts[0], dns_zone)
try: