Class: Knife::Clc::Bootstrap::Validator
- Inherits:
-
Object
- Object
- Knife::Clc::Bootstrap::Validator
- Defined in:
- lib/knife-clc/bootstrap/validator.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(params) ⇒ Validator
constructor
A new instance of Validator.
- #validate ⇒ Object
Constructor Details
#initialize(params) ⇒ Validator
Returns a new instance of Validator.
9 10 11 12 13 |
# File 'lib/knife-clc/bootstrap/validator.rb', line 9 def initialize(params) @connection = params.fetch(:connection) @config = params.fetch(:config) @errors = params.fetch(:errors) end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
7 8 9 |
# File 'lib/knife-clc/bootstrap/validator.rb', line 7 def config @config end |
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
7 8 9 |
# File 'lib/knife-clc/bootstrap/validator.rb', line 7 def connection @connection end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
7 8 9 |
# File 'lib/knife-clc/bootstrap/validator.rb', line 7 def errors @errors end |
Instance Method Details
#validate ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/knife-clc/bootstrap/validator.rb', line 15 def validate return unless config[:clc_bootstrap] check_chef_server_connectivity if config[:clc_bootstrap_platform] validate_bootstrap_platform else check_server_platform end check_server_platform if config[:clc_wait] check_bootstrap_connectivity_params else check_bootstrap_node_connectivity_params end end |