From d21f29b5bf2e9e7b5a6ec5fa4b403a1d710c641a Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Mon, 21 Mar 2016 15:50:36 -0400 Subject: [PATCH] Fix bmcdiscover usage after code review - change the bmcpwd option to bmcpasswd --- .../references/man1/bmcdiscover.1.rst | 12 +++++++----- xCAT-client/pods/man1/bmcdiscover.1.pod | 6 ++++-- xCAT-server/lib/xcat/plugins/bmcdiscover.pm | 15 ++++++++------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst b/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst index 9ae7edee1..92c8ddda1 100644 --- a/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst +++ b/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst @@ -19,13 +19,15 @@ SYNOPSIS ******** -\ **bmcdiscover**\ [\ **-?**\ |\ **-h**\ |\ **--help**\ ] +\ **bmcdiscover**\ [\ **-? | -h | -**\ **-help**\ ] -\ **bmcdiscover**\ [\ **-v**\ |\ **--version**\ ] +\ **bmcdiscover**\ [\ **-v | -**\ **-version**\ ] -\ **bmcdiscover**\ [\ **-s**\ \ *scan_method*\ ] \ **--range**\ \ *ip_ranges*\ [\ **-z**\ ] [\ **-w**\ ] [\ **-t**\ ] +\ **bmcdiscover**\ [\ **-s**\ \ *scan_method*\ ] \ **-**\ **-range**\ \ *ip_ranges*\ [\ **-z**\ ] [\ **-w**\ ] [\ **-t**\ ] -\ **bmcdiscover**\ [\ **-i**\ |\ **--bmcip**\ ] \ *bmc_ip*\ [\ **-u**\ |\ **--bmcuser**\ ] \ *bmcusername*\ [\ **-p**\ |\ **--bmcpwd**\ ] \ *bmcpassword*\ (\ **-c**\ |\ **--check**\ |\ **--ipsource**\ ) +\ **bmcdiscover**\ {\ **-i | -**\ **-bmcip**\ } \ *bmc_ip*\ {\ **-u | -**\ **-bmcuser**\ } \ *bmc_username*\ {\ **-p | -**\ **-bmcpasswd**\ } \ *bmc_password*\ \ **-**\ **-check**\ + +\ **bmcdiscover**\ {\ **-i | -**\ **-bmcip**\ } \ *bmc_ip*\ {\ **-u | -**\ **-bmcuser**\ } \ *bmc_username*\ {\ **-p | -**\ **-bmcpasswd**\ } \ *bmc_password*\ \ **-**\ **-ipsource**\ *********** @@ -90,7 +92,7 @@ OPTIONS -\ **-p|-**\ **-bmcpwd**\ +\ **-p|-**\ **-bmcpasswd**\ BMC user password. diff --git a/xCAT-client/pods/man1/bmcdiscover.1.pod b/xCAT-client/pods/man1/bmcdiscover.1.pod index 93a1500db..f63a9edb2 100644 --- a/xCAT-client/pods/man1/bmcdiscover.1.pod +++ b/xCAT-client/pods/man1/bmcdiscover.1.pod @@ -10,7 +10,9 @@ B [B<-v>|B<--version>] B [B<-s> I] B<--range> I [B<-z>] [B<-w>] [B<-t>] -B [B<-i>|B<--bmcip>] I [B<-u>|B<--bmcuser>] I [B<-p>|B<--bmcpwd>] I (B<-c>|B<--check>|B<--ipsource>) +B {B<-i>|B<--bmcip>} I {B<-u>|B<--bmcuser>} I {B<-p>|B<--bmcpasswd>} I B<--check> + +B {B<-i>|B<--bmcip>} I {B<-u>|B<--bmcuser>} I {B<-p>|B<--bmcpasswd>} I B<--ipsource> =head1 DESCRIPTION @@ -55,7 +57,7 @@ BMC IP address. BMC user name. -=item B<-p|--bmcpwd> +=item B<-p|--bmcpasswd> BMC user password. diff --git a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm index 9667761b4..c76f9347c 100644 --- a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm @@ -110,11 +110,12 @@ sub process_request sub bmcdiscovery_usage { my $rsp; push @{ $rsp->{data} }, "\nbmcdiscover - Discover BMC (Baseboard Management Controller) using the specified scan method\n"; - push @{ $rsp->{data} }, "Usage:\tbmcdiscover [-?|-h|--help]"; + push @{ $rsp->{data} }, "Usage:"; + push @{ $rsp->{data} }, "\tbmcdiscover [-?|-h|--help]"; push @{ $rsp->{data} }, "\tbmcdiscover [-v|--version]"; push @{ $rsp->{data} }, "\tbmcdiscover [-s scan_method] --range ip_range [-z] [-w] [-t]"; - push @{ $rsp->{data} }, "\tbmcdiscover [-i|--bmcip] bmc_ip [-u|--bmcuser] bmcusername [-p|--bmcpwd] bmcpassword (-c | --check | --ipsource)"; - push @{ $rsp->{data} }, "\nFor more details see bmcdiscover(1)"; + push @{ $rsp->{data} }, "\tbmcdiscover {-i|--bmcip} bmc_ip {-u|--bmcuser} bmc_user {-p|--bmcpasswd} bmc_password --check"; + push @{ $rsp->{data} }, "\tbmcdiscover {-i|--bmcip} bmc_ip {-u|--bmcuser} bmc_user {-p|--bmcpasswd} bmc_password --ipsource"; xCAT::MsgUtils->message( "I", $rsp, $::CALLBACK ); return 0; @@ -156,9 +157,9 @@ sub bmcdiscovery_processargs { 'bmcip|i=s' => \$::opt_I, 'z' => \$::opt_Z, 'w' => \$::opt_W, - 'check|c' => \$::opt_C, + 'check' => \$::opt_C, 'bmcuser|u=s' => \$::opt_U, - 'bmcpwd|p=s' => \$::opt_P, + 'bmcpasswd|p=s' => \$::opt_P, 'ipsource' => \$::opt_S, 'version|v' => \$::opt_v, 't' => \$::opt_T, @@ -257,7 +258,7 @@ sub bmcdiscovery_processargs { if (!defined($::opt_I)) { $msg = "The check option requires a BMC IP. Specify the IP using the -i|--bmcip option."; } elsif (!defined($::opt_P)) { - $msg = "The check option requires a password. Specify the password with the -p|--bmcpwd option."; + $msg = "The check option requires a password. Specify the password with the -p|--bmcpasswd option."; } my $rsp = {}; push @{ $rsp->{data} }, "$msg"; @@ -280,7 +281,7 @@ sub bmcdiscovery_processargs { if (!defined($::opt_I)) { $msg = "The ipsource option requires a BMC IP. Specify the IP using the -i|--bmcip option."; } elsif (!defined($::opt_P)) { - $msg = "The ipsource option requires a password. Specify the password with the -p|--bmcpwd option."; + $msg = "The ipsource option requires a password. Specify the password with the -p|--bmcpasswd option."; } my $rsp = {}; push @{ $rsp->{data} }, "$msg";