diff --git a/perl-xCAT-2.0/xCAT/Usage.pm b/perl-xCAT-2.0/xCAT/Usage.pm new file mode 100644 index 000000000..00d208e74 --- /dev/null +++ b/perl-xCAT-2.0/xCAT/Usage.pm @@ -0,0 +1,51 @@ +#!/usr/bin/perl +# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html + +package xCAT::Usage; + +#------------------------------------------------------------------------------- +=head1 xCAT::Usage +=head2 Package Description + xCAT usage module. Some commands such as rpower have different implementations + for different hardware. This module holds the usage usage string for these kind + of commands so that the usage can be referenced from different modules. +=cut +#------------------------------------------------------------------------------- + + +my %usage = ( + "rpower" => "Usage: rpower [--nodeps][on|off|reset|stat|boot]", + "rbeacon" => "Usage: rbeacon [on|off|stat]", + "rvitals" => "Usage: rvitals [all|temp|wattage|voltage|fanspeed|power|leds]", + "reventlog" => "Usage: reventlog [all|clear|]", + "rinv" => "Usage: rinv [all|model|serial|vpd|mprom|deviceid|uuid]", + "rsetboot" => "Usage: rsetboot [net|hd|cd|def|stat]", + "rbootseq" => "Usage: rbootseq [hd0|hd1|hd2|hd3|net|iscsi|usbflash|floppy|none],...", + "rscan" => "Usage: rscan [-w][-x|-z]", + "rspconfig" => +"Usage: + Common: + rspconfig [snmpdest|alert|community] + rspconfig [snmpdest=|alert=|community=] + BMC specific: + rspconfig [ip|netmask|gateway|backupgateway|garp] + rspconfig [garp=] + MPA specific: + rspconfig [sshcfg|snmpcfg|build] + rspconfig [shcfg=|snmpcfg=]" +); + +#-------------------------------------------------------------------------------- +=head3 getUsage + It returns the usage string for the given command. + Arguments: + command + Returns: + the usage string for the command. +=cut +#------------------------------------------------------------------------------- +sub getUsage { + my ($class, $command)=@_; + if (exists($usage{$command})) { return $usage{$command};} + else { return "Usage for command $command cannot be found\n"; } +} diff --git a/xCAT-client-2.0/pods/man1/rspconfig.1.pod b/xCAT-client-2.0/pods/man1/rspconfig.1.pod index 55c076b7c..649212761 100644 --- a/xCAT-client-2.0/pods/man1/rspconfig.1.pod +++ b/xCAT-client-2.0/pods/man1/rspconfig.1.pod @@ -4,9 +4,7 @@ B - remote power control of nodes =head1 SYNOPSIS -B I {B|B|B|B} - -B I {B|B|B|B} +B I {B|B|B} B I B={B|B|B|B} @@ -14,10 +12,22 @@ B I B=I B I B={B|I} -B I B=I