def _exit_status(retcode):
    ret = {0: 'Successful completion.',
           1: 'An error occurred.',
           2: 'Usage error.',
           3: 'Image not installed.'}[retcode]
    return ret
Translate exit status of imgadm
dataset/ETHPy150Open saltstack/salt/salt/modules/smartos_imgadm.py/_exit_status