Class: Chef::Application::ExitCode
- Inherits:
-
Object
- Object
- Chef::Application::ExitCode
- Defined in:
- lib/chef/application/exit_code.rb
Overview
These are the exit codes defined in Chef RFC 062 github.com/chef/chef-rfc/blob/master/rfc062-exit-status.md
Constant Summary collapse
- VALID_RFC_062_EXIT_CODES =
-1 is defined as DEPRECATED_FAILURE in RFC 062, so it is not enumerated in an active constant.
{ SUCCESS: 0, GENERIC_FAILURE: 1, SIGINT_RECEIVED: 2, SIGTERM_RECEIVED: 3, REBOOT_SCHEDULED: 35, REBOOT_NEEDED: 37, REBOOT_FAILED: 41, AUDIT_MODE_FAILURE: 42, }
- DEPRECATED_RFC_062_EXIT_CODES =
{ DEPRECATED_FAILURE: -1, }
Class Method Summary collapse
- .enforce_rfc_062_exit_codes? ⇒ Boolean
- .normalize_exit_code(exit_code = nil) ⇒ Object
- .notify_deprecated_exit_code ⇒ Object
- .notify_reboot_exit_code_deprecation ⇒ Object
Class Method Details
.enforce_rfc_062_exit_codes? ⇒ Boolean
56 57 58 |
# File 'lib/chef/application/exit_code.rb', line 56 def enforce_rfc_062_exit_codes? !normalization_disabled? && !normalization_not_configured? end |
.normalize_exit_code(exit_code = nil) ⇒ Object
46 47 48 49 50 51 52 53 54 |
# File 'lib/chef/application/exit_code.rb', line 46 def normalize_exit_code(exit_code = nil) if normalization_not_configured? normalize_legacy_exit_code_with_warning(exit_code) elsif normalization_disabled? normalize_legacy_exit_code(exit_code) else normalize_exit_code_to_rfc(exit_code) end end |
.notify_deprecated_exit_code ⇒ Object
65 66 67 68 |
# File 'lib/chef/application/exit_code.rb', line 65 def notify_deprecated_exit_code return if normalization_disabled? notify_on_deprecation(deprecation_warning) end |
.notify_reboot_exit_code_deprecation ⇒ Object
60 61 62 63 |
# File 'lib/chef/application/exit_code.rb', line 60 def notify_reboot_exit_code_deprecation return if normalization_disabled? notify_on_deprecation(reboot_deprecation_warning) end |