diff options
-rwxr-xr-x | config-db/slxconfig | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/config-db/slxconfig b/config-db/slxconfig index 3d9eba0a..66a77d15 100755 --- a/config-db/slxconfig +++ b/config-db/slxconfig @@ -102,9 +102,6 @@ elsif ($action =~ m[^cleanup-db]i) { cleanupConfigDB(@ARGV); } elsif ($action =~ m[^list-a]) { - print @ARGV - ? _tr("List of known attributes for scope '%s':\n", $ARGV[0]) - : _tr("List of known attributes:\n"); listAttributes(@ARGV); } elsif ($action =~ m[^list-c]) { @@ -389,9 +386,23 @@ sub dumpElements sub listAttributes { - my $scope = shift; + my $attrSpec = shift; - my $attrInfo = OpenSLX::AttributeRoster->getAttrInfo( { scope => $scope } ); + my $listHeader = _tr("List of known attributes:\n"); + my $attrInfo + = OpenSLX::AttributeRoster->getAttrInfo( { scope => $attrSpec } ); + if ($attrInfo && keys %$attrInfo) { + $listHeader + = _tr("List of known attributes for scope '%s':\n", $attrSpec); + } + else { + $attrInfo = + OpenSLX::AttributeRoster->getAttrInfo( { name => $attrSpec } ); + $listHeader = _tr("Details for attribute '%s':\n", $attrSpec); + $option{verbose} = 1; + } + + print $listHeader; dumpElements( 'attribute', undef, map { @@ -1507,9 +1518,10 @@ You should only invoke this if you are a developer and have removed one or more plugins from the repository and would like to get rid of the left-overs in your local DB. -=item B<< list-attributes [<attr-scope>] >> +=item B<< list-attributes [<attr-scope-or-attr-name>] >> -lists all attributes or the one with the given name +lists all attributes, the ones in the given scope or the one with the given +name =item B<< list-client [<client-name>] >> |