@@ -52,6 +52,7 @@ def run_command(cf, method, command, params=None, content=None, files=None):
5252
5353 hex_only = re .compile ('^[0-9a-fA-F]+$' )
5454 waf_rules = re .compile ('^[0-9]+[A-Z]*$' )
55+ uuid_value = re .compile ('^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$' ) # 8-4-4-4-12
5556
5657 m = cf
5758 for element in parts :
@@ -61,6 +62,9 @@ def run_command(cf, method, command, params=None, content=None, files=None):
6162 if len (element ) in [32 , 40 , 48 ] and hex_only .match (element ):
6263 # raw identifier - lets just use it as-is
6364 identifier1 = element
65+ if len (element ) == 36 and uuid_value .match (element ):
66+ # uuid identifier - lets just use it as-is
67+ identifier1 = element
6468 elif element [0 ] == ':' :
6569 # raw string - used for workers script_name - use ::script_name
6670 identifier1 = element [1 :]
@@ -93,6 +97,9 @@ def run_command(cf, method, command, params=None, content=None, files=None):
9397 if len (element ) in [32 , 40 , 48 ] and hex_only .match (element ):
9498 # raw identifier - lets just use it as-is
9599 identifier2 = element
100+ if len (element ) == 36 and uuid_value .match (element ):
101+ # uuid identifier - lets just use it as-is
102+ identifier2 = element
96103 elif element [0 ] == ':' :
97104 # raw string - used for workers script_names
98105 identifier2 = element [1 :]
@@ -102,6 +109,10 @@ def run_command(cf, method, command, params=None, content=None, files=None):
102109 identifier2 = converters .convert_dns_record_to_identifier (cf ,
103110 identifier1 ,
104111 element )
112+ elif (cmd [0 ] and cmd [0 ] == 'zones' ) and (cmd [2 ] and cmd [2 ] == 'custom_hostnames' ):
113+ identifier2 = converters .convert_custom_hostnames_to_identifier (cf ,
114+ identifier1 ,
115+ element )
105116 else :
106117 raise Exception ("/%s/%s :NOT CODED YET" % ('/' .join (cmd ), element ))
107118 except Exception as e :
@@ -117,6 +128,9 @@ def run_command(cf, method, command, params=None, content=None, files=None):
117128 if len (element ) in [32 , 40 , 48 ] and hex_only .match (element ):
118129 # raw identifier - lets just use it as-is
119130 identifier3 = element
131+ if len (element ) == 36 and uuid_value .match (element ):
132+ # uuid identifier - lets just use it as-is
133+ identifier3 = element
120134 elif waf_rules .match (element ):
121135 identifier3 = element
122136 else :
0 commit comments