From dc983f258b5d238bface407711f54ecfda20f438 Mon Sep 17 00:00:00 2001 From: badra001 Date: Thu, 27 Apr 2023 11:05:51 -0400 Subject: [PATCH] fix --- code/ddns-lambda.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/ddns-lambda.py b/code/ddns-lambda.py index a1c6710..23112e3 100755 --- a/code/ddns-lambda.py +++ b/code/ddns-lambda.py @@ -73,7 +73,7 @@ LOGGER = logging.getLogger() account_id = None region = None -VERSION = '1.2.0b77' +VERSION = '1.2.0b78' # Read Env variables DEBUG_LOG_LEVEL = os.environ.get('DebugLogLevel', 'INFO') @@ -3086,7 +3086,7 @@ def process_tags_flags(tags): def process_tags_value(name): """ - Process the name from one of the tags and return vald (true|false), hostname, domainname, if the domainname exists in a PHZ + Process the name from one of the tags and return vald (true|false), hostname (the name if domainname is not found), domainname (if the domainname exists in a PHZ) :param str: name (hostname or domainname) to check :return tuple(bool,str,str): true|false if vaid, hostname, domainname @@ -3096,12 +3096,13 @@ def process_tags_value(name): components = parse_hostname_to_components(name) if components: return (True, components[0], components[1]) - return (False, None, None) + return (False, name, None) def process_tags_option_cname(tags): """ - Process the CNAME option tag 'boc:dns:cname', determine if name and zone are valid + Process the CNAME option tag 'boc:dns:cname', determine if name and zone are valid. This allows an unqualified name (i.e, no zones) + and if a zone is not found, it will mark it as not valid, but will be used later with the tag zone or dhcp zone. : param list(dict(string)) tags: tags from instance, list of dict of string : return tuple(bool, str, str): true | false if vaid, hostname, domainname