Restructuring LEDs test cases execution

The fix controls the execution as follows
  - If a given LEDs path exist then it will execute the subsequent
    LEDs ON,OFF, Blink use cases
  - Else ignore and drops the execution of the test cases

Resolves openbmc/openbmc-test-automation#10

Change-Id: I7f7eb19eded05b919484edab8baf8219bedc4384
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/tests/test_led.robot b/tests/test_led.robot
index a512339..8ca04fc 100644
--- a/tests/test_led.robot
+++ b/tests/test_led.robot
@@ -13,6 +13,44 @@
 
 *** Test Cases ***
 
+Validate Heartbeat LEDs Test Cases
+    [Documentation]   If heartbeat LED exist then execute the test set.
+    ${resp} =   OpenBMC Get Request   /org/openbmc/control/led/heartbeat
+    Run keyword If  ${resp.status_code} == ${HTTP_OK}   Execute Heartbeat LEDs Test Cases
+
+Validate Identify LEDs Test Cases
+    [Documentation]   If identify LED exist then execute the test set.
+    ${resp} =   OpenBMC Get Request   /org/openbmc/control/led/identify
+    Run keyword If  ${resp.status_code} == ${HTTP_OK}   Execute Identify LEDs Test Cases
+
+Validate Beep LEDs Test Cases
+    [Documentation]   If beep LED exist then execute the test set.
+    ${resp} =   OpenBMC Get Request   /org/openbmc/control/led/beep
+    Run keyword If  ${resp.status_code} == ${HTTP_OK}  Execute Beep LEDs Test Cases
+
+*** Keywords ***
+
+Execute Heartbeat LEDs Test Cases
+    [Documentation]   Executing ON/OFF/Fast/Slow Heartbeat LED test cases.
+    Turn ON the Heartbeat LED
+    Turn OFF the Heartbeat LED
+    Blink Fast the Heartbeat LED
+    Blink Slow the Heartbeat LED
+
+Execute Identify LEDs Test Cases
+    [Documentation]   Executing ON/OFF/Fast/Slow Identify LED test cases.
+    Turn ON the Identify LED
+    Turn OFF the Identify LED
+    Blink Fast the Identify LED
+    Blink Slow the Identify LED
+
+Execute Beep LEDs Test Cases
+    [Documentation]   Executing ON/OFF/Fast/Slow Beep LED test cases.
+    Turn ON the Beep LED
+    Turn OFF the Beep LED
+    Blink Fast the Beep LED
+    Blink Slow the Beep LED
+
 Turn ON the Heartbeat LED
    [Documentation]   This testcase is to test the setOn functionality of the
    ...               Heartbeat LED. The LED state is read again to check if
@@ -152,8 +190,6 @@
    \   ${OFF_VALUE} =   Set Variable If   '${ledstate}'=='Off'   ${OFF_VALUE + 1}   ${OFF_VALUE}
    should be true   ${ON_VALUE} > ${MIN_TOGGLE_VALUE} and ${OFF_VALUE} > ${MIN_TOGGLE_VALUE}
    
-*** Keywords ***
-
 Get LED State
    [arguments]    ${args}
    ${data} =   create dictionary   data=@{EMPTY}