Enable REST logging for HW CI runs

We noticed that during HW CI there are intermittent REST
request failures. FFDC collected didn't show if the request
was served or dropped due to NW issues. With logging enabled,
we can identify a REST vs NW failures via REST footprint.

Change-Id: I6718956e6b194f6de83dd1c18890c38393556e56
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index 05898f4..053e8ea 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -1553,9 +1553,24 @@
 Get Service Attribute
     [Documentation]  Get service attribute policy output.
     [Arguments]  ${option}  ${servicename}
+
+    # Description of argument(s):
     # option  systemctl supported options
     # servicename  Qualified service name
     ${cmd}=  Set Variable
     ...  systemctl -p ${option} show ${servicename} | cut -d = -f2
     ${attr}  ${stderr}  ${rc}=  BMC Execute Command  ${cmd}
     [Return]  ${attr}
+
+
+Set REST Logging Policy
+    [Documentation]  Enable or disable REST logging setting.
+    [Arguments]  ${policy_setting}=${True}
+
+    # Description of argument(s):
+    # policy_setting    The policy setting value which can be either True or False.
+
+    ${log_dict}=  Create Dictionary  data=${policy_setting}
+    Write Attribute  ${BMC_LOGGING_URI}${/}rest_api_logs  Enabled
+    ...  data=${log_dict}  verify=${1}  expected_value=${policy_setting}
+