OVSDB bridge create test case now using UUID 02/32302/2
authorJamo Luhrsen <jluhrsen@redhat.com>
Sat, 9 Jan 2016 00:22:15 +0000 (16:22 -0800)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 11 Jan 2016 11:22:40 +0000 (11:22 +0000)
- while trying to fix this test case, a bug was filed so this
  is expected to fail until the bug (4908) is fixed

Change-Id: Ia6d8c9bdc8f2e7a584a1ca65f3284f1ef6dc264c
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
csit/libraries/ClusterKeywords.robot
csit/libraries/ClusterOvsdb.robot
csit/libraries/OVSDB.robot
csit/suites/ovsdb/Southbound_Cluster/010__Ovsdb_Southbound_Cluster.robot

index 82b39418b1e673182fd8e7eda250f2dc92359b29..72862959e0149c7ea982ecf945392a012eca03af 100644 (file)
@@ -96,7 +96,8 @@ Put And Check At URI In Cluster
     ...    and check the data is replicated in all instances in ${controller_index_list}.
     ${expected_body}=    Hsf Json    ${body}
     ${resp}    RequestsLibrary.Put Request    controller${controller_index}    ${uri}    ${body}    ${headers}
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${status_code}=    Convert To String    ${resp.status_code}
+    Should Match Regexp    ${status_code}    20(0|1)
     : FOR    ${i}    IN    @{controller_index_list}
     \    ${data}    Wait Until Keyword Succeeds    5s    1s    Get Data From URI    controller${i}
     \    ...    ${uri}    ${headers}
index ff7ecae896881d797bee000090e3e73469bea3fb..99b2675421a7b41e07851757fab09d1a7e2cfe94 100644 (file)
@@ -4,6 +4,7 @@ Library           RequestsLibrary
 Resource          ClusterKeywords.robot
 Resource          MininetKeywords.robot
 Resource          Utils.robot
+Resource          OVSDB.robot
 Variables         ../variables/Variables.py
 
 *** Keywords ***
@@ -62,20 +63,17 @@ Get Cluster Entity Owner For Ovsdb
 Create Bridge And Verify
     [Arguments]    ${controller_index_list}    ${controller_index}
     [Documentation]    Create bridge in ${controller_index} and verify it gets applied in all instances in ${controller_index_list}.
-    ${sample}=    OperatingSystem.Get File    ${CURDIR}/../variables/ovsdb/create_bridge_3node.json
-    Log    ${sample}
-    ${sample1}    Replace String    ${sample}    tcp:controller1:6633    tcp:${ODL_SYSTEM_1_IP}:6640
-    Log    ${sample1}
-    ${sample2}    Replace String    ${sample1}    tcp:controller2:6633    tcp:${ODL_SYSTEM_2_IP}:6640
-    Log    ${sample2}
-    ${sample3}    Replace String    ${sample2}    tcp:controller3:6633    tcp:${ODL_SYSTEM_3_IP}:6640
-    Log    ${sample3}
-    ${sample4}    Replace String    ${sample3}    127.0.0.1    ${MININET}
-    Log    ${sample4}
-    ${sample5}    Replace String    ${sample4}    br01    ${BRIDGE}
-    Log    ${sample5}
-    ${body}    Replace String    ${sample5}    61644    ${OVSDB_PORT}
+    # need to get UUID which should be the same on all controllers in cluster, so asking controller1
+    ${ovsdb_uuid}=    Get OVSDB UUID    controller_http_session=controller1
+    ${body}=    OperatingSystem.Get File    ${CURDIR}/../variables/ovsdb/create_bridge_3node.json
+    ${body}    Replace String    ${body}     ovsdb://127.0.0.1:61644    ovsdb://uuid/${ovsdb_uuid}
+    ${body}    Replace String    ${body}    tcp:controller1:6633    tcp:${ODL_SYSTEM_1_IP}:6640
+    ${body}    Replace String    ${body}    tcp:controller2:6633    tcp:${ODL_SYSTEM_2_IP}:6640
+    ${body}    Replace String    ${body}    tcp:controller3:6633    tcp:${ODL_SYSTEM_3_IP}:6640
+    ${body}    Replace String    ${body}    127.0.0.1    ${MININET}
+    ${body}    Replace String    ${body}    br01    ${BRIDGE}
+    ${body}    Replace String    ${body}    61644    ${OVSDB_PORT}
     Log    ${body}
     ${dictionary}=    Create Dictionary    ${MININET}=1    ${OVSDBPORT}=4    ${BRIDGE}=1
-    Put And Check At URI In Cluster    ${controller_index_list}    ${controller_index}    ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}    ${body}    ${HEADERS}
+    Put And Check At URI In Cluster    ${controller_index_list}    ${controller_index}    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}%2Fbridge%2F${BRIDGE}    ${body}    ${HEADERS}
     Wait Until Keyword Succeeds    5s    1s    Check Item Occurrence At URI In Cluster    ${controller_index_list}    ${dictionary}    ${OPERATIONAL_TOPO_API}
index d17d5820a9632db5071c1c0b455a621797475505..ef5746edae3785238e93d50530927c5d07c8d8f9 100644 (file)
@@ -68,12 +68,12 @@ Verify OVS Reports Connected
     Should Contain    ${output}    is_connected
 
 Get OVSDB UUID
-    [Arguments]    ${ovs_system_ip}=${TOOLS_SYSTEM_IP}    ${controller_ip}=${ODL_SYSTEM_IP}
+    [Arguments]    ${ovs_system_ip}=${TOOLS_SYSTEM_IP}    ${controller_ip}=${ODL_SYSTEM_IP}     ${controller_http_session}=session
     [Documentation]  Queries the topology in the operational datastore and searches for the node that has
     ...  the ${ovs_system_ip} argument as the "remote-ip".  If found, the value returned will be the value of
     ...  node-id stripped of "ovsdb://uuid/".  If not found, ${EMPTY} will be returned.
     ${uuid}=    Set Variable    ${EMPTY}
-    ${resp}=    RequestsLibrary.Get Request    session    ${OPERATIONAL_TOPO_API}/topology/ovsdb:1
+    ${resp}=    RequestsLibrary.Get Request    ${controller_http_session}    ${OPERATIONAL_TOPO_API}/topology/ovsdb:1
     Should Be Equal As Strings    ${resp.status_code}    200
     ${resp_json}=    To Json    ${resp.content}
     ${topologies}=    Get From Dictionary   ${resp_json}    topology
index a7d903fa04da418cb23417843936edb5483be8c4..42236715876ac334753bef39246908a16f36873b 100644 (file)
@@ -39,3 +39,4 @@ Check Entity Owner Status And Find Owner and Candidate Before Fail
 Create Bridge In Owner and Verify Before Fail
     [Documentation]    Create Bridge in Owner and verify it gets applied from all instances.
     Create Bridge And Verify    ${original_cluster_list}    ${original_owner}
+    [Teardown]    Report_Failure_Due_To_Bug    4908
\ No newline at end of file