Skip to content

Commit

Permalink
reorder functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Rousse authored and Guillaume Rousse committed Feb 23, 2012
1 parent 6dae477 commit 8a69123
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions lib/FusionInventory/Agent/Task/Inventory/Input/AIX/LVM.pm
Expand Up @@ -2,9 +2,7 @@ package FusionInventory::Agent::Task::Inventory::Input::AIX::LVM;

use FusionInventory::Agent::Tools;

# LVM for AIX
use strict;

use warnings;

use English qw(-no_match_vars);
Expand All @@ -13,6 +11,28 @@ sub isEnabled {
canRun("lspv");
}

sub doInventory {
my (%params) = @_;

my $inventory = $params{inventory};

my $pvs = _parsePvs();
foreach (@$pvs) {
$inventory->addEntry(section => 'PHYSICAL_VOLUMES', entry => $_);
}

my $lvs = _parseLvs();
foreach (@$lvs) {
$inventory->addEntry(section => 'LOGICAL_VOLUMES', entry => $_);
}

my $vgs = _parseVgs();
foreach (@$vgs) {
$inventory->addEntry(section => 'VOLUME_GROUPS', entry => $_);
}

}

sub _parseLvs {

my @vs_elem;
Expand Down Expand Up @@ -181,26 +201,4 @@ sub _parseVgs {
return $entries;
}

sub doInventory {
my (%params) = @_;

my $inventory = $params{inventory};

my $pvs = _parsePvs();
foreach (@$pvs) {
$inventory->addEntry(section => 'PHYSICAL_VOLUMES', entry => $_);
}

my $lvs = _parseLvs();
foreach (@$lvs) {
$inventory->addEntry(section => 'LOGICAL_VOLUMES', entry => $_);
}

my $vgs = _parseVgs();
foreach (@$vgs) {
$inventory->addEntry(section => 'VOLUME_GROUPS', entry => $_);
}

}

1;

0 comments on commit 8a69123

Please sign in to comment.