File tree Expand file tree Collapse file tree
src/k8s-extension/azext_k8s_extension Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111
1212from knack .commands import CLICommand
1313
14-
1514class K8sExtensionCommandsLoader (AzCommandsLoader ):
1615
1716 def __init__ (self , cli_ctx = None ):
Original file line number Diff line number Diff line change 1717
1818from knack .commands import CLICommand
1919
20-
2120def load_arguments (self , _ : CLICommand ) -> None :
2221 with self .argument_context (consts .EXTENSION_NAME ) as c :
2322 c .argument ('location' ,
Original file line number Diff line number Diff line change 2727
2828EXTENSION_TYPE_API_VERSION = "2023-05-01-preview"
2929
30- # Diagnostic check result constants.
31- # Used to indicate the outcome of a diagnostic check performed on the cluster or extension.
32- DIAGNOSTIC_CHECK_PASSED = "Passed" # The diagnostic check completed successfully.
33- DIAGNOSTIC_CHECK_FAILED = "Failed" # The diagnostic check failed.
34- DIAGNOSTIC_CHECK_INCOMPLETE = "Incomplete" # The diagnostic check did not complete.
35-
36- # Diagnostic check name constants.
37- # Used to identify specific diagnostic checks performed during troubleshooting.
38- RETRIEVE_NAMESPACE_LOGS = "retrieved_namespace_logs" # Check for retrieving logs from a namespace.
39- RETRIEVE_POD_STATUS = "retrieved_pod_status" # Check for retrieving pod status information.
40- RETRIEVE_CONFIGMAP = "retrieved_config_map" # Check for retrieving ConfigMap data.
41-
4230# Fault type constants for error categorization.
4331# Used to classify different types of faults encountered during diagnostics.
4432LOAD_KUBECONFIG_FAULT_TYPE = "kubeconfig-load-error" # Error loading kubeconfig file.
Original file line number Diff line number Diff line change 5959from kubernetes .client .rest import ApiException
6060from kubernetes .client import CoreV1Api , V1NodeList
6161
62-
6362from typing import Optional , Union
6463
6564import oras .client
@@ -618,10 +617,10 @@ def troubleshoot_extension(
618617 storage_space_available = False
619618
620619 if storage_space_available :
621- logger . warning (
622- "The diagnoser logs have been saved at this path: %s. \n These logs can be attached while filing a "
623- "support ticket for further assistance. \n " ,
624- filepath_with_timestamp ,
620+ print (
621+ f "The diagnoser logs have been saved at this path: ' { filepath_with_timestamp } '. \n "
622+ "These logs can be attached while filing a "
623+ "support ticket for further assistance. \n "
625624 )
626625 else :
627626 logger .warning (
You can’t perform that action at this time.
0 commit comments