XCAT testing: Continuous power status and rvitals

This change includes:
    1. Power on BMC node.
    2. Repeatedly get power status and verify.
    3. Get temperature reading through XCAT.
    4. Get voltage reading through XCAT.
    5. Get wattage reading through XCAT.
    6. Get fanspeed through XCAT.

This resolves openbmc/openbmc-test-automation#779

Change-Id: I16e8bfcc65471d7012955788e8e35c4f71e02aa0
Signed-off-by: Prashanth Katti <prkatti1@in.ibm.com>
diff --git a/lib/xcat/xcat_utils.robot b/lib/xcat/xcat_utils.robot
index 943ca6e..032d526 100644
--- a/lib/xcat/xcat_utils.robot
+++ b/lib/xcat/xcat_utils.robot
@@ -155,4 +155,16 @@
     Should Contain  ${nodes_in_group}  ${node}
     ...  msg=BMC node is not added in a group.
 
-# TBD  openbmc/openbmc-test-automation/issues/647
+Get Hardware Vitals Via XCAT
+    [Documentation]  Get hardware vitals via XCAT.
+    [Arguments]  ${node}  ${option}
+
+    # Description of argument(s):
+    # node    Name of the node (e.g. "node1").
+    # option  Hardware vitals option (e.g. "temp", "voltage", "fanspeed", etc.).
+
+    ${cmd_buf}=  Catenate  ${XCAT_DIR_PATH}/rvitals ${node} ${option}
+    ${stdout}  ${stderr}=  Execute Command  ${cmd_buf}  return_stderr=True
+    Should Be Empty  ${stderr}
+
+    [Return]  ${stdout}