From 4a799bb3317d5946c37a67d0ddd2c1001b9390e6 Mon Sep 17 00:00:00 2001 From: bxuxa Date: Tue, 18 Dec 2018 15:59:40 +0800 Subject: [PATCH] Make lsdef -z could display all attribute by default(#5241) --- .../guides/admin-guides/references/man1/lsdef.1.rst | 8 ++++---- xCAT-client/pods/man1/lsdef.1.pod | 10 +++++----- xCAT-server/lib/xcat/plugins/DBobjectdefs.pm | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/source/guides/admin-guides/references/man1/lsdef.1.rst b/docs/source/guides/admin-guides/references/man1/lsdef.1.rst index e5585d61b..9723d3e33 100644 --- a/docs/source/guides/admin-guides/references/man1/lsdef.1.rst +++ b/docs/source/guides/admin-guides/references/man1/lsdef.1.rst @@ -21,13 +21,13 @@ SYNOPSIS \ **lsdef**\ [\ **-h | -**\ **-help**\ ] [\ **-t**\ \ *object-types*\ ] [\ **-i**\ \ *attr-list*\ ] -\ **lsdef**\ [\ **-V | -**\ **-verbose**\ ] [\ **-l | -**\ **-long**\ ] [\ **-s | -**\ **-short**\ ] [\ **-a | -**\ **-all**\ ] [\ **-S**\ ] -[\ **-t**\ \ *object-types*\ ] [\ **-o**\ \ *object-names*\ ] [\ **-z | -**\ **-stanza**\ ] [\ **-i**\ \ *attr-list*\ ] +\ **lsdef**\ [\ **-V | -**\ **-verbose**\ ] [\ **-a | -**\ **-all**\ ] [\ **-S**\ ] +[\ **-t**\ \ *object-types*\ ] [\ **-o**\ \ *object-names*\ ] [\ **-z | -**\ **-stanza**\ ] [\ [\ **-i**\ \ *attr-list*\] | [\ **-l | -**\ **-long**\ ] | [\ **-s | -**\ **-short**\ ]] [\ **-c | -**\ **-compress**\ ] [\ **-**\ **-osimage**\ ] [\ **-**\ **-nics**\ ] [[\ **-w**\ \ *attr*\ ==\ *val*\ ] [\ **-w**\ \ *attr*\ =~\ *val*\ ] ...] [\ *noderange*\ ] -\ **lsdef**\ [\ **-l | -**\ **-long**\ ] [\ **-a | -**\ **-all**\ ] [\ **-t**\ \ *object-types*\ ] [\ **-z | -**\ **-stanza**\ ] -[\ **-i**\ \ *attr-list*\ ] [\ **-**\ **-template**\ [\ *template-object-name*\ ]] +\ **lsdef**\ [\ **-a | -**\ **-all**\ ] [\ **-t**\ \ *object-types*\ ] [\ **-z | -**\ **-stanza**\ ] +[\ [\ **-i**\ \ *attr-list*\] | [\ **-l | -**\ **-long**\ ] | [\ **-s | -**\ **-short**\ ]] [\ **-**\ **-template**\ [\ *template-object-name*\ ]] *********** diff --git a/xCAT-client/pods/man1/lsdef.1.pod b/xCAT-client/pods/man1/lsdef.1.pod index ac677d0f1..65d4e720b 100644 --- a/xCAT-client/pods/man1/lsdef.1.pod +++ b/xCAT-client/pods/man1/lsdef.1.pod @@ -6,13 +6,13 @@ B - Use this command to list xCAT data object definitions. B [B<-h>|B<--help>] [B<-t> I] [B<-i> I] -B [B<-V>|B<--verbose>] [B<-l>|B<--long>] [B<-s>|B<--short>] [B<-a>|B<--all>] [B<-S>] -[B<-t> I] [B<-o> I] [B<-z>|B<--stanza>] [B<-i> I] +B [B<-V>|B<--verbose>] [B<-a>|B<--all>] [B<-S>] +[B<-t> I] [B<-o> I] [B<-z>|B<--stanza>] [B<-i> I | [B<-l>|B<--long>] | [B<-s>|B<--short>]] [B<-c>|B<--compress>] [B<--osimage>] [B<--nics>] [[B<-w> I==I] [B<-w> I=~I] ...] [I] -B [B<-l>|B<--long>] [B<-a>|B<--all>] [B<-t> I] [B<-z>|B<--stanza>] -[B<-i> I] [B<--template> [I]] +B [B<-a>|B<--all>] [B<-t> I] [B<-z>|B<--stanza>] +[B<-i> I | [B<-l>|B<--long>] | [B<-s>|B<--short>]] [B<--template> [I]] =head1 DESCRIPTION @@ -99,7 +99,7 @@ Note: if the "val" fields includes spaces or any other characters that will be p =item B<-z|--stanza> -Display output in stanza format. See the xcatstanzafile man page for details on using xCAT stanza files. +Display output in stanza format. See the xcatstanzafile man page for details on using xCAT stanza files. And default is to list complete object definition, use B<-i> to specify the attribute scope. =back diff --git a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm index 2ac532e15..9b3a3fe34 100755 --- a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm @@ -3274,7 +3274,7 @@ sub defls # do we want just the object names or all the attr=val - if ($::opt_l || @::noderange || $::opt_o || $::opt_i || $::opt_template) + if ($::opt_l || @::noderange || $::opt_o || $::opt_i || $::opt_z || $::opt_template) { # assume we want the the details - not just the names @@ -3297,7 +3297,7 @@ sub defls # is -i then just get the ones in the list $::ATTRLIST = $::opt_i; - } elsif (@::noderange || $::opt_o) { + } elsif (@::noderange || $::opt_o || $::opt_z) { # if they gave a list of objects then they must want more # than the object names!