Topoprocessing - corrected tests for filtration and unification 48/36748/4
authorSamuel Kontriš <samuel.kontris@pantheon.tech>
Thu, 24 Mar 2016 17:12:48 +0000 (18:12 +0100)
committerVratko Polák <vrpolak@cisco.com>
Thu, 31 Mar 2016 18:06:47 +0000 (18:06 +0000)
of termination points on inventory model

According to change https://git.opendaylight.org/gerrit/#/c/36507/3

Change-Id: I7c2bfcf56f0411922eac77e59c4c78303918fcf8
Signed-off-by: Samuel Kontriš <samuel.kontris@pantheon.tech>
csit/suites/topoprocessing/basic-topology-operations/010_Aggregation.robot
csit/suites/topoprocessing/basic-topology-operations/030_Filtration_termination_points.robot

index d457dbb6bae654947225bf92a85a1d8b14390a2e..2e7302ef12a8eb3ed44c528e890e4decd6791f87 100644 (file)
@@ -164,19 +164,45 @@ Unification Termination Point Inside Inventory
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <node-id>node:    5
     Should Contain X Times    ${resp.content}    <termination-point>    8
+    # of-node:1
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:1']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:1/termination-point/tp:1:1</tp-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:1/termination-point/tp:1:2</tp-ref>    1
+    # of-node:2
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:2']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    3
+    ${tp}    Get Element    ${node}    xpath=.//termination-point[tp-ref='/network-topology:network-topology/topology/openflow-topo:1/node/of-node:2/termination-point/tp:2:2']
+    ${tp}    Element to String    ${tp}
+    Should Contain X Times    ${tp}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:2/termination-point/tp:2:2</tp-ref>    1
+    ${tp}    Get Element    ${node}    xpath=.//termination-point[tp-ref='/network-topology:network-topology/topology/openflow-topo:1/node/of-node:2/termination-point/tp:2:1']
+    ${tp}    Element to String    ${tp}
+    Should Contain X Times    ${tp}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:2/termination-point/tp:2:1</tp-ref>    1
+    ${tp}    Get Element    ${node}    xpath=.//termination-point[tp-ref='/network-topology:network-topology/topology/openflow-topo:1/node/of-node:2/termination-point/tp:3']
+    ${tp}    Element to String    ${tp}
+    Should Contain X Times    ${tp}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:2/termination-point/tp:3</tp-ref>    1
+    # of-node:3
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:3']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    2
+    ${tp}    Get Element    ${node}    xpath=.//termination-point[tp-ref='/network-topology:network-topology/topology/openflow-topo:1/node/of-node:3/termination-point/tp:3:3']
+    ${tp}    Element to String    ${tp}
+    Should Contain X Times    ${tp}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:3/termination-point/tp:3:3</tp-ref>    1
+    ${tp}    Get Element    ${node}    xpath=.//termination-point[tp-ref='/network-topology:network-topology/topology/openflow-topo:1/node/of-node:3/termination-point/tp:3:2']
+    ${tp}    Element to String    ${tp}
+    Should Contain X Times    ${tp}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:3/termination-point/tp:3:2</tp-ref>    1
+    Should Contain X Times    ${tp}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:3/termination-point/tp:3:1</tp-ref>    1
+    # of-node:4
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:4']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:4/termination-point/tp:4:1</tp-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:4/termination-point/tp:4:2</tp-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:4/termination-point/tp:4:3</tp-ref>    1
+    # of-node:5
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:5']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    1
-    [Teardown]    Report_Failure_Due_To_Bug    4674
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:5/termination-point/tp:5:1</tp-ref>    1
index b51ce671b880d98ebc21a3f21e68af532b522611..08136a3787b34bef46b31cf268f97cdcce4fe786 100644 (file)
@@ -48,17 +48,17 @@ Filtration Range Number Inventory Model
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:2']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    2
-    Should Contain X Times    ${node}    <inventory-node-connector-ref xmlns="urn:opendaylight:model:topology:inventory">openflow:2:3</inventory-node-connector-ref>    1
-    Should Contain X Times    ${node}    <inventory-node-connector-ref xmlns="urn:opendaylight:model:topology:inventory">openflow:2:2</inventory-node-connector-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:2/termination-point/tp:3</tp-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:2/termination-point/tp:2:2</tp-ref>    1
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:3']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    2
-    Should Contain X Times    ${node}    <inventory-node-connector-ref xmlns="urn:opendaylight:model:topology:inventory">openflow:3:2</inventory-node-connector-ref>    1
-    Should Contain X Times    ${node}    <inventory-node-connector-ref xmlns="urn:opendaylight:model:topology:inventory">openflow:3:1</inventory-node-connector-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:3/termination-point/tp:3:2</tp-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:3/termination-point/tp:3:1</tp-ref>    1
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:5']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    1
-    Should Contain X Times    ${node}    <inventory-node-connector-ref xmlns="urn:opendaylight:model:topology:inventory">openflow:5:1</inventory-node-connector-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:5/termination-point/tp:5:1</tp-ref>    1
 
 Filtration Specific Number Network Topology Model
     [Documentation]    Test of specific number type of filtration operation on Network Topology model
@@ -77,7 +77,6 @@ Filtration Specific Number Network Topology Model
 Filtration Specific Number Inventory Model
     [Documentation]    Test of specific number type of filtration operation on Inventory model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    opendaylight-inventory-model    termination-point    openflow-topo:1
-    #${request}    Insert Filter    ${request}    ${FILTER_SPECIFIC_NUMBER}    flow-node-inventory:port-number
     ${request}    Insert Filter    ${request}    ${FILTER_SPECIFIC_NUMBER}    flow-node-inventory:maximum-speed
     ${request}    Set Specific Number Filter    ${request}    2
     ${resp}    Send Basic Request    ${request}    network-topology:network-topology/topology/topo:1
@@ -87,12 +86,12 @@ Filtration Specific Number Inventory Model
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:2']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    1
-    Should Contain X Times    ${node}    <inventory-node-connector-ref xmlns="urn:opendaylight:model:topology:inventory">openflow:2:2</inventory-node-connector-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:2/termination-point/tp:2:2</tp-ref>    1
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:3']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    2
-    Should Contain X Times    ${node}    <inventory-node-connector-ref xmlns="urn:opendaylight:model:topology:inventory">openflow:3:2</inventory-node-connector-ref>    1
-    Should Contain X Times    ${node}    <inventory-node-connector-ref xmlns="urn:opendaylight:model:topology:inventory">openflow:3:1</inventory-node-connector-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:3/termination-point/tp:3:2</tp-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:3/termination-point/tp:3:1</tp-ref>    1
 
 Filtration Specific String Network Topology Model
     [Documentation]    Test of specific string type of filtration operation on Network Topology model
@@ -119,11 +118,11 @@ Filtration Specific String Inventory Model
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:2']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    1
-    Should Contain X Times    ${node}    <inventory-node-connector-ref xmlns="urn:opendaylight:model:topology:inventory">openflow:2:1</inventory-node-connector-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:2/termination-point/tp:2:1</tp-ref>    1
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:5']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    1
-    Should Contain X Times    ${node}    <inventory-node-connector-ref xmlns="urn:opendaylight:model:topology:inventory">openflow:5:1</inventory-node-connector-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:5/termination-point/tp:5:1</tp-ref>    1
 
 Filtration Range String Network Topology Model
     [Documentation]    Test of range string type of filtration operation on Network Topology model
@@ -137,15 +136,15 @@ Filtration Range String Network Topology Model
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='bgp:6']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    1
-    Should Contain    ${node}    <tp-ref>/network-topology/topology/network-topo:2/node/bgp:6/termination-point/tp:6:1</tp-ref>
+    Should Contain X Times    ${node}    <tp-ref>/network-topology/topology/network-topo:2/node/bgp:6/termination-point/tp:6:1</tp-ref>    1
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='bgp:7']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    1
-    Should Contain    ${node}    <tp-ref>/network-topology/topology/network-topo:2/node/bgp:7/termination-point/tp:7:2</tp-ref>
+    Should Contain X Times    ${node}    <tp-ref>/network-topology/topology/network-topo:2/node/bgp:7/termination-point/tp:7:2</tp-ref>    1
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='bgp:10']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    1
-    Should Contain    ${node}    <tp-ref>/network-topology/topology/network-topo:2/node/bgp:10/termination-point/tp:10:1</tp-ref>
+    Should Contain X Times    ${node}    <tp-ref>/network-topology/topology/network-topo:2/node/bgp:10/termination-point/tp:10:1</tp-ref>    1
 
 Filtration Range String Inventory Model
     [Documentation]    Test of range string type of filtration operation on Inventory model
@@ -158,12 +157,12 @@ Filtration Range String Inventory Model
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:2']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    2
-    Should Contain    ${node}    <inventory-node-connector-ref xmlns="urn:opendaylight:model:topology:inventory">openflow:2:1</inventory-node-connector-ref>
-    Should Contain    ${node}    <inventory-node-connector-ref xmlns="urn:opendaylight:model:topology:inventory">openflow:2:3</inventory-node-connector-ref>
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:2/termination-point/tp:2:1</tp-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:2/termination-point/tp:3</tp-ref>    1
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:5']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    1
-    Should Contain    ${node}    <inventory-node-connector-ref xmlns="urn:opendaylight:model:topology:inventory">openflow:5:1</inventory-node-connector-ref>
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:5/termination-point/tp:5:1</tp-ref>    1
 
 Filtration Script Network Topology Model
     [Documentation]    Test of script type of filtration operation on Network Topology model
@@ -198,9 +197,9 @@ Filtration Script Inventory Model
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:2']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    2
-    Should Contain X Times    ${node}    <inventory-node-connector-ref xmlns="urn:opendaylight:model:topology:inventory">openflow:2:3</inventory-node-connector-ref>    1
-    Should Contain X Times    ${node}    <inventory-node-connector-ref xmlns="urn:opendaylight:model:topology:inventory">openflow:2:2</inventory-node-connector-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:2/termination-point/tp:3</tp-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:2/termination-point/tp:2:2</tp-ref>    1
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:1']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    1
-    Should Contain X Times    ${node}    <inventory-node-connector-ref xmlns="urn:opendaylight:model:topology:inventory">openflow:1:1</inventory-node-connector-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology:network-topology/topology/openflow-topo:1/node/of-node:1/termination-point/tp:1:1</tp-ref>    1