From beab72fc0ec3a6d857f4c64e3d08dcbf9c457c61 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Tue, 20 May 2008 13:26:55 +0000 Subject: * added support to slxconfig for checking the given attribute values against their respective regex, an appropriate complaint is shown if the value doesn't match git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1778 95ad53e4-c205-0410-b2fa-d234c58c8868 --- config-db/slxconfig | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'config-db') diff --git a/config-db/slxconfig b/config-db/slxconfig index cd3b3ec2..c8c05093 100755 --- a/config-db/slxconfig +++ b/config-db/slxconfig @@ -39,6 +39,7 @@ use OpenSLX::AttributeRoster; use OpenSLX::Basics; use OpenSLX::ConfigDB; use OpenSLX::ConfigFolder; +use OpenSLX::OSPlugin::Roster; use OpenSLX::Utils; my %option; @@ -247,6 +248,12 @@ sub parseKeyValueArgsWithAttrs if (grep { $_ eq $key } @$allowedKeys) { $dataHash{$key} = $value; } elsif (grep { $_ eq $key } @$allowedAttrKeys) { + $key =~ m{^(.+)::.+?$}; + my $pluginName = $1; + my $plugin + = OpenSLX::OSPlugin::Roster->getPlugin($pluginName) + || die _tr('unable to load plugin "%s"', $pluginName); + $plugin->checkValueForKey($key, $value); $attrHash{$key} = $value; } else { die _tr("unknown key '%s' specified for %s\n", $key, $table); -- cgit v1.2.3-55-g7522