replace () with _ 13/76113/2
authorSam Hague <shague@redhat.com>
Sun, 16 Sep 2018 01:00:45 +0000 (21:00 -0400)
committerSam Hague <shague@redhat.com>
Sun, 16 Sep 2018 01:20:25 +0000 (01:20 +0000)
The below error is coming out because the ()'s are  not valid in the
python shell  call. The path is composed of the test name and some
tests have  ()'s in the name.

18:39:17 Ping Vm Instance1 In net_2 From net_1 (vxlan to vlan) :: Check rea... sh: -c: line 0: syntax error near unexpected token `('
18:39:23 sh: -c: line 0: `odltools show eos -i 10.30.170.33 -t 8181 -u admin -w admin --path /tmp/02_l3_Ping_Vm_Instance1_In_net_2_From_net_1_(vxlan_to_vlan) 2>&1'
18:39:23 sh: -c: line 0: syntax error near unexpected token `('
18:39:23 sh: -c: line 0: `odltools analyze tunnels -i 10.30.170.33 -t 8181 -u admin -w admin --path /tmp/02_l3_Ping_Vm_Instance1_In_net_2_From_net_1_(vxlan_to_vlan) 2>&1'

Change-Id: I82b28a713f0c007af74cdcba23a16a758e805929
Signed-off-by: Sam Hague <shague@redhat.com>
csit/libraries/ODLTools.robot

index 51188e19a4bf10d1a9d3f22b795b6ab3576ada51..ebd26d1512637903c3bb35c60893c9df932c2d3c 100644 (file)
@@ -49,5 +49,5 @@ Get All
 Get Path
     [Arguments]    ${test_name}=${SUITE_NAME}.${TEST_NAME}
     [Documentation]    Get odltools path for a given test case
-    ${tmpdir} =    BuiltIn.Evaluate    """${test_name}""".replace(" ","_").replace("/","_").replace(".","_")
+    ${tmpdir} =    BuiltIn.Evaluate    """${test_name}""".replace(" ","_").replace("/","_").replace(".","_").replace("(","_").replace(")","_")
     [Return]    /tmp/${tmpdir}