Module: Config::Check
- Defined in:
- lib/wf_node_api/config/check.rb
Class Method Summary (collapse)
-
+ (Object) run
Runs the configuration check.
-
+ (Boolean) valid_container_type?(container_type)
Checks if the submitted container type is registered and valid.
Class Method Details
+ (Object) run
Runs the configuration check
7 8 9 10 11 |
# File 'lib/wf_node_api/config/check.rb', line 7 def self.run if self.valid_container_type?($container_type) == false raise RuntimeError, 'container_type is invalid' end end |
+ (Boolean) valid_container_type?(container_type)
Checks if the submitted container type is registered and valid
20 21 22 23 24 25 |
# File 'lib/wf_node_api/config/check.rb', line 20 def self.valid_container_type?(container_type) raise ArgumentError 'container_type not set' if container_type.nil? valid_types = ['lxc', 'vserver'] valid_types.include?(container_type) end |