diff --git a/perl-xCAT/xCAT/FSPinv.pm b/perl-xCAT/xCAT/FSPinv.pm index d26349fe8..7fbdd7e0f 100644 --- a/perl-xCAT/xCAT/FSPinv.pm +++ b/perl-xCAT/xCAT/FSPinv.pm @@ -66,7 +66,7 @@ sub parse_args { $Getopt::Long::ignorecase = 0; Getopt::Long::Configure( "bundling" ); - if ( !GetOptions( \%opt, qw(V|Verbose) )) { + if ( !GetOptions( \%opt, qw(V|Verbose x) )) { return( usage() ); } #################################### @@ -89,6 +89,9 @@ sub parse_args { if ( defined( $ARGV[0] )) { return(usage( "Invalid Argument: $ARGV[0]" )); } + if (exists($opt{x}) and $cmd !~ /^deconfig$/) { + return (usage("Option '-x' can't work with '$cmd'")); + } #################################### # Set method to invoke #################################### @@ -268,10 +271,13 @@ sub deconfig { $decfg = XMLin($data); }; if( $@ ) { - push @result,[$name, "Error: there are some unreadable XML data from the firmware. Please check with the data provider.", -1]; + push @result,[$name, "Error: there are some unreadable XML data from the firmware. It can't be parsed by 'xcatd'.", -1]; return (\@result); } - + if( exists($request->{opt}->{x})) { + push @result, [$name, "\n".$data, -1]; + next; + } #print "decfg"; #print Dumper($decfg); my $node = $decfg->{NODE}; diff --git a/perl-xCAT/xCAT/Usage.pm b/perl-xCAT/xCAT/Usage.pm index 45508f4a2..d34807438 100644 --- a/perl-xCAT/xCAT/Usage.pm +++ b/perl-xCAT/xCAT/Usage.pm @@ -69,7 +69,8 @@ my %usage = ( PPC specific(with HMC): rinv [bus|config|serial|model|firm|all] PPC specific(using Direct FSP Management): - rinv [firm|deconfig] + rinv [firm] + rinv [deconfig [-x]] Blade specific: rinv [mtm|serial|mac|bios|diag|mprom|mparom|firm|all] VMware specific: diff --git a/xCAT-client/pods/man1/rinv.1.pod b/xCAT-client/pods/man1/rinv.1.pod index 78c954238..4e1ad910e 100644 --- a/xCAT-client/pods/man1/rinv.1.pod +++ b/xCAT-client/pods/man1/rinv.1.pod @@ -16,7 +16,9 @@ B I {B|B|B|B|B|B} =head2 PPC (using Direct FSP Management) specific: -B I {B|B} +B I {B} + +B I {B [B<-x>]} =head2 Blade specific: @@ -66,6 +68,10 @@ Retrieves firmware versions. Retrieves deconfigured resources. Deconfigured resources are hw components (cpus, memory, etc.) that have failed so the firmware has automatically turned those components off. +=item B<-x> + +To output the information of deconfigured resources in XML format. + =item B Retrieves asset tag. Usually it's the MAC address of eth0. @@ -141,6 +147,21 @@ To retrieve all information available from blade node4, enter: =item * +To output the information of deconfigured resources in XML format for CEC cec01, enter: + + rinv cec01 deconfig -x + + cec01: + + IH + + U78A9.001.0123456-P1 + 800 + + + +=item * + To retrieve 'config' information from the HMC-managed LPAR node3, enter: rinv node3 config