From 33882e7aa9eb9b9295a972913fcaf7968738c4cb Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Tue, 4 Nov 2008 01:45:46 +0000 Subject: [PATCH] git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2459 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/PPCvm.pm | 19 +++++++++++++++---- perl-xCAT/xCAT/Usage.pm | 8 ++++++-- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/perl-xCAT/xCAT/PPCvm.pm b/perl-xCAT/xCAT/PPCvm.pm index e32982f09..55738fca0 100644 --- a/perl-xCAT/xCAT/PPCvm.pm +++ b/perl-xCAT/xCAT/PPCvm.pm @@ -284,7 +284,7 @@ sub lsvm_parse_args { $Getopt::Long::ignorecase = 0; Getopt::Long::Configure( "bundling" ); - if ( !GetOptions( \%opt, qw(V|verbose) )) { + if ( !GetOptions( \%opt, qw(V|verbose a|all) )) { return( usage() ); } #################################### @@ -772,6 +772,7 @@ sub list { my $request = shift; my $hash = shift; my $exp = shift; + my $args = $request->{opt}; my @values = (); my @lpars = (); my $result; @@ -846,10 +847,20 @@ sub list { next; } ################################# - # List LPAR profile + # List the default LPAR profile, + # or all the profiles if option + # -a|--all is assigned ################################# - $pprofile .= "@$prof[0]\n\n"; - } + if (exists( $args->{a} )) { + my $count = 0; + foreach (@$prof) { + $pprofile .= "@$prof[$count]\n\n"; + $count++; + } + } else { + $pprofile .= "@$prof[0]\n\n"; + } + } push @values, [$lpar, $pprofile, SUCCESS]; } } diff --git a/perl-xCAT/xCAT/Usage.pm b/perl-xCAT/xCAT/Usage.pm index bf806297a..9e62e162e 100644 --- a/perl-xCAT/xCAT/Usage.pm +++ b/perl-xCAT/xCAT/Usage.pm @@ -102,8 +102,12 @@ my %usage = ( mkvm srccec -c destcec [-V|--verbose] mkvm [-h|--help|-v|--version]", "lsvm" => -"Usage: lsvm [-V|--verbose] - lsvm [-h|--help|-v|--version]", +"Usage: + Common: + lsvm [-V|--verbose] + lsvm [-h|--help|-v|--version] + PPC specific: + lsvm [-a|--all]", "chvm" => "Usage: chvm [-p profile][-V|--verbose] chvm [-h|--help|-v|--version]",