INTTEST-107: Add test cases to cover rpc augmentation action 69/90969/3
authorKailash Khalasi <kailash.khalasi@gmail.com>
Tue, 7 Jul 2020 19:37:58 +0000 (12:37 -0700)
committerJamo Luhrsen <jluhrsen@gmail.com>
Tue, 14 Jul 2020 20:34:59 +0000 (20:34 +0000)
Change-Id: I8c9b32aea038d7f7e2003dc0171bc36da4f85cc9
Signed-off-by: Kailash Khalasi <kailash.khalasi@gmail.com>
csit/suites/netconf/CRUD-ACTION/CRUD-ACTION.robot
csit/variables/netconf/CRUD/augment/location.uri [new file with mode: 0644]
csit/variables/netconf/CRUD/augment/post_data.json [new file with mode: 0644]
csit/variables/netconf/CRUD/augment/post_data.xml [new file with mode: 0644]
csit/variables/netconf/CRUD/customaction/customaction.xml

index 7dd52a531ff3d9e6aa0bba02b55adc979768a8c0..dd2dbe71e23424edee82809479a8e8f4fcddfd17 100644 (file)
@@ -72,6 +72,16 @@ Invoke_Yang1.1_Action_Via_Json_Post
     ${template_as_string} =    BuiltIn.Set_Variable    {'DEVICE_NAME': '${DEVICE_NAME}'}
     TemplatedRequests.Post_As_Json_RFC8040_Templated    ${DIRECTORY_WITH_TEMPLATE_FOLDERS}${/}dataorigaction    ${template_as_string}
 
+Invoke_Yang1.1_Augmentation_Via_Xml_Post
+    [Documentation]    Send a sample test data label into the device and check that the request went OK.
+    ${template_as_string} =    BuiltIn.Set_Variable    {'DEVICE_NAME': '${DEVICE_NAME}'}
+    TemplatedRequests.Post_As_Xml_Templated    ${DIRECTORY_WITH_TEMPLATE_FOLDERS}${/}augment    ${template_as_string}
+
+Invoke_Yang1.1_Augmentation_Via_Json_Post
+    [Documentation]    Send a sample test data label into the device and check that the request went OK.
+    ${template_as_string} =    BuiltIn.Set_Variable    {'DEVICE_NAME': '${DEVICE_NAME}'}
+    TemplatedRequests.Post_As_Json_RFC8040_Templated    ${DIRECTORY_WITH_TEMPLATE_FOLDERS}${/}augment    ${template_as_string}
+
 Deconfigure_Device_From_Netconf
     [Documentation]    Make request to deconfigure the testtool device on Netconf connector.
     [Tags]    critical
diff --git a/csit/variables/netconf/CRUD/augment/location.uri b/csit/variables/netconf/CRUD/augment/location.uri
new file mode 100644 (file)
index 0000000..c54ed99
--- /dev/null
@@ -0,0 +1 @@
+rests/data/network-topology:network-topology/topology=topology-netconf/node=$DEVICE_NAME/yang-ext:mount/main:cont/cont1/reset
diff --git a/csit/variables/netconf/CRUD/augment/post_data.json b/csit/variables/netconf/CRUD/augment/post_data.json
new file mode 100644 (file)
index 0000000..3cfd19c
--- /dev/null
@@ -0,0 +1,5 @@
+{
+   "ns:augment:main:a:input":{
+      "delay":600
+   }
+}
diff --git a/csit/variables/netconf/CRUD/augment/post_data.xml b/csit/variables/netconf/CRUD/augment/post_data.xml
new file mode 100644 (file)
index 0000000..351a2e5
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<input xmlns="ns:augment:main:a">
+  <delay>600</delay>
+</input>
+
index 987a708325b87cf0d3642ce1514666b323ea9094..5ac538c4955e68757e368c7adb8517258bb07b50 100644 (file)
          </rpc-reply>
       </output>
    </rpc>
+   <!-- Augmentation case example -->
+   <rpc>
+     <input>
+        <action xmlns="urn:ietf:params:xml:ns:yang:1">
+            <cont xmlns="ns:main">
+                <cont1 xmlns="ns:augment:main:a">
+                    <reset>
+                        <delay>600</delay>
+                    </reset>
+                </cont1>
+            </cont>
+        </action>
+    </input>
+    <output>
+        <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:sys="ns:augment:main:a">
+            <ok />
+        </rpc-reply>
+    </output>
+   </rpc>
 </rpcs>