MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / load_config

Function load_config

vmm/src/vmm-cli.py:62–76  ·  view source on GitHub ↗

Load configuration from the default config file. Returns: Dictionary with configuration values (url, auth_user, auth_password)

()

Source from the content-addressed store, hash-verified

60
61
62def load_config() -> Dict[str, Any]:
63 """Load configuration from the default config file.
64
65 Returns:
66 Dictionary with configuration values (url, auth_user, auth_password)
67
68 """
69 if not os.path.exists(DEFAULT_CONFIG_PATH):
70 return {}
71
72 try:
73 with open(DEFAULT_CONFIG_PATH, "r") as f:
74 return json.load(f)
75 except (json.JSONDecodeError, FileNotFoundError):
76 return {}
77
78
79def discover_vmm_instances() -> List[Dict[str, Any]]:

Callers 8

load_config_figmentFunction · 0.70
save_active_vmmFunction · 0.70
cmd_ls_vmmFunction · 0.70
mainFunction · 0.70
load_config_figmentFunction · 0.50
load_config_figmentFunction · 0.50
load_config_figmentFunction · 0.50

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected