Skip to content

Commit

Permalink
no reason to reuse host ID as guest ID
Browse files Browse the repository at this point in the history
  • Loading branch information
guillomovitch committed Jul 10, 2015
1 parent 99fbd41 commit ab41a42
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 47 deletions.
Expand Up @@ -76,13 +76,8 @@ sub doInventory {
});
}

my $uuid = $type eq 'Xen' ? _getXenUUID(logger => $logger) :
$type eq 'LXC' ? _getLibvirtLXC_UUID(logger => $logger) :
undef;

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

Expand Down Expand Up @@ -222,29 +217,4 @@ sub _matchPatterns {
}
}

sub _getXenUUID {
return getFirstLine(
file => '/sys/hypervisor/uuid',
@_
);
}

sub _getLibvirtLXC_UUID {
my (%params) = (
file => '/proc/1/environ',
@_
);

my @environ = split( '\0', getAllLines( %params ) );

foreach my $variable (@environ) {
next unless $variable =~ /^LIBVIRT_LXC_UUID/;
my (undef, $value) = split('=', $variable);
return $value;
}

## no critic (ExplicitReturnUndef)
return undef;
}

1;
17 changes: 0 additions & 17 deletions t/tasks/inventory/virtualization/vmsystem.t

This file was deleted.

0 comments on commit ab41a42

Please sign in to comment.