Update led-manager to use JSON
Current LED manager uses compile time generated led-gen.hpp and creates
DBus objects for the groups.
We would need this changed to use the generated JSON.
Tested: JSON used at runtime when --enable-json given at configure time.
led-gen.hpp not created when using JSON and led-gen.hpp created by
default when using YAML at build time.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I781f8cb090ece8b87730e6c97795624282857c64
diff --git a/test/config/led-group-config-malformed.json b/test/config/led-group-config-malformed.json
new file mode 100644
index 0000000..4281cdf
--- /dev/null
+++ b/test/config/led-group-config-malformed.json
@@ -0,0 +1,40 @@
+{
+ "leds": [
+ {
+ "group": "bmc_booted"
+ "members": [
+ {
+ "name": "heartbeat",
+ "Action": "On"
+ }
+ ]
+ },
+ {
+ "group": "power_on",
+ "members": [
+ {
+ "name": "power",
+ "Action": "On",
+ "Priority": "On"
+ }
+ ]
+ },
+ {
+ "group": "enclosure_identify",
+ "members": [
+ {
+ "name": "front_id",
+ "Action": "Blink",
+ "DutyOn": 50,
+ "Period": 1000
+ },
+ {
+ "name": "rear_id",
+ "Action": "Blink",
+ "DutyOn": 50,
+ "Period": 1000
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/config/led-group-config.json b/test/config/led-group-config.json
new file mode 100644
index 0000000..aff1fd4
--- /dev/null
+++ b/test/config/led-group-config.json
@@ -0,0 +1,40 @@
+{
+ "leds": [
+ {
+ "group": "bmc_booted",
+ "members": [
+ {
+ "name": "heartbeat",
+ "Action": "On"
+ }
+ ]
+ },
+ {
+ "group": "power_on",
+ "members": [
+ {
+ "name": "power",
+ "Action": "On",
+ "Priority": "On"
+ }
+ ]
+ },
+ {
+ "group": "enclosure_identify",
+ "members": [
+ {
+ "name": "front_id",
+ "Action": "Blink",
+ "DutyOn": 50,
+ "Period": 1000
+ },
+ {
+ "name": "rear_id",
+ "Action": "Blink",
+ "DutyOn": 50,
+ "Period": 1000
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file