Class: Exec::ClusterAllocate::CustomCommandOption
- Inherits:
-
Exec::CommandOption
- Object
- Exec::CommandOption
- Exec::ClusterAllocate::CustomCommandOption
- Defined in:
- lib/exec/cluster_allocate.rb
Overview
Inherited CommandOption used only by ServiceLs.
Instance Attribute Summary
Attributes inherited from Exec::CommandOption
Instance Method Summary collapse
-
#check_mandatory ⇒ Object
protected
This method overrides the default behaviour.
-
#get_banner ⇒ Object
This method overrides the default banner generating method.
Methods inherited from Exec::CommandOption
#add_option, #get_help, #get_sorted_options, #has_argument, #initialize, #initialize_option_values, #verify
Constructor Details
This class inherits a constructor from Exec::CommandOption
Instance Method Details
#check_mandatory ⇒ Object (protected)
This method overrides the default behaviour.
156 157 158 159 160 |
# File 'lib/exec/cluster_allocate.rb', line 156 def check_mandatory() raise Common::MissingParameter.new("-C", get_help()) if !@values["help"] && @values["cluster_name"].nil? raise Common::MissingParameter.new("-n or -a", get_help()) if !@values["help"] && @values["list_nodes"].nil? && !@values["all"] && !@values["cluster_name"].nil? raise Common::InconsistentParameter.new("can not be used together.", get_help(), "-a", "-n") if !@values["help"] && @values["all"] && !@values["list_nodes"].nil? end |
#get_banner ⇒ Object
This method overrides the default banner generating method
149 150 151 |
# File 'lib/exec/cluster_allocate.rb', line 149 def return "Usage: #@command_name -C CLUSTER_NAME -a|-n NODE_NAME" end |