Topoprocessing - tests correction
[integration/test.git] / csit / suites / topoprocessing / basic-topology-operations / 010_Aggregation.robot
index d99694c46337ae1253ef6a4728c667215ea96fcc..d457dbb6bae654947225bf92a85a1d8b14390a2e 100644 (file)
@@ -6,7 +6,7 @@ Documentation     Test suite to verify unification operation on different models
 ...               xmls and verify output. Topology-id on the end of each urls must match topology-id from xml. Yang models of components in topology are defined in xmls.
 Suite Setup       Setup Environment
 Suite Teardown    Clean Environment
-Test Teardown     Aggregation Test Teardown
+Test Teardown     Test Teardown    network-topology:network-topology/topology/topo:1
 Library           RequestsLibrary
 Library           SSHLibrary
 Library           XML
@@ -25,7 +25,7 @@ Unification Node
     ${resp}    Send Basic Request    ${request}    network-topology:network-topology/topology/topo:1
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <node-id>node:    9
-    : FOR    ${index}    IN RANGE    1    9
+    : FOR    ${index}    IN RANGE    1    10
     \    Should Contain X Times    ${resp.content}    <node-ref>bgp:${index}</node-ref>    1
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='bgp:10']/..
     ${node}    Element to String    ${node}
@@ -40,7 +40,7 @@ Unification Node Inventory
     ${resp}    Send Basic Request    ${request}    network-topology:network-topology/topology/topo:1
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <node-id>node:    8
-    : FOR    ${index}    IN RANGE    1    10
+    : FOR    ${index}    IN RANGE    1    11
     \    Should Contain X Times    ${resp.content}    <node-ref>of-node:${index}</node-ref>    1
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:1']/..
     ${node}    Element to String    ${node}
@@ -60,7 +60,7 @@ Unification Scripting Node
     ${resp}    Send Basic Request    ${request}    network-topology:network-topology/topology/topo:1
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <node-id>node:    9
-    : FOR    ${index}    IN RANGE    1    10
+    : FOR    ${index}    IN RANGE    1    11
     \    Should Contain X Times    ${resp.content}    <node-ref>bgp:${index}</node-ref>    1
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='bgp:1']/..
     ${node}    Element to String    ${node}
@@ -76,7 +76,7 @@ Unification Scripting Node Inventory
     ${resp}    Send Basic Request    ${request}    network-topology:network-topology/topology/topo:1
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <node-id>node:    9
-    : FOR    ${index}    IN RANGE    1    10
+    : FOR    ${index}    IN RANGE    1    11
     \    Should Contain X Times    ${resp.content}    <node-ref>of-node:${index}</node-ref>    1
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:2']/..
     ${node}    Element to String    ${node}
@@ -119,18 +119,42 @@ Unification Termination Point Inside
     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>    6
+    # bgp:1
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='bgp:1']/..
     ${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/network-topo:1/node/bgp:1/termination-point/tp:1:3']
+    ${tp}    Element to String    ${tp}
+    Should Contain X Times    ${tp}    <tp-ref>/network-topology:network-topology/topology/network-topo:1/node/bgp:1/termination-point/tp:1:3</tp-ref>    1
+    ${tp}    Get Element    ${node}    xpath=.//termination-point[tp-ref='/network-topology:network-topology/topology/network-topo:1/node/bgp:1/termination-point/tp:1:1']
+    ${tp}    Element to String    ${tp}
+    Should Contain X Times    ${tp}    <tp-ref>/network-topology:network-topology/topology/network-topo:1/node/bgp:1/termination-point/tp:1:1</tp-ref>    1
+    Should Contain X Times    ${tp}    <tp-ref>/network-topology:network-topology/topology/network-topo:1/node/bgp:1/termination-point/tp:1:2</tp-ref>    1
+    # bgp:3
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='bgp: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/network-topo:1/node/bgp:3/termination-point/tp:3:2']
+    ${tp}    Element to String    ${tp}
+    Should Contain X Times    ${tp}    <tp-ref>/network-topology:network-topology/topology/network-topo:1/node/bgp:3/termination-point/tp:3:2</tp-ref>    1
+    ${tp}    Get Element    ${node}    xpath=.//termination-point[tp-ref='/network-topology:network-topology/topology/network-topo:1/node/bgp:3/termination-point/tp:3:1']
+    ${tp}    Element to String    ${tp}
+    Should Contain X Times    ${tp}    <tp-ref>/network-topology:network-topology/topology/network-topo:1/node/bgp:3/termination-point/tp:3:1</tp-ref>    1
+    # bgp:4
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='bgp:4']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    1
+    ${tp}    Get Element    ${node}    xpath=.//termination-point[tp-ref='/network-topology:network-topology/topology/network-topo:1/node/bgp:4/termination-point/tp:4:1']
+    ${tp}    Element to String    ${tp}
+    Should Contain X Times    ${tp}    <tp-ref>/network-topology:network-topology/topology/network-topo:1/node/bgp:4/termination-point/tp:4:1</tp-ref>    1
+    Should Contain X Times    ${tp}    <tp-ref>/network-topology:network-topology/topology/network-topo:1/node/bgp:4/termination-point/tp:4:2</tp-ref>    1
+    # bgp:5
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='bgp:5']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    1
+    ${tp}    Get Element    ${node}    xpath=.//termination-point[tp-ref='/network-topology:network-topology/topology/network-topo:1/node/bgp:5/termination-point/tp:5:1']
+    ${tp}    Element to String    ${tp}
+    Should Contain X Times    ${tp}    <tp-ref>/network-topology:network-topology/topology/network-topo:1/node/bgp:5/termination-point/tp:5:1</tp-ref>    1
 
 Unification Termination Point Inside Inventory
     [Documentation]    Test aggregate inside operation on termination points
@@ -155,10 +179,4 @@ Unification Termination Point Inside Inventory
     ${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]    Run Keywords    Aggregation Test Teardown
-    ...    AND    Report_Failure_Due_To_Bug    4674
-
-*** Keywords ***
-Aggregation Test Teardown
-    Test Teardown    network-topology:network-topology/topology/topo:1
-    Report_Failure_Due_To_Bug    5157
+    [Teardown]    Report_Failure_Due_To_Bug    4674