Class: Puppet::SSL::StateMachine::SSLState Private
- Defined in:
- lib/puppet/ssl/state_machine.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Direct Known Subclasses
Done, Error, KeySSLState, LockFailure, NeedCACerts, NeedCRLs, NeedKey, NeedLock, Wait
Instance Attribute Summary collapse
- #ssl_context ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(machine, ssl_context) ⇒ SSLState
constructor
private
A new instance of SSLState.
- #log_error(message) ⇒ Object private
- #to_error(message, cause) ⇒ Object private
Constructor Details
#initialize(machine, ssl_context) ⇒ SSLState
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SSLState.
20 21 22 23 24 25 |
# File 'lib/puppet/ssl/state_machine.rb', line 20 def initialize(machine, ssl_context) @machine = machine @ssl_context = ssl_context @cert_provider = machine.cert_provider @ssl_provider = machine.ssl_provider end |
Instance Attribute Details
#ssl_context ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 |
# File 'lib/puppet/ssl/state_machine.rb', line 18 def ssl_context @ssl_context end |
Instance Method Details
#log_error(message) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
33 34 35 36 37 38 39 40 |
# File 'lib/puppet/ssl/state_machine.rb', line 33 def log_error() # When running daemonized we set stdout to /dev/null, so write to the log instead if Puppet[:daemonize] Puppet.err() else $stdout.puts() end end |
#to_error(message, cause) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
27 28 29 30 31 |
# File 'lib/puppet/ssl/state_machine.rb', line 27 def to_error(, cause) detail = Puppet::Error.new() detail.set_backtrace(cause.backtrace) Error.new(@machine, , detail) end |