summaryrefslogtreecommitdiffstats
path: root/installer/OpenSLX/OSExport/BlockDevice/NBD.pm
diff options
context:
space:
mode:
authorOliver Tappe2008-03-20 01:04:16 +0100
committerOliver Tappe2008-03-20 01:04:16 +0100
commita0ce0340d0f95514008cfac751fe58748bbadd88 (patch)
tree844bb9e015f2fbcd83de54c3a63dd027b1218211 /installer/OpenSLX/OSExport/BlockDevice/NBD.pm
parent* fixed several bugs with respect to the listing of plugins (as part of a system (diff)
downloadcore-a0ce0340d0f95514008cfac751fe58748bbadd88.tar.gz
core-a0ce0340d0f95514008cfac751fe58748bbadd88.tar.xz
core-a0ce0340d0f95514008cfac751fe58748bbadd88.zip
* Switched indent used in Perl-code and settings files from tabs to 4 spaces.
May need some manual corrections here and there, but should basically be ok. git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1658 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer/OpenSLX/OSExport/BlockDevice/NBD.pm')
-rw-r--r--installer/OpenSLX/OSExport/BlockDevice/NBD.pm70
1 files changed, 35 insertions, 35 deletions
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;