From: B Sathwik Date: Tue, 2 Jan 2018 10:13:49 +0000 (+0530) Subject: Check ServiceStatus For Genius X-Git-Tag: pre-potassium~953 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=23b5d6bc40c64cba1f9aadef903899acc254e298;p=integration%2Ftest.git Check ServiceStatus For Genius Change-Id: Iabd83facf300676ed53d6a9e4fe13f6015c20542 Signed-off-by: B Sathwik --- diff --git a/csit/suites/genius/__init__.robot b/csit/suites/genius/__init__.robot index 85291baeec..0022251119 100644 --- a/csit/suites/genius/__init__.robot +++ b/csit/suites/genius/__init__.robot @@ -3,6 +3,7 @@ Documentation Test suite for Genius Modules Suite Setup Start Suite Suite Teardown Stop Suite Library SSHLibrary +Library BuiltIn Variables ../../variables/Variables.py Resource ../../libraries/Utils.robot Library re @@ -15,6 +16,7 @@ Resource ../../libraries/KarafKeywords.robot *** Keywords *** Start Suite [Documentation] Test suit for vpn service using mininet OF13 and OVS 2.3.1 + Run_Keyword_If_At_Least_Oxygen Check Service Status ACTIVE OPERATIONAL Log Start the tests ${conn_id_1}= Open Connection ${TOOLS_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=30s Set Global Variable ${conn_id_1} @@ -69,3 +71,12 @@ check establishment ${check_establishment} Execute Command netstat -anp | grep ${port} Should contain ${check_establishment} ESTABLISHED [Return] ${check_establishment} + +Check Service Status + [Arguments] ${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 + Should Contain ${service_status_output} ${system_ready_state} + @{split} Split To Lines ${service_status_output} 3 7 + : FOR ${var} IN @{split} + \ Should Contain ${var} ${service_state}