bios: Converting bios json keys to lower snake case

Converting following bios attribute json keys to lower snake case
displayName --> display_name
helpText    --> help_text
readOnly    --> read_only

Tested:
     Power on/off
     Gtest passed

Change-Id: Iad88ed7bc381d66182c99e31e7d385f65750e0ed
Signed-off-by: Archana Kakani <archana.kakani@ibm.com>
diff --git a/libpldmresponder/test/bios_jsons/bios_attrs.json b/libpldmresponder/test/bios_jsons/bios_attrs.json
index 0a4dd69..feaef17 100644
--- a/libpldmresponder/test/bios_jsons/bios_attrs.json
+++ b/libpldmresponder/test/bios_jsons/bios_attrs.json
@@ -5,9 +5,9 @@
             "attribute_name": "HMCManagedState",
             "possible_values": ["On", "Off"],
             "default_values": ["On"],
-            "readOnly": false,
-            "helpText": "HMCManagedState HelpText",
-            "displayName": "HMCManagedState DisplayName",
+            "read_only": false,
+            "help_text": "HMCManagedState HelpText",
+            "display_name": "HMCManagedState DisplayName",
             "dbus": {
                 "object_path": "/xyz/abc/def",
                 "interface": "xyz.openbmc_project.HMCManaged.State",
@@ -24,9 +24,9 @@
             "attribute_name": "FWBootSide",
             "possible_values": ["Perm", "Temp"],
             "default_values": ["Perm"],
-            "readOnly": false,
-            "helpText": "FWBootSide HelpText",
-            "displayName": "FWBootSide DisplayName",
+            "read_only": false,
+            "help_text": "FWBootSide HelpText",
+            "display_name": "FWBootSide DisplayName",
             "dbus": {
                 "object_path": "/xyz/abc/def",
                 "interface": "xyz.openbmc.FWBoot.Side",
@@ -40,9 +40,9 @@
             "attribute_name": "InbandCodeUpdate",
             "possible_values": ["Allowed", "NotAllowed"],
             "default_values": ["Allowed"],
-            "readOnly": false,
-            "helpText": "InbandCodeUpdate HelpText",
-            "displayName": "InbandCodeUpdate DisplayName",
+            "read_only": false,
+            "help_text": "InbandCodeUpdate HelpText",
+            "display_name": "InbandCodeUpdate DisplayName",
             "dbus": {
                 "object_path": "/xyz/abc/def",
                 "interface": "xyz.openbmc.InBandCodeUpdate",
@@ -56,9 +56,9 @@
             "attribute_name": "CodeUpdatePolicy",
             "possible_values": ["Concurrent", "Disruptive"],
             "default_values": ["Concurrent"],
-            "readOnly": true,
-            "helpText": "CodeUpdatePolicy HelpText",
-            "displayName": "CodeUpdatePolicy DisplayName"
+            "read_only": true,
+            "help_text": "CodeUpdatePolicy HelpText",
+            "display_name": "CodeUpdatePolicy DisplayName"
         },
         {
             "attribute_type": "integer",
@@ -67,9 +67,9 @@
             "upper_bound": 15,
             "scalar_increment": 1,
             "default_value": 0,
-            "readOnly": false,
-            "helpText": "VDD_AVSBUS_RAIL HelpText",
-            "displayName": "VDD_AVSBUS_RAIL DisplayName",
+            "read_only": false,
+            "help_text": "VDD_AVSBUS_RAIL HelpText",
+            "display_name": "VDD_AVSBUS_RAIL DisplayName",
             "dbus": {
                 "object_path": "/xyz/openbmc_project/avsbus",
                 "interface": "xyz.openbmc.AvsBus.Manager",
@@ -84,9 +84,9 @@
             "upper_bound": 15,
             "scalar_increment": 1,
             "default_value": 2,
-            "readOnly": true,
-            "helpText": "SBE_IMAGE_MINIMUM_VALID_ECS HelpText",
-            "displayName": "SBE_IMAGE_MINIMUM_VALID_ECS DisplayName"
+            "read_only": true,
+            "help_text": "SBE_IMAGE_MINIMUM_VALID_ECS HelpText",
+            "display_name": "SBE_IMAGE_MINIMUM_VALID_ECS DisplayName"
         },
         {
             "attribute_type": "integer",
@@ -95,9 +95,9 @@
             "upper_bound": 15,
             "scalar_increment": 2,
             "default_value": 3,
-            "readOnly": true,
-            "helpText": "INTEGER_INVALID_CASE HelpText",
-            "displayName": "INTEGER_INVALID_CASE DisplayName"
+            "read_only": true,
+            "help_text": "INTEGER_INVALID_CASE HelpText",
+            "display_name": "INTEGER_INVALID_CASE DisplayName"
         },
         {
             "attribute_type": "string",
@@ -106,9 +106,9 @@
             "minimum_string_length": 1,
             "maximum_string_length": 100,
             "default_string": "abc",
-            "readOnly": false,
-            "helpText": "str_example1 HelpText",
-            "displayName": "str_example1 DisplayName",
+            "read_only": false,
+            "help_text": "str_example1 HelpText",
+            "display_name": "str_example1 DisplayName",
             "dbus": {
                 "object_path": "/xyz/abc/def",
                 "interface": "xyz.openbmc_project.str_example1.value",
@@ -123,9 +123,9 @@
             "minimum_string_length": 0,
             "maximum_string_length": 100,
             "default_string": "",
-            "readOnly": false,
-            "helpText": "str_example2 HelpText",
-            "displayName": "str_example2 DisplayName",
+            "read_only": false,
+            "help_text": "str_example2 HelpText",
+            "display_name": "str_example2 DisplayName",
             "dbus": {
                 "object_path": "/xyz/abc/def",
                 "interface": "xyz.openbmc_project.str_example2.value",
@@ -140,9 +140,9 @@
             "minimum_string_length": 1,
             "maximum_string_length": 100,
             "default_string": "ef",
-            "readOnly": true,
-            "helpText": "str_example3 HelpText",
-            "displayName": "str_example3 DisplayName"
+            "read_only": true,
+            "help_text": "str_example3 HelpText",
+            "display_name": "str_example3 DisplayName"
         }
     ]
 }
diff --git a/libpldmresponder/test/libpldmresponder_bios_attribute_test.cpp b/libpldmresponder/test/libpldmresponder_bios_attribute_test.cpp
index 93b633a..7f07d6d 100644
--- a/libpldmresponder/test/libpldmresponder_bios_attribute_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_bios_attribute_test.cpp
@@ -46,9 +46,9 @@
 {
     auto jsonReadOnly = R"({
       "attribute_name" : "ReadOnly",
-      "readOnly" : true,
-      "helpText" : "HelpText",
-      "displayName" : "DisplayName"
+      "read_only" : true,
+      "help_text" : "HelpText",
+      "display_name" : "DisplayName"
     })"_json;
 
     TestAttribute readOnly{jsonReadOnly, nullptr};
@@ -64,9 +64,9 @@
 
     auto jsonReadWrite = R"({
       "attribute_name":"ReadWrite",
-      "readOnly" : false,
-      "helpText" : "HelpText",
-      "displayName" : "DisplayName",
+      "read_only" : false,
+      "help_text" : "HelpText",
+      "display_name" : "DisplayName",
       "dbus":
            {
                "object_path" : "/xyz/abc/def",
diff --git a/libpldmresponder/test/libpldmresponder_bios_enum_attribute_test.cpp b/libpldmresponder/test/libpldmresponder_bios_enum_attribute_test.cpp
index 775cd15..98161a0 100644
--- a/libpldmresponder/test/libpldmresponder_bios_enum_attribute_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_bios_enum_attribute_test.cpp
@@ -39,9 +39,9 @@
          "possible_values" : [ "Concurrent", "Disruptive" ],
          "value_names" : [ "Concurrent", "Disruptive" ],
          "default_values" : [ "Concurrent" ],
-         "readOnly" : true,
-         "helpText" : "HelpText",
-         "displayName" : "DisplayName"
+         "read_only" : true,
+         "help_text" : "HelpText",
+         "display_name" : "DisplayName"
       })"_json;
 
     BIOSEnumAttribute enumReadOnly{jsonEnumReadOnly, nullptr};
@@ -56,9 +56,9 @@
          "possible_value" : [ "Concurrent", "Disruptive" ],
          "value_names" : [ "Concurrent", "Disruptive" ],
          "default_values" : [ "Concurrent" ],
-         "readOnly" : true,
-         "helpText" : "HelpText",
-         "displayName" : "DisplayName"
+         "read_only" : true,
+         "help_text" : "HelpText",
+         "display_name" : "DisplayName"
       })"_json; // possible_value -> possible_values
     EXPECT_THROW((BIOSEnumAttribute{jsonEnumReadOnlyError, nullptr}),
                  Json::exception);
@@ -68,9 +68,9 @@
          "possible_values" : [ "Perm", "Temp" ],
          "value_names" : [ "Perm", "Temp" ],
          "default_values" : [ "Perm" ],
-         "readOnly" : false,
-         "helpText" : "HelpText",
-         "displayName" : "DisplayName",
+         "read_only" : false,
+         "help_text" : "HelpText",
+         "display_name" : "DisplayName",
          "dbus":
             {
                "object_path" : "/xyz/abc/def",
@@ -96,9 +96,9 @@
          "possible_values" : [ "Concurrent", "Disruptive" ],
          "value_names" : [ "Concurrent", "Disruptive" ],
          "default_values" : [ "Disruptive" ],
-         "readOnly" : true,
-         "helpText" : "HelpText",
-         "displayName" : "DisplayName"
+         "read_only" : true,
+         "help_text" : "HelpText",
+         "display_name" : "DisplayName"
       })"_json;
 
     std::vector<uint8_t> expectedAttrEntry{
@@ -136,9 +136,9 @@
          "possible_values" : [ "Concurrent", "Disruptive" ],
          "value_names" : [ "Concurrent", "Disruptive" ],
          "default_values" : [ "Disruptive" ],
-         "readOnly" : false,
-         "helpText" : "HelpText",
-         "displayName" : "DisplayName",
+         "read_only" : false,
+         "help_text" : "HelpText",
+         "display_name" : "DisplayName",
          "dbus":
             {
                "object_path" : "/xyz/abc/def",
@@ -189,9 +189,9 @@
          "possible_values" : [ "Concurrent", "Disruptive" ],
          "value_names" : [ "Concurrent", "Disruptive" ],
          "default_values" : [ "Disruptive" ],
-         "readOnly" : false,
-         "helpText" : "HelpText",
-         "displayName" : "DisplayName",
+         "read_only" : false,
+         "help_text" : "HelpText",
+         "display_name" : "DisplayName",
          "dbus":
             {
                "object_path" : "/xyz/abc/def",
diff --git a/libpldmresponder/test/libpldmresponder_bios_integer_attribute_test.cpp b/libpldmresponder/test/libpldmresponder_bios_integer_attribute_test.cpp
index 5301c77..f016649 100644
--- a/libpldmresponder/test/libpldmresponder_bios_integer_attribute_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_bios_integer_attribute_test.cpp
@@ -35,9 +35,9 @@
          "upper_bound" : 15,
          "scalar_increment" : 1,
          "default_value" : 2,
-         "readOnly" : true,
-         "helpText" : "HelpText",
-         "displayName" : "DisplayName"
+         "read_only" : true,
+         "help_text" : "HelpText",
+         "display_name" : "DisplayName"
       })"_json;
 
     BIOSIntegerAttribute integerReadOnly{jsonIntegerReadOnly, nullptr};
@@ -55,9 +55,9 @@
          "upper_bound" : 15,
          "scalar_increment" : 1,
          "default_valu" : 2,
-         "readOnly" : true,
-         "helpText" : "HelpText",
-         "displayName" : "DisplayName"
+         "read_only" : true,
+         "help_text" : "HelpText",
+         "display_name" : "DisplayName"
       })"_json; // default_valu -> default_value
     EXPECT_THROW((BIOSIntegerAttribute{jsonIntegerReadOnlyError, nullptr}),
                  Json::exception);
@@ -68,9 +68,9 @@
          "upper_bound" : 15,
          "scalar_increment" : 1,
          "default_value" : 0,
-         "readOnly" : false,
-         "helpText" : "HelpText",
-         "displayName" : "DisplayName",
+         "read_only" : false,
+         "help_text" : "HelpText",
+         "display_name" : "DisplayName",
          "dbus":{
             "object_path" : "/xyz/openbmc_project/avsbus",
             "interface" : "xyz.openbmc.AvsBus.Manager",
@@ -95,9 +95,9 @@
          "upper_bound" : 15,
          "scalar_increment" : 1,
          "default_value" : 2,
-         "readOnly" : true,
-         "helpText" : "HelpText",
-         "displayName" : "DisplayName"
+         "read_only" : true,
+         "help_text" : "HelpText",
+         "display_name" : "DisplayName"
       })"_json;
 
     std::vector<uint8_t> expectedAttrEntry{
@@ -129,9 +129,9 @@
          "upper_bound" : 15,
          "scalar_increment" : 1,
          "default_value" : 2,
-         "readOnly" : false,
-         "helpText" : "HelpText",
-         "displayName" : "DisplayName",
+         "read_only" : false,
+         "help_text" : "HelpText",
+         "display_name" : "DisplayName",
          "dbus":{
             "object_path" : "/xyz/openbmc_project/avsbus",
             "interface" : "xyz.openbmc.AvsBus.Manager",
@@ -181,9 +181,9 @@
          "upper_bound" : 15,
          "scalar_increment" : 1,
          "default_value" : 2,
-         "readOnly" : false,
-         "helpText" : "HelpText",
-         "displayName" : "DisplayName",
+         "read_only" : false,
+         "help_text" : "HelpText",
+         "display_name" : "DisplayName",
          "dbus":{
             "object_path" : "/xyz/openbmc_project/avsbus",
             "interface" : "xyz.openbmc.AvsBus.Manager",
diff --git a/libpldmresponder/test/libpldmresponder_bios_string_attribute_test.cpp b/libpldmresponder/test/libpldmresponder_bios_string_attribute_test.cpp
index daeec13..06c1f6c 100644
--- a/libpldmresponder/test/libpldmresponder_bios_string_attribute_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_bios_string_attribute_test.cpp
@@ -34,9 +34,9 @@
             "minimum_string_length" : 1,
             "maximum_string_length" : 100,
             "default_string" : "ef",
-            "readOnly" : true,
-            "helpText" : "HelpText",
-            "displayName" : "DisplayName"
+            "read_only" : true,
+            "help_text" : "HelpText",
+            "display_name" : "DisplayName"
         })"_json;
     BIOSStringAttribute stringReadOnly{jsonStringReadOnly, nullptr};
     EXPECT_EQ(stringReadOnly.name, "str_example3");
@@ -56,9 +56,9 @@
             "minimum_string_length" : 1,
             "maximum_string_length" : 100,
             "default_string" : "abc",
-            "readOnly" : false,
-            "helpText" : "HelpText",
-            "displayName" : "DisplayName",
+            "read_only" : false,
+            "help_text" : "HelpText",
+            "display_name" : "DisplayName",
             "dbus" : {
                 "object_path" : "/xyz/abc/def",
                 "interface" : "xyz.openbmc_project.str_example1.value",
@@ -83,9 +83,9 @@
             "minimum_string_length" : 1,
             "maximum_string_length" : 100,
             "default_string" : "abc",
-            "readOnly" : true,
-            "helpText" : "HelpText",
-            "displayName" : "DisplayName"
+            "read_only" : true,
+            "help_text" : "HelpText",
+            "display_name" : "DisplayName"
         })"_json;
 
     std::vector<uint8_t> expectedAttrEntry{
@@ -119,9 +119,9 @@
             "minimum_string_length" : 1,
             "maximum_string_length" : 100,
             "default_string" : "abc",
-            "readOnly" : false,
-            "helpText" : "HelpText",
-            "displayName" : "DisplayName",
+            "read_only" : false,
+            "help_text" : "HelpText",
+            "display_name" : "DisplayName",
             "dbus" : {
                 "object_path" : "/xyz/abc/def",
                 "interface" : "xyz.openbmc_project.str_example1.value",
@@ -169,9 +169,9 @@
             "minimum_string_length" : 1,
             "maximum_string_length" : 100,
             "default_string" : "abc",
-            "readOnly" : false,
-            "helpText" : "HelpText",
-            "displayName" : "DisplayName",
+            "read_only" : false,
+            "help_text" : "HelpText",
+            "display_name" : "DisplayName",
             "dbus" : {
                 "object_path" : "/xyz/abc/def",
                 "interface" : "xyz.openbmc_project.str_example1.value",
diff --git a/libpldmresponder/test/system_type1/bios_jsons/bios_attrs.json b/libpldmresponder/test/system_type1/bios_jsons/bios_attrs.json
index 7a1f120..2a90500 100644
--- a/libpldmresponder/test/system_type1/bios_jsons/bios_attrs.json
+++ b/libpldmresponder/test/system_type1/bios_jsons/bios_attrs.json
@@ -5,9 +5,9 @@
             "attribute_name": "HMCManagedState",
             "possible_values": ["On", "Off"],
             "default_values": ["On"],
-            "readOnly": false,
-            "helpText": "HMCManagedState HelpText",
-            "displayName": "HMCManagedState DisplayName",
+            "read_only": false,
+            "help_text": "HMCManagedState HelpText",
+            "display_name": "HMCManagedState DisplayName",
             "dbus": {
                 "object_path": "/xyz/abc/def",
                 "interface": "xyz.openbmc_project.HMCManaged.State",
@@ -24,9 +24,9 @@
             "attribute_name": "FWBootSide",
             "possible_values": ["Perm", "Temp"],
             "default_values": ["Temp"],
-            "readOnly": false,
-            "helpText": "FWBootSide HelpText",
-            "displayName": "FWBootSide DisplayName",
+            "read_only": false,
+            "help_text": "FWBootSide HelpText",
+            "display_name": "FWBootSide DisplayName",
             "dbus": {
                 "object_path": "/xyz/abc/def",
                 "interface": "xyz.openbmc.FWBoot.Side",
@@ -40,9 +40,9 @@
             "attribute_name": "InbandCodeUpdate",
             "possible_values": ["Allowed", "NotAllowed"],
             "default_values": ["Allowed"],
-            "readOnly": false,
-            "helpText": "InbandCodeUpdate HelpText",
-            "displayName": "InbandCodeUpdate DisplayName",
+            "read_only": false,
+            "help_text": "InbandCodeUpdate HelpText",
+            "display_name": "InbandCodeUpdate DisplayName",
             "dbus": {
                 "object_path": "/xyz/abc/def",
                 "interface": "xyz.openbmc.InBandCodeUpdate",
@@ -56,9 +56,9 @@
             "attribute_name": "CodeUpdatePolicy",
             "possible_values": ["Concurrent", "Disruptive"],
             "default_values": ["Concurrent"],
-            "readOnly": true,
-            "helpText": "CodeUpdatePolicy HelpText",
-            "displayName": "CodeUpdatePolicy DisplayName"
+            "read_only": true,
+            "help_text": "CodeUpdatePolicy HelpText",
+            "display_name": "CodeUpdatePolicy DisplayName"
         },
         {
             "attribute_type": "integer",
@@ -67,9 +67,9 @@
             "upper_bound": 15,
             "scalar_increment": 1,
             "default_value": 0,
-            "readOnly": false,
-            "helpText": "VDD_AVSBUS_RAIL HelpText",
-            "displayName": "VDD_AVSBUS_RAIL DisplayName",
+            "read_only": false,
+            "help_text": "VDD_AVSBUS_RAIL HelpText",
+            "display_name": "VDD_AVSBUS_RAIL DisplayName",
             "dbus": {
                 "object_path": "/xyz/openbmc_project/avsbus",
                 "interface": "xyz.openbmc.AvsBus.Manager",
@@ -84,9 +84,9 @@
             "upper_bound": 30,
             "scalar_increment": 1,
             "default_value": 2,
-            "readOnly": true,
-            "helpText": "SBE_IMAGE_MINIMUM_VALID_ECS HelpText",
-            "displayName": "SBE_IMAGE_MINIMUM_VALID_ECS DisplayName"
+            "read_only": true,
+            "help_text": "SBE_IMAGE_MINIMUM_VALID_ECS HelpText",
+            "display_name": "SBE_IMAGE_MINIMUM_VALID_ECS DisplayName"
         },
         {
             "attribute_type": "integer",
@@ -95,9 +95,9 @@
             "upper_bound": 15,
             "scalar_increment": 2,
             "default_value": 3,
-            "readOnly": true,
-            "helpText": "INTEGER_INVALID_CASE HelpText",
-            "displayName": "INTEGER_INVALID_CASE DisplayName"
+            "read_only": true,
+            "help_text": "INTEGER_INVALID_CASE HelpText",
+            "display_name": "INTEGER_INVALID_CASE DisplayName"
         },
         {
             "attribute_type": "string",
@@ -106,9 +106,9 @@
             "minimum_string_length": 1,
             "maximum_string_length": 100,
             "default_string": "abc",
-            "readOnly": false,
-            "helpText": "str_example1 HelpText",
-            "displayName": "str_example1 DisplayName",
+            "read_only": false,
+            "help_text": "str_example1 HelpText",
+            "display_name": "str_example1 DisplayName",
             "dbus": {
                 "object_path": "/xyz/abc/def",
                 "interface": "xyz.openbmc_project.str_example1.value",
@@ -123,9 +123,9 @@
             "minimum_string_length": 0,
             "maximum_string_length": 200,
             "default_string": "",
-            "readOnly": false,
-            "helpText": "str_example2 HelpText",
-            "displayName": "str_example2 DisplayName",
+            "read_only": false,
+            "help_text": "str_example2 HelpText",
+            "display_name": "str_example2 DisplayName",
             "dbus": {
                 "object_path": "/xyz/abc/def",
                 "interface": "xyz.openbmc_project.str_example2.value",
@@ -140,9 +140,9 @@
             "minimum_string_length": 1,
             "maximum_string_length": 100,
             "default_string": "ef",
-            "readOnly": true,
-            "helpText": "str_example3 HelpText",
-            "displayName": "str_example3 DisplayName"
+            "read_only": true,
+            "help_text": "str_example3 HelpText",
+            "display_name": "str_example3 DisplayName"
         }
     ]
 }