IPMI Parser Script Updates

This commit adds a new option to the IPMI MRW
parsing scripts (--skip-broken-mrw).

When specified, the option will cause the scripts
to ignore broken MRW targets such as IPMI sensor
targets without a valid SENSOR_ID attribute
or a FRU without a valid FRU_ID.

This allows us to pull in an in-progress MRW without
it breaking our builds.

Tested:
I tested the scripts against an incomplete MRW and made
sure that the scripts ignored broken targets and generated
output config files for whatever targets were valid.

Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
Change-Id: Ibf2ca3769e6030d62e73fb362d73a775433273bc
diff --git a/gen_ipmi_sensor.pl b/gen_ipmi_sensor.pl
index 5ac15b2..490cade 100755
--- a/gen_ipmi_sensor.pl
+++ b/gen_ipmi_sensor.pl
@@ -12,12 +12,14 @@
 my $debug           = 0;
 my $outputFile     = "";
 my $metaDataFile   = "";
+my $skipBrokenMrw = 0;
 
 # Command line argument parsing
 GetOptions(
 "i=s" => \$serverwizFile,    # string
 "m=s" => \$metaDataFile,     # string
 "o=s" => \$outputFile,       # string
+"skip-broken-mrw" => \$skipBrokenMrw,
 "d"   => \$debug,
 )
 or printUsage();
@@ -88,6 +90,7 @@
         #Instance path then die
 
         if ($sensorID eq '' or $sensorReadingType eq '' or $path eq '') {
+            next if $skipBrokenMrw;
             close $fh;
             die("sensor without info for target=$target");
         }
@@ -295,6 +298,7 @@
     print "
     $0 -i [MRW filename] -m [SensorMetaData filename] -o [Output filename] [OPTIONS]
 Options:
+    --skip-broken-mrw = Skip broken MRW targets
     -d = debug mode
         \n";
     exit(1);