Class: Exec::NodeInstall::CustomCommandOption

Inherits:
CommandOption show all
Defined in:
lib/exec/node_install.rb

Overview

Inherited CommandOption used only by ServiceLs.

Instance Attribute Summary

Attributes inherited from CommandOption

#values

Instance Method Summary collapse

Methods inherited from 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_mandatoryObject (protected)

This method overrides the default behaviour.

Raises:



227
228
229
230
231
# File 'lib/exec/node_install.rb', line 227

def check_mandatory
  raise Common::MissingParameter.new("-n or -a", get_help()) if !@values["help"] && !@values["all"] && @values["node"].nil?
  raise Common::InconsistentParameter.new("can not be used together.", get_help(), "-a", "-n") if !@values["help"] && @values["all"] && !@values["node"].nil?
  raise Common::InconsistentParameter.new("can not be used together.", get_help(), "-a", "-f") if !@values["help"] && @values["all"] && @values["force"]
end

#get_bannerObject

This method overrides the default bannger generating



220
221
222
# File 'lib/exec/node_install.rb', line 220

def get_banner
  return "Usage: -a|-n NODE_NAME [-b BIOS_NAME] [-r RAID_NAME] [-f] [-h]"
end