The main function for salt-cloud
()
| 557 | |
| 558 | |
| 559 | def 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 | |
| 582 | def salt_api(): |
nothing calls this directly
no test coverage detected