Skip to content

Commit

Permalink
better variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
guillomovitch committed Jan 11, 2013
1 parent 89cbc66 commit baabfef
Showing 1 changed file with 6 additions and 6 deletions.
Expand Up @@ -63,11 +63,11 @@ sub doInventory {
# return immediatly if vm type has already been found
return if $inventory->{content}{HARDWARE}{VMSYSTEM} ne "Physical";

my $status = _getStatus($logger);
my $type = _getType($logger);

# for consistency with HVM domU
if (
$status eq 'Xen' &&
$type eq 'Xen' &&
!$inventory->{h}{CONTENT}{BIOS}{SMANUFACTURER}
) {
$inventory->setBios({
Expand All @@ -80,11 +80,11 @@ sub doInventory {
my $uuid;
my $vmid;

if ( $status eq 'Virtuozzo' ) {
if ($type eq 'Virtuozzo') {
$vmid = _getOpenVZVmID( logger => $logger );
}

if ( $status eq 'Xen' ) {
if ($type eq 'Xen') {
if (-f '/sys/hypervisor/uuid') {
$uuid = getFirstLine(
file => '/sys/hypervisor/uuid',
Expand All @@ -94,13 +94,13 @@ sub doInventory {
}

$inventory->setHardware({
VMSYSTEM => $status,
VMSYSTEM => $type,
UUID => $uuid,
VMID => $vmid
});
}

sub _getStatus {
sub _getType {
my ($logger) = @_;

# Solaris zones
Expand Down

0 comments on commit baabfef

Please sign in to comment.