1"""
2Classification of Salt exit codes.  These are intended to augment
3universal exit codes (found in Python's `os` module with the `EX_`
4prefix or in `sysexits.h`).
5"""
6
7# Too many situations use "exit 1" - try not to use it when something
8# else is more appropriate.
9EX_GENERIC = 1
10
11EX_STATE_COMPILER_ERROR = 1
12EX_STATE_FAILURE = 2
13EX_PILLAR_FAILURE = 5
14
15# Salt SSH "Thin" deployment failures
16EX_THIN_PYTHON_INVALID = 10
17EX_THIN_DEPLOY = 11
18EX_THIN_CHECKSUM = 12
19EX_MOD_DEPLOY = 13
20EX_SCP_NOT_FOUND = 14
21
22# One of a collection failed
23EX_AGGREGATE = 20
24
25# The os.EX_* exit codes are Unix only so in the interest of cross-platform
26# compatiblility define them explicitly here.
27#
28# These constants are documented here:
29# https://docs.python.org/2/library/os.html#os.EX_OK
30
31EX_OK = 0  # successful termination
32EX_USAGE = 64  # command line usage error
33EX_NOUSER = 67  # addressee unknown
34EX_UNAVAILABLE = 69  # service unavailable
35EX_SOFTWARE = 70  # internal software error
36EX_CANTCREAT = 73  # can't create (user) output file
37EX_TEMPFAIL = 75  # temp failure; user is invited to retry
38EX_NOPERM = 77  # permission denied
39
40# The Salt specific exit codes are defined below:
41
42# keepalive exit code is a hint that the process should be restarted
43SALT_KEEPALIVE = 99
44
45# SALT_BUILD_FAIL is used when salt fails to build something, like a container
46SALT_BUILD_FAIL = 101
47