MCPcopy Create free account
hub / github.com/saltstack/salt / salt_cloud

Function salt_cloud

salt/scripts.py:559–579  ·  view source on GitHub ↗

The main function for salt-cloud

()

Source from the content-addressed store, hash-verified

557
558
559def salt_cloud():
560 """
561 The main function for salt-cloud
562 """
563 try:
564 # Late-imports for CLI performance
565 import salt.cloud
566 import salt.cloud.cli
567 except ImportError as e:
568 # No salt cloud on Windows
569 import salt.defaults.exitcodes
570
571 log.error("Error importing salt cloud: %s", e)
572 print("salt-cloud is not available in this system")
573 sys.exit(salt.defaults.exitcodes.EX_UNAVAILABLE)
574 if "" in sys.path:
575 sys.path.remove("")
576
577 client = salt.cloud.cli.SaltCloud()
578 _install_signal_handlers(client)
579 client.run()
580
581
582def salt_api():

Callers

nothing calls this directly

Calls 5

runMethod · 0.95
_install_signal_handlersFunction · 0.85
exitMethod · 0.80
errorMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected