diff options
Diffstat (limited to 'installer/OpenSLX/OSExport/BlockDevice')
-rw-r--r-- | installer/OpenSLX/OSExport/BlockDevice/AoE.pm | 72 | ||||
-rw-r--r-- | installer/OpenSLX/OSExport/BlockDevice/Base.pm | 6 | ||||
-rw-r--r-- | installer/OpenSLX/OSExport/BlockDevice/DNBD2.pm | 78 | ||||
-rw-r--r-- | installer/OpenSLX/OSExport/BlockDevice/NBD.pm | 70 |
4 files changed, 113 insertions, 113 deletions
diff --git a/installer/OpenSLX/OSExport/BlockDevice/AoE.pm b/installer/OpenSLX/OSExport/BlockDevice/AoE.pm index 9a7450f5..d3916d6a 100644 --- a/installer/OpenSLX/OSExport/BlockDevice/AoE.pm +++ b/installer/OpenSLX/OSExport/BlockDevice/AoE.pm @@ -9,8 +9,8 @@ # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- # AoE.pm -# - provides ATA-over-Ethernet specific overrides of the -# OpenSLX::OSExport::BlockDevice API. +# - provides ATA-over-Ethernet specific overrides of the +# OpenSLX::OSExport::BlockDevice API. # ----------------------------------------------------------------------------- package OpenSLX::OSExport::BlockDevice::AoE; @@ -36,71 +36,71 @@ use OpenSLX::Utils; ################################################################################ sub new { - my $class = shift; - my $self = {'name' => 'aoe',}; - return bless $self, $class; + my $class = shift; + my $self = {'name' => 'aoe',}; + return bless $self, $class; } sub initialize { - my $self = shift; - my $engine = shift; - my $fs = shift; + my $self = shift; + my $engine = shift; + my $fs = shift; - $self->{'engine'} = $engine; - $self->{'fs'} = $fs; - return; + $self->{'engine'} = $engine; + $self->{'fs'} = $fs; + return; } sub getExportPort { - my $self = shift; - my $openslxDB = shift; + my $self = shift; + my $openslxDB = shift; - return $openslxDB->incrementGlobalCounter('next-nbd-server-port'); + return $openslxDB->incrementGlobalCounter('next-nbd-server-port'); } sub generateExportURI { - my $self = shift; - my $export = shift; + my $self = shift; + my $export = shift; - my $serverIP = $export->{server_ip} || ''; - my $server - = length($serverIP) ? $serverIP : generatePlaceholderFor('serverip'); - $server .= ":$export->{port}" if length($export->{port}); + my $serverIP = $export->{server_ip} || ''; + my $server + = length($serverIP) ? $serverIP : generatePlaceholderFor('serverip'); + $server .= ":$export->{port}" if length($export->{port}); - return "aoe://$server"; + return "aoe://$server"; } sub requiredBlockDeviceModules { - my $self = shift; + my $self = shift; - return qw( aoe ); + return qw( aoe ); } sub requiredBlockDeviceTools { - my $self = shift; + my $self = shift; - # TODO: is there any such tool? + # TODO: is there any such tool? - return; + return; } sub showExportConfigInfo { - my $self = shift; - my $export = shift; - - print(('#' x 80) . "\n"); - print _tr( - "Please make sure you start a corresponding aoe-server:\n\t%s\n", - "... (don't know how this is done yet)" - ); - print(('#' x 80) . "\n"); - return; + my $self = shift; + my $export = shift; + + print(('#' x 80) . "\n"); + print _tr( + "Please make sure you start a corresponding aoe-server:\n\t%s\n", + "... (don't know how this is done yet)" + ); + print(('#' x 80) . "\n"); + return; } 1; diff --git a/installer/OpenSLX/OSExport/BlockDevice/Base.pm b/installer/OpenSLX/OSExport/BlockDevice/Base.pm index 80868a80..d2395e30 100644 --- a/installer/OpenSLX/OSExport/BlockDevice/Base.pm +++ b/installer/OpenSLX/OSExport/BlockDevice/Base.pm @@ -9,14 +9,14 @@ # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- # Base.pm -# - provides empty base of the OpenSLX OSExport::BlockDevice API. +# - provides empty base of the OpenSLX OSExport::BlockDevice API. # ----------------------------------------------------------------------------- package OpenSLX::OSExport::BlockDevice::Base; use strict; use warnings; -our $VERSION = 1.01; # API-version . implementation-version +our $VERSION = 1.01; # API-version . implementation-version use OpenSLX::Basics; @@ -25,7 +25,7 @@ use OpenSLX::Basics; ################################################################################ sub new { - confess "Creating OpenSLX::OSExport::BlockDevice::Base-objects directly makes no sense!"; + confess "Creating OpenSLX::OSExport::BlockDevice::Base-objects directly makes no sense!"; } sub initialize diff --git a/installer/OpenSLX/OSExport/BlockDevice/DNBD2.pm b/installer/OpenSLX/OSExport/BlockDevice/DNBD2.pm index 8cd20904..8dcc340b 100644 --- a/installer/OpenSLX/OSExport/BlockDevice/DNBD2.pm +++ b/installer/OpenSLX/OSExport/BlockDevice/DNBD2.pm @@ -9,8 +9,8 @@ # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- # DNBD2.pm -# - provides DNBD2+Squashfs-specific overrides of the -# OpenSLX::OSExport::BlockDevice API. +# - provides DNBD2+Squashfs-specific overrides of the +# OpenSLX::OSExport::BlockDevice API. # ----------------------------------------------------------------------------- package OpenSLX::OSExport::BlockDevice::DNBD2; @@ -30,73 +30,73 @@ use OpenSLX::Utils; ################################################################################ sub new { - my $class = shift; - my $self = {'name' => 'dnbd2',}; - return bless $self, $class; + my $class = shift; + my $self = {'name' => 'dnbd2',}; + return bless $self, $class; } sub initialize { - my $self = shift; - my $engine = shift; - my $fs = shift; + my $self = shift; + my $engine = shift; + my $fs = shift; - $self->{'engine'} = $engine; - $self->{'fs'} = $fs; - return; + $self->{'engine'} = $engine; + $self->{'fs'} = $fs; + return; } sub getExportPort { - my $self = shift; - my $openslxDB = shift; + my $self = shift; + my $openslxDB = shift; - return $openslxDB->incrementGlobalCounter('next-nbd-server-port'); + return $openslxDB->incrementGlobalCounter('next-nbd-server-port'); } sub generateExportURI { - my $self = shift; - my $export = shift; + my $self = shift; + my $export = shift; - my $serverIP = $export->{server_ip} || ''; - my $server - = length($serverIP) ? $serverIP : generatePlaceholderFor('serverip'); - $server .= ":$export->{port}" if length($export->{port}); + my $serverIP = $export->{server_ip} || ''; + my $server + = length($serverIP) ? $serverIP : generatePlaceholderFor('serverip'); + $server .= ":$export->{port}" if length($export->{port}); - return "dnbd2://$server"; + return "dnbd2://$server"; } sub requiredBlockDeviceModules { - my $self = shift; + my $self = shift; - return qw( dnbd2 ); + return qw( dnbd2 ); } sub requiredBlockDeviceTools { - my $self = shift; + my $self = shift; - return qw( ); + return qw( ); } sub showExportConfigInfo { - my $self = shift; - my $export = shift; - - print '#' x 80 , "\n", - _tr( - "Please make sure you start a corresponding dnbd2-server:\n\t%s\n", - "dnbd2-server /etc/dnbd2/server.conf\n" - ), - "Create or modify a config file like /etc/dnbd2/server.conf, looking like:", - "<server>\n", - "$export->{port}\n", - "$self->{fs}->{'export-path'}\n", - '#' x 80, "\n"; - return; + my $self = shift; + my $export = shift; + + print '#' x 80 , "\n", + _tr( + "Please make sure you start a corresponding dnbd2-server:\n\t%s\n", + "dnbd2-server /etc/dnbd2/server.conf\n" + ), + "Create or modify a config file like /etc/dnbd2/server.conf, looking like:", + "<server>\n", + "$export->{port}\n", + "$self->{fs}->{'export-path'}\n", + '#' x 80, "\n"; + return; } 1; diff --git a/installer/OpenSLX/OSExport/BlockDevice/NBD.pm b/installer/OpenSLX/OSExport/BlockDevice/NBD.pm index fff4b024..73694fbc 100644 --- a/installer/OpenSLX/OSExport/BlockDevice/NBD.pm +++ b/installer/OpenSLX/OSExport/BlockDevice/NBD.pm @@ -9,8 +9,8 @@ # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- # NBD.pm -# - provides NBD+Squashfs-specific overrides of the -# OpenSLX::OSExport::BlockDevice API. +# - provides NBD+Squashfs-specific overrides of the +# OpenSLX::OSExport::BlockDevice API. # ----------------------------------------------------------------------------- package OpenSLX::OSExport::BlockDevice::NBD; @@ -30,69 +30,69 @@ use OpenSLX::Utils; ################################################################################ sub new { - my $class = shift; - my $self = {'name' => 'nbd',}; - return bless $self, $class; + my $class = shift; + my $self = {'name' => 'nbd',}; + return bless $self, $class; } sub initialize { - my $self = shift; - my $engine = shift; - my $fs = shift; + my $self = shift; + my $engine = shift; + my $fs = shift; - $self->{'engine'} = $engine; - $self->{'fs'} = $fs; - return; + $self->{'engine'} = $engine; + $self->{'fs'} = $fs; + return; } sub getExportPort { - my $self = shift; - my $openslxDB = shift; + my $self = shift; + my $openslxDB = shift; - return $openslxDB->incrementGlobalCounter('next-nbd-server-port'); + return $openslxDB->incrementGlobalCounter('next-nbd-server-port'); } sub generateExportURI { - my $self = shift; - my $export = shift; + my $self = shift; + my $export = shift; - my $serverIP = $export->{server_ip} || ''; - my $server - = length($serverIP) ? $serverIP : generatePlaceholderFor('serverip'); - $server .= ":$export->{port}" if length($export->{port}); + my $serverIP = $export->{server_ip} || ''; + my $server + = length($serverIP) ? $serverIP : generatePlaceholderFor('serverip'); + $server .= ":$export->{port}" if length($export->{port}); - return "nbd://$server"; + return "nbd://$server"; } sub requiredBlockDeviceModules { - my $self = shift; + my $self = shift; - return qw( nbd ); + return qw( nbd ); } sub requiredBlockDeviceTools { - my $self = shift; + my $self = shift; - return qw( nbd-client ); + return qw( nbd-client ); } sub showExportConfigInfo { - my $self = shift; - my $export = shift; - - print(('#' x 80) . "\n"); - print _tr( - "Please make sure you start a corresponding nbd-server:\n\t%s\n", - "nbd-server $export->{port} $self->{fs}->{'export-path'} -r" - ); - print(('#' x 80) . "\n"); - return; + my $self = shift; + my $export = shift; + + print(('#' x 80) . "\n"); + print _tr( + "Please make sure you start a corresponding nbd-server:\n\t%s\n", + "nbd-server $export->{port} $self->{fs}->{'export-path'} -r" + ); + print(('#' x 80) . "\n"); + return; } 1; |