Topoprocessing - tests correction 66/35466/7
authorSamuel Kontriš <samuel.kontris@pantheon.tech>
Fri, 26 Feb 2016 12:30:26 +0000 (13:30 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 11 Mar 2016 19:03:02 +0000 (19:03 +0000)
 - reworked aggregation with filtration tests
 - reworked Filtration termination points tests
 - removed unnecessary files
 - corrected some other tests

Change-Id: I8fc28154433517f22965d5eb93a52f218f2401ed
Signed-off-by: Samuel Kontriš <samuel.kontris@pantheon.tech>
csit/libraries/TopoprocessingKeywords.robot
csit/suites/topoprocessing/basic-topology-operations/010_Aggregation.robot
csit/suites/topoprocessing/basic-topology-operations/020_Filtration_nodes.robot
csit/suites/topoprocessing/basic-topology-operations/030_Filtration_termination_points.robot
csit/suites/topoprocessing/basic-topology-operations/040_Filtration_links.robot
csit/suites/topoprocessing/basic-topology-operations/050_Aggregation_filtration.robot
csit/suites/topoprocessing/basic/010_Restconf_OK.robot [deleted file]
csit/suites/topoprocessing/topology-operations/010_Unifications_Tests.robot [deleted file]
csit/variables/topoprocessing/Requests.py [deleted file]
csit/variables/topoprocessing/Topologies.py
csit/variables/topoprocessing/TopologyRequests.py

index 14a5569ff43eae633a098322830d023aa2fb6ba0..ebede24c4a5e88fc5e2a0f454e44bf565301d988 100644 (file)
@@ -72,7 +72,7 @@ Insert Underlay Topologies
     [Documentation]    Insert underlay topologies used by following tests
     Log    Inserting underlay topologies
     # Network underlay topologies
-    : FOR    ${index}    IN RANGE    1    6
+    : FOR    ${index}    IN RANGE    1    7
     \    ${resp}    Put Request    session    ${CONFIG_API}/${TOPOLOGY_URL}/network-topo:${index}    data=${NETWORK_UNDERLAY_TOPOLOGY_${index}}
     \    Log    ${resp.content}
     \    Should Be Equal As Strings    ${resp.status_code}    200
@@ -81,7 +81,7 @@ Insert Underlay Topologies
     Log    ${resp.content}
     Should Be Equal As Strings    ${resp.status_code}    200
     # Openflow underlay topologies
-    : FOR    ${index}    IN RANGE    1    6
+    : FOR    ${index}    IN RANGE    1    7
     \    ${resp}    Put Request    session    ${CONFIG_API}/${TOPOLOGY_URL}/openflow-topo:${index}    data=${OPENFLOW_UNDERLAY_TOPOLOGY_${index}}
     \    Log    ${resp.content}
     \    Should Be Equal As Strings    ${resp.status_code}    200
@@ -110,10 +110,12 @@ Prepare Unification Topology Request
     [Return]    ${request_template}
 
 Prepare Unification Filtration Topology Request
-    [Arguments]    ${request_template}    ${model}    ${target_field}    ${underlay_topo2}
+    [Arguments]    ${request_template}    ${model}    ${correlation_item}    ${target_field1}    ${underlay_topo1}    ${target_field2}
+    ...    ${underlay_topo2}
     [Documentation]    Prepare topology request for unification on two topologies from template
+    ${request_template}    Prepare Unification Filtration Inside Topology Request    ${request_template}    ${model}    ${correlation_item}    ${target_field1}    ${underlay_topo1}
     ${request_template}    Set Element Text    ${request_template}    ${underlay_topo2}    xpath=.//correlation/aggregation/mapping[2]/underlay-topology
-    Insert Target Field    ${request_template}    2    ${target_field}    1
+    Insert Target Field    ${request_template}    2    ${target_field2}    1
     ${request_template}    Set Element Text    ${request_template}    ${model}    xpath=.//correlation/aggregation/mapping[2]/input-model
     ${request_template}    Element to String    ${request_template}
     [Return]    ${request_template}
@@ -132,6 +134,12 @@ Prepare Unification Filtration Inside Topology Request
     ${request_template}    Element to String    ${request_template}
     [Return]    ${request_template}
 
+Insert Apply Filters
+    [Arguments]    ${request_template}    ${mapping}    ${filter_id}
+    ${request_template}    Add Element    ${request_template}    ${APPLY_FILTERS}    xpath=.//correlation/aggregation/mapping[${mapping}]
+    ${request_template}    Set Element Text    ${request_template}    ${filter_id}    xpath=.//correlation/aggregation/mapping[${mapping}]/apply-filters
+    [Return]    ${request_template}
+
 Prepare Filtration Topology Request
     [Arguments]    ${request_template}    ${model}    ${correlation_item}    ${underlay_topo}
     [Documentation]    Prepare topology request for filtration from template
@@ -158,6 +166,13 @@ Insert Filter
     ${request_template}    Set Element Text    ${request_template}    ${target_field}    xpath=.//correlation/filtration/filter/target-field
     [Return]    ${request_template}
 
+Insert Filter With ID
+    [Arguments]    ${request_template}    ${filter_template}    ${target_field}    ${filter_id}
+    [Documentation]    Add filter to filtration with specified id
+    ${request_template}    Insert Filter    ${request_template}    ${filter_template}    ${target_field}
+    ${request_template}    Set Element Text    ${request_template}    ${filter_id}    xpath=.//correlation/filtration/filter/filter-id
+    [Return]    ${request_template}
+
 Set IPV4 Filter
     [Arguments]    ${request_template}    ${ip_address}
     [Documentation]    Set filter ipv4 address
index 0e9def6dd45d2da4a03925c7996dfabf58af0160..d457dbb6bae654947225bf92a85a1d8b14390a2e 100644 (file)
@@ -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}
index 134ab9286d44684addf2a4e064f650c344809d31..e1d1133e991940d38204b61f7e69a2b0c03e6a68 100644 (file)
@@ -42,7 +42,7 @@ Filtration IPV4 Inventory Model
     ${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:    3
-    : FOR    ${index}    IN RANGE    1    3
+    : FOR    ${index}    IN RANGE    1    4
     \    Should Contain X Times    ${resp.content}    <node-ref>of-node:${index}</node-ref>    1
 
 Filtration Range Number Network Topology Model
@@ -53,7 +53,7 @@ Filtration Range Number Network Topology Model
     ${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:    4
-    : FOR    ${index}    IN RANGE    7    10
+    : FOR    ${index}    IN RANGE    7    11
     \    Should Contain X Times    ${resp.content}    <node-ref>bgp:${index}</node-ref>    1
     Should Contain X Times    ${resp.content}    <termination-point>    5
     #node bgp:7
@@ -82,7 +82,7 @@ Filtration Range Number Inventory Model
     ${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:    3
-    : FOR    ${index}    IN RANGE    8    10
+    : FOR    ${index}    IN RANGE    8    11
     \    Should Contain X Times    ${resp.content}    <node-ref>of-node:${index}</node-ref>    1
 
 Filtration Specific Number Network Topology Model
@@ -151,7 +151,7 @@ Filtration Range String Network Topology Model
     ${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:    4
-    : FOR    ${index}    IN RANGE    7    10
+    : FOR    ${index}    IN RANGE    7    11
     \    Should Contain X Times    ${resp.content}    <node-ref>bgp:${index}</node-ref>    1
     Should Contain X Times    ${resp.content}    <termination-point>    5
     #node bgp:7
@@ -180,7 +180,7 @@ Filtration Range String Inventory Model
     ${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:    3
-    : FOR    ${index}    IN RANGE    8    10
+    : FOR    ${index}    IN RANGE    8    11
     \    Should Contain X Times    ${resp.content}    <node-ref>of-node:${index}</node-ref>    1
 
 Filtration IPV6 Network Topology Model
@@ -224,7 +224,7 @@ Filtration Script Network Topology Model
     ${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:    3
-    : FOR    ${index}    IN RANGE    3    5
+    : FOR    ${index}    IN RANGE    3    6
     \    Should Contain X Times    ${resp.content}    <node-ref>bgp:${index}</node-ref>    1
     Should Contain X Times    ${resp.content}    <termination-point>    5
     #node bgp:3
@@ -251,5 +251,5 @@ Filtration Script Inventory Model
     ${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:    3
-    : FOR    ${index}    IN RANGE    1    3
+    : FOR    ${index}    IN RANGE    1    4
     \    Should Contain X Times    ${resp.content}    <node-ref>of-node:${index}</node-ref>    1
index f9a3410eacab0a9ba806ce4061444bb5295ce086..b51ce671b880d98ebc21a3f21e68af532b522611 100644 (file)
@@ -17,26 +17,6 @@ Resource          ../../../libraries/Utils.robot
 Resource          ../../../libraries/TopoprocessingKeywords.robot
 
 *** Test Cases ***
-Filtration IPV4 Network Topology Model
-    [Documentation]    Test of ipv4 type of filtration operation on Network Topology model
-    ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    network-topology-model    termination-point    network-topo:1
-    ${request}    Insert Filter    ${request}    ${FILTER_IPV4}    l3-unicast-igp-topology:igp-termination-point-attributes/l3-unicast-igp-topology:ip-address
-    ${request}    Set IPV4 Filter    ${request}    192.168.1.1/8
-    ${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:    5
-    Should Contain X Times    ${resp.content}    <termination-point>    4
-    ${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
-    Should Contain    ${node}    <tp-id>tp:1:1</tp-id>
-    Should Contain    ${node}    <tp-id>tp:1:2</tp-id>
-    ${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
-    Should Contain    ${node}    <tp-id>tp:3:1</tp-id>
-    Should Contain    ${node}    <tp-id>tp:3:2</tp-id>
-
 Filtration Range Number Network Topology Model
     [Documentation]    Test of range number type of filtration operation on Network Topology model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    network-topology-model    termination-point    network-topo:2
@@ -49,12 +29,12 @@ Filtration Range Number Network Topology Model
     ${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>    2
-    Should Contain    ${node}    <tp-id>tp:7:1</tp-id>
-    Should Contain    ${node}    <tp-id>tp:7:2</tp-id>
+    Should Contain X Times    ${node}    <tp-ref>/network-topology/topology/network-topo:2/node/bgp:7/termination-point/tp:7:1</tp-ref>    1
+    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:6']/..
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <termination-point>    1
-    Should Contain    ${node}    <tp-id>tp:6:1</tp-id>
+    Should Contain X Times    ${node}    <tp-ref>/network-topology/topology/network-topo:2/node/bgp:6/termination-point/tp:6:1</tp-ref>    1
 
 Filtration Range Number Inventory Model
     [Documentation]    Test of range number type of filtration operation on Inventory model
@@ -68,14 +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
     ${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
     ${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    Test Teardown    network-topology:network-topology/topology/topo:1
-    ...    AND    Report_Failure_Due_To_Bug    4674
+    Should Contain X Times    ${node}    <inventory-node-connector-ref xmlns="urn:opendaylight:model:topology:inventory">openflow:5:1</inventory-node-connector-ref>    1
 
 Filtration Specific Number Network Topology Model
     [Documentation]    Test of specific number type of filtration operation on Network Topology model
@@ -89,31 +72,27 @@ Filtration Specific Number Network Topology Model
     ${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-id>tp:7:1</tp-id>
+    Should Contain X Times    ${node}    <tp-ref>/network-topology/topology/network-topo:2/node/bgp:7/termination-point/tp:7:1</tp-ref>    1
 
 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}    Set Specific Number Filter    ${request}    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
     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>    7
-    ${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>    2
+    Should Contain X Times    ${resp.content}    <termination-point>    3
     ${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
     ${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>    1
-    ${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>    3
-    [Teardown]    Run Keywords    Test Teardown    network-topology:network-topology/topology/topo:1
-    ...    AND    Report_Failure_Due_To_Bug    4674
+    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
 
 Filtration Specific String Network Topology Model
     [Documentation]    Test of specific string type of filtration operation on Network Topology model
@@ -127,6 +106,7 @@ Filtration Specific String Network Topology Model
     ${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 X Times    ${node}    <tp-ref>/network-topology/topology/network-topo:2/node/bgp:7/termination-point/tp:7:2</tp-ref>    1
 
 Filtration Specific String Inventory Model
     [Documentation]    Test of specific string type of filtration operation on Inventory model
@@ -139,11 +119,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
     ${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    Test Teardown    network-topology:network-topology/topology/topo:1
-    ...    AND    Report_Failure_Due_To_Bug    4674
+    Should Contain X Times    ${node}    <inventory-node-connector-ref xmlns="urn:opendaylight:model:topology:inventory">openflow:5:1</inventory-node-connector-ref>    1
 
 Filtration Range String Network Topology Model
     [Documentation]    Test of range string type of filtration operation on Network Topology model
@@ -157,12 +137,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>
     ${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>
     ${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>
 
 Filtration Range String Inventory Model
     [Documentation]    Test of range string type of filtration operation on Inventory model
@@ -175,30 +158,18 @@ 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>
     ${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    Test Teardown    network-topology:network-topology/topology/topo:1
-    ...    AND    Report_Failure_Due_To_Bug    4674
-
-Filtration IPV6 Network Topology Model
-    [Documentation]    Test of ipv6 type of filtration operation on Network Topology model
-    ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    network-topology-model    termination-point    network-topo:3
-    ${request}    Insert Filter    ${request}    ${FILTER_IPV6}    l3-unicast-igp-topology:igp-termination-point-attributes/l3-unicast-igp-topology:ip-address
-    ${request}    Set IPV6 Filter    ${request}    fe80:0:0:0:0:0:c0a8:101/120
-    ${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:    5
-    Should Contain X Times    ${resp.content}    <termination-point>    1
-    ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='bgp:11']/..
-    ${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>
 
 Filtration Script Network Topology Model
     [Documentation]    Test of script type of filtration operation on Network Topology model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    network-topology-model    termination-point    network-topo:1
-    ${request}    Insert Filter    ${request}    ${FILTER_SCRIPT}    l3-unicast-igp-topology:igp-termination-point-attributes/l3-unicast-igp-topology:ip-address
-    ${script}    Set Variable    if (node.getValue().indexOf("192.168.1") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
+    ${request}    Insert Filter    ${request}    ${FILTER_SCRIPT}    ovsdb:ofport
+    ${script}    Set Variable    if (node.getValue() > 1117 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
     ${request}    Set Script Filter    ${request}    javascript    ${script}
     ${resp}    Send Basic Request    ${request}    network-topology:network-topology/topology/topo:1
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
@@ -207,9 +178,12 @@ Filtration Script Network Topology Model
     ${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>    2
+    Should Contain X Times    ${node}    <tp-ref>/network-topology/topology/network-topo:1/node/bgp:4/termination-point/tp:4:2</tp-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology/topology/network-topo:1/node/bgp:4/termination-point/tp:4:1</tp-ref>    1
     ${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
+    Should Contain X Times    ${node}    <tp-ref>/network-topology/topology/network-topo:1/node/bgp:5/termination-point/tp:5:1</tp-ref>    1
 
 Filtration Script Inventory Model
     [Documentation]    Test of script type of filtration operation on Inventory model
@@ -224,8 +198,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
     ${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
-    [Teardown]    Run Keywords    Test Teardown    network-topology:network-topology/topology/topo:1
-    ...    AND    Report_Failure_Due_To_Bug    4674
+    Should Contain X Times    ${node}    <inventory-node-connector-ref xmlns="urn:opendaylight:model:topology:inventory">openflow:1:1</inventory-node-connector-ref>    1
index aa94ccd756163ee0d18a779a1e5d4015db03ecd6..fa902be6d34f145a55c848b78a30330876651f4c 100644 (file)
@@ -25,9 +25,9 @@ Filtration Range Number Network Topology Model
     ${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}    <link-id>link:    3
-    Should Contain X Times    ${resp.content}    <link-ref>link:1:4</link-ref>    1
-    Should Contain X Times    ${resp.content}    <link-ref>link:1:3</link-ref>    1
-    Should Contain X Times    ${resp.content}    <link-ref>link:1:2-1</link-ref>    1
+    Should Contain X Times    ${resp.content}    <link-ref>/network-topology/topology/network-topo:1/link/link:1:4</link-ref>    1
+    Should Contain X Times    ${resp.content}    <link-ref>/network-topology/topology/network-topo:1/link/link:1:3</link-ref>    1
+    Should Contain X Times    ${resp.content}    <link-ref>/network-topology/topology/network-topo:1/link/link:1:2-1</link-ref>    1
 
 Filtration Range Number Inventory Model
     [Documentation]    Test of range number type of filtration operation on Inventory model
@@ -40,30 +40,6 @@ Filtration Range Number Inventory Model
     Should Contain X Times    ${resp.content}    <link-ref>link:14:12</link-ref>    1
     Should Contain X Times    ${resp.content}    <link-ref>link:15:13</link-ref>    1
 
-Filtration Specific Number Network Topology Model
-    [Documentation]    Test of specific number type of filtration operation on Network Topology model
-    Pass Execution    Test is being passed due to incorrect target field. Test will be included in execution when corrected.
-    ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    network-topology-model    link    network-topo:1
-    ${request}    Insert Filter    ${request}    ${FILTER_SPECIFIC_NUMBER}    l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:metric
-    ${request}    Set Specific Number Filter    ${request}    12
-    ${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}    <link-id>link:    2
-    Should Contain X Times    ${resp.content}    <link-ref>link:1:4</link-ref>    1
-    Should Contain X Times    ${resp.content}    <link-ref>link:1:2-1</link-ref>    1
-
-Filtration Specific Number Inventory Model
-    [Documentation]    Test of specific number type of filtration operation on Inventory model
-    Pass Execution    Test is being passed due to incorrect target field. Test will be included in execution when corrected.
-    ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    opendaylight-inventory-model    link    openflow-topo:3
-    ${request}    Insert Filter    ${request}    ${FILTER_SPECIFIC_NUMBER}    l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:metric
-    ${request}    Set Specific Number Filter    ${request}    16
-    ${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}    <link-id>link:    1
-    Should Contain X Times    ${resp.content}    <link-ref>link:11:12</link-ref>    1
-    [Teardown]    Run Keywords    Filtration Links Test Teardown
-
 Filtration Specific String Network Topology Model
     [Documentation]    Test of specific string type of filtration operation on Network Topology model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    network-topology-model    link    network-topo:1
@@ -72,8 +48,8 @@ Filtration Specific String Network Topology Model
     ${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}    <link-id>link:    2
-    Should Contain X Times    ${resp.content}    <link-ref>link:1:4</link-ref>    1
-    Should Contain X Times    ${resp.content}    <link-ref>link:1:2-1</link-ref>    1
+    Should Contain X Times    ${resp.content}    <link-ref>/network-topology/topology/network-topo:1/link/link:1:4</link-ref>    1
+    Should Contain X Times    ${resp.content}    <link-ref>/network-topology/topology/network-topo:1/link/link:1:2-1</link-ref>    1
 
 Filtration Specific String Inventory Model
     [Documentation]    Test of specific string type of filtration operation on Inventory model
@@ -93,9 +69,9 @@ Filtration Range String Network Topology Model
     ${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}    <link-id>link:    3
-    Should Contain X Times    ${resp.content}    <link-ref>link:1:4</link-ref>    1
-    Should Contain X Times    ${resp.content}    <link-ref>link:1:3</link-ref>    1
-    Should Contain X Times    ${resp.content}    <link-ref>link:1:2-1</link-ref>    1
+    Should Contain X Times    ${resp.content}    <link-ref>/network-topology/topology/network-topo:1/link/link:1:4</link-ref>    1
+    Should Contain X Times    ${resp.content}    <link-ref>/network-topology/topology/network-topo:1/link/link:1:2-1</link-ref>    1
+    Should Contain X Times    ${resp.content}    <link-ref>/network-topology/topology/network-topo:1/link/link:1:3</link-ref>    1
 
 Filtration Range String Inventory Model
     [Documentation]    Test of range string type of filtration operation on Inventory model
@@ -117,8 +93,8 @@ Filtration Script Network Topology Model
     ${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}    <link-id>link:    2
-    Should Contain X Times    ${resp.content}    <link-ref>link:1:3</link-ref>    1
-    Should Contain X Times    ${resp.content}    <link-ref>link:1:2-2</link-ref>    1
+    Should Contain X Times    ${resp.content}    <link-ref>/network-topology/topology/network-topo:1/link/link:1:3</link-ref>    1
+    Should Contain X Times    ${resp.content}    <link-ref>/network-topology/topology/network-topo:1/link/link:1:2-2</link-ref>    1
 
 Filtration Script Inventory Model
     [Documentation]    Test of script type of filtration operation on Inventory model
index a1f5c42c26ec4e68362a93d5ecfc0f77b316b853..19f5ff1ff2fb3e2a7fcb86dc5f5c7f350692b916 100644 (file)
@@ -20,13 +20,14 @@ Resource          ../../../libraries/TopoprocessingKeywords.robot
 Unification Filtration Node Inside Network Topology model
     [Documentation]    Test unification filtration inside operation on Network Topology model
     ${request}    Prepare Unification Filtration Inside Topology Request    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}    network-topology-model    node    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4    network-topo:4
-    ${request}    Insert Filter    ${request}    ${FILTER_IPV4}    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4
+    ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4    1
+    ${request}    Insert Apply Filters    ${request}    1    1
     ${request}    Set IPV4 Filter    ${request}    192.168.2.1/24
     ${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:    2
     Should Contain    ${resp.content}    <node-ref>bgp:    3
-    : FOR    ${index}    IN RANGE    18    20
+    : FOR    ${index}    IN RANGE    18    21
     \    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:18']/..
     ${node}    Element to String    ${node}
@@ -37,13 +38,14 @@ Unification Filtration Node Inside Network Topology model
 Unification Filtration Node Inside Inventory model
     [Documentation]    Test unification filtration inside operation on Inventory model
     ${request}    Prepare Unification Filtration Inside Topology Request    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}    opendaylight-inventory-model    node    flow-node-inventory:ip-address    openflow-topo:4
-    ${request}    Insert Filter    ${request}    ${FILTER_IPV4}    flow-node-inventory:ip-address
+    ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    flow-node-inventory:ip-address    1
+    ${request}    Insert Apply Filters    ${request}    1    1
     ${request}    Set IPV4 Filter    ${request}    192.168.2.1/24
     ${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:    2
     Should Contain    ${resp.content}    <node-ref>of-node:    4
-    : FOR    ${index}    IN RANGE    17    20
+    : FOR    ${index}    IN RANGE    17    21
     \    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:17']/..
     ${node}    Element to String    ${node}
@@ -54,9 +56,10 @@ Unification Filtration Node Inside Inventory model
 
 Unification Filtration Termination Point Inside Network Topology model
     [Documentation]    Test unification filtration inside operation on Network Topology model
-    ${request}    Prepare Unification Filtration Inside Topology Request    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}    network-topology-model    termination-point    l3-unicast-igp-topology:igp-termination-point-attributes/l3-unicast-igp-topology:ip-address    network-topo:5
-    ${request}    Insert Filter    ${request}    ${FILTER_IPV4}    l3-unicast-igp-topology:igp-termination-point-attributes/l3-unicast-igp-topology:ip-address
-    ${request}    Set IPV4 Filter    ${request}    192.168.1.1/24
+    ${request}    Prepare Unification Filtration Inside Topology Request    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}    network-topology-model    termination-point    ovsdb:name    network-topo:5
+    ${request}    Insert Filter With ID    ${request}    ${FILTER_SPECIFIC_STRING}    ovsdb:name    1
+    ${request}    Insert Apply Filters    ${request}    1    1
+    ${request}    Set Specific String Filter    ${request}    portA
     ${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:    5
@@ -83,54 +86,45 @@ Unification Filtration Termination Point Inside Network Topology model
 
 Unification Filtration Node Network Topology model
     [Documentation]    Test unification filtration operation on Network Topology model
-    ${request}    Prepare Unification Filtration Inside Topology Request    ${UNIFICATION_FILTRATION_NT}    network-topology-model    node    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4    network-topo:4
-    ${request}    Prepare Unification Filtration Topology Request    ${request}    network-topology-model    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4    network-topo:1
-    ${request}    Insert Filter    ${request}    ${FILTER_IPV4}    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4
-    ${request}    Set IPV4 Filter    ${request}    192.168.2.1/24
+    ${target_field}    Set Variable    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4
+    ${request}    Prepare Unification Filtration Topology Request    ${UNIFICATION_FILTRATION_NT}    network-topology-model    node    ${target_field}    network-topo:4
+    ...    ${target_field}    network-topo:1
+    ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4    1
+    ${request}    Insert Apply Filters    ${request}    1    1
+    ${request}    Insert Apply Filters    ${request}    2    1
+    ${request}    Set IPV4 Filter    ${request}    192.168.1.1/24
     ${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:    5
-    : FOR    ${index}    IN RANGE    18    20
-    \    Should Contain X Times    ${resp.content}    <node-ref>bgp:${index}</node-ref>    1
-    : FOR    ${index}    IN RANGE    1    5
-    \    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:18']/..
-    ${node}    Element to String    ${node}
-    Should Contain X Times    ${node}    <supporting-node>    4
-    Should Contain    ${node}    <node-ref>bgp:18</node-ref>
-    Should Contain    ${node}    <node-ref>bgp:20</node-ref>
-    Should Contain    ${node}    <node-ref>bgp:3</node-ref>
-    Should Contain    ${node}    <node-ref>bgp:4</node-ref>
-    Should Contain    ${node}    <termination-point>    4
-    Should Contain    ${node}    <tp-id>tp:3:1</tp-id>
-    Should Contain    ${node}    <tp-id>tp:3:2</tp-id>
-    Should Contain    ${node}    <tp-id>tp:4:1</tp-id>
-    Should Contain    ${node}    <tp-id>tp:4:2</tp-id>
-    ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='bgp:5']/..
-    ${node}    Element to String    ${node}
-    Should Contain    ${node}    <termination-point>    1
-    Should Contain    ${node}    <tp-id>tp:5:1</tp-id>
+    Should Contain X Times    ${resp.content}    <node>    2
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='bgp:1']/..
     ${node}    Element to String    ${node}
-    Should Contain    ${node}    <termination-point>    3
-    Should Contain    ${node}    <tp-id>tp:1:1</tp-id>
-    Should Contain    ${node}    <tp-id>tp:1:2</tp-id>
-    Should Contain    ${node}    <tp-id>tp:1:3</tp-id>
+    Should Contain X Times    ${node}    <supporting-node>    2
+    Should Contain X Times    ${node}    <node-ref>bgp:1</node-ref>    1
+    Should Contain X Times    ${node}    <node-ref>bgp:16</node-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology/topology/network-topo:1/node/bgp:1/termination-point/tp:1:3</tp-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology/topology/network-topo:1/node/bgp:1/termination-point/tp:1:2</tp-ref>    1
+    Should Contain X Times    ${node}    <tp-ref>/network-topology/topology/network-topo:1/node/bgp:1/termination-point/tp:1:1</tp-ref>    1
+    ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='bgp:2']/..
+    ${node}    Element to String    ${node}
+    Should Contain X Times    ${node}    <supporting-node>    2
+    Should Contain X Times    ${node}    <node-ref>bgp:2</node-ref>    1
+    Should Contain X Times    ${node}    <node-ref>bgp:17</node-ref>    1
 
 Unification Filtration Node Inventory model
     [Documentation]    Test unification filtration operation on Inventory model
-    ${request}    Prepare Unification Filtration Inside Topology Request    ${UNIFICATION_FILTRATION_NT}    opendaylight-inventory-model    node    flow-node-inventory:ip-address    openflow-topo:4
-    ${request}    Prepare Unification Filtration Topology Request    ${request}    opendaylight-inventory-model    flow-node-inventory:ip-address    openflow-topo:6
-    ${request}    Insert Filter    ${request}    ${FILTER_IPV4}    flow-node-inventory:ip-address
+    ${request}    Prepare Unification Filtration Topology Request    ${UNIFICATION_FILTRATION_NT}    opendaylight-inventory-model    node    flow-node-inventory:ip-address    openflow-topo:4
+    ...    flow-node-inventory:ip-address    openflow-topo:6
+    ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    flow-node-inventory:ip-address    1
+    ${request}    Insert Apply Filters    ${request}    1    1
+    ${request}    Insert Apply Filters    ${request}    2    1
     ${request}    Set IPV4 Filter    ${request}    192.168.1.1/24
     ${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:    5
-    : FOR    ${index}    IN RANGE    6    10
-    \    Should Contain X Times    ${resp.content}    <node-ref>of-node:${index}</node-ref>    1
-    Should Contain X Times    ${resp.content}    <node-ref>of-node:16</node-ref>    1
-    ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:6']/..
+    Should Contain X Times    ${resp.content}    <node>    2
+    ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:26']/..
     ${node}    Element to String    ${node}
-    Should Contain X Times    ${node}    <supporting-node>    2
-    Should Contain    ${node}    <node-ref>of-node:6</node-ref>
-    Should Contain    ${node}    <node-ref>of-node:16</node-ref>
+    Should Contain X Times    ${node}    <node-ref>of-node:26</node-ref>    1
+    Should Contain X Times    ${node}    <node-ref>of-node:16</node-ref>    1
+    ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='of-node:28']/..
+    ${node}    Element to String    ${node}
+    Should Contain X Times    ${node}    <node-ref>of-node:28</node-ref>    1
diff --git a/csit/suites/topoprocessing/basic/010_Restconf_OK.robot b/csit/suites/topoprocessing/basic/010_Restconf_OK.robot
deleted file mode 100644 (file)
index aa17f2c..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-*** Settings ***
-Documentation     Test suite to verify Restconf is OK
-Suite Setup       Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
-Suite Teardown    Delete All Sessions
-Library           RequestsLibrary
-Variables         ../../../variables/Variables.py
-Resource          ../../../libraries/Utils.robot
-
-*** Variables ***
-${REST_CONTEXT}    /restconf/modules
-
-*** Test Cases ***
-Get Controller Modules
-    [Documentation]    Get the controller modules via Restconf
-    ${resp}    RequestsLibrary.Get Request    session    ${REST_CONTEXT}
-    Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
-    Should Contain    ${resp.content}    ietf-restconf
diff --git a/csit/suites/topoprocessing/topology-operations/010_Unifications_Tests.robot b/csit/suites/topoprocessing/topology-operations/010_Unifications_Tests.robot
deleted file mode 100644 (file)
index fea8bbc..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-*** Settings ***
-Documentation     Test suite to verify unification operation on different models.
-...               Before test starts, configurational file have to be rewriten to change listners registration datastore type from CONFIGURATION to OPERATIONAL.
-...               Need for this change is also a reason why main feature (odl-topoprocessing-framework) is installed after file change and not during boot.
-...               Tests themselves install feature required for specific model, clear karaf logs for futher synchronization, send configurational 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 Enviroment
-Suite Teardown    Test Teardown
-Library           RequestsLibrary
-Library           SSHLibrary
-Variables         ../../../variables/topoprocessing/Requests.py
-Variables         ../../../variables/Variables.py
-Resource          ../../../libraries/Utils.robot
-Resource          ../../../libraries/KarafKeywords.robot
-
-*** Variables ***
-${CONFIGURATION_XML}    ${CURDIR}/../configuration.xml
-${OPERATIONAL_XML}    ${CURDIR}/../operational.xml
-${REMOTE_FILE}    ${WORKSPACE}/${BUNDLEFOLDER}/etc/opendaylight/karaf/80-topoprocessing-config.xml
-${OPERATIONAL}    /restconf/operational
-${CONFIGURATION}    /restconf/config
-
-*** Test Cases ***
-Unification on Network Topology
-    [Documentation]    Test unification operation on Network Topology model
-    Prepare New Feature Installation
-    Install a Feature    odl-topoprocessing-network-topology odl-bgpcep-pcep-all    timeout=30
-    Wait For Karaf Log    Registering Topology Request Listener    300
-    ${resp}    RequestsLibrary.Put Request    session    ${CONFIGURATION}/${TOPOLOGY_URL}/unif:1    data=${UNIFICATION_NT}
-    Log    ${CONFIGURATION}/${TOPOLOGY_URL}/unif:1
-    Should Be Equal As Strings    ${resp.status_code}    200
-    Wait For Karaf Log    Correlation configuration successfully read
-    ${resp}    RequestsLibrary.Put Request    session    ${CONFIGURATION}/${TOPOLOGY_URL}/und-topo:1    data=${UNDERLAY_TOPOLOGY_1}
-    Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
-    Issue Command On Karaf Console    log:clear
-    ${resp}    RequestsLibrary.Put Request    session    ${CONFIGURATION}/${TOPOLOGY_URL}/und-topo:2    data=${UNDERLAY_TOPOLOGY_2}
-    Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
-    Wait For Karaf Log    Transaction successfully written
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL}/network-topology:network-topology
-    Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
-    Should Contain    ${resp.content}    <topology-id>unif:1</topology-id>
-    Should Contain X Times    ${resp.content}    <node-id>node:    9
-    Should Match Regexp    ${resp.content}    <node><node-id>node:.?</node-id>((<supporting-node><node-ref>pcep:5</node-ref><topology-ref>und-topo:1</topology-ref></supporting-node>)|(<supporting-node><node-ref>pcep:10</node-ref><topology-ref>und-topo:2</topology-ref></supporting-node>)){2}</node>
-
-*** Keywords ***
-Setup Enviroment
-    [Documentation]    Setup karaf enviroment for following tests
-    Open Connection    ${ODL_SYSTEM_IP}
-    Flexible Controller Login
-    Put File    ${CONFIGURATION_XML}    ${REMOTE_FILE}
-    Close Connection
-    Issue Command On Karaf Console    log:set DEBUG org.opendaylight.topoprocessing
-    Install a Feature    odl-topoprocessing-framework odl-restconf-noauth    timeout=30
-    Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${SEND_ACCEPT_XML_HEADERS}
-
-Test Teardown
-    [Documentation]    Revert startup changes
-    Open Connection    ${ODL_SYSTEM_IP}
-    Flexible Controller Login
-    Put File    ${OPERATIONAL_XML}    ${REMOTE_FILE}
-    Close Connection
-    Delete All Sessions
-
-Wait For Karaf Log
-    [Arguments]    ${message}    ${timeout}=60
-    [Documentation]    Read karaf logs until message appear
-    Open Connection    ${ODL_SYSTEM_IP}    port=${KARAF_SHELL_PORT}    prompt=${KARAF_PROMPT}    timeout=${timeout}
-    Flexible SSH Login    ${KARAF_USER}    ${KARAF_PASSWORD}
-    Write    log:tail
-    Read Until    ${message}
-    Close Connection
-
-Prepare New Feature Installation
-    [Documentation]    Clears karaf logs and CONFIGURATION datastore
-    ${resp}    RequestsLibrary.Delete Request    session    ${CONFIGURATION}/network-topology:network-topology
-    Issue Command On Karaf Console    log:clear
diff --git a/csit/variables/topoprocessing/Requests.py b/csit/variables/topoprocessing/Requests.py
deleted file mode 100644 (file)
index 85b05ea..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-UNIFICATION_NT = '''<topology xmlns="urn:opendaylight:topology:correlation" xmlns:n="urn:TBD:params:xml:ns:yang:network-topology">
-                        <n:topology-id>unif:1</n:topology-id>
-                        <correlations>
-                            <output-model>network-topology-model</output-model>
-                            <correlation>
-                                <correlation-id>1</correlation-id>
-                                <type>aggregation-only</type>
-                                <correlation-item>node</correlation-item>
-                                <aggregation>
-                                    <aggregation-type>unification</aggregation-type>
-                                    <mapping>
-                                        <input-model>network-topology-model</input-model>
-                                        <underlay-topology>und-topo:1</underlay-topology>
-                                        <target-field>network-topology-pcep:path-computation-client/network-topology-pcep:ip-address</target-field>
-                                        <aggregate-inside>false</aggregate-inside>
-                                    </mapping>
-                                    <mapping>
-                                        <input-model>network-topology-model</input-model>
-                                        <underlay-topology>und-topo:2</underlay-topology>
-                                        <target-field>network-topology-pcep:path-computation-client/network-topology-pcep:ip-address</target-field>
-                                        <aggregate-inside>false</aggregate-inside>
-                                    </mapping>
-                                </aggregation>
-                            </correlation>
-                        </correlations>
-                    </topology>'''
-
-UNDERLAY_TOPOLOGY_1 = '''<topology
-                                xmlns="urn:TBD:params:xml:ns:yang:network-topology"
-                                xmlns:pcep="urn:opendaylight:params:xml:ns:yang:topology:pcep">
-                            <topology-id>und-topo:1</topology-id>
-                            <topology-types>
-                                <pcep:topology-pcep></pcep:topology-pcep>
-                            </topology-types>
-                            <node>
-                                <node-id>pcep:1</node-id>
-                                <pcep:path-computation-client>
-                                    <pcep:ip-address>192.168.1.1</pcep:ip-address>
-                                </pcep:path-computation-client>
-                            </node>
-                            <node>
-                                <node-id>pcep:2</node-id>
-                                <pcep:path-computation-client>
-                                    <pcep:ip-address>192.168.1.2</pcep:ip-address>
-                                </pcep:path-computation-client>
-                            </node>
-                            <node>
-                                <node-id>pcep:3</node-id>
-                                <pcep:path-computation-client>
-                                    <pcep:ip-address>192.168.2.1</pcep:ip-address>
-                                </pcep:path-computation-client>
-                            </node>
-                            <node>
-                                <node-id>pcep:4</node-id>
-                                <pcep:path-computation-client>
-                                    <pcep:ip-address>192.168.2.2</pcep:ip-address>
-                                </pcep:path-computation-client>
-                            </node>
-                            <node>
-                                <node-id>pcep:5</node-id>
-                                <pcep:path-computation-client>
-                                    <pcep:ip-address>192.168.2.3</pcep:ip-address>
-                                </pcep:path-computation-client>
-                            </node>
-                        </topology>'''
-
-UNDERLAY_TOPOLOGY_2 = '''<topology
-                                xmlns="urn:TBD:params:xml:ns:yang:network-topology"
-                                xmlns:pcep="urn:opendaylight:params:xml:ns:yang:topology:pcep">
-                            <topology-id>und-topo:2</topology-id>
-                            <topology-types>
-                                <pcep:topology-pcep></pcep:topology-pcep>
-                            </topology-types>
-                            <node>
-                                <node-id>pcep:6</node-id>
-                                <pcep:path-computation-client>
-                                    <pcep:ip-address>192.168.1.3</pcep:ip-address>
-                                </pcep:path-computation-client>
-                            </node>
-                            <node>
-                                <node-id>pcep:7</node-id>
-                                <pcep:path-computation-client>
-                                    <pcep:ip-address>192.168.1.4</pcep:ip-address>
-                                </pcep:path-computation-client>
-                            </node>
-                            <node>
-                                <node-id>pcep:8</node-id>
-                                <pcep:path-computation-client>
-                                    <pcep:ip-address>192.168.2.4</pcep:ip-address>
-                                </pcep:path-computation-client>
-                            </node>
-                            <node>
-                                <node-id>pcep:9</node-id>
-                                <pcep:path-computation-client>
-                                    <pcep:ip-address>192.168.2.5</pcep:ip-address>
-                                </pcep:path-computation-client>
-                            </node>
-                            <node>
-                                <node-id>pcep:10</node-id>
-                                <pcep:path-computation-client>
-                                    <pcep:ip-address>192.168.2.3</pcep:ip-address>
-                                </pcep:path-computation-client>
-                            </node>
-                        </topology>'''
index 2056d3bb837ac17f9665f1999b36024977e101d9..783ac76532284eea2336e71c6babcce1946c90d1 100644 (file)
@@ -399,7 +399,8 @@ NETWORK_UNDERLAY_TOPOLOGY_4 = '''<topology
 NETWORK_UNDERLAY_TOPOLOGY_5 = '''<topology
                                 xmlns="urn:TBD:params:xml:ns:yang:network-topology"
                                 xmlns:igp="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology"
-                                xmlns:isis="urn:TBD:params:xml:ns:yang:network:isis-topology">
+                                xmlns:isis="urn:TBD:params:xml:ns:yang:network:isis-topology"
+                                xmlns:ovsdb="urn:opendaylight:params:xml:ns:yang:ovsdb">
                             <topology-id>network-topo:5</topology-id>
                             <node>
                                 <node-id>bgp:21</node-id>
@@ -412,18 +413,21 @@ NETWORK_UNDERLAY_TOPOLOGY_5 = '''<topology
                                 </igp:igp-node-attributes>
                                 <termination-point>
                                     <tp-id>tp:21:1</tp-id>
+                                    <ovsdb:name>portA</ovsdb:name>
                                     <igp:igp-termination-point-attributes>
                                         <igp:ip-address>192.168.1.9</igp:ip-address>
                                     </igp:igp-termination-point-attributes>
                                 </termination-point>
                                 <termination-point>
                                     <tp-id>tp:21:2</tp-id>
+                                    <ovsdb:name>portA</ovsdb:name>
                                     <igp:igp-termination-point-attributes>
                                        <igp:ip-address>192.168.1.8</igp:ip-address>
                                     </igp:igp-termination-point-attributes>
                                 </termination-point>
                                 <termination-point>
                                     <tp-id>tp:21:3</tp-id>
+                                    <ovsdb:name>portA</ovsdb:name>
                                     <igp:igp-termination-point-attributes>
                                         <igp:ip-address>192.168.1.8</igp:ip-address>
                                     </igp:igp-termination-point-attributes>
@@ -440,12 +444,14 @@ NETWORK_UNDERLAY_TOPOLOGY_5 = '''<topology
                                 </igp:igp-node-attributes>
                                 <termination-point>
                                     <tp-id>tp:22:1</tp-id>
+                                    <ovsdb:name>portA</ovsdb:name>
                                     <igp:igp-termination-point-attributes>
                                         <igp:ip-address>192.168.2.9</igp:ip-address>
                                     </igp:igp-termination-point-attributes>
                                 </termination-point>
                                 <termination-point>
                                     <tp-id>tp:22:2</tp-id>
+                                    <ovsdb:name>portB</ovsdb:name>
                                     <igp:igp-termination-point-attributes>
                                         <igp:ip-address>192.168.1.7</igp:ip-address>
                                     </igp:igp-termination-point-attributes>
@@ -472,18 +478,21 @@ NETWORK_UNDERLAY_TOPOLOGY_5 = '''<topology
                                 </igp:igp-node-attributes>
                                 <termination-point>
                                     <tp-id>tp:24:1</tp-id>
+                                    <ovsdb:name>portA</ovsdb:name>
                                     <igp:igp-termination-point-attributes>
                                         <igp:ip-address>192.168.1.7</igp:ip-address>
                                     </igp:igp-termination-point-attributes>
                                 </termination-point>
                                 <termination-point>
                                     <tp-id>tp:24:2</tp-id>
+                                    <ovsdb:name>portA</ovsdb:name>
                                     <igp:igp-termination-point-attributes>
                                         <igp:ip-address>192.168.1.7</igp:ip-address>
                                     </igp:igp-termination-point-attributes>
                                 </termination-point>
                                 <termination-point>
                                     <tp-id>tp:24:3</tp-id>
+                                    <ovsdb:name>portB</ovsdb:name>
                                     <igp:igp-termination-point-attributes>
                                         <igp:ip-address>192.168.1.7</igp:ip-address>
                                     </igp:igp-termination-point-attributes>
@@ -619,6 +628,7 @@ OPENFLOW_UNDERLAY_NODES = '''
         <node-connector>
             <id>openflow:1:1</id>
             <flov-inv:port-number>1</flov-inv:port-number>
+            <flov-inv:maximum-speed>1</flov-inv:maximum-speed>
             <flov-inv:name>portC</flov-inv:name>
         </node-connector>
         <node-connector>
@@ -634,16 +644,19 @@ OPENFLOW_UNDERLAY_NODES = '''
         <node-connector>
             <id>openflow:2:1</id>
             <flov-inv:port-number>1</flov-inv:port-number>
+            <flov-inv:maximum-speed>1</flov-inv:maximum-speed>
             <flov-inv:name>portB</flov-inv:name>
         </node-connector>
         <node-connector>
             <id>openflow:2:2</id>
             <flov-inv:port-number>2</flov-inv:port-number>
+            <flov-inv:maximum-speed>2</flov-inv:maximum-speed>
             <flov-inv:name>portD</flov-inv:name>
         </node-connector>
         <node-connector>
             <id>openflow:2:3</id>
             <flov-inv:port-number>3</flov-inv:port-number>
+            <flov-inv:maximum-speed>3</flov-inv:maximum-speed>
             <flov-inv:name>portA</flov-inv:name>
         </node-connector>
         <flov-inv:manufacturer>Pantheon Technologies</flov-inv:manufacturer>
@@ -655,14 +668,17 @@ OPENFLOW_UNDERLAY_NODES = '''
         <node-connector>
             <id>openflow:3:1</id>
             <flov-inv:port-number>2</flov-inv:port-number>
+            <flov-inv:maximum-speed>2</flov-inv:maximum-speed>
         </node-connector>
         <node-connector>
             <id>openflow:3:2</id>
             <flov-inv:port-number>2</flov-inv:port-number>
+            <flov-inv:maximum-speed>2</flov-inv:maximum-speed>
         </node-connector>
         <node-connector>
             <id>openflow:3:3</id>
             <flov-inv:port-number>1</flov-inv:port-number>
+            <flov-inv:maximum-speed>1</flov-inv:maximum-speed>
         </node-connector>
         <flov-inv:manufacturer>Pantheon Technologies</flov-inv:manufacturer>
         <flov-inv:ip-address>192.168.1.3</flov-inv:ip-address>
@@ -673,14 +689,17 @@ OPENFLOW_UNDERLAY_NODES = '''
         <node-connector>
             <id>openflow:4:1</id>
             <flov-inv:port-number>1</flov-inv:port-number>
+            <flov-inv:maximum-speed>1</flov-inv:maximum-speed>
         </node-connector>
         <node-connector>
             <id>openflow:4:2</id>
             <flov-inv:port-number>1</flov-inv:port-number>
+            <flov-inv:maximum-speed>1</flov-inv:maximum-speed>
         </node-connector>
         <node-connector>
             <id>openflow:4:3</id>
             <flov-inv:port-number>1</flov-inv:port-number>
+            <flov-inv:maximum-speed>1</flov-inv:maximum-speed>
         </node-connector>
         <flov-inv:manufacturer>Cisco</flov-inv:manufacturer>
         <flov-inv:ip-address>192.168.2.1</flov-inv:ip-address>
@@ -691,6 +710,7 @@ OPENFLOW_UNDERLAY_NODES = '''
         <node-connector>
             <id>openflow:5:1</id>
             <flov-inv:port-number>3</flov-inv:port-number>
+            <flov-inv:maximum-speed>3</flov-inv:maximum-speed>
             <flov-inv:name>portB</flov-inv:name>
         </node-connector>
         <flov-inv:manufacturer>Cisco</flov-inv:manufacturer>
index 96531d2994465935cad2c7f33b48a474906a5667..79b65a3f2da951185e6f996d39fd6d83296d546d 100644 (file)
@@ -57,15 +57,16 @@ UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE = '''<topology xmlns="urn:opendayligh
                                 <aggregation>
                                     <aggregation-type>{aggregation-type}</aggregation-type>
                                     <mapping>
-                                        <apply-filters>1</apply-filters>
                                         <input-model>{input-model}</input-model>
                                         <underlay-topology>{underlay-topology-id}</underlay-topology>
-                                        <!-- target field -->
                                         <aggregate-inside>true</aggregate-inside>
+                                        <!-- target field -->
+                                        <!-- apply filters -->
                                     </mapping>
                                 </aggregation>
                                 <filtration>
                                     <underlay-topology>{underlay-topology-id}</underlay-topology>
+                                    <!-- Filter -->
                                 </filtration>
                             </correlation>
                         </correlations>
@@ -81,22 +82,24 @@ UNIFICATION_FILTRATION_NT = '''<topology xmlns="urn:opendaylight:topology:correl
                                 <correlation-item>{correlation-item}</correlation-item>
                                 <aggregation>
                                     <aggregation-type>{aggregation-type}</aggregation-type>
-                                   <mapping>
-                                        <apply-filters>1</apply-filters>
+                                    <mapping>
                                         <input-model>{input-model}</input-model>
                                         <underlay-topology>{underlay-topology-id}</underlay-topology>
-                                        <!-- target field -->
                                         <aggregate-inside>false</aggregate-inside>
+                                        <!-- target field -->
+                                        <!-- apply filters -->
                                     </mapping>
                                     <mapping>
                                         <input-model>{input-model}</input-model>
                                         <underlay-topology>{underlay-topology-id}</underlay-topology>
-                                        <!-- target field -->
                                         <aggregate-inside>false</aggregate-inside>
+                                        <!-- target field -->
+                                        <!-- apply filters -->
                                     </mapping>
                                 </aggregation>
                                 <filtration>
                                     <underlay-topology>{underlay-topology-id}</underlay-topology>
+                                    <!-- Filter -->
                                 </filtration>
                             </correlation>
                         </correlations>
@@ -118,6 +121,10 @@ FILTRATION_NT = '''<topology xmlns="urn:opendaylight:topology:correlation" xmlns
                     </correlations>
                 </topology>'''
 
+APPLY_FILTERS = '''
+<apply-filters>{filter-id}</apply-filters>
+'''
+
 TARGET_FIELD = '''
 <target-field>
     <target-field-path>{target-field-path}</target-field-path>