summaryrefslogtreecommitdiffstats
path: root/gen_ipmi_fru.pl
diff options
context:
space:
mode:
authorDeepak Kodihalli <dkodihal@in.ibm.com>2017-02-07 12:14:55 -0600
committerPatrick Williams <patrick@stwcx.xyz>2017-02-14 16:34:01 +0000
commit6225e93d37644774aaecc30cb0161d0eaf0f570d (patch)
tree1a57b04c2b0d0fa53e7e2c32d642008d4523e3d4 /gen_ipmi_fru.pl
parente3e0b720a06ed8fa8bfec834d597d2010412fbe7 (diff)
downloadphosphor-mrw-tools-6225e93d37644774aaecc30cb0161d0eaf0f570d.tar.gz
phosphor-mrw-tools-6225e93d37644774aaecc30cb0161d0eaf0f570d.zip
gen_openpower_fru.pl : Fetch inventory paths
In preparation for the openpower-vpd-parser recipe, this script will, from an input openpower vpd-config YAML file, determine which inventory objects we're interested in, and will fetch from the MRW pathnames these objects should have. The script will output a file in a format that can serve as an environment file for a systemd service, which in turn will launch the openpower-vpd-parser application with this information. Change-Id: I7c4fa70af002f63bd5501093802c1d41bd503e88 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Diffstat (limited to 'gen_ipmi_fru.pl')
-rwxr-xr-xgen_ipmi_fru.pl19
1 files changed, 2 insertions, 17 deletions
diff --git a/gen_ipmi_fru.pl b/gen_ipmi_fru.pl
index 99884d9..5465d84 100755
--- a/gen_ipmi_fru.pl
+++ b/gen_ipmi_fru.pl
@@ -4,6 +4,7 @@ use warnings;
use mrw::Targets;
use mrw::Inventory;
+use mrw::Util;
use Getopt::Long; # For parsing command line arguments
use YAML::Tiny qw(LoadFile);
@@ -106,7 +107,7 @@ for my $item (@inventory) {
printDebug(" ".$child);
printDebug(" Type:".$fruType );
- my $childObmcName = getObmcName(\@inventory, $child);
+ my $childObmcName = Util::getObmcName(\@inventory, $child);
writeToFile($fruType, $childObmcName, $fruTypeConfig, $fh);
}
}
@@ -114,22 +115,6 @@ close $fh;
#------------------------------------END OF MAIN-----------------------
-# Map an MRW name to corresponding OBMC name
-sub getObmcName
-{
- my $inventory = $_[0]; # Inventory items
- my $target = $_[1]; # MRW Target name
- for my $item (@inventory)
- {
- if($item->{TARGET} eq $target)
- {
- return $item->{OBMC_NAME};
- }
- }
- return undef;
-}
-
-
#Get the metdata for the incoming frutype from the loaded config file.
#Write the FRU data into the output file
OpenPOWER on IntegriCloud