OF1.3 action unit testing XML's using REST 24/5024/1
authorPraveen Darshanam <praveen_recker@sify.com>
Tue, 28 Jan 2014 20:01:48 +0000 (01:31 +0530)
committerPraveen Darshanam <praveen_recker@sify.com>
Tue, 28 Jan 2014 20:01:48 +0000 (01:31 +0530)
Signed-off-by: Praveen Darshanam <praveen_recker@sify.com>
test-scripts/xmls/f113.xml
test-scripts/xmls/f114.xml [new file with mode: 0644]
test-scripts/xmls/f207.xml [new file with mode: 0644]
test-scripts/xmls/f208.xml [moved from test-scripts/xmls/f120.xml with 88% similarity]
test-scripts/xmls/f209.xml [new file with mode: 0644]

index 63ce2689bc932d72024345604c13b908188499b1..f6b241141a04a4a2337e364f557f5153be464fea 100644 (file)
@@ -1,24 +1,24 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <flow xmlns="urn:opendaylight:flow:inventory">
     <strict>false</strict>
-    <flow-name>FooXf101</flow-name>
-    <id>256</id>
+    <flow-name>push-mpls-action</flow-name>
+    <id>263</id>
     <cookie_mask>255</cookie_mask>
-    <cookie>101</cookie>
+    <cookie>401</cookie>
     <table_id>2</table_id>
-    <priority>2</priority>
+    <priority>8</priority>
     <hard-timeout>1200</hard-timeout>
     <idle-timeout>3400</idle-timeout>
     <installHw>false</installHw>
     <instructions>
         <instruction>
             <order>0</order>
-           <apply-actions>
+            <apply-actions>
                 <action>
                     <order>0</order>
-                    <set-nw-ttl-action>
-                        <nw-ttl>1</nw-ttl>
-                    </set-nw-ttl-action>
+                    <push-mpls-action>
+                        <ethernet-type>34888</ethernet-type>
+                    </push-mpls-action>
                 </action>
             </apply-actions>
         </instruction>
     <match>
         <ethernet-match>
             <ethernet-type>
-                <type>34525</type>
+                <type>2048</type>
             </ethernet-type>
+            <ethernet-destination>
+                <address>20:14:29:01:19:61</address>
+            </ethernet-destination>
+            <ethernet-source>
+                <address>00:00:00:11:23:ae</address>
+            </ethernet-source>
         </ethernet-match>
-        <ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/76</ipv6-source>
-        <ipv6-destination>fe80:2acf:e9ff:fe21::6431/94</ipv6-destination>
-        <metadata>
-            <metadata>12345</metadata>
-        </metadata>
+        <ipv4-source>19.1.2.3/10</ipv4-source>
+        <ipv4-destination>172.168.5.6/18</ipv4-destination>
         <ip-match>
-            <ip-protocol>6</ip-protocol>
-            <ip-dscp>60</ip-dscp>
+            <ip-protocol>17</ip-protocol>
+            <ip-dscp>8</ip-dscp>
             <ip-ecn>3</ip-ecn>
         </ip-match>
-        <tcp-source-port>183</tcp-source-port>
-        <tcp-destination-port>8080</tcp-destination-port>
+        <udp-source-port>25364</udp-source-port>
+        <udp-destination-port>8080</udp-destination-port>
+        <in-port>0</in-port>
     </match>
 </flow>
 
diff --git a/test-scripts/xmls/f114.xml b/test-scripts/xmls/f114.xml
new file mode 100644 (file)
index 0000000..1a902b5
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <flow-name>pop-mpls-action</flow-name>
+    <id>263</id>
+    <cookie_mask>255</cookie_mask>
+    <cookie>889</cookie>
+    <table_id>2</table_id>
+    <priority>8</priority>
+    <hard-timeout>1200</hard-timeout>
+    <idle-timeout>3400</idle-timeout>
+    <installHw>false</installHw>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <pop-mpls-action>
+                        <ethernet-type>2048</ethernet-type>
+                    </pop-mpls-action>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+            <ethernet-destination>
+                <address>20:14:29:01:19:61</address>
+            </ethernet-destination>
+            <ethernet-source>
+                <address>00:00:00:11:23:ae</address>
+            </ethernet-source>
+        </ethernet-match>
+        <ipv4-source>19.1.2.3/10</ipv4-source>
+        <ipv4-destination>172.168.5.6/18</ipv4-destination>
+        <ip-match>
+            <ip-protocol>17</ip-protocol>
+            <ip-dscp>8</ip-dscp>
+            <ip-ecn>3</ip-ecn>
+        </ip-match>
+        <udp-source-port>25364</udp-source-port>
+        <udp-destination-port>8080</udp-destination-port>
+        <in-port>0</in-port>
+    </match>
+</flow>
+
diff --git a/test-scripts/xmls/f207.xml b/test-scripts/xmls/f207.xml
new file mode 100644 (file)
index 0000000..da1e277
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <flow-name>set-field-ipv6-source-addr</flow-name>
+    <id>256</id>
+    <cookie_mask>255</cookie_mask>
+    <cookie>101</cookie>
+    <table_id>2</table_id>
+    <priority>2</priority>
+    <hard-timeout>1200</hard-timeout>
+    <idle-timeout>3400</idle-timeout>
+    <installHw>false</installHw>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <set-field>
+                        <ipv6-source>1004:5608:900c:d000:f00d::200f</ipv6-source>
+                    </set-field>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>34525</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/76</ipv6-source>
+        <ipv6-destination>fe80:2acf:e9ff:fe21::6431/94</ipv6-destination>
+        <metadata>
+            <metadata>12345</metadata>
+        </metadata>
+        <ip-match>
+            <ip-protocol>6</ip-protocol>
+            <ip-dscp>60</ip-dscp>
+            <ip-ecn>3</ip-ecn>
+        </ip-match>
+        <tcp-source-port>183</tcp-source-port>
+        <tcp-destination-port>8080</tcp-destination-port>
+    </match>
+</flow>
+
similarity index 88%
rename from test-scripts/xmls/f120.xml
rename to test-scripts/xmls/f208.xml
index f1f7f46a2a6b100729206e49ea0d9527987840f4..c05acdc481e5b66bb1607e575613ff2bf8190b0c 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <flow xmlns="urn:opendaylight:flow:inventory">
     <strict>false</strict>
-    <flow-name>set-field-tcp-src</flow-name>
+    <flow-name>set-field-ipv6-dest-addr</flow-name>
     <id>256</id>
     <cookie_mask>255</cookie_mask>
     <cookie>101</cookie>
@@ -17,7 +17,7 @@
                 <action>
                     <order>0</order>
                     <set-field>
-                        <tcp-source-port>2059</tcp-source-port>
+                        <ipv6-destination>2160:2160:216::6431</ipv6-destination>
                     </set-field>
                 </action>
             </apply-actions>
@@ -36,6 +36,7 @@
         </metadata>
         <ip-match>
             <ip-protocol>6</ip-protocol>
+            <ip-dscp>60</ip-dscp>
             <ip-ecn>3</ip-ecn>
         </ip-match>
         <tcp-source-port>183</tcp-source-port>
diff --git a/test-scripts/xmls/f209.xml b/test-scripts/xmls/f209.xml
new file mode 100644 (file)
index 0000000..6465bcc
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <flow-name>set-field-tunnel-id</flow-name>
+    <id>256</id>
+    <cookie_mask>255</cookie_mask>
+    <cookie>101</cookie>
+    <table_id>2</table_id>
+    <priority>2</priority>
+    <hard-timeout>1200</hard-timeout>
+    <idle-timeout>3400</idle-timeout>
+    <installHw>false</installHw>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <set-field>
+                        <tunnel>
+                            <tunnel-id>2591</tunnel-id>
+                        </tunnel>
+                    </set-field>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>34525</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/76</ipv6-source>
+        <ipv6-destination>fe80:2acf:e9ff:fe21::6431/94</ipv6-destination>
+        <metadata>
+            <metadata>12345</metadata>
+        </metadata>
+        <ip-match>
+            <ip-protocol>6</ip-protocol>
+            <ip-dscp>60</ip-dscp>
+            <ip-ecn>3</ip-ecn>
+        </ip-match>
+        <tcp-source-port>183</tcp-source-port>
+        <tcp-destination-port>8080</tcp-destination-port>
+    </match>
+</flow>
+