Fix BGPCEP Test related to tcpmd5user (Neon) 53/80853/5
authorgvrangan <vgovindarajan@luminanetworks.com>
Thu, 14 Mar 2019 13:29:20 +0000 (18:59 +0530)
committerVenkatrangan Govindarajan <vgovindarajan@luminanetworks.com>
Fri, 15 Mar 2019 08:52:04 +0000 (08:52 +0000)
- The XML response is differnt for neon.
- This Patch checks for the STREAM and uses a differnt
  response for XML.

Change-Id: Iefeb6c5c2b57c676c73e2942350ff3476dbfa2fc
Signed-off-by: gvrangan <vgovindarajan@luminanetworks.com>
csit/suites/bgpcep/tcpmd5user/tcpmd5user.robot
csit/variables/tcpmd5user/update_delegated_neon/location.uri [new file with mode: 0644]
csit/variables/tcpmd5user/update_delegated_neon/post_data.xml [new file with mode: 0644]
csit/variables/tcpmd5user/update_delegated_neon/response.xml [new file with mode: 0644]

index d80c561f664e9d05448ef4fa614017966b7d2563..9f63ce94b8cb539c7c03691cf2a04deb06a96b9e 100644 (file)
@@ -115,7 +115,8 @@ Topology_Intercondition_2
 Update_Delegated
     [Documentation]    Perform update-lsp on the mocked tunnel, check response is success.
     &{mapping}    BuiltIn.Create_Dictionary    IP=${TOOLS_SYSTEM_IP}    NAME=${pcc_name}
-    ${response}=    TemplatedRequests.Post_As_Xml_Templated    ${DIR_WITH_TEMPLATES}${/}update_delegated    ${mapping}    ${CONFIG_SESSION}    verify=True
+    ${template_dir} =    CompareStream.Set_Variable_If_At_Least_Neon    update_delegated_neon    update_delegated
+    ${response}=    TemplatedRequests.Post_As_Xml_Templated    ${DIR_WITH_TEMPLATES}${/}${template_dir}    ${mapping}    ${CONFIG_SESSION}    verify=True
     Log    ${response}
 
 Topology_Updated
diff --git a/csit/variables/tcpmd5user/update_delegated_neon/location.uri b/csit/variables/tcpmd5user/update_delegated_neon/location.uri
new file mode 100644 (file)
index 0000000..7193120
--- /dev/null
@@ -0,0 +1 @@
+restconf/operations/network-topology-pcep:update-lsp
diff --git a/csit/variables/tcpmd5user/update_delegated_neon/post_data.xml b/csit/variables/tcpmd5user/update_delegated_neon/post_data.xml
new file mode 100644 (file)
index 0000000..ab64fca
--- /dev/null
@@ -0,0 +1,27 @@
+<input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
+    <node>pcc://$IP</node>
+    <name>$NAME</name>
+    <network-topology-ref xmlns:topo="urn:TBD:params:xml:ns:yang:network-topology">
+    /topo:network-topology/topo:topology[topo:topology-id="pcep-topology"]
+    </network-topology-ref>
+    <arguments>
+        <lsp xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
+            <delegate>true</delegate>
+            <administrative>true</administrative>
+        </lsp>
+        <ero>
+            <subobject>
+                <loose>false</loose>
+                <ip-prefix>
+                    <ip-prefix>2.2.2.2/32</ip-prefix>
+                </ip-prefix>
+            </subobject>
+            <subobject>
+                <loose>false</loose>
+                <ip-prefix>
+                    <ip-prefix>1.1.1.1/32</ip-prefix>
+                </ip-prefix>
+            </subobject>
+        </ero>
+    </arguments>
+</input>
diff --git a/csit/variables/tcpmd5user/update_delegated_neon/response.xml b/csit/variables/tcpmd5user/update_delegated_neon/response.xml
new file mode 100644 (file)
index 0000000..241afaa
--- /dev/null
@@ -0,0 +1 @@
+<output xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep"/>