Change the key [name] to [Name] in members property
All the other keys start with Uppercase. Changing this to make it
consistent.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ic30f9c35ba2c3626e4f565ec166dcc810145eff2
diff --git a/json-config.hpp b/json-config.hpp
index 3d1caec..d47bfd5 100644
--- a/json-config.hpp
+++ b/json-config.hpp
@@ -83,7 +83,7 @@
LedAction ledActions{};
for (const auto& member : members)
{
- auto name = member.value("name", "");
+ auto name = member.value("Name", "");
auto action = getAction(member.value("Action", ""));
uint8_t dutyOn = member.value("DutyOn", 50);
uint16_t period = member.value("Period", 0);
diff --git a/test/config/led-group-config-malformed.json b/test/config/led-group-config-malformed.json
index 4281cdf..3e7d668 100644
--- a/test/config/led-group-config-malformed.json
+++ b/test/config/led-group-config-malformed.json
@@ -4,7 +4,7 @@
"group": "bmc_booted"
"members": [
{
- "name": "heartbeat",
+ "Name": "heartbeat",
"Action": "On"
}
]
@@ -13,7 +13,7 @@
"group": "power_on",
"members": [
{
- "name": "power",
+ "Name": "power",
"Action": "On",
"Priority": "On"
}
@@ -23,13 +23,13 @@
"group": "enclosure_identify",
"members": [
{
- "name": "front_id",
+ "Name": "front_id",
"Action": "Blink",
"DutyOn": 50,
"Period": 1000
},
{
- "name": "rear_id",
+ "Name": "rear_id",
"Action": "Blink",
"DutyOn": 50,
"Period": 1000
diff --git a/test/config/led-group-config.json b/test/config/led-group-config.json
index aff1fd4..3ef9d73 100644
--- a/test/config/led-group-config.json
+++ b/test/config/led-group-config.json
@@ -4,7 +4,7 @@
"group": "bmc_booted",
"members": [
{
- "name": "heartbeat",
+ "Name": "heartbeat",
"Action": "On"
}
]
@@ -13,7 +13,7 @@
"group": "power_on",
"members": [
{
- "name": "power",
+ "Name": "power",
"Action": "On",
"Priority": "On"
}
@@ -23,13 +23,13 @@
"group": "enclosure_identify",
"members": [
{
- "name": "front_id",
+ "Name": "front_id",
"Action": "Blink",
"DutyOn": 50,
"Period": 1000
},
{
- "name": "rear_id",
+ "Name": "rear_id",
"Action": "Blink",
"DutyOn": 50,
"Period": 1000