summaryrefslogtreecommitdiffstats
path: root/config-db/slxconfig
diff options
context:
space:
mode:
authorOliver Tappe2008-05-24 18:25:22 +0200
committerOliver Tappe2008-05-24 18:25:22 +0200
commitda7455266023274dd1aca1fb9854a6bbe8985f67 (patch)
tree4df4005fe5fddc52fc9ffd315fa1664b2827d91b /config-db/slxconfig
parent* fixed a problem with a failing child process passing the death gate by thro... (diff)
downloadcore-da7455266023274dd1aca1fb9854a6bbe8985f67.tar.gz
core-da7455266023274dd1aca1fb9854a6bbe8985f67.tar.xz
core-da7455266023274dd1aca1fb9854a6bbe8985f67.zip
* heavily redesigned and improved the checking of attributes: instead of dying
on the first error, we now collect all errors and return them. The caller can now decide what to do - die or just print a warning or whatever. * slxconfig now dies with the list of all attribute problems if there were any * slxconfig-demuxer prints warnings for all attribute problems that were found (checking for each system & client in turn) * adjusted desktop plugin to API changes concerning the attribute checks git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1796 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db/slxconfig')
-rwxr-xr-xconfig-db/slxconfig16
1 files changed, 14 insertions, 2 deletions
diff --git a/config-db/slxconfig b/config-db/slxconfig
index d4656e5e..02029a81 100755
--- a/config-db/slxconfig
+++ b/config-db/slxconfig
@@ -269,12 +269,24 @@ sub checkGivenStage3Attrs
my $stage3Attrs = shift;
my $vendorOSID = shift;
+ my $attrProblems;
+
if ($vendorOSID) {
my $vendorOS = $openslxDB->fetchVendorOSByID($vendorOSID);
- OpenSLX::AttributeRoster->checkValues($stage3Attrs, $vendorOS->{name});
+ my @installedPlugins = $openslxDB->fetchInstalledPlugins($vendorOSID);
+ $attrProblems = OpenSLX::AttributeRoster->findProblematicValues(
+ $stage3Attrs, $vendorOS->{name}, \@installedPlugins
+ );
}
else {
- OpenSLX::AttributeRoster->checkValues($stage3Attrs);
+ $attrProblems = OpenSLX::AttributeRoster->findProblematicValues(
+ $stage3Attrs
+ );
+ }
+
+ if ($attrProblems) {
+ my $complaint = join "\n", @$attrProblems;
+ die $complaint;
}
return 1;