Update led manager to consume DutyOn and Period values

Previous code only considered the Name and Action for the LED but then
DutyOn and Period are also the properties that are associated with LED
and this patchset handles that.

Change-Id: Ifb57719ed3bcf01a4704618089d9ce676e4b951c
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
diff --git a/parse_led.py b/parse_led.py
index 35f67aa..c86764c 100755
--- a/parse_led.py
+++ b/parse_led.py
@@ -15,15 +15,23 @@
         ofile.write(' std::set<phosphor::led::Layout::LedAction>>')
         ofile.write(' systemLedMap = {\n\n')
         for group in ifile.iterkeys():
-            # Value of this group is a std::set<string, led structure>
+            # This section generates an std::map of LedGroupNames to std::set
+            # of LEDs containing the name and properties
             ledset = ifile[group]
             ofile.write('   {\"' + "/xyz/openbmc_project/ledmanager/groups/" + group + '\",{\n')
 
             for led_dict, list_dict in ledset.iteritems():
+                # Need this to make sure the LED name is printed once
+                name_printed = False
                 for name, value in list_dict.iteritems():
-                    if group and led_dict and name and value:
-                        ofile.write('        {\"' + led_dict + '\",')
-                        ofile.write('phosphor::led::Layout::' + value + '},\n')
+                    if group and led_dict and name:
+                        if name_printed is False:
+                            ofile.write('        {\"' + led_dict + '\",')
+                            name_printed = True
+                        if name == 'Action':
+                            ofile.write('phosphor::led::Layout::')
+                        ofile.write(str(value) + ',')
+                ofile.write('},\n')
             ofile.write('   }},\n')
         ofile.write('};\n')