diff options
author | Oliver Tappe | 2008-03-17 23:24:15 +0100 |
---|---|---|
committer | Oliver Tappe | 2008-03-17 23:24:15 +0100 |
commit | 480019c4ae2bb212aa0af065d77d169fa6550598 (patch) | |
tree | 395789f95dffa98b679228aa6b9e751208037045 /config-db/slxconfig-demuxer | |
parent | * fixed bug in addAllStage3AttributesToHash() - the actual filtering was missing (diff) | |
download | core-480019c4ae2bb212aa0af065d77d169fa6550598.tar.gz core-480019c4ae2bb212aa0af065d77d169fa6550598.tar.xz core-480019c4ae2bb212aa0af065d77d169fa6550598.zip |
* fixed several bugs in the config-demuxer caused by recent changes in plugin
code (the way plugin info is returned from DB)
* Added support to mergeDefaultAttributesIntoSystem() for merging in attributes
that are stored in the installed plugins of the corresponding vendor-OS.
The new order for system attribute selection is:
1. default client
2. specific system
3. vendor-OS (plugin attributes only)
4. default system
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1648 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db/slxconfig-demuxer')
-rwxr-xr-x | config-db/slxconfig-demuxer | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/config-db/slxconfig-demuxer b/config-db/slxconfig-demuxer index bc1c23be..03d2ca2e 100755 --- a/config-db/slxconfig-demuxer +++ b/config-db/slxconfig-demuxer @@ -668,7 +668,8 @@ sub writePluginConfigurationsForSystem my $attrs = $info->{attrs} || {}; my @activePlugins; - foreach my $pluginName (@{$info->{'installed-plugins'}}) { + foreach my $pluginInfo (@{$info->{'installed-plugins'}}) { + my $pluginName = $pluginInfo->{plugin_name}; vlog(2, _tr("checking configuration of plugin '%s'", $pluginName)); # skip inactive plugins @@ -686,7 +687,9 @@ sub writePluginConfigurationsForSystem my @pluginAttrs = grep { $_ =~ m{^${pluginName}::} } keys %$attrs; foreach my $attr (sort @pluginAttrs) { my $attrVal = $attrs->{$attr}; - next if !defined $attrVal; + if (!defined $attrVal) { + $attrVal = ''; + } my $attrName = substr($attr, index($attr, '::')+2); $content .= qq[${pluginName}_$attrName="$attrVal"\n]; } @@ -721,7 +724,9 @@ sub writeSystemConfiguration my $buildPath = "$tempPath/build"; copyExternalSystemConfig(externalIDForSystem($info), $buildPath); - $openslxDB->mergeDefaultAttributesIntoSystem($info); + $openslxDB->mergeDefaultAttributesIntoSystem( + $info, $info->{'installed-plugins'} + ); $info->{'attr-digest'} = digestAttributes($info); vlog( 2, |