summaryrefslogtreecommitdiffstats
path: root/installer/OpenSLX/OSExport/Engine.pm
diff options
context:
space:
mode:
authorOliver Tappe2007-05-07 18:07:15 +0200
committerOliver Tappe2007-05-07 18:07:15 +0200
commit47b886b5e1b7a00ae3fb4d0cf247eab0353161dd (patch)
tree1fa33d963536863ae61c650e22d2bc154c89281c /installer/OpenSLX/OSExport/Engine.pm
parent* moved instantiateClass() from OpenSLX::Utils to OpenSLX::Basics (diff)
downloadcore-47b886b5e1b7a00ae3fb4d0cf247eab0353161dd.tar.gz
core-47b886b5e1b7a00ae3fb4d0cf247eab0353161dd.tar.xz
core-47b886b5e1b7a00ae3fb4d0cf247eab0353161dd.zip
* reworked construction of export-URI to be delegated into the respective
exporter module, as a result, the NBD-URLs are now correct * added 'nbd' as an alias for the 'nbd-squash' export type git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1024 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer/OpenSLX/OSExport/Engine.pm')
-rw-r--r--installer/OpenSLX/OSExport/Engine.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/installer/OpenSLX/OSExport/Engine.pm b/installer/OpenSLX/OSExport/Engine.pm
index 77b21eaa..4ffae1a8 100644
--- a/installer/OpenSLX/OSExport/Engine.pm
+++ b/installer/OpenSLX/OSExport/Engine.pm
@@ -39,6 +39,10 @@ use vars qw(%supportedExportTypes %supportedDistros);
=> { module => 'NBD_Squash' },
);
+my %aliasedExportTypes = (
+ 'nbd' => 'nbd-squash',
+);
+
%supportedDistros = (
'<any>'
=> { module => 'Any' },
@@ -158,6 +162,14 @@ sub purgeExport
$self->removeExportFromConfigDB();
}
+sub generateExportURI
+{
+ my $self = shift;
+ my $export = shift;
+
+ return $self->{exporter}->generateExportURI($export);
+}
+
sub requiredFSMods
{
my $self = shift;
@@ -176,6 +188,9 @@ sub _initialize
my $exportName = shift;
my $exportType = lc(shift);
+ if (exists $aliasedExportTypes{lc($exportType)}) {
+ $exportType = $aliasedExportTypes{lc($exportType)};
+ }
if (!exists $supportedExportTypes{lc($exportType)}) {
print _tr("Sorry, export type '%s' is unsupported.\n", $exportType);
print _tr("List of supported export types:\n\t");