Enhance Genius Tests to Check Service Status 88/71988/13
authorSathwik Boggarapu <b.sathwik@ericsson.com>
Mon, 14 May 2018 10:13:11 +0000 (15:43 +0530)
committerVenkatrangan Govindarajan <venkatrangang@hcl.com>
Wed, 16 May 2018 12:09:52 +0000 (12:09 +0000)
This adds a keyword to verify Service Status in 1node
and 3node ODL deployments

Change-Id: I6be11ef3a623c0137e8e084082144d65b50eab66
Signed-off-by: Sathwik Boggarapu <b.sathwik@ericsson.com>
csit/libraries/Genius.robot

index 37e4cdd5430968916867a7f29c36c71c384bc5d8..8b3a54b1d0a9ff2d31e35dcb3eeb0df9067af8c8 100644 (file)
@@ -34,7 +34,7 @@ Genius Suite Teardown
 
 Start Suite
     [Documentation]    Initial setup for Genius test suites
-    Run_Keyword_If_At_Least_Oxygen    Wait Until Keyword Succeeds    60    2    Check Service Status    ACTIVE    OPERATIONAL
+    Run_Keyword_If_At_Least_Oxygen    Wait Until Keyword Succeeds    60    2    Check System Status
     Log    Start the tests
     ${conn_id_1}=    Open Connection    ${TOOLS_SYSTEM_IP}    prompt=${DEFAULT_LINUX_PROMPT}    timeout=30s
     Set Global Variable    ${conn_id_1}
@@ -91,9 +91,9 @@ check establishment
     [Return]    ${check_establishment}
 
 Check Service Status
-    [Arguments]    ${system_ready_state}    ${service_state}
+    [Arguments]    ${odl_ip}    ${system_ready_state}    ${service_state}
     [Documentation]    Issues the karaf shell command showSvcStatus to verify the ready and service states are the same as the arguments passed
-    ${service_status_output}    Issue_Command_On_Karaf_Console    showSvcStatus    ${ODL_SYSTEM_IP}    8101
+    ${service_status_output}    Issue_Command_On_Karaf_Console    showSvcStatus    ${odl_ip}    8101
     Should Contain    ${service_status_output}    ${system_ready_state}
     : FOR    ${service}    IN    @{DIAG_SERVICES}
     \    Should Match Regexp    ${service_status_output}    ${service} +: ${service_state}
@@ -241,3 +241,8 @@ Verify Tunnel Status as UP
     ${Actual_Tunnel_Count}    Get Line Count    ${lines_of_VXLAN}
     ${Expected_Tunnel_Count}    Set Variable    ${Expected_Node_Count*${Expected_Node_Count - 1}}
     Should Be Equal As Strings    ${Actual_Tunnel_Count}    ${Expected_Tunnel_Count}
+
+Check System Status
+    [Documentation]    This keyword will verify whether all the services are in operational and all nodes are active based on the number of odl systems
+    : FOR    ${i}    IN RANGE    ${NUM_ODL_SYSTEM}
+    \    Check Service Status    ${ODL_SYSTEM_${i+1}_IP}    ACTIVE    OPERATIONAL