Topoprocessing - Refactor of mostly target fields' paths 55/41555/5
authorMartin Dindoffer <odlgerritforwarder@dindoffer.eu>
Fri, 8 Jul 2016 12:54:57 +0000 (14:54 +0200)
committerJamo Luhrsen <jluhrsen@redhat.com>
Fri, 15 Jul 2016 18:32:21 +0000 (18:32 +0000)
Moved locally defined target fields' paths into a .py file as constants
Also instroduced a variable for overlay topology url and renamed Teardown keywords to reflect their behaviour

Change-Id: Iaa24b160142b03e034a8d385ecf72eeafd2c3fd9
Signed-off-by: Martin Dindoffer <odlgerritforwarder@dindoffer.eu>
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-topology-operations/060_Link_computation.robot
csit/suites/topoprocessing/basic-topology-operations/070_Underlay_update.robot
csit/suites/topoprocessing/basic-topology-operations/080_Underlay_item_removal.robot
csit/variables/topoprocessing/TargetFields.py [new file with mode: 0644]

index 7c9285aa653f8717b8bea9618accd2ab0d446261..14f035341031ce7e2fc5a2ff6bded795a58d1ec0 100644 (file)
@@ -86,7 +86,7 @@ Clean Environment
     Close Connection
     Delete All Sessions
 
-Test Teardown
+Delete Overlay Topology
     [Arguments]    ${overlay_topology}
     [Documentation]    Delete overlay topologies from datastore
     Log    ---- Test Teardown ----
@@ -94,10 +94,10 @@ Test Teardown
     ${resp}    Delete Request    session    ${CONFIG_API}/${overlay_topology}
     Should Be Equal As Strings    ${resp.status_code}    200
 
-Test Teardown With Underlay Topologies Refresh
+Refresh Underlay Topologies And Delete Overlay Topology
     [Arguments]    ${overlay_topology}
     [Documentation]    Deletes given overlay topology from datastore and overwrites the underlaying ones with initial topologies
-    Test Teardown    ${overlay_topology}
+    Delete Overlay Topology    ${overlay_topology}
     Insert Underlay Topologies
 
 Prepare New Feature Installation
index bc551bf1b5666f84eb02bcb048e48884599fe286..8ca73335d5582e2febfa925c84fad418b5a408ec 100644 (file)
@@ -6,24 +6,28 @@ 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     Test Teardown    network-topology:network-topology/topology/topo:1
+Test Teardown     Delete Overlay Topology    ${OVERLAY_TOPO_URL}
 Library           RequestsLibrary
 Library           SSHLibrary
 Library           XML
 Variables         ../../../variables/topoprocessing/TopologyRequests.py
+Variables         ../../../variables/topoprocessing/TargetFields.py
 Variables         ../../../variables/Variables.py
 Resource          ../../../libraries/KarafKeywords.robot
 Resource          ../../../libraries/Utils.robot
 Resource          ../../../libraries/TopoprocessingKeywords.robot
 
+*** Variables ***
+${OVERLAY_TOPO_URL}    ${TOPOLOGY_URL}/topo:1
+
 *** Test Cases ***
 Unification Node
     [Documentation]    Test unification operation on Network Topology model
     ${model}    Set Variable    network-topology-model
     ${request}    Prepare Unification Topology Request    ${UNIFICATION_NT}    ${model}    node    network-topo:1    network-topo:2
-    ${request}    Insert Target Field    ${request}    0    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4    0
-    ${request}    Insert Target Field    ${request}    1    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4    0
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    8
+    ${request}    Insert Target Field    ${request}    0    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    0
+    ${request}    Insert Target Field    ${request}    1    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    0
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    8
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <supporting-node>    10
     Should Contain X Times    ${resp.content}    <termination-point    14
@@ -41,9 +45,9 @@ Unification Node Inventory
     [Documentation]    Test unification operation on inventory model
     ${model}    Set Variable    opendaylight-inventory-model
     ${request}    Prepare Unification Topology Request    ${UNIFICATION_NT}    ${model}    node    openflow-topo:1    openflow-topo:2
-    ${request}    Insert Target Field    ${request}    0    flow-node-inventory:ip-address    0
-    ${request}    Insert Target Field    ${request}    1    flow-node-inventory:ip-address    0
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    7
+    ${request}    Insert Target Field    ${request}    0    ${OPENFLOW_NODE_IP_ADDRESS}    0
+    ${request}    Insert Target Field    ${request}    1    ${OPENFLOW_NODE_IP_ADDRESS}    0
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    7
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <supporting-node>    10
     Should Contain X Times    ${resp.content}    <termination-point    12
@@ -60,10 +64,10 @@ Unification Scripting Node
     [Documentation]    Test unification operation on Network Topology model using scripting
     ${model}    Set Variable    network-topology-model
     ${request}    Prepare Unification Topology Request    ${UNIFICATION_NT}    ${model}    node    network-topo:1    network-topo:2
-    ${request}    Insert Target Field    ${request}    0    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4    0
-    ${request}    Insert Target Field    ${request}    1    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4    0
+    ${request}    Insert Target Field    ${request}    0    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    0
+    ${request}    Insert Target Field    ${request}    1    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    0
     ${request}    Insert Scripting into Request    ${request}    javascript    if (originalItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.1") > -1 && newItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.3") > -1 || originalItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.3") > -1 && newItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.1") > -1) {aggregable.setResult(true);} else { aggregable.setResult(false);}
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    9
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    9
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <supporting-node>    10
     Should Contain X Times    ${resp.content}    <termination-point    14
@@ -82,10 +86,10 @@ Unification Scripting Node Inventory
     [Documentation]    Test unification operation on inventory model using scripting
     ${model}    Set Variable    opendaylight-inventory-model
     ${request}    Prepare Unification Topology Request    ${UNIFICATION_NT}    ${model}    node    openflow-topo:1    openflow-topo:2
-    ${request}    Insert Target Field    ${request}    0    flow-node-inventory:ip-address    0
-    ${request}    Insert Target Field    ${request}    1    flow-node-inventory:ip-address    0
+    ${request}    Insert Target Field    ${request}    0    ${OPENFLOW_NODE_IP_ADDRESS}    0
+    ${request}    Insert Target Field    ${request}    1    ${OPENFLOW_NODE_IP_ADDRESS}    0
     ${request}    Insert Scripting into Request    ${request}    javascript    if (originalItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.2") > -1 && newItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.4") > -1 || originalItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.4") > -1 && newItem.getLeafNodes().get(java.lang.Integer.valueOf('0')).getValue().indexOf("192.168.1.2") > -1) {aggregable.setResult(true);} else { aggregable.setResult(false);}
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    9
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    9
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <supporting-node>    10
     Should Contain X Times    ${resp.content}    <termination-point    12
@@ -104,8 +108,8 @@ Unification Node Inside
     [Documentation]    Test of unification type of aggregation inside on nodes on Network Topology model
     ${model}    Set Variable    network-topology-model
     ${request}    Prepare Unification Inside Topology Request    ${UNIFICATION_NT_AGGREGATE_INSIDE}    ${model}    node    network-topo:1
-    ${request}    Insert Target Field    ${request}    0    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4    0
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    4
+    ${request}    Insert Target Field    ${request}    0    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    0
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    4
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <supporting-node>    5
     Should Contain X Times    ${resp.content}    <termination-point    8
@@ -119,8 +123,8 @@ Unification Node Inside Inventory
     [Documentation]    Test of unification type of aggregation inside on nodes on Inventory model
     ${model}    Set Variable    opendaylight-inventory-model
     ${request}    Prepare Unification Inside Topology Request    ${UNIFICATION_NT_AGGREGATE_INSIDE}    ${model}    node    openflow-topo:2
-    ${request}    Insert Target Field    ${request}    0    flow-node-inventory:ip-address    0
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    4
+    ${request}    Insert Target Field    ${request}    0    ${OPENFLOW_NODE_IP_ADDRESS}    0
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    4
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <supporting-node>    5
     Should Contain X Times    ${resp.content}    <termination-point    0
@@ -134,8 +138,8 @@ Unification Termination Point Inside
     [Documentation]    Test aggregate inside operation on termination points
     ${model}    Set Variable    network-topology-model
     ${request}    Prepare Unification Inside Topology Request    ${UNIFICATION_NT_AGGREGATE_INSIDE}    ${model}    termination-point    network-topo:1
-    ${request}    Insert Target Field    ${request}    0    ovsdb:ofport    0
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    5
+    ${request}    Insert Target Field    ${request}    0    ${OVSDB_OFPORT}    0
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    5
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <supporting-node>    5
     Should Contain X Times    ${resp.content}    <tp-ref>    8
@@ -154,8 +158,8 @@ Unification Termination Point Inside Inventory
     [Documentation]    Test aggregate inside operation on termination points
     ${model}    Set Variable    opendaylight-inventory-model
     ${request}    Prepare Unification Inside Topology Request    ${UNIFICATION_NT_AGGREGATE_INSIDE}    ${model}    termination-point    openflow-topo:1
-    ${request}    Insert Target Field    ${request}    0    flow-node-inventory:port-number    0
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    5
+    ${request}    Insert Target Field    ${request}    0    ${OPENFLOW_NODE_CONNECTOR_PORT_NUMBER}    0
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    5
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <supporting-node>    5
     Should Contain X Times    ${resp.content}    <tp-ref>    12
index d569e68d599e9c9aec4082585a23412bfc7296dd..b547e8749b2aaba06ec8574f5b3fa0f28253af50 100644 (file)
@@ -6,123 +6,127 @@ Documentation     Test suite to verify fitration operation on different models.
 ...               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     Test Teardown    network-topology:network-topology/topology/topo:1
+Test Teardown     Delete Overlay Topology    ${OVERLAY_TOPO_URL}
 Library           RequestsLibrary
 Library           SSHLibrary
 Library           XML
 Variables         ../../../variables/topoprocessing/TopologyRequests.py
+Variables         ../../../variables/topoprocessing/TargetFields.py
 Variables         ../../../variables/Variables.py
 Resource          ../../../libraries/KarafKeywords.robot
 Resource          ../../../libraries/Utils.robot
 Resource          ../../../libraries/TopoprocessingKeywords.robot
 
+*** Variables ***
+${OVERLAY_TOPO_URL}    ${TOPOLOGY_URL}/topo:1
+
 *** 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    node    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}    Insert Filter    ${request}    ${FILTER_IPV4}    ${ISIS_NODE_TE_ROUTER_ID_IPV4}
     ${request}    Set IPV4 Filter    ${request}    192.168.1.1/24
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    2
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    2
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Check Filtered Nodes in Topology    ${resp.content}    3    bgp:1    bgp:2
 
 Filtration IPV4 Inventory Model
     [Documentation]    Test of ipv4 type of filtration operation on Inventory model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    opendaylight-inventory-model    node    openflow-topo:1
-    ${request}    Insert Filter    ${request}    ${FILTER_IPV4}    flow-node-inventory:ip-address
+    ${request}    Insert Filter    ${request}    ${FILTER_IPV4}    ${OPENFLOW_NODE_IP_ADDRESS}
     ${request}    Set IPV4 Filter    ${request}    192.168.1.1/24
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    3
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    3
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Check Filtered Nodes in Topology    ${resp.content}    8    of-node:1    of-node:2    of-node:3
 
 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    node    network-topo:2
-    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    ovsdb:ovs-version
+    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    ${OVSDB_OVS_VERSION}
     ${request}    Set Range Number Filter    ${request}    20    25
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    4
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    4
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Check Filtered Nodes in Topology    ${resp.content}    5    bgp:7    bgp:8    bgp:9    bgp:10
 
 Filtration Range Number Inventory Model
     [Documentation]    Test of range number type of filtration operation on Inventory model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    opendaylight-inventory-model    node    openflow-topo:2
-    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    flow-node-inventory:serial-number
+    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    ${OPENFLOW_NODE_SERIAL_NUMBER}
     ${request}    Set Range Number Filter    ${request}    20    25
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    3
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    3
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Check Filtered Nodes in Topology    ${resp.content}    0    of-node:8    of-node:9    of-node:10
 
 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    node    network-topo:2
-    ${request}    Insert Filter    ${request}    ${FILTER_SPECIFIC_STRING}    ovsdb:ovs-version
+    ${request}    Insert Filter    ${request}    ${FILTER_SPECIFIC_STRING}    ${OVSDB_OVS_VERSION}
     ${request}    Set Specific String Filter    ${request}    25
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    2
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    2
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>    ${EMPTY}
     Check Filtered Nodes in Topology    ${resp.content}    2    bgp:9    bgp:10
 
 Filtration Specific String Inventory Model
     [Documentation]    Test of specific string type of filtration operation on Inventory model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    opendaylight-inventory-model    node    openflow-topo:2
-    ${request}    Insert Filter    ${request}    ${FILTER_SPECIFIC_STRING}    flow-node-inventory:serial-number
+    ${request}    Insert Filter    ${request}    ${FILTER_SPECIFIC_STRING}    ${OPENFLOW_NODE_SERIAL_NUMBER}
     ${request}    Set Specific String Filter    ${request}    21
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    2
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    2
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Check Filtered Nodes in Topology    ${resp.content}    0    of-node:8    of-node:9
 
 Filtration Range String Network Topology Model
     [Documentation]    Test of range string type of filtration operation on Network Topology model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    network-topology-model    node    network-topo:2
-    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_STRING}    ovsdb:ovs-version
+    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_STRING}    ${OVSDB_OVS_VERSION}
     ${request}    Set Range String Filter    ${request}    20    25
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    4
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    4
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Check Filtered Nodes in Topology    ${resp.content}    5    bgp:7    bgp:8    bgp:9    bgp:10
 
 Filtration Range String Inventory Model
     [Documentation]    Test of range string type of filtration operation on Inventory model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    opendaylight-inventory-model    node    openflow-topo:2
-    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_STRING}    flow-node-inventory:serial-number
+    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_STRING}    ${OPENFLOW_NODE_SERIAL_NUMBER}
     ${request}    Set Range String Filter    ${request}    20    25
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    3
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    3
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Check Filtered Nodes in Topology    ${resp.content}    0    of-node:8    of-node:9    of-node:10
 
 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    node    network-topo:3
-    ${request}    Insert Filter    ${request}    ${FILTER_IPV6}    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv6
+    ${request}    Insert Filter    ${request}    ${FILTER_IPV6}    ${ISIS_NODE_TE_ROUTER_ID_IPV6}
     ${request}    Set IPV6 Filter    ${request}    fe80:0:0:0:0:0:c0a8:101/120
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    2
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    2
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Check Filtered Nodes in Topology    ${resp.content}    1    bgp:11    bgp:12
 
 Filtration IPV6 Inventory Model
     [Documentation]    Test of ipv6 type of filtration operation on Inventory model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    opendaylight-inventory-model    node    openflow-topo:3
-    ${request}    Insert Filter    ${request}    ${FILTER_IPV6}    flow-node-inventory:ip-address
+    ${request}    Insert Filter    ${request}    ${FILTER_IPV6}    ${OPENFLOW_NODE_IP_ADDRESS}
     ${request}    Set IPV6 Filter    ${request}    fe80:0:0:0:0:0:c0a8:201/120
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    3
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    3
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Check Filtered Nodes in Topology    ${resp.content}    0    of-node:12    of-node:14    of-node:15
 
 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    node    network-topo:1
-    ${request}    Insert Filter    ${request}    ${FILTER_SCRIPT}    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4
+    ${request}    Insert Filter    ${request}    ${FILTER_SCRIPT}    ${ISIS_NODE_TE_ROUTER_ID_IPV4}
     ${script}    Set Variable    if (node.getValue().indexOf("192.168.1") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
     ${request}    Set Script Filter    ${request}    javascript    ${script}
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    3
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    3
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Check Filtered Nodes in Topology    ${resp.content}    5    bgp:3    bgp:4    bgp:5
 
 Filtration Script Inventory Model
     [Documentation]    Test of script type of filtration operation on Inventory model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    opendaylight-inventory-model    node    openflow-topo:1
-    ${request}    Insert Filter    ${request}    ${FILTER_SCRIPT}    flow-node-inventory:ip-address
+    ${request}    Insert Filter    ${request}    ${FILTER_SCRIPT}    ${OPENFLOW_NODE_IP_ADDRESS}
     ${script}    Set Variable    if (node.getValue().indexOf("192.168.2") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
     ${request}    Set Script Filter    ${request}    javascript    ${script}
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    3
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    3
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Check Filtered Nodes in Topology    ${resp.content}    8    of-node:1    of-node:2    of-node:3
index 0d59ecc414ae56d854286a11f99ab12ef0b1b000..408719e4da904811aa9d2e79bd94561f18d0e1d6 100644 (file)
@@ -6,23 +6,27 @@ Documentation     Test suite to verify fitration operation on different models.
 ...               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     Test Teardown    network-topology:network-topology/topology/topo:1
+Test Teardown     Delete Overlay Topology    ${OVERLAY_TOPO_URL}
 Library           RequestsLibrary
 Library           SSHLibrary
 Library           XML
 Variables         ../../../variables/topoprocessing/TopologyRequests.py
+Variables         ../../../variables/topoprocessing/TargetFields.py
 Variables         ../../../variables/Variables.py
 Resource          ../../../libraries/KarafKeywords.robot
 Resource          ../../../libraries/Utils.robot
 Resource          ../../../libraries/TopoprocessingKeywords.robot
 
+*** Variables ***
+${OVERLAY_TOPO_URL}    ${TOPOLOGY_URL}/topo:1
+
 *** Test Cases ***
 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
-    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    ovsdb:ofport
+    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    ${OVSDB_OFPORT}
     ${request}    Set Range Number Filter    ${request}    1115    1119
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    5
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    5
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <termination-point>    3
     Check Filtered Termination Points in Node    ${resp.content}    bgp:6    tp:6:1
@@ -34,9 +38,9 @@ Filtration Range Number Network Topology Model
 Filtration Range Number Inventory Model
     [Documentation]    Test of range 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_RANGE_NUMBER}    flow-node-inventory:port-number
+    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    ${OPENFLOW_NODE_CONNECTOR_PORT_NUMBER}
     ${request}    Set Range Number Filter    ${request}    2    4
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    5
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    5
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <termination-point>    5
     Check Filtered Termination Points in Node    ${resp.content}    of-node:1
@@ -48,9 +52,9 @@ Filtration Range Number Inventory Model
 Filtration Specific Number Network Topology Model
     [Documentation]    Test of specific number type of filtration operation on Network Topology model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    network-topology-model    termination-point    network-topo:2
-    ${request}    Insert Filter    ${request}    ${FILTER_SPECIFIC_NUMBER}    ovsdb:ofport
+    ${request}    Insert Filter    ${request}    ${FILTER_SPECIFIC_NUMBER}    ${OVSDB_OFPORT}
     ${request}    Set Specific Number Filter    ${request}    1119
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    5
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    5
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <termination-point>    1
     ${node}    Get Element    ${resp.content}    xpath=.//node/supporting-node[node-ref='bgp:7']/..
@@ -65,9 +69,9 @@ 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:maximum-speed
+    ${request}    Insert Filter    ${request}    ${FILTER_SPECIFIC_NUMBER}    ${OPENFLOW_NODE_CONNECTOR_MAXIMUM_SPEED}
     ${request}    Set Specific Number Filter    ${request}    2
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    5
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    5
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <termination-point>    3
     Check Filtered Termination Points in Node    ${resp.content}    of-node:1
@@ -79,9 +83,9 @@ Filtration Specific Number Inventory Model
 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    termination-point    network-topo:2
-    ${request}    Insert Filter    ${request}    ${FILTER_SPECIFIC_STRING}    ovsdb:name
+    ${request}    Insert Filter    ${request}    ${FILTER_SPECIFIC_STRING}    ${OVSDB_TP_NAME}
     ${request}    Set Specific String Filter    ${request}    portC
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    5
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    5
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <termination-point>    1
     Check Filtered Termination Points in Node    ${resp.content}    bgp:6
@@ -93,9 +97,9 @@ Filtration Specific String Network Topology Model
 Filtration Specific String Inventory Model
     [Documentation]    Test of specific string 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_STRING}    flow-node-inventory:name
+    ${request}    Insert Filter    ${request}    ${FILTER_SPECIFIC_STRING}    ${OPENFLOW_NODE_CONNECTOR_NAME}
     ${request}    Set Specific String Filter    ${request}    portB
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    5
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    5
     Should Contain X Times    ${resp.content}    <termination-point>    2
     Check Filtered Termination Points in Node    ${resp.content}    of-node:1
     Check Filtered Termination Points in Node    ${resp.content}    of-node:2    tp:2:1
@@ -106,9 +110,9 @@ Filtration Specific String Inventory Model
 Filtration Range String Network Topology Model
     [Documentation]    Test of range string type of filtration operation on Network Topology model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    network-topology-model    termination-point    network-topo:2
-    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_STRING}    ovsdb:name
+    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_STRING}    ${OVSDB_TP_NAME}
     ${request}    Set Range String Filter    ${request}    portA    portC
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    5
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    5
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>    ${EMPTY}
     Should Contain X Times    ${resp.content}    <termination-point>    3
     Check Filtered Termination Points in Node    ${resp.content}    bgp:6    tp:6:1
@@ -120,9 +124,9 @@ Filtration Range String Network Topology Model
 Filtration Range String Inventory Model
     [Documentation]    Test of range string 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_RANGE_STRING}    flow-node-inventory:name
+    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_STRING}    ${OPENFLOW_NODE_CONNECTOR_NAME}
     ${request}    Set Range String Filter    ${request}    portA    portB
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    5
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    5
     Should Contain X Times    ${resp.content}    <termination-point>    3
     Check Filtered Termination Points in Node    ${resp.content}    of-node:1
     Check Filtered Termination Points in Node    ${resp.content}    of-node:2    tp:2:1    tp:2:3
@@ -133,10 +137,10 @@ Filtration Range String Inventory Model
 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}    ovsdb:ofport
+    ${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 And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    5
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    5
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <termination-point>    3
     Check Filtered Termination Points in Node    ${resp.content}    bgp:1
@@ -148,10 +152,10 @@ Filtration Script Network Topology Model
 Filtration Script Inventory Model
     [Documentation]    Test of script 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_SCRIPT}    flow-node-inventory:name
+    ${request}    Insert Filter    ${request}    ${FILTER_SCRIPT}    ${OPENFLOW_NODE_CONNECTOR_NAME}
     ${script}    Set Variable    if (node.getValue().indexOf("portB") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
     ${request}    Set Script Filter    ${request}    javascript    ${script}
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    5
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    5
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <termination-point>    3
     Check Filtered Termination Points in Node    ${resp.content}    of-node:1    tp:1:1
index 05f2688da1a2c733975ece5e63efa67587959d19..4f25346e69fc235ed5ab628a1bc188c7c963bdb4 100644 (file)
@@ -6,87 +6,91 @@ Documentation     Test suite to verify fitration operation on different models.
 ...               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     Test Teardown    network-topology:network-topology/topology/topo:1
+Test Teardown     Delete Overlay Topology    ${OVERLAY_TOPO_URL}
 Library           RequestsLibrary
 Library           SSHLibrary
 Library           XML
 Variables         ../../../variables/topoprocessing/TopologyRequests.py
+Variables         ../../../variables/topoprocessing/TargetFields.py
 Variables         ../../../variables/Variables.py
 Resource          ../../../libraries/KarafKeywords.robot
 Resource          ../../../libraries/Utils.robot
 Resource          ../../../libraries/TopoprocessingKeywords.robot
 
+*** Variables ***
+${OVERLAY_TOPO_URL}    ${TOPOLOGY_URL}/topo:1
+
 *** Test Cases ***
 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    link    network-topo:1
-    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:metric
+    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    ${IGP_LINK_METRIC}
     ${request}    Set Range Number Filter    ${request}    11    13
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <link-id>link:    3
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <link-id>link:    3
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Check Filtered Links In Topology    ${resp.content}    link:1:2-1    link:1:3    link:1:4
 
 Filtration Range Number Inventory Model
     [Documentation]    Test of range number type of filtration operation on Inventory model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    opendaylight-inventory-model    link    openflow-topo:3
-    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:metric
+    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    ${IGP_LINK_METRIC}
     ${request}    Set Range Number Filter    ${request}    14    15
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <link-id>link:    2
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <link-id>link:    2
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Check Filtered Links In Topology    ${resp.content}    link:14:12    link:15:13
 
 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
-    ${request}    Insert Filter    ${request}    ${FILTER_SPECIFIC_STRING}    l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:name
+    ${request}    Insert Filter    ${request}    ${FILTER_SPECIFIC_STRING}    ${IGP_LINK_NAME}
     ${request}    Set Specific String Filter    ${request}    linkA
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <link-id>link:    2
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <link-id>link:    2
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Check Filtered Links In Topology    ${resp.content}    link:1:4    link:1:2-1
 
 Filtration Specific String Inventory Model
     [Documentation]    Test of specific string type of filtration operation on Inventory model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    opendaylight-inventory-model    link    openflow-topo:3
-    ${request}    Insert Filter    ${request}    ${FILTER_SPECIFIC_STRING}    l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:name
+    ${request}    Insert Filter    ${request}    ${FILTER_SPECIFIC_STRING}    ${IGP_LINK_NAME}
     ${request}    Set Specific String Filter    ${request}    linkD
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <link-id>link:    1
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <link-id>link:    1
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Check Filtered Links In Topology    ${resp.content}    link:15:13
 
 Filtration Range String Network Topology Model
     [Documentation]    Test of range string type of filtration operation on Network Topology model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    network-topology-model    link    network-topo:1
-    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_STRING}    l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:name
+    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_STRING}    ${IGP_LINK_NAME}
     ${request}    Set Range String Filter    ${request}    linkA    linkB
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <link-id>link:    3
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <link-id>link:    3
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Check Filtered Links In Topology    ${resp.content}    link:1:2-1    link:1:3    link:1:4
 
 Filtration Range String Inventory Model
     [Documentation]    Test of range string type of filtration operation on Inventory model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    opendaylight-inventory-model    link    openflow-topo:3
-    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_STRING}    l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:name
+    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_STRING}    ${IGP_LINK_NAME}
     ${request}    Set Range String Filter    ${request}    linkC    linkD
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <link-id>link:    2
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <link-id>link:    2
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Check Filtered Links In Topology    ${resp.content}    link:14:12    link:15:13
 
 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    link    network-topo:1
-    ${request}    Insert Filter    ${request}    ${FILTER_SCRIPT}    l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:name
+    ${request}    Insert Filter    ${request}    ${FILTER_SCRIPT}    ${IGP_LINK_NAME}
     ${script}    Set Variable    if (node.getValue().indexOf("linkA") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
     ${request}    Set Script Filter    ${request}    javascript    ${script}
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <link-id>link:    2
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <link-id>link:    2
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Check Filtered Links In Topology    ${resp.content}    link:1:2-2    link:1:3
 
 Filtration Script Inventory Model
     [Documentation]    Test of script type of filtration operation on Inventory model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    opendaylight-inventory-model    link    openflow-topo:3
-    ${request}    Insert Filter    ${request}    ${FILTER_SCRIPT}    l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:name
+    ${request}    Insert Filter    ${request}    ${FILTER_SCRIPT}    ${IGP_LINK_NAME}
     ${script}    Set Variable    if (node.getValue().indexOf("linkA") > -1 ) {filterOut.setResult(true);} else {filterOut.setResult(false);}
     ${request}    Set Script Filter    ${request}    javascript    ${script}
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <link-id>link:    3
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <link-id>link:    3
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Check Filtered Links In Topology    ${resp.content}    link:11:12    link:14:12    link:15:13
index ae5c315b5337d9e90ac92cf9568754836b723aca..d1ae92b7b698272e889dfac8f6ca17b05e1a2429 100644 (file)
@@ -6,25 +6,29 @@ Documentation     Test suite to verify fitration operation on different models.
 ...               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     Test Teardown    network-topology:network-topology/topology/topo:1
+Test Teardown     Delete Overlay Topology    ${OVERLAY_TOPO_URL}
 Library           RequestsLibrary
 Library           SSHLibrary
 Library           XML
 Variables         ../../../variables/topoprocessing/TopologyRequests.py
+Variables         ../../../variables/topoprocessing/TargetFields.py
 Variables         ../../../variables/Variables.py
 Resource          ../../../libraries/KarafKeywords.robot
 Resource          ../../../libraries/Utils.robot
 Resource          ../../../libraries/TopoprocessingKeywords.robot
 
+*** Variables ***
+${OVERLAY_TOPO_URL}    ${TOPOLOGY_URL}/topo:1
+
 *** Test Cases ***
 Unification Filtration Node Inside Network Topology model
     [Documentation]    Test unification filtration inside operation on Network Topology model
     ${model}    Set Variable    network-topology-model
-    ${request}    Prepare Unification Filtration Inside Topology Request    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}    ${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 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}    Prepare Unification Filtration Inside Topology Request    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}    ${model}    node    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    network-topo:4
+    ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    ${ISIS_NODE_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 And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    2
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    2
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <supporting-node>    3
     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:18    bgp:20
@@ -33,11 +37,11 @@ Unification Filtration Node Inside Network Topology model
 Unification Filtration Node Inside Inventory model
     [Documentation]    Test unification filtration inside operation on Inventory model
     ${model}    Set Variable    opendaylight-inventory-model
-    ${request}    Prepare Unification Filtration Inside Topology Request    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}    ${model}    node    flow-node-inventory:ip-address    openflow-topo:4
-    ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    flow-node-inventory:ip-address    1
+    ${request}    Prepare Unification Filtration Inside Topology Request    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}    ${model}    node    ${OPENFLOW_NODE_IP_ADDRESS}    openflow-topo:4
+    ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    ${OPENFLOW_NODE_IP_ADDRESS}    1
     ${request}    Insert Apply Filters    ${request}    1    1
     ${request}    Set IPV4 Filter    ${request}    192.168.2.1/24
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    2
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    2
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <supporting-node>    4
     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    of-node:18
@@ -46,11 +50,11 @@ Unification Filtration Node Inside Inventory model
 Unification Filtration Termination Point Inside Network Topology model
     [Documentation]    Test unification filtration inside operation on Network Topology model
     ${model}    Set Variable    network-topology-model
-    ${request}    Prepare Unification Filtration Inside Topology Request    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}    ${model}    termination-point    ovsdb:name    network-topo:5
-    ${request}    Insert Filter With ID    ${request}    ${FILTER_SPECIFIC_STRING}    ovsdb:name    1
+    ${request}    Prepare Unification Filtration Inside Topology Request    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}    ${model}    termination-point    ${OVSDB_TP_NAME}    network-topo:5
+    ${request}    Insert Filter With ID    ${request}    ${FILTER_SPECIFIC_STRING}    ${OVSDB_TP_NAME}    1
     ${request}    Insert Apply Filters    ${request}    1    1
     ${request}    Set Specific String Filter    ${request}    portA
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    5
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    5
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <termination-point>    3
     ${topology_id}    Set Variable    network-topo:5
@@ -63,14 +67,14 @@ Unification Filtration Termination Point Inside Network Topology model
 Unification Filtration Node Network Topology model
     [Documentation]    Test unification filtration operation on Network Topology model
     ${model}    Set Variable    network-topology-model
-    ${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
+    ${target_field}    Set Variable    ${ISIS_NODE_TE_ROUTER_ID_IPV4}
     ${request}    Prepare Unification Filtration Topology Request    ${UNIFICATION_FILTRATION_NT}    ${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 Filter With ID    ${request}    ${FILTER_IPV4}    ${ISIS_NODE_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 And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node>    2
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node>    2
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <supporting-node>    4
     Should Contain X Times    ${resp.content}    <termination-point    3
@@ -81,13 +85,13 @@ Unification Filtration Node Network Topology model
 Unification Filtration Node Inventory model
     [Documentation]    Test unification filtration operation on Inventory model
     ${model}    Set Variable    opendaylight-inventory-model
-    ${request}    Prepare Unification Filtration Topology Request    ${UNIFICATION_FILTRATION_NT}    ${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}    Prepare Unification Filtration Topology Request    ${UNIFICATION_FILTRATION_NT}    ${model}    node    ${OPENFLOW_NODE_IP_ADDRESS}    openflow-topo:4
+    ...    ${OPENFLOW_NODE_IP_ADDRESS}    openflow-topo:6
+    ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    ${OPENFLOW_NODE_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 And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node>    2
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node>    2
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <supporting-node>    3
     Should Contain X Times    ${resp.content}    <termination-point    0
index f8185e79c0db539196b5cba5ee01937179ec1283..d37d0b62d730ebdb1b536dfe9df14c3fca4e9888 100644 (file)
@@ -6,24 +6,28 @@ Documentation     Test suite to verify link computation operation on different m
 ...               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     Test Teardown    network-topology:network-topology/topology/topo:1
+Test Teardown     Delete Overlay Topology    ${OVERLAY_TOPO_URL}
 Library           RequestsLibrary
 Library           SSHLibrary
 Library           XML
 Variables         ../../../variables/topoprocessing/TopologyRequests.py
+Variables         ../../../variables/topoprocessing/TargetFields.py
 Variables         ../../../variables/Variables.py
 Resource          ../../../libraries/KarafKeywords.robot
 Resource          ../../../libraries/Utils.robot
 Resource          ../../../libraries/TopoprocessingKeywords.robot
 
+*** Variables ***
+${OVERLAY_TOPO_URL}    ${TOPOLOGY_URL}/topo:1
+
 *** Test Cases ***
 Link Computation Aggregation Inside
     [Documentation]    Test of link computation with unification inside on Network Topology model
     ${model}    Set Variable    network-topology-model
     ${request}    Prepare Unification Inside Topology Request    ${UNIFICATION_NT_AGGREGATE_INSIDE}    ${model}    node    network-topo:6
-    ${request}    Insert Target Field    ${request}    0    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4    0
+    ${request}    Insert Target Field    ${request}    0    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    0
     ${request}    Insert Link Computation Inside    ${request}    ${LINK_COMPUTATION_INSIDE}    n:network-topology-model    network-topo:6
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    4
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    4
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <link-id>    4
     ${overlay_node_id_28_29}    Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:28    bgp:29
@@ -40,10 +44,10 @@ Link Computation Filtration
     [Documentation]    Test of link computation with filtration on Network Topology model
     ${model}    Set Variable    network-topology-model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    ${model}    node    network-topo:6
-    ${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    ${request}    ${FILTER_IPV4}    ${ISIS_NODE_TE_ROUTER_ID_IPV4}
     ${request}    Set IPV4 Filter    ${request}    192.168.2.1/32
     ${request}    Insert Link Computation Inside    ${request}    ${LINK_COMPUTATION_INSIDE}    n:network-topology-model    network-topo:6
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    2
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    2
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <link-id>    1
     ${overlay_node_id_28}    Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:28
@@ -53,15 +57,15 @@ Link Computation Filtration
 Link Computation Aggregation Filtration
     [Documentation]    Test of link computation with aggregation filtration on Network Topology model
     ${model}    Set Variable    network-topology-model
-    ${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
+    ${target_field}    Set Variable    ${ISIS_NODE_TE_ROUTER_ID_IPV4}
     ${request}    Prepare Unification Filtration Topology Request    ${UNIFICATION_FILTRATION_NT}    ${model}    node    ${target_field}    network-topo:6
     ...    ${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 Filter With ID    ${request}    ${FILTER_IPV4}    ${ISIS_NODE_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
     ${request}    Insert Link Computation    ${request}    ${LINK_COMPUTATION}    n:network-topology-model    network-topo:6    network-topo:1
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    2
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    2
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <link>    2
     ${overlay_node_id_1_26}    Check Aggregated Node in Topology    ${model}    ${resp.content}    3    bgp:26    bgp:1
index 6118abb2cc2a46b703636f254c0e3668bbb1681c..7e7db158d138066580b1b776074c58660ff1e393 100644 (file)
@@ -6,36 +6,40 @@ Documentation     Test suite to verify update behaviour during different topopro
 ...               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     Test Teardown With Underlay Topologies Refresh    network-topology:network-topology/topology/topo:1
+Test Teardown     Refresh Underlay Topologies And Delete Overlay Topology    ${OVERLAY_TOPO_URL}
 Library           RequestsLibrary
 Library           SSHLibrary
 Library           XML
 Variables         ../../../variables/topoprocessing/TopologyRequests.py
+Variables         ../../../variables/topoprocessing/TargetFields.py
 Variables         ../../../variables/Variables.py
 Resource          ../../../libraries/KarafKeywords.robot
 Resource          ../../../libraries/Utils.robot
 Resource          ../../../libraries/TopoprocessingKeywords.robot
 
+*** Variables ***
+${OVERLAY_TOPO_URL}    ${TOPOLOGY_URL}/topo:1
+
 *** Test Cases ***
 Unification Node Update
     [Documentation]    Test processing of updates using unification operation on Network Topology model
     #Create the original topology
     ${model}    Set Variable    network-topology-model
     ${request}    Prepare Unification Topology Request    ${UNIFICATION_NT}    ${model}    node    network-topo:1    network-topo:2
-    ${request}    Insert Target Field    ${request}    0    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4    0
-    ${request}    Insert Target Field    ${request}    1    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4    0
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    8
+    ${request}    Insert Target Field    ${request}    0    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    0
+    ${request}    Insert Target Field    ${request}    1    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    0
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    8
     #Update a node, expecting a unification of two nodes into one
     ${node}    Create Isis Node    bgp:1    router-id-ipv4=192.168.1.2
     Basic Request Put    ${node}    network-topology:network-topology/topology/network-topo:1/node/bgp:1
-    ${resp}    Basic Request Get And Test    network-topology:network-topology/topology/topo:1    <node-id>node:    7
+    ${resp}    Basic Request Get And Test    ${OVERLAY_TOPO_URL}    <node-id>node:    7
     : FOR    ${index}    IN RANGE    1    11
     \    Should Contain X Times    ${resp.content}    <node-ref>bgp:${index}</node-ref>    1
     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:2    bgp:1
     #Update a unified node, expecting creation of a new overlay node
     ${node}    Create Isis Node    bgp:3    router-id-ipv4=192.168.3.1
     Basic Request Put    ${node}    network-topology:network-topology/topology/network-topo:1/node/bgp:3
-    ${resp}    Basic Request Get And Test    network-topology:network-topology/topology/topo:1    <node-id>node:    8
+    ${resp}    Basic Request Get And Test    ${OVERLAY_TOPO_URL}    <node-id>node:    8
     : FOR    ${index}    IN RANGE    1    11
     \    Should Contain X Times    ${resp.content}    <node-ref>bgp:${index}</node-ref>    1
 
@@ -43,32 +47,32 @@ Unification Node Inventory
     [Documentation]    Test processing of updates using unification operation on Inventory model
     ${model}    Set Variable    opendaylight-inventory-model
     ${request}    Prepare Unification Topology Request    ${UNIFICATION_NT}    ${model}    node    openflow-topo:1    openflow-topo:2
-    ${request}    Insert Target Field    ${request}    0    flow-node-inventory:ip-address    0
-    ${request}    Insert Target Field    ${request}    1    flow-node-inventory:ip-address    0
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    7
+    ${request}    Insert Target Field    ${request}    0    ${OPENFLOW_NODE_IP_ADDRESS}    0
+    ${request}    Insert Target Field    ${request}    1    ${OPENFLOW_NODE_IP_ADDRESS}    0
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    7
     #Update a node, expecting unification of two nodes into one
     ${node}    Create Openflow Node    openflow:2    192.168.1.1
     Basic Request Put    ${node}    opendaylight-inventory:nodes/node/openflow:2
-    ${resp}    Basic Request Get And Test    network-topology:network-topology/topology/topo:1    <node-id>node:    6
+    ${resp}    Basic Request Get And Test    ${OVERLAY_TOPO_URL}    <node-id>node:    6
     : FOR    ${index}    IN RANGE    1    11
     \    Should Contain X Times    ${resp.content}    <node-ref>of-node:${index}</node-ref>    1
     Check Aggregated Node in Topology    ${model}    ${resp.content}    5    of-node:2    of-node:6    of-node:1
     #Update a unified node, expecting creation of a new overlay node
     ${node}    Create Openflow Node    openflow:4    192.168.3.1
     Basic Request Put    ${node}    opendaylight-inventory:nodes/node/openflow:4
-    ${resp}    Basic Request Get And Test    network-topology:network-topology/topology/topo:1    <node-id>node:    7
+    ${resp}    Basic Request Get And Test    ${OVERLAY_TOPO_URL}    <node-id>node:    7
     : FOR    ${index}    IN RANGE    1    11
     \    Should Contain X Times    ${resp.content}    <node-ref>of-node:${index}</node-ref>    1
 
 Filtration Range Number Node Update Network Topology Model
     ${model}    Set Variable    network-topology-model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    ${model}    node    network-topo:2
-    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    ovsdb:ovs-version
+    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    ${OVSDB_OVS_VERSION}
     ${request}    Set Range Number Filter    ${request}    20    25
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    4
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    4
     ${request}    Create Isis Node    bgp:7    17
     Basic Request Put    ${request}    network-topology:network-topology/topology/network-topo:2/node/bgp:7
-    ${resp}    Basic Request Get    network-topology:network-topology/topology/topo:1
+    ${resp}    Basic Request Get    ${OVERLAY_TOPO_URL}
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     : FOR    ${index}    IN RANGE    8    11
     \    Should Contain X Times    ${resp.content}    <node-ref>bgp:${index}</node-ref>    1
@@ -82,7 +86,7 @@ Filtration Range Number Node Update Network Topology Model
     Basic Request Put    ${request}    network-topology:network-topology/topology/network-topo:2/node/bgp:7
     ${request}    Create OVSDB Termination Point    tp:7:1    1119
     Basic Request Put    ${request}    network-topology:network-topology/topology/network-topo:2/node/bgp:7/termination-point/tp:7:1
-    ${resp}    Basic Request Get    network-topology:network-topology/topology/topo:1
+    ${resp}    Basic Request Get    ${OVERLAY_TOPO_URL}
     : 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>    4
@@ -93,18 +97,18 @@ Filtration Range Number Node Update Network Topology Model
 
 Filtration Range Number Node Update Inventory Model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    opendaylight-inventory-model    node    openflow-topo:2
-    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    flow-node-inventory:serial-number
+    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    ${OPENFLOW_NODE_SERIAL_NUMBER}
     ${request}    Set Range Number Filter    ${request}    20    25
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    3
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    3
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     ${request}    Create Openflow Node    openflow:7    192.168.2.3    23
     Basic Request Put    ${request}    opendaylight-inventory:nodes/node/openflow:7
-    ${resp}    Basic Request Get    network-topology:network-topology/topology/topo:1
+    ${resp}    Basic Request Get    ${OVERLAY_TOPO_URL}
     : FOR    ${index}    IN RANGE    7    11
     \    Should Contain X Times    ${resp.content}    <node-ref>of-node:${index}</node-ref>    1
     ${request}    Create Openflow Node    openflow:7    192.168.2.3    17
     Basic Request Put    ${request}    opendaylight-inventory:nodes/node/openflow:7
-    ${resp}    Basic Request Get    network-topology:network-topology/topology/topo:1
+    ${resp}    Basic Request Get    ${OVERLAY_TOPO_URL}
     : FOR    ${index}    IN RANGE    8    11
     \    Should Contain X Times    ${resp.content}    <node-ref>of-node:${index}</node-ref>    1
     Should Not Contain    ${resp.content}    <node-ref>of-node:7</node-ref>
@@ -113,19 +117,19 @@ Filtration Range Number Termination Point Update NT
     [Documentation]    Test processing of updates using range number type of filtration operation on Network Topology model
     ${model}    Set Variable    network-topology-model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    ${model}    termination-point    network-topo:2
-    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    ovsdb:ofport
+    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    ${OVSDB_OFPORT}
     ${request}    Set Range Number Filter    ${request}    1115    1119
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    5
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    5
     #Update a previously out-of-range termination point, so it passes filtration
     ${terminationPoint}    Create OVSDB Termination Point    tp:8:1    1115
     Basic Request Put    ${terminationPoint}    network-topology:network-topology/topology/network-topo:2/node/bgp:8/termination-point/tp:8:1
-    ${resp}    Basic Request Get And Test    network-topology:network-topology/topology/topo:1    <node-id>node:    5
+    ${resp}    Basic Request Get And Test    ${OVERLAY_TOPO_URL}    <node-id>node:    5
     Should Contain X Times    ${resp.content}    <termination-point>    4
     Check Aggregated Termination Point in Node    ${model}    ${resp.content}    network-topo:2    bgp:8    tp:8:1    tp:8:1
     #Update a previsouly in-range termination point, so it is filtered out
     ${terminationPoint}    Create OVSDB Termination Point    tp:7:2    1110
     Basic Request Put    ${terminationPoint}    network-topology:network-topology/topology/network-topo:2/node/bgp:7/termination-point/tp:7:2
-    ${resp}    Basic Request Get And Test    network-topology:network-topology/topology/topo:1    <node-id>node:    5
+    ${resp}    Basic Request Get And Test    ${OVERLAY_TOPO_URL}    <node-id>node:    5
     Should Contain X Times    ${resp.content}    <termination-point>    3
     Check Aggregated Termination Point in Node    ${model}    ${resp.content}    network-topo:2    bgp:7    tp:7:1    tp:7:1
 
@@ -133,14 +137,14 @@ Filtration Range Number Termination Point Update Inventory
     [Documentation]    Test processing of updates using range number type of filtration operation on Inventory model
     ${model}    Set Variable    opendaylight-inventory-model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    ${model}    termination-point    openflow-topo:1
-    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    flow-node-inventory:port-number
+    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    ${OPENFLOW_NODE_CONNECTOR_PORT_NUMBER}
     ${request}    Set Range Number Filter    ${request}    2    4
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    5
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    5
     Should Contain X Times    ${resp.content}    <termination-point>    5
     #Update a previously out-of-range termination point, so it passes filtration
     ${nodeConnector}    Create Openflow Node Connector    openflow:2:1    3
     Basic Request Put    ${nodeConnector}    opendaylight-inventory:nodes/node/openflow:2/node-connector/openflow:2:1
-    ${resp}    Basic Request Get And Test    network-topology:network-topology/topology/topo:1    <node-id>node:    5
+    ${resp}    Basic Request Get And Test    ${OVERLAY_TOPO_URL}    <node-id>node:    5
     Should Contain X Times    ${resp.content}    <termination-point>    6
     Check Aggregated Termination Point in Node    ${model}    ${resp.content}    openflow-topo:1    of-node:2    tp:2:1    tp:2:1
     Check Aggregated Termination Point in Node    ${model}    ${resp.content}    openflow-topo:1    of-node:2    tp:2:2    tp:2:2
@@ -148,28 +152,28 @@ Filtration Range Number Termination Point Update Inventory
     #Update an in-range termination point, so it is filtered out
     ${nodeConnector}    Create Openflow Node Connector    openflow:3:2    5
     Basic Request Put    ${nodeConnector}    opendaylight-inventory:nodes/node/openflow:3/node-connector/openflow:3:2
-    ${resp}    Basic Request Get And Test    network-topology:network-topology/topology/topo:1    <node-id>node:    5
+    ${resp}    Basic Request Get And Test    ${OVERLAY_TOPO_URL}    <node-id>node:    5
     Should Contain X Times    ${resp.content}    <termination-point>    5
     Check Aggregated Termination Point in Node    ${model}    ${resp.content}    openflow-topo:1    of-node:3    tp:3:1    tp:3:1
 
 Filtration Range Number Link Update Network Topology Model
     [Documentation]    Tests the processing of link update requests when using a range-number filtration on NT model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    network-topology-model    link    network-topo:1
-    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:metric
+    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    ${IGP_LINK_METRIC}
     ${request}    Set Range Number Filter    ${request}    11    13
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <link-id>link:    3
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <link-id>link:    3
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     #Filter a link out
     ${request}    Create Link    link:1:4    bgp:1    bgp:4    linkA    15
     Basic Request Put    ${request}    network-topology:network-topology/topology/network-topo:1/link/link:1:4
-    ${resp}    Basic Request Get And Test    network-topology:network-topology/topology/topo:1    <link-id>    2
+    ${resp}    Basic Request Get And Test    ${OVERLAY_TOPO_URL}    <link-id>    2
     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
     Should Not Contain    ${resp.content}    network-topology/topology/network-topo:1/link/link:1:4
     #Put the link back in
     ${request}    Create Link    link:1:4    bgp:1    bgp:4    linkA    12
     Basic Request Put    ${request}    network-topology:network-topology/topology/network-topo:1/link/link:1:4
-    ${resp}    Basic Request Get And Test    network-topology:network-topology/topology/topo:1    <link-id>    3
+    ${resp}    Basic Request Get And Test    ${OVERLAY_TOPO_URL}    <link-id>    3
     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
@@ -177,56 +181,56 @@ Filtration Range Number Link Update Network Topology Model
 Filtration Range Number Link Update Inventory Model
     [Documentation]    Tests the processing of link update requests when using a range-number filtration on Inventory model
     ${request}    Prepare Filtration Topology Request    ${FILTRATION_NT}    opendaylight-inventory-model    link    openflow-topo:3
-    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:metric
+    ${request}    Insert Filter    ${request}    ${FILTER_RANGE_NUMBER}    ${IGP_LINK_METRIC}
     ${request}    Set Range Number Filter    ${request}    14    15
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <link-id>link:    2
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <link-id>link:    2
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     ${request}    Create Link    link:11:12    of-node:11    of-node:12    linkB    14
     Basic Request Put    ${request}    network-topology:network-topology/topology/openflow-topo:3/link/link:11:12
-    ${resp}    Basic Request Get And Test    network-topology:network-topology/topology/topo:1    <link-id>    3
+    ${resp}    Basic Request Get And Test    ${OVERLAY_TOPO_URL}    <link-id>    3
     Should Contain X Times    ${resp.content}    <link-ref>/network-topology/topology/openflow-topo:3/link/link:14:12</link-ref>    1
     Should Contain X Times    ${resp.content}    <link-ref>/network-topology/topology/openflow-topo:3/link/link:15:13</link-ref>    1
     Should Contain X Times    ${resp.content}    <link-ref>/network-topology/topology/openflow-topo:3/link/link:11:12</link-ref>    1
     ${request}    Create Link    link:11:12    of-node:11    of-node:12    linkB    13
     Basic Request Put    ${request}    network-topology:network-topology/topology/openflow-topo:3/link/link:11:12
-    ${resp}    Basic Request Get And Test    network-topology:network-topology/topology/topo:1    <link-id>    2
+    ${resp}    Basic Request Get And Test    ${OVERLAY_TOPO_URL}    <link-id>    2
     Should Contain X Times    ${resp.content}    <link-ref>/network-topology/topology/openflow-topo:3/link/link:14:12</link-ref>    1
     Should Contain X Times    ${resp.content}    <link-ref>/network-topology/topology/openflow-topo:3/link/link:15:13</link-ref>    1
 
 Unification Filtration Node Update Inside Network Topology model
     ${model}    Set Variable    network-topology-model
-    ${request}    Prepare Unification Filtration Inside Topology Request    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}    ${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 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}    Prepare Unification Filtration Inside Topology Request    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}    ${model}    node    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    network-topo:4
+    ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    ${ISIS_NODE_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 And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    2
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    2
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain    ${resp.content}    <node-ref>bgp:    3
     ${request}    Create Isis Node    bgp:17    10    192.168.2.1
     Basic Request Put    ${request}    network-topology:network-topology/topology/network-topo:4/node/bgp:17
-    ${resp}    Basic Request Get    network-topology:network-topology/topology/topo:1
+    ${resp}    Basic Request Get    ${OVERLAY_TOPO_URL}
     : FOR    ${index}    IN RANGE    17    21
     \    Should Contain X Times    ${resp.content}    <node-ref>bgp:${index}</node-ref>    1
     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:18    bgp:17    bgp:20
     ${request}    Create Isis Node    bgp:17    10    192.168.1.2
     Basic Request Put    ${request}    network-topology:network-topology/topology/network-topo:4/node/bgp:17
-    ${resp}    Basic Request Get    network-topology:network-topology/topology/topo:1
+    ${resp}    Basic Request Get    ${OVERLAY_TOPO_URL}
     : FOR    ${index}    IN RANGE    18    21
     \    Should Contain X Times    ${resp.content}    <node-ref>bgp:${index}</node-ref>    1
     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:18    bgp:20
 
 Unification Filtration Node Update Inside Inventory model
     ${model}    Set Variable    opendaylight-inventory-model
-    ${request}    Prepare Unification Filtration Inside Topology Request    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}    ${model}    node    flow-node-inventory:ip-address    openflow-topo:4
-    ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    flow-node-inventory:ip-address    1
+    ${request}    Prepare Unification Filtration Inside Topology Request    ${UNIFICATION_FILTRATION_NT_AGGREGATE_INSIDE}    ${model}    node    ${OPENFLOW_NODE_IP_ADDRESS}    openflow-topo:4
+    ${request}    Insert Filter With ID    ${request}    ${FILTER_IPV4}    ${OPENFLOW_NODE_IP_ADDRESS}    1
     ${request}    Insert Apply Filters    ${request}    1    1
     ${request}    Set IPV4 Filter    ${request}    192.168.2.1/24
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    2
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    2
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain    ${resp.content}    <node-ref>of-node:    4
     ${request}    Create Openflow Node    openflow:17    192.168.1.2
     Basic Request Put    ${request}    opendaylight-inventory:nodes/node/openflow:17
-    ${resp}    Basic Request Get    network-topology:network-topology/topology/topo:1
+    ${resp}    Basic Request Get    ${OVERLAY_TOPO_URL}
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain    ${resp.content}    <node-ref>of-node:    3
     : FOR    ${index}    IN RANGE    18    21
@@ -239,7 +243,7 @@ Unification Filtration Node Update Inside Inventory model
     Should Not Contain    ${node}    <node-ref>of-node:17</node-ref>
     ${request}    Create Openflow Node    openflow:17    192.168.2.3
     Basic Request Put    ${request}    opendaylight-inventory:nodes/node/openflow:17
-    ${resp}    Basic Request Get    network-topology:network-topology/topology/topo:1
+    ${resp}    Basic Request Get    ${OVERLAY_TOPO_URL}
     : FOR    ${index}    IN RANGE    17    21
     \    Should Contain X Times    ${resp.content}    <node-ref>of-node:${index}</node-ref>    1
     Check Aggregated Node in Topology    ${model}    ${resp.content}    0    of-node:17    of-node:19    of-node:20
@@ -248,13 +252,13 @@ Link Computation Aggregation Inside Update NT
     [Documentation]    Test of link computation with unification type of aggregation inside on updated nodes from network-topology model
     ${model}    Set Variable    network-topology-model
     ${request}    Prepare Unification Inside Topology Request    ${UNIFICATION_NT_AGGREGATE_INSIDE}    ${model}    node    network-topo:6
-    ${request}    Insert Target Field    ${request}    0    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4    0
+    ${request}    Insert Target Field    ${request}    0    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    0
     ${request}    Insert Link Computation Inside    ${request}    ${LINK_COMPUTATION_INSIDE}    n:network-topology-model    network-topo:6
-    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    network-topology:network-topology/topology/topo:1    <node-id>node:    4
+    ${resp}    Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    4
     #Divide double nodes from overlay topology
     ${request}    Create Isis Node    bgp:29    router-id-ipv4=192.168.1.3
     Basic Request Put    ${request}    network-topology:network-topology/topology/network-topo:6/node/bgp:29
-    ${resp}    Basic Request Get    network-topology:network-topology/topology/topo:1
+    ${resp}    Basic Request Get    ${OVERLAY_TOPO_URL}
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <link-id>    4
     ${node_26}    Check Aggregated Node in Topology    ${model}    ${resp.content}    0    bgp:26
@@ -270,7 +274,7 @@ Link Computation Aggregation Inside Update NT
     #Update link to node out of topology
     ${request}    Create Link    link:28:29    bgp:28    bgp:31    linkB    11
     Basic Request Put    ${request}    network-topology:network-topology/topology/network-topo:6/link/link:28:29
-    ${resp}    Basic Request Get    network-topology:network-topology/topology/topo:1
+    ${resp}    Basic Request Get    ${OVERLAY_TOPO_URL}
     Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
     Should Contain X Times    ${resp.content}    <link-id>    3
     #Refresh node IDs
index 1eb5f1a0bc862accee23ba86051dae01dbe0237c..1617bde711bb36e294d803abfbd8d1ff02da8a64 100644 (file)
@@ -6,11 +6,12 @@ Documentation     Test suite to verify processing of removal requests on differe
 ...               xmls and verify output. Topology-id on the end of each url 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     Test Teardown With Underlay Topologies Refresh    network-topology:network-topology/topology/topo:1
+Test Teardown     Refresh Underlay Topologies And Delete Overlay Topology    ${OVERLAY_TOPO_URL}
 Library           RequestsLibrary
 Library           SSHLibrary
 Library           XML
 Variables         ../../../variables/topoprocessing/TopologyRequests.py
+Variables         ../../../variables/topoprocessing/TargetFields.py
 Variables         ../../../variables/Variables.py
 Resource          ../../../libraries/KarafKeywords.robot
 Resource          ../../../libraries/Utils.robot
@@ -25,8 +26,8 @@ Unification Node Removal NT
     ${model}    Set Variable    network-topology-model
     #Create the original topology
     ${request}    Prepare Unification Topology Request    ${UNIFICATION_NT}    network-topology-model    node    network-topo:1    network-topo:2
-    ${request}    Insert Target Field    ${request}    0    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4    0
-    ${request}    Insert Target Field    ${request}    1    l3-unicast-igp-topology:igp-node-attributes/isis-topology:isis-node-attributes/isis-topology:ted/isis-topology:te-router-id-ipv4    0
+    ${request}    Insert Target Field    ${request}    0    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    0
+    ${request}    Insert Target Field    ${request}    1    ${ISIS_NODE_TE_ROUTER_ID_IPV4}    0
     Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    8
     #Remove an underlay aggregated node, preserving the overlay node
     Delete Underlay Node    network-topo:1    bgp:3
@@ -41,8 +42,8 @@ Unification Node Removal Inventory
     ${model}    Set Variable    opendaylight-inventory-model
     #Create the original topology
     ${request}    Prepare Unification Topology Request    ${UNIFICATION_NT}    ${model}    node    openflow-topo:1    openflow-topo:2
-    ${request}    Insert Target Field    ${request}    0    flow-node-inventory:ip-address    0
-    ${request}    Insert Target Field    ${request}    1    flow-node-inventory:ip-address    0
+    ${request}    Insert Target Field    ${request}    0    ${OPENFLOW_NODE_IP_ADDRESS}    0
+    ${request}    Insert Target Field    ${request}    1    ${OPENFLOW_NODE_IP_ADDRESS}    0
     Send Basic Request And Test If Contain X Times    ${request}    ${OVERLAY_TOPO_URL}    <node-id>node:    7
     #Remove an underlay aggregated node, preserving the overlay node
     Delete Underlay Node    openflow-topo:2    of-node:6
diff --git a/csit/variables/topoprocessing/TargetFields.py b/csit/variables/topoprocessing/TargetFields.py
new file mode 100644 (file)
index 0000000..a5691ab
--- /dev/null
@@ -0,0 +1,24 @@
+"""
+Definitions of target field paths widely used throughout the Topoprocessing suites.
+"""
+# NT target fields
+ISIS_NODE_TE_ROUTER_ID_IPV4 = ('l3-unicast-igp-topology:igp-node-attributes'
+                               '/isis-topology:isis-node-attributes'
+                               '/isis-topology:ted'
+                               '/isis-topology:te-router-id-ipv4')
+ISIS_NODE_TE_ROUTER_ID_IPV6 = ('l3-unicast-igp-topology:igp-node-attributes'
+                               '/isis-topology:isis-node-attributes'
+                               '/isis-topology:ted'
+                               '/isis-topology:te-router-id-ipv6')
+IGP_LINK_METRIC = 'l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:metric'
+IGP_LINK_NAME = 'l3-unicast-igp-topology:igp-link-attributes/l3-unicast-igp-topology:name'
+OVSDB_OFPORT = 'ovsdb:ofport'
+OVSDB_OVS_VERSION = 'ovsdb:ovs-version'
+OVSDB_TP_NAME = 'ovsdb:name'
+
+# Inventory target fields
+OPENFLOW_NODE_IP_ADDRESS = 'flow-node-inventory:ip-address'
+OPENFLOW_NODE_SERIAL_NUMBER = 'flow-node-inventory:serial-number'
+OPENFLOW_NODE_CONNECTOR_PORT_NUMBER = 'flow-node-inventory:port-number'
+OPENFLOW_NODE_CONNECTOR_MAXIMUM_SPEED = 'flow-node-inventory:maximum-speed'
+OPENFLOW_NODE_CONNECTOR_NAME = 'flow-node-inventory:name'