summaryrefslogtreecommitdiffstats
path: root/os-plugins/OpenSLX/OSPlugin/Engine.pm
diff options
context:
space:
mode:
authorOliver Tappe2008-05-22 22:01:34 +0200
committerOliver Tappe2008-05-22 22:01:34 +0200
commit2a614b1103699d60e7e2999030d64e2adc9a6955 (patch)
tree0e0ffd2962e5835f08e3749d258cd36d9e3a7a79 /os-plugins/OpenSLX/OSPlugin/Engine.pm
parent* supress lib error while giving vmware its own font config (diff)
downloadcore-2a614b1103699d60e7e2999030d64e2adc9a6955.tar.gz
core-2a614b1103699d60e7e2999030d64e2adc9a6955.tar.xz
core-2a614b1103699d60e7e2999030d64e2adc9a6955.zip
* attributes set via slxconfig are now being checked not only against the respective
regex, but the corresponding plugin is being invoked to do a check of its own, too (where it has the chance to look at the vendor-OS attributes and determine the possible stage3-values from their state). * listing a vendor-OS in verbose mode now shows the vendor-OS attributes (stage1 & stage3), too * used Clone::clone instead of Storable::dclone since the latter is not capable of cloning compiled regexes git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1783 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/OpenSLX/OSPlugin/Engine.pm')
-rw-r--r--os-plugins/OpenSLX/OSPlugin/Engine.pm40
1 files changed, 39 insertions, 1 deletions
diff --git a/os-plugins/OpenSLX/OSPlugin/Engine.pm b/os-plugins/OpenSLX/OSPlugin/Engine.pm
index 0672aa5e..ada0af79 100644
--- a/os-plugins/OpenSLX/OSPlugin/Engine.pm
+++ b/os-plugins/OpenSLX/OSPlugin/Engine.pm
@@ -126,6 +126,7 @@ sub initialize
? $dbAttrs->{$attrName}
: $defaultAttrs->{$attrName}->{default};
}
+ $self->{'vendorOS-attrs'} = $dbAttrs;
}
return 1;
@@ -377,7 +378,6 @@ sub getInstallablePackagesForSelection
);
}
-
=item installPackages($packages)
Installs the given packages into the vendor-OS.
@@ -447,6 +447,44 @@ sub removePackages
=back
+=head2 Driver Interface
+
+The following methods are invoked by the slxos-plugin script in order to
+install/remove a plugin into/from a vendor-OS:
+
+=over
+
+=item checkStage3AttrValues()
+
+Checks if the stage3 values given in B<$stage3Attrs> are allowed and make sense.
+
+If all values are ok, this method returns 1 - if not, it dies with an
+appropriate message.
+
+This method chroots into the vendor-OS and then asks the plugin itself to check
+the attributes.
+
+=cut
+
+sub checkStage3AttrValues
+{
+ my $self = shift;
+ my $stage3Attrs = shift;
+
+ $self->_callChrootedFunctionForPlugin(
+ sub {
+ # let plugin check by itself
+ $self->{plugin}->checkStage3AttrValues(
+ $stage3Attrs, $self->{'vendorOS-attrs'}
+ );
+ }
+ );
+
+ return 1;
+}
+
+=back
+
=cut
sub _loadPlugin