From: Andrej Záň Date: Thu, 19 Nov 2015 19:04:00 +0000 (+0100) Subject: Basic tests - Unification termination point inside X-Git-Tag: release/beryllium-sr1~249 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;ds=sidebyside;h=e0595f0be74a24a20c20aea289e1b51dc3646a43;p=integration%2Ftest.git Basic tests - Unification termination point inside Change-Id: I1755f43b4cad5851d68f80f5500aac364390d1c3 Signed-off-by: Andrej Záň Signed-off-by: Samuel Kontriš --- diff --git a/csit/libraries/TopoprocessingKeywords.robot b/csit/libraries/TopoprocessingKeywords.robot index a52e478dcc..ee6cd3bd61 100644 --- a/csit/libraries/TopoprocessingKeywords.robot +++ b/csit/libraries/TopoprocessingKeywords.robot @@ -39,7 +39,7 @@ Setup Environment ${features} Get Installed Features ${lines} Get Lines Containing String ${features} odl-topoprocessing-framework ${length} Get Length ${lines} - Install a Feature odl-openflowplugin-nsf-model-li odl-topoprocessing-framework odl-topoprocessing-network-topology odl-topoprocessing-inventory odl-bgpcep-pcep-all timeout=100 + Install a Feature odl-openflowplugin-nsf-model-li odl-topoprocessing-framework odl-topoprocessing-network-topology odl-topoprocessing-inventory odl-bgpcep-pcep-all odl-ovsdb-southbound-impl timeout=100 Run Keyword If ${length} == 0 Wait For Karaf Log Registering Topology Request Listener 60 Prepare New Feature Installation Insert Underlay topologies diff --git a/csit/suites/topoprocessing/basic-topology-operations/010_Aggregation.robot b/csit/suites/topoprocessing/basic-topology-operations/010_Aggregation.robot index aebcc2c74b..62d6f3c721 100644 --- a/csit/suites/topoprocessing/basic-topology-operations/010_Aggregation.robot +++ b/csit/suites/topoprocessing/basic-topology-operations/010_Aggregation.robot @@ -48,7 +48,6 @@ Unification Node Inventory ${node} Element to String ${node} Should Contain X Times ${node} of-node:10 1 Should Contain X Times ${node} of-node:4 1 - Unification Scripting Node [Documentation] Test unification operation on Network Topology model using scripting ${request} Prepare Unification Topology Request ${UNIFICATION_NT} network-topology-model node network-topology-pcep:path-computation-client/network-topology-pcep:ip-address network-topo:1 @@ -104,3 +103,50 @@ Unification Node Inside Inventory Should Contain X Times ${node} 2 Should Contain ${node} of-node:7 Should Contain ${node} of-node:9 + +Unification Termination Point Inside + [Documentation] Test aggregate inside operation on termination points + ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} network-topology-model termination-point ovsdb:ofport network-topo:1 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + ${response_xml} Get Element ${resp.content} xpath=.//topology[topology-id='topo:1'] + ${response_xml} Element to String ${response_xml} + Should Contain X Times ${resp.content} node: 5 + Should Contain X Times ${response_xml} 6 + ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='pcep:1']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 2 + ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='pcep:3']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 2 + ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='pcep:4']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 1 + ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='pcep:5']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 1 + +Unification Termination Point Inside Inventory + [Documentation] Test aggregate inside operation on termination points + ${request} Prepare Unification Inside Topology Request ${UNIFICATION_NT_AGGREGATE_INSIDE} opendaylight-inventory-model termination-point flow-node-inventory:port-number openflow-topo:1 + ${resp} Send Basic Request ${request} network-topology:network-topology/topology/topo:1 + Should Contain ${resp.content} topo:1 + ${response_xml} Get Element ${resp.content} xpath=.//topology[topology-id='topo:1'] + ${response_xml} Element to String ${response_xml} + Should Contain X Times ${resp.content} node: 5 + Should Contain X Times ${response_xml} 7 + ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='of-node:1']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 1 + ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='of-node:2']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 2 + ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='of-node:3']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 2 + ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='of-node:4']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 1 + ${node} Get Element ${response_xml} xpath=.//node/supporting-node[node-ref='of-node:5']/.. + ${node} Element to String ${node} + Should Contain X Times ${node} 1 \ No newline at end of file diff --git a/csit/variables/topoprocessing/Topologies.py b/csit/variables/topoprocessing/Topologies.py index 0a1b7183b6..13c7796844 100644 --- a/csit/variables/topoprocessing/Topologies.py +++ b/csit/variables/topoprocessing/Topologies.py @@ -1,6 +1,7 @@ NETWORK_UNDERLAY_TOPOLOGY_1 = ''' + xmlns:pcep="urn:opendaylight:params:xml:ns:yang:topology:pcep" + xmlns:ovsdb="urn:opendaylight:params:xml:ns:yang:ovsdb"> network-topo:1 @@ -10,6 +11,18 @@ NETWORK_UNDERLAY_TOPOLOGY_1 = ''' 192.168.1.1 + + tp:1:1 + 1119 + + + tp:1:2 + 1119 + + + tp:1:3 + 2119 + pcep:2 @@ -22,24 +35,45 @@ NETWORK_UNDERLAY_TOPOLOGY_1 = ''' 192.168.2.1 + + tp:3:1 + 1118 + + + tp:3:2 + 2118 + pcep:4 192.168.2.1 + + tp:4:1 + 1117 + + + tp:4:2 + 1117 + pcep:5 192.168.2.3 + + tp:5:1 + 1116 + ''' NETWORK_UNDERLAY_TOPOLOGY_2 = ''' + xmlns:pcep="urn:opendaylight:params:xml:ns:yang:topology:pcep" + xmlns:ovsdb="urn:opendaylight:params:xml:ns:yang:ovsdb"> network-topo:2 @@ -49,30 +83,50 @@ NETWORK_UNDERLAY_TOPOLOGY_2 = ''' 192.168.1.3 + + tp:6:1 + 1116 + pcep:7 192.168.1.4 + + tp:7:1 + 1117 + pcep:8 192.168.2.4 + + tp:8:1 + 11120 + pcep:9 192.168.2.5 + + tp:9:1 + 1121 + pcep:10 192.168.2.3 + + tp:10:1 + 1122 + ''' @@ -82,26 +136,70 @@ OPENFLOW_UNDERLAY_NODES = ''' xmlns:flov-inv="urn:opendaylight:flow:inventory"> openflow:1 + + openflow:1:1 + 1 + + + openflow:1:2 + 1 + Pantheon Technologies 192.168.1.1 openflow:2 + + openflow:2:1 + 1 + + + openflow:2:2 + 2 + Pantheon Technologies 192.168.1.2 openflow:3 + + openflow:3:1 + 2 + + + openflow:3:2 + 2 + + + openflow:3:3 + 1 + Pantheon Technologies 192.168.1.3 openflow:4 + + openflow:4:1 + 1 + + + openflow:4:2 + 1 + + + openflow:4:3 + 1 + Cisco 192.168.2.1 openflow:5 + + openflow:5:1 + 3 + Cisco 192.168.2.2 @@ -142,22 +240,88 @@ OPENFLOW_UNDERLAY_TOPOLOGY_1 = ''' of-node:1 /inventory:nodes/inventory:node[inventory:id="openflow:1"] + + tp:1:1 + + /inventory:nodes/inventory:node[inventory:id="openflow:1"]/inventory:node-connector[inventory:id="openflow:1:1"] + + + + tp:1:2 + + /inventory:nodes/inventory:node[inventory:id="openflow:1"]/inventory:node-connector[inventory:id="openflow:1:2"] + + of-node:2 /inventory:nodes/inventory:node[inventory:id="openflow:2"] + + tp:2:1 + + /inventory:nodes/inventory:node[inventory:id="openflow:2"]/inventory:node-connector[inventory:id="openflow:2:1"] + + + + tp:2:2 + + /inventory:nodes/inventory:node[inventory:id="openflow:2"]/inventory:node-connector[inventory:id="openflow:2:2"] + + of-node:3 /inventory:nodes/inventory:node[inventory:id="openflow:3"] + + tp:3:1 + + /inventory:nodes/inventory:node[inventory:id="openflow:3"]/inventory:node-connector[inventory:id="openflow:3:1"] + + + + tp:3:2 + + /inventory:nodes/inventory:node[inventory:id="openflow:3"]/inventory:node-connector[inventory:id="openflow:3:2"] + + + + tp:3:3 + + /inventory:nodes/inventory:node[inventory:id="openflow:3"]/inventory:node-connector[inventory:id="openflow:3:3"] + + of-node:4 /inventory:nodes/inventory:node[inventory:id="openflow:4"] + + tp:4:1 + + /inventory:nodes/inventory:node[inventory:id="openflow:4"]/inventory:node-connector[inventory:id="openflow:4:1"] + + + + tp:4:2 + + /inventory:nodes/inventory:node[inventory:id="openflow:4"]/inventory:node-connector[inventory:id="openflow:4:2"] + + + + tp:4:3 + + /inventory:nodes/inventory:node[inventory:id="openflow:4"]/inventory:node-connector[inventory:id="openflow:4:3"] + + of-node:5 /inventory:nodes/inventory:node[inventory:id="openflow:5"] + + tp:5:1 + + /inventory:nodes/inventory:node[inventory:id="openflow:5"]/inventory:node-connector[inventory:id="openflow:5:1"] + + '''