diff options
author | Oliver Tappe | 2007-03-16 23:38:07 +0100 |
---|---|---|
committer | Oliver Tappe | 2007-03-16 23:38:07 +0100 |
commit | 8d7793b86e27824d14ba454377e839939f499008 (patch) | |
tree | 04e9aeabab1def58b4872006843ad5f4cbb9becc /config-db | |
parent | * changed option to list supported export types from '--list' to '--list-types' (diff) | |
download | core-8d7793b86e27824d14ba454377e839939f499008.tar.gz core-8d7793b86e27824d14ba454377e839939f499008.tar.xz core-8d7793b86e27824d14ba454377e839939f499008.zip |
* added the options '--list-clients', '--list-exports', '--list-systems' and
'--list-vendor-oses' which trigger a list of the respective objects that as defined
in the config-DB.
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@778 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db')
-rwxr-xr-x | config-db/slxconfig | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/config-db/slxconfig b/config-db/slxconfig index 6e2b7c72..cd87e0f9 100755 --- a/config-db/slxconfig +++ b/config-db/slxconfig @@ -33,6 +33,10 @@ use OpenSLX::DBSchema; my ( $helpReq, + $listClientsReq, + $listExportsReq, + $listSystemsReq, + $listVendorOSesReq, $manReq, $verbose, $versionReq, @@ -40,6 +44,10 @@ my ( GetOptions( 'help|?' => \$helpReq, + 'list-clients' => \$listClientsReq, + 'list-exports' => \$listExportsReq, + 'list-systems' => \$listSystemsReq, + 'list-vendor-oses' => \$listVendorOSesReq, 'man' => \$manReq, 'verbose' => \$verbose, 'version' => \$versionReq, @@ -56,6 +64,40 @@ openslxInit(); my $openslxDB = OpenSLX::ConfigDB->new(); $openslxDB->connect(); +if ($listClientsReq) { + print _tr("List of the clients defined in config-DB:\n"); + print join('', map { "\t$_->{name}\n" } +# grep { $_->{id} > 0 } + sort { $a->{name} cmp $b->{name} } + $openslxDB->fetchClientByFilter()); + exit 1; +} + +if ($listExportsReq) { + print _tr("List of the exports defined in config-DB:\n"); + print join('', map { "\t$_->{name}\n" } + sort { $a->{name} cmp $b->{name} } + $openslxDB->fetchExportByFilter()); + exit 1; +} + +if ($listSystemsReq) { + print _tr("List of the systems defined in config-DB:\n"); + print join('', map { "\t$_->{name}\n" } +# grep { $_->{id} > 0 } + sort { $a->{name} cmp $b->{name} } + $openslxDB->fetchSystemByFilter()); + exit 1; +} + +if ($listVendorOSesReq) { + print _tr("List of the vendor-OSes defined in config-DB:\n"); + print join('', map { "\t$_->{name}\n" } + sort { $a->{name} cmp $b->{name} } + $openslxDB->fetchVendorOSByFilter()); + exit 1; +} + my $action = shift @ARGV; if ($action =~ m[^add-system$]i) { addSystemToConfigDB(@ARGV); |