Basic tests - Unification node inside 75/30175/6
authorBranislav Janošík <branislav.janosik@pantheon.sk>
Wed, 25 Nov 2015 08:53:02 +0000 (09:53 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 17 Dec 2015 04:51:26 +0000 (04:51 +0000)
Change-Id: I199d6594c21f7bfc31eb535fff7a2a55579d07e1
Signed-off-by: Branislav Janošík <branislav.janosik@pantheon.sk>
Signed-off-by: Samuel Kontriš <samuel.kontris@pantheon.sk>
csit/suites/topoprocessing/basic-topology-operations/010_Aggregation.robot
csit/variables/topoprocessing/Topologies.py
csit/variables/topoprocessing/TopologyRequests.py

index 92e7537f1676ee167bdc88e3149ed783afeff592..aebcc2c74b112fe6c1fac07b78406e6375e51daf 100644 (file)
@@ -78,3 +78,29 @@ Unification Scripting Node Inventory
     ${node}    Element to String    ${node}
     Should Contain X Times    ${node}    <node-ref>of-node:2</node-ref>    1
     Should Contain X Times    ${node}    <node-ref>of-node:8</node-ref>    1
+
+Unification Node Inside
+    [Documentation]    Test of unification type of aggregation inside on nodes on Network Topology model
+    ${request}    Prepare Unification Inside Topology Request    ${UNIFICATION_NT_AGGREGATE_INSIDE}    network-topology-model    node    network-topology-pcep:path-computation-client/network-topology-pcep:ip-address    network-topo:1
+    ${resp}    Send Basic Request    ${request}    network-topology:network-topology/topology/topo:1
+    Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
+    Should Contain X Times    ${resp.content}    <node-id>node:    4
+    ${response_xml}    Parse XML    ${resp.content}
+    ${node}    Get Element    ${response_xml}    xpath=.//node/supporting-node[node-ref='pcep:3']/..
+    ${node}    Element To String    ${node}
+    Should Contain X Times    ${node}    <supporting-node>    2
+    Should Contain    ${node}    <supporting-node><node-ref>pcep:3</node-ref>
+    Should Contain    ${node}    <supporting-node><node-ref>pcep:4</node-ref>
+
+Unification Node Inside Inventory
+    [Documentation]    Test of unification type of aggregation inside on nodes on Inventory model
+    ${request}    Prepare Unification Inside Topology Request    ${UNIFICATION_NT_AGGREGATE_INSIDE}    opendaylight-inventory-model    node    flow-node-inventory:ip-address    openflow-topo:2
+    ${resp}    Send Basic Request    ${request}    network-topology:network-topology/topology/topo:1
+    Should Contain    ${resp.content}    <topology-id>topo:1</topology-id>
+    Should Contain X Times    ${resp.content}    <node-id>node:    4
+    ${response_xml}    Parse XML    ${resp.content}
+    ${node}    Get Element    ${response_xml}    xpath=.//node/supporting-node[node-ref='of-node:7']/..
+    ${node}    Element To String    ${node}
+    Should Contain X Times    ${node}    <supporting-node>    2
+    Should Contain    ${node}    <supporting-node><node-ref>of-node:7</node-ref>
+    Should Contain    ${node}    <supporting-node><node-ref>of-node:9</node-ref>
index 427074d8d193ba57032d49823de8a78ca1fcc37e..0a1b7183b62007c637ec7db74b8205991eeed26b 100644 (file)
@@ -26,7 +26,7 @@ NETWORK_UNDERLAY_TOPOLOGY_1 = '''<topology
                             <node>
                                 <node-id>pcep:4</node-id>
                                 <pcep:path-computation-client>
-                                    <pcep:ip-address>192.168.2.2</pcep:ip-address>
+                                    <pcep:ip-address>192.168.2.1</pcep:ip-address>
                                 </pcep:path-computation-client>
                             </node>
                             <node>
@@ -123,7 +123,7 @@ OPENFLOW_UNDERLAY_NODES = '''
     <node>
         <id>openflow:9</id>
         <flov-inv:manufacturer>Cisco</flov-inv:manufacturer>
-        <flov-inv:ip-address>192.168.1.5</flov-inv:ip-address>
+        <flov-inv:ip-address>192.168.2.3</flov-inv:ip-address>
     </node>
     <node>
         <id>openflow:10</id>
index 03a459a49bdc22de47ed1beac34c8fe2b974ad41..6d8a0f38d9f013625ec818c3bb5fb2e7f3e65039 100644 (file)
@@ -25,7 +25,7 @@ UNIFICATION_NT = '''<topology xmlns="urn:opendaylight:topology:correlation" xmln
                         </correlations>
                     </topology>'''
 
-UNIFICATION_NT_AGREGATE_INSIDE = '''<topology xmlns="urn:opendaylight:topology:correlation" xmlns:n="urn:TBD:params:xml:ns:yang:network-topology">
+UNIFICATION_NT_AGGREGATE_INSIDE = '''<topology xmlns="urn:opendaylight:topology:correlation" xmlns:n="urn:TBD:params:xml:ns:yang:network-topology">
                         <n:topology-id>topo:1</n:topology-id>
                         <correlations>
                             <output-model>{output-model}</output-model>