Support to set and get BIOS attribute via pldmtool

Changes:
     - Added keyword to set and get BIOS attribute using
       pldmtool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Example on how to use this new keywords:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$ cat redfish/sample.robot
*** Settings ***
Resource        ../lib/resource.robot
Resource        ../lib/utils.robot

*** Test Cases ***

Test BIOS Example

    ${pldm_resp}=  PLDM Get BIOS Attribute  fw_boot_side
    Log To Console  ${pldm_resp}

    PLDM Set BIOS Attribute  fw_boot_side  Perm

    ${pldm_resp}=  PLDM Get BIOS Attribute  fw_boot_side
    Log To Console  ${pldm_resp}

    PLDM Set BIOS Attribute  fw_boot_side  Temp

    ${pldm_resp}=  PLDM Get BIOS Attribute  fw_boot_side
    Log To Console  ${pldm_resp}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++

++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Example output of the above test sample code run:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++

==============================================================================
Sample
==============================================================================
Test BIOS Example
root@xx.xx.xx.xx:~#
{
    "CurrentValue": "Temp"
}
.{'CurrentValue': 'Temp'}
.#(CDT) 2022/05/19 10:45:19.445616 -    0.086554 - Issuing: pldmtool bios SetBIOSAttributeCurrentValue -a fw_boot_side -d Perm
{
    "Response": "SUCCESS"
}
{
    "CurrentValue": "Perm"
}
.#(CDT) 2022/05/19 10:45:22.940009 -    0.117587 - Issuing: pldmtool bios GetBIOSAttributeCurrentValueByHandle -a fw_boot_side
{
    "CurrentValue": "Perm"
}
.{'CurrentValue': 'Perm'}
.#(CDT) 2022/05/19 10:45:23.203642 -    0.086487 - Issuing: pldmtool bios SetBIOSAttributeCurrentValue -a fw_boot_side -d Temp
{
    "Response": "SUCCESS"
}
{
    "CurrentValue": "Temp"
}
.#(CDT) 2022/05/19 10:45:26.669550 -    0.112921 - Issuing: pldmtool bios GetBIOSAttributeCurrentValueByHandle -a fw_boot_side
{
    "CurrentValue": "Temp"
}
.{'CurrentValue': 'Temp'}
Test BIOS Example                                                     | PASS |
------------------------------------------------------------------------------
Sample                                                                | PASS |
1 test, 1 passed, 0 failed
==============================================================================

Change-Id: If24ad6fd61b4f9a6dcb8015aaec3ddd6d2a853b0
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index 29bd240..5eb7802 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -23,6 +23,7 @@
 Library                 var_funcs.py
 Library                 SCPLibrary  WITH NAME  scp
 Library                 gen_robot_valid.py
+Library                 pldm_utils.py
 
 
 *** Variables ***
@@ -1039,3 +1040,41 @@
 
     ${bmc_status} =  Redfish Get BMC State
     Should Be Equal  ${bmc_status}  Enabled
+
+
+PLDM Set BIOS Attribute
+    [Documentation]  Set the BIOS attribute via pldmtool and verify the attribute is set.
+    ...              Defaulted for fw_boot_side for boot test usage caller.
+    [Arguments]  ${attribute_name}=fw_boot_side  ${attribute_value}=Temp
+
+    # Description of argument(s):
+    # attribute_name      Valid BIOS attribute name e.g ("fw_boot_side")
+    # attribute_value     Valid BIOS attribute value for fw_boot_side.
+
+    # PLDM response output example:
+    # {
+    #    "Response": "SUCCESS"
+    # }
+
+    ${resp}=  pldmtool  bios SetBIOSAttributeCurrentValue -a ${attribute_name} -d ${attribute_value}
+    Should Be Equal As Strings  ${resp["Response"]}  SUCCESS
+
+    # PLDM GET output example:
+    # {
+    #    "CurrentValue": "Temp"
+    # }
+
+    ${pldm_output}=  PLDM Get BIOS Attribute  ${attribute_name}
+    Should Be Equal As Strings  ${pldm_output["CurrentValue"]}  ${attribute_value}
+    ...  msg=Expecting ${attribute_value} but got ${pldm_output["CurrentValue"]}
+
+
+PLDM Get BIOS Attribute
+    [Documentation]  Get the BIOS attribute via pldmtool for a given attribute and return value.
+    [Arguments]  ${attribute_name}
+
+    # Description of argument(s):
+    # attribute_name     Valid BIOS attribute name e.g ("fw_boot_side")
+
+    ${pldm_output}=  pldmtool  bios GetBIOSAttributeCurrentValueByHandle -a ${attribute_name}
+    [Return]  ${pldm_output}