Development test HW CI

Changes:
     - Added  robot user variable parameter to skip OCC and
       Power check, by default enabled.
     - New HW_CI_DEV list.

Usage:
    robot -v OPENBMC_HOST:xx.xx.xx.xx
    -v additional_power_check:0 -v check_performance:0
    -v BOOT_TABLE_PATH:data/boot_table_redfish.json
    --argumentfile test_list/HW_CI_DEV  redfish/ ipmi/ tests/

Change-Id: I1288a8f9cfb057c00342cfa414b5ec9ca861e7b7
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/redfish/systems/test_power_operations.robot b/redfish/systems/test_power_operations.robot
index 4797e27..563f24e 100644
--- a/redfish/systems/test_power_operations.robot
+++ b/redfish/systems/test_power_operations.robot
@@ -8,6 +8,11 @@
 Test Setup       Test Setup Execution
 Test Teardown    Test Teardown Execution
 
+*** Variables ***
+
+# Extended code to check OCC state, power metric and others.
+${additional_power_check}      ${1}
+
 *** Test Cases ***
 
 Verify Redfish Host GracefulShutdown
@@ -33,36 +38,7 @@
 
     Redfish Power On
 
-    # TODO: Replace OCC state check with redfish property when available.
-    Verify OCC State
-
-    ${power_uri_list}=  redfish_utils.Get Members URI  /redfish/v1/Chassis/  PowerControl
-    Log List  ${power_uri_list}
-
-    # Power entries could be seen across different redfish path, remove the URI
-    # where the attribute is non-existent.
-    # Example:
-    #     ['/redfish/v1/Chassis/chassis/Power',
-    #      '/redfish/v1/Chassis/motherboard/Power']
-    FOR  ${idx}  IN  @{power_uri_list}
-        ${power_control}=  redfish_utils.Get Attribute  ${idx}  PowerControl
-        Log Dictionary  ${power_control[0]}
-
-        # Ensure the path does have the attribute else set to EMPTY as default to skip.
-        ${value}=  Get Variable Value  ${power_control[0]['PowerConsumedWatts']}  ${EMPTY}
-        Run Keyword If  "${value}" == "${EMPTY}"
-        ...  Remove Values From List  ${power_uri_list}  ${idx}
-
-        # Check the next available element in the list.
-        Continue For Loop If  "${value}" == "${EMPTY}"
-
-        Valid Dict  power_control[${0}]  ['PowerConsumedWatts']
-
-    END
-
-    # Double check, the validation has at least one valid path.
-    Should Not Be Empty  ${power_uri_list}
-    ...  msg=Should contain at least one element in the list.
+    Run Keyword If  ${additional_power_check} == ${1}  Additional OCC And Power Check
 
 
 Verify Redfish BMC GracefulRestart
@@ -100,3 +76,38 @@
     ...  ELSE
     ...    Set Auto Reboot  ${1}
     Redfish.Logout
+
+
+Additional OCC And Power Check
+    [Documentation]  Verify OCC state and PowerConsumedWatts property.
+
+    # TODO: Replace OCC state check with redfish property when available.
+    Verify OCC State
+
+    ${power_uri_list}=  redfish_utils.Get Members URI  /redfish/v1/Chassis/  PowerControl
+    Log List  ${power_uri_list}
+
+    # Power entries could be seen across different redfish path, remove the URI
+    # where the attribute is non-existent.
+    # Example:
+    #     ['/redfish/v1/Chassis/chassis/Power',
+    #      '/redfish/v1/Chassis/motherboard/Power']
+    FOR  ${idx}  IN  @{power_uri_list}
+        ${power_control}=  redfish_utils.Get Attribute  ${idx}  PowerControl
+        Log Dictionary  ${power_control[0]}
+
+        # Ensure the path does have the attribute else set to EMPTY as default to skip.
+        ${value}=  Get Variable Value  ${power_control[0]['PowerConsumedWatts']}  ${EMPTY}
+        Run Keyword If  "${value}" == "${EMPTY}"
+        ...  Remove Values From List  ${power_uri_list}  ${idx}
+
+        # Check the next available element in the list.
+        Continue For Loop If  "${value}" == "${EMPTY}"
+
+        Valid Dict  power_control[${0}]  ['PowerConsumedWatts']
+
+    END
+
+    # Double check, the validation has at least one valid path.
+    Should Not Be Empty  ${power_uri_list}
+    ...  msg=Should contain at least one element in the list.