@@ -567,6 +567,7 @@ def __read_kv_from_file(
567567 key_values .append (KeyValue (key = k , value = v ))
568568 return key_values
569569
570+
570571def flatten_config_data (config_data , format_ , content_type , prefix_to_add = "" , depth = None , separator = None ):
571572 """
572573 Flatten configuration data into a dictionary of key-value pairs.
@@ -741,6 +742,7 @@ def __read_kv_from_app_service(
741742 except Exception as exception :
742743 raise CLIError ("Failed to read key-values from appservice.\n " + str (exception ))
743744
745+
744746def __read_kv_from_kubernetes_configmap (
745747 cmd ,
746748 aks_cluster ,
@@ -785,7 +787,7 @@ def __read_kv_from_kubernetes_configmap(
785787 # Execute the command on the cluster
786788 result = aks_runcommand (cmd , aks_client , aks_cluster ["resource_group" ], aks_cluster ["name" ], command_string = command )
787789
788- if hasattr (result , 'logs' ) and result .logs :
790+ if hasattr (result , 'logs' ) and result .logs :
789791 if not hasattr (result , 'exit_code' ) or result .exit_code != 0 :
790792 raise AzureResponseError (f"{ result .logs .strip ()} " )
791793
@@ -811,6 +813,7 @@ def __read_kv_from_kubernetes_configmap(
811813 f"Failed to read key-values from ConfigMap '{ configmap_name } ' in namespace '{ namespace } '.\n { str (exception )} "
812814 )
813815
816+
814817def __extract_kv_from_configmap_data (configmap_data , content_type , prefix_to_add = "" , format_ = None , depth = None , separator = None ):
815818 """
816819 Helper function to extract key-value pairs from ConfigMap data.
@@ -851,7 +854,7 @@ def __extract_kv_from_configmap_data(configmap_data, content_type, prefix_to_add
851854 f'Value "{ value } " for key "{ key } " is not a well formatted YAML data.'
852855 )
853856 continue
854- elif format_ == "properties" :
857+ else :
855858 try :
856859 import io
857860 value = javaproperties .load (io .StringIO (value ))
@@ -892,6 +895,7 @@ def __extract_kv_from_configmap_data(configmap_data, content_type, prefix_to_add
892895
893896 return key_values
894897
898+
895899def __validate_import_keyvault_ref (kv ):
896900 if kv and validate_import_key (kv .key ):
897901 try :
0 commit comments