Upload OF plugin test to Integration repo
authorMadhusudhan <madhusudhan.opendaylight@yahoo.com>
Fri, 17 Jan 2014 19:29:36 +0000 (11:29 -0800)
committerMadhusudhan <madhusudhan.opendaylight@yahoo.com>
Fri, 17 Jan 2014 19:29:36 +0000 (11:29 -0800)
Change-Id: I8a0c04b5cbb01e9a56ab197cffd29eb66e6bcfed
Signed-off-by: Madhusudhan <madhusudhan.opendaylight@yahoo.com>
79 files changed:
test/tools/OF_Test/action-keywords.csv [new file with mode: 0644]
test/tools/OF_Test/keywords.csv [new file with mode: 0755]
test/tools/OF_Test/keywords.csv.backup [new file with mode: 0755]
test/tools/OF_Test/match-keywords.csv [new file with mode: 0755]
test/tools/OF_Test/odl_tests.py [new file with mode: 0755]
test/tools/OF_Test/odl_tests.py.backup [new file with mode: 0755]
test/tools/OF_Test/ofctl/t1 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t11 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t19 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t2 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t20 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t21 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t22 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t25 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t27 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t29 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t30 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t31 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t33 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t36 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t38 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t4 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t41 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t43 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t45 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t48 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t5 [new file with mode: 0644]
test/tools/OF_Test/ofctl/t6 [new file with mode: 0644]
test/tools/OF_Test/test.py [new file with mode: 0644]
test/tools/OF_Test/test1.py [new file with mode: 0644]
test/tools/OF_Test/xmls/f1.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f10.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f11.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f12.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f13.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f14.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f15.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f16.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f17.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f18.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f19.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f2.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f20.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f21.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f22.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f23.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f24.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f25.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f26.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f27.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f28.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f29.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f3.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f30.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f31.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f32.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f33.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f34.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f35.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f36.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f37.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f38.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f39.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f4.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f40.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f41.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f42.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f43.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f44.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f45.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f46.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f47.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f48.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f49.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f5.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f6.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f7.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f8.xml [new file with mode: 0644]
test/tools/OF_Test/xmls/f9.xml [new file with mode: 0644]

diff --git a/test/tools/OF_Test/action-keywords.csv b/test/tools/OF_Test/action-keywords.csv
new file mode 100644 (file)
index 0000000..e610303
--- /dev/null
@@ -0,0 +1,3 @@
+dec-nw-ttl;dec_ttl
+dec-mpls-ttl;dec_mpls_ttl
+drop-action;drop
diff --git a/test/tools/OF_Test/keywords.csv b/test/tools/OF_Test/keywords.csv
new file mode 100755 (executable)
index 0000000..5ff10e3
--- /dev/null
@@ -0,0 +1,15 @@
+cookie;cookie
+duration;duration
+exit;exit
+idle-timeout;idle_timeout
+in_port;in_port
+instructions;instructions
+hard-timeout;hard_timeout
+out_port;out_port
+match;matches
+n_packets;n_packets
+n_bytes;n_bytes
+priority;priority
+reg;reg
+table;table
+table_id;table
diff --git a/test/tools/OF_Test/keywords.csv.backup b/test/tools/OF_Test/keywords.csv.backup
new file mode 100755 (executable)
index 0000000..7cd9ee0
--- /dev/null
@@ -0,0 +1,50 @@
+in_port;in_port
+dl_vlan;dl_vlan
+dl_vlan_pcp;dl_vlan_pcp
+dl_src;dl_src
+dl_dst;dl_dst
+dl_type;dl_type
+ipv4-source;nw_src
+ipv4-destination;nw_dst
+nw_proto;nw_proto
+nw_tos;nw_tos
+nw_ecn;nw_ecn
+nw_ttl;nw_ttl
+tp_src;tp_src
+tp_dst;tp_dst
+icmp_type;icmp_type
+icmp_code;icmp_code
+table;table
+ip;ip
+icmp;icmp
+tcp;tcp
+udp;udp
+arp;arp
+vlan_tci;vlan_tci
+ip_frag;ip_frag
+arp_sha;arp_sha
+arp_tha;arp_tha
+ipv6_src;ipv6_src
+ipv6_dst;ipv6_dst
+ipv6_label;ipv6_label
+nd_target;nd_target
+nd_sll;nd_sll
+nd_tll;nd_tll
+tun_id;tun_id
+reg;reg
+ipv6;ipv6
+tcp6;tcp6
+udp6;udp6
+icmp6;icmp6
+apply_actions;actions
+exit;exit
+cookie;cookie
+priority;priority
+idle-timeout;idle_timeout
+hard-timeout;hard_timeout
+out_port;out_port
+duration;duration
+table_id;table
+priority;priority
+n_packets;n_packets
+n_bytes;n_bytes
diff --git a/test/tools/OF_Test/match-keywords.csv b/test/tools/OF_Test/match-keywords.csv
new file mode 100755 (executable)
index 0000000..7dad3eb
--- /dev/null
@@ -0,0 +1,32 @@
+arp-op;arp_op
+arp-source-transport-address;arp_spa
+arp-target-transport-address;arp_tpa
+arp-source-hardware-address;arp_sha
+arp-target-hardware-address;arp_tha
+ethernet-source;dl_src
+ethernet-destination;dl_dst
+ethernet-type;dl_type
+icmpv4-type;icmp_type
+icmpv4-code;icmp_code
+in-port;in_port
+in-phy-port;in_phy_port
+ip-dscp;nw_tos
+ip-ecn;nw_ecn
+ip-protocol;nw_proto
+ipv4-source;nw_src
+ipv4-destination;nw_dst
+ipv6_source;ipv6_src
+ipv6_destination;ipv6_dst
+ipv6_label;ipv6_label
+sctp-destination-port;tp_dst
+sctp-source-port;tp_src
+tcp-destination-port;tp_dst
+tcp-source-port;tp_src
+udp-destination-port;tp_dst
+udp-source-port;tp_src
+vlan-id;dl_vlan
+vlan_tci;vlan_tci
+nd_target;nd_target
+nd_sll;nd_sll
+nd_tll;nd_tll
+tun_id;tun_id
diff --git a/test/tools/OF_Test/odl_tests.py b/test/tools/OF_Test/odl_tests.py
new file mode 100755 (executable)
index 0000000..d743bd2
--- /dev/null
@@ -0,0 +1,539 @@
+import os
+import sys
+import time
+import logging
+import argparse
+import unittest
+import requests
+import xml.dom.minidom as md
+from xml.etree import ElementTree as ET
+from netaddr import IPNetwork
+from string import lower
+
+import mininet.node
+import mininet.topo
+import mininet.net
+import mininet.util
+
+from mininet.node import RemoteController
+from mininet.node import OVSKernelSwitch
+
+def create_network(controller_ip, controller_port):
+    """Create topology and mininet network."""
+    topo = mininet.topo.Topo()
+
+    topo.addSwitch('s1')
+    topo.addHost('h1')
+    topo.addHost('h2')
+
+    topo.addLink('h1', 's1')
+    topo.addLink('h2', 's1')
+
+    switch=mininet.util.customConstructor(
+        {'ovsk':OVSKernelSwitch}, 'ovsk,protocols=OpenFlow13')
+
+    controller=mininet.util.customConstructor(
+        {'remote': RemoteController}, 'remote,ip=%s:%s' % (controller_ip,
+                                                           controller_port))
+
+
+    net = mininet.net.Mininet(topo=topo, switch=switch, controller=controller)
+
+    return net
+
+
+def get_flows(net):
+    """Get list of flows from network's first switch.
+
+    Return list of all flows on switch, sorted by duration (newest first)
+    One flow is a dictionary with all flow's attribute:value pairs. Matches
+    are stored under 'matches' key as another dictionary.
+    Example:
+
+        {
+            'actions': 'drop',
+            'cookie': '0xa,',
+            'duration': '3.434s,',
+            'hard_timeout': '12,',
+            'idle_timeout': '34,',
+            'matches': {
+                'ip': None,
+                'nw_dst': '10.0.0.0/24'
+            },
+            'n_bytes': '0,',
+            'n_packets': '0,',
+            'priority': '2',
+            'table': '1,'
+        }
+
+    """
+    log = logging.getLogger(__name__)
+    def parse_matches(flow, matches):
+        flow['matches'] = {}
+
+        for match in matches:
+            split_match = match.split('=', 1)
+            if len(split_match) == 1:
+                flow['matches'][split_match[0]] = None
+            else:
+                flow['matches'][split_match[0]] = split_match[1].rstrip(',')
+
+    switch = net.switches[0]
+    output = switch.cmdPrint(
+        'ovs-ofctl -O OpenFlow13 dump-flows %s' % switch.name)
+#    output = switch.cmdPrint(
+#        'ovs-ofctl -F openflow10 dump-flows %s' % switch.name)
+
+    log.debug('switch flow table: {}'.format(output))
+
+    flows = []
+
+    for line in output.splitlines()[1:]:
+        flow = {}
+        for word in line.split():
+            word.rstrip(',')
+            try:
+                key, value = word.split('=', 1)
+            except ValueError:
+                #TODO: need to figure out what to do here?
+                continue
+
+            if key == 'priority':
+                values = value.split(',')
+                flow[key] = values[0]
+                parse_matches(flow, values[1:])
+            else:
+                flow[key] = value.rstrip(',')
+
+        flows.append(flow)
+
+    # sort by duration 
+    return sorted(flows, key=lambda x: x['duration'].rstrip('s'))
+
+
+def translate_to_flow(flow, name, dictionary):
+    switch_flow_name = dictionary[name]
+
+    key_err = '{} needs to be present in flow definition. Flow definition ' \
+              'was: {}.'.format(switch_flow_name, flow)
+    assert switch_flow_name in flow, key_err
+    return switch_flow_name
+
+
+def get_text_value(element):
+    return element.childNodes[0].nodeValue
+
+
+def compare_elements(expected_match, actual_match, kw, comparators, default):
+    for child in expected_match.childNodes:
+        if child.nodeType is expected_match.TEXT_NODE:
+            continue
+      
+        comparator = comparators.get(child.nodeName, default)
+        comparator(child, actual_match, kw)
+
+
+def fallback_comparator(xml_element, switch_flow, kw):
+    # print 'fallback_comparator-xml_element', xml_element.toxml()
+    # print 'fallback_comparator: switch_flow', switch_flow
+    # print 'fallback_comparator: kw', kws
+
+    name = translate_to_flow(switch_flow, xml_element.nodeName, kw)
+
+    actual = switch_flow[name]
+    expected = xml_element.childNodes[0].nodeValue
+
+    data = xml_element.toxml(), name, actual
+    # print 'fallback_comparator: data', data
+
+    assert expected == actual, 'xml part: %s && switch %s=%s' % data
+
+
+def default_comparator(xml_element, switch_flow):
+    fallback_comparator(xml_element, switch_flow, keywords)
+
+
+def integer_comparator(expected, actual, kw, base):
+    expected_value = int(expected.childNodes[0].data)
+
+    name = kw.get(expected.nodeName)
+    actual_value = int(actual[name], base)
+
+    data = expected.toxml(), name, actual
+    assert expected_value == actual_value, \
+        'xml value: %s && actual value %s=%s' % data
+
+
+def cookie_comparator(cookie, switch_flow):
+    integer_comparator(cookie, switch_flow, keywords, 16)
+
+
+def ethernet_address_comparator(child, actual_match, kw):
+    expected_address = child.getElementsByTagName("address")[0].childNodes[0].data
+    actual_address = actual_match[kw.get(child.nodeName)]
+
+    data = child.toxml(), kw.get(child.nodeName), actual_address
+
+    assert lower(expected_address) == lower(actual_address), \
+        'xml address: %s && actual address %s=%s' % data
+
+
+def vlan_match_comparator(expected_match, actual_match, kw):
+
+    def compare_vlan_pcp(expected_match, actual_match, kw):
+        integer_comparator(expected_match, actual_match, kw, 10)
+
+    def compare_vlan_id(expected_match, actual_match, kw):
+        integer_comparator(expected_match.getElementsByTagName('vlan-id')[0], \
+                           actual_match, kw, 10)
+
+    VLAN_COMPARATORS = {
+        'vlan-pcp': compare_vlan_pcp, 
+        'vlan-id': compare_vlan_id,
+    }    
+
+    # print 'ethernet_match_comparator-expected_match:', expected_match.toxml()
+    # print 'ethernet_match_comparator-actual_match:', actual_match
+
+    compare_elements(expected_match, actual_match, kw, \
+                     VLAN_COMPARATORS, fallback_comparator)
+
+
+def ethernet_match_comparator(expected_match, actual_match, kw):
+    def compare_etype(child, actual_match, kw):
+        expected_etype = int(child.getElementsByTagName("type")[0].childNodes[0].data)
+        name = kw.get(child.nodeName)
+        data = child.toxml(), name, actual_match
+
+        if expected_etype == 2048: # IP
+            assert ((actual_match.get('ip', 'IP Not-present') is None) or \
+                    (actual_match.get('tcp', 'TCP Not-present') is None) or \
+                    (actual_match.get('sctp', 'SCTP Not-present') is None) or \
+                    (actual_match.get('udp', 'UDP Not-present') is None)), \
+                     'Expected etype %s && actual etype %s=%s' % data
+        elif expected_etype == 2054: #ARP
+            assert actual_match.get('arp', 'ARP Not-present') is None, \
+                     'Expected etype %s && actual etype %s=%s' % data
+
+        else:
+            actual_etype = int(actual_match[name], 16)
+
+            assert expected_etype == actual_etype, \
+                'xml etype: %s && actual etype %s=%s' % data
+
+
+    ETH_COMPARATORS = {
+        'ethernet-type': compare_etype, 
+        'ethernet-source': ethernet_address_comparator,
+        'ethernet-destination': ethernet_address_comparator,
+    }    
+
+    # print 'ethernet_match_comparator-expected_match:', expected_match.toxml()
+    # print 'ethernet_match_comparator-actual_match:', actual_match
+
+    compare_elements(expected_match, actual_match, kw, \
+                     ETH_COMPARATORS, fallback_comparator)
+            
+
+def ipv4_comparator(expected_match, actual_match, kw):
+    # print 'ip_v4_comparator:', expected_match.toxml(), actual_match
+    # print 'ip_v4_comparator-actual_match:', actual_match
+
+    expected_value = expected_match.childNodes[0].data
+    actual_value = actual_match[kw.get(expected_match.nodeName)]
+
+    data = expected_match.toxml(), kw.get(expected_match.nodeName), actual_value
+
+    assert IPNetwork(expected_value) == IPNetwork(actual_value),\
+        'xml part: %s && address %s=%s' % data
+
+
+def ip_match_comparator(expected_match, actual_match, kw):
+    def compare_proto(child, actual_match, kw):
+        print 'compare_proto:', child.toxml(), actual_match
+        expected_proto = int(child.childNodes[0].data)
+
+        name = child.nodeName
+        data = expected_match.toxml(), name, actual_match
+
+        if expected_proto == 6: # TCP
+            assert actual_match.get('tcp', 'TCP Not-present') is None, \
+                   'ip protocol type: expected %s, actual %s=%s' % data
+
+        elif expected_proto == 17: #UDP
+            assert actual_match.get('udp', 'UDP Not-present') is None, \
+                   'ip protocol type: expected %s, actual %s=%s' % data
+
+        elif expected_proto == 132: #SCTP
+            assert actual_match.get('sctp', 'SCTP Not-present') is None, \
+                   'ip protocol type: expected %s, actual %s=%s' % data
+
+        else:
+            fallback_comparator(child, actual_match, kw)
+
+
+    def compare_dscp(child, actual_match, kw):
+        # print 'compare_dscp:', child.toxml(), actual_match
+
+        expected_dscp = int(child.childNodes[0].data)
+        name = kw.get(child.nodeName)
+        actual_dscp = int(actual_match[name])
+        
+        data = child.toxml(), name, actual_match
+
+        assert (expected_dscp * 4) == actual_dscp, 'dscp: expected %s, actual %s=%s' % data
+
+
+    IP_MATCH_COMPARATORS = {
+        'ip-protocol': compare_proto, 
+        'ip-dscp': compare_dscp,
+    }    
+
+    # print 'ip_match_comparator:', expected_match.toxml(), actual_match
+    compare_elements(expected_match, actual_match, kw, \
+                     IP_MATCH_COMPARATORS, fallback_comparator)
+
+
+def match_comparator(expected_match, switch_flow):
+    MATCH_COMPARATORS = {
+        'arp-source-hardware-address': ethernet_address_comparator,
+        'arp-target-hardware-address': ethernet_address_comparator,
+        'vlan-match': vlan_match_comparator,
+        'ethernet-match': ethernet_match_comparator,
+        'ip-match': ip_match_comparator,
+        'ipv4-destination': ipv4_comparator,
+        'ipv4-source': ipv4_comparator,
+    }
+
+    actual_match = switch_flow['matches']
+
+    # print 'match_comparator-expected_match:', expected_match.toxml()
+    # print 'match_comparator-actual_match:', actual_match
+    # print 'match_comparator: keywords', keywords
+
+    compare_elements(expected_match, actual_match, match_keywords, \
+                     MATCH_COMPARATORS, fallback_comparator)
+
+
+def actions_comparator(actions, switch_flow):
+    # print 'actions_comparator:', actions, switch_flow
+
+    actual_actions = switch_flow['actions'].split(",")
+    # print 'actions_comparator:', actual_actions
+
+    for action in actions.childNodes:
+        if action.nodeType is actions.TEXT_NODE:
+            continue
+
+        action_name = action.childNodes[3].nodeName
+        expected_action = action_keywords.get(action_name)
+
+        data = action.toxml(), expected_action
+        # print 'actions_comparator:', data
+
+        assert expected_action in actual_actions, 'xml part:\n%s\n expected action: %s' % data
+
+
+def null_comparator(element, switch_flow):
+    pass
+
+
+def instructions_comparator(instructions_element, switch_flow):
+    INSTRUCTION_COMPARATORS = {
+        'apply-actions': actions_comparator,
+        'default': null_comparator,
+    }
+    # print 'instructions_comparator:', instructions_element, switch_flow
+
+    instructions = instructions_element.childNodes
+
+    for instruction in instructions_element.childNodes:
+        if instruction.nodeType is instructions_element.TEXT_NODE:
+            continue
+        
+        for itype in instruction.childNodes:
+            if itype.nodeType is itype.TEXT_NODE:
+                continue
+
+            comparator = INSTRUCTION_COMPARATORS.get(itype.nodeName,
+                                                     INSTRUCTION_COMPARATORS['default'])
+            comparator(itype, switch_flow)
+
+
+COMPARATORS = {
+    'cookie': cookie_comparator,
+    'instructions': instructions_comparator,
+    'match': match_comparator,
+    'default': default_comparator,
+}
+
+def all_nodes(xml_root):
+    """
+    Generates every non-text nodes.
+    """
+    current_nodes = [xml_root]
+    next_nodes = []
+
+    while len(current_nodes) > 0:
+        for node in current_nodes:
+            if node.nodeType != xml_root.TEXT_NODE:
+                yield node
+                next_nodes.extend(node.childNodes)
+
+        current_nodes, next_nodes = next_nodes, []
+
+
+def check_elements(xmlstr, keywords):
+    # namespace = 'urn:opendaylight:flow:inventory'
+    tree = md.parseString(xmlstr)
+
+    for element in all_nodes(tree.documentElement):
+        # switch flow object contains only some data from xml
+        if element.nodeName not in keywords:
+            # print 'check_elements: element.nodeName', element.nodeName, 'NOT in keywords'
+            continue
+
+        yield element
+
+    raise StopIteration()
+
+
+class TestOpenFlowXMLs(unittest.TestCase):
+    @classmethod
+    def setUpClass(cls):
+        cls.net = create_network(cls.host, cls.mn_port)
+        cls.net.start()
+        time.sleep(15)
+
+    @classmethod
+    def tearDownClass(cls):
+        cls.net.stop()
+
+
+def get_values(node, *tags):
+    result = {tag: None for tag in tags}
+    for node in all_nodes(node):
+        if node.nodeName in result and len(node.childNodes) > 0:
+            result[node.nodeName] = node.childNodes[0].nodeValue
+    return result
+
+
+def generate_tests_from_xmls(path, xmls=None):
+    # generate test function from path to request xml
+    def generate_test(path_to_xml):
+        xml_string = ''
+        with open(path_to_xml) as f:
+            xml_string = f.read()
+
+        tree = md.parseString(xml_string)
+        ids = get_values(tree.documentElement, 'table_id', 'id')
+
+        def new_test(self):
+            log = logging.getLogger(__name__)
+            # send request throught RESTCONF
+            data = (self.host, self.port, ids['table_id'], ids['id'])
+            url = 'http://%s:%d/restconf/config/opendaylight-inventory:nodes' \
+                  '/node/openflow:1/table/%s/flow/%s' % data
+            headers = {
+                'Content-Type': 'application/xml',
+                'Accept': 'application/xml',
+            }
+            log.info('sending request to url: {}'.format(url))
+            rsp = requests.put(url, auth=('admin', 'admin'), data=xml_string,
+                               headers=headers)
+            log.info('received status code: {}'.format(rsp.status_code))
+            log.debug('received content: {}'.format(rsp.text))
+            assert rsp.status_code == 204 or rsp.status_code == 200, 'Status' \
+                    ' code returned %d' % rsp.status_code
+
+            # check request content against restconf's datastore
+            response = requests.get(url, auth=('admin', 'admin'),
+                                    headers={'Accept': 'application/xml'})
+            assert response.status_code == 200
+            req = ET.tostring(ET.fromstring(xml_string))
+            res = ET.tostring(ET.fromstring(response.text))
+            assert req == res, 'uploaded and stored xml, are not the same\n' \
+                'uploaded: %s\nstored:%s' % (req, res)
+
+            # collect flow table state on switch
+            switch_flows = get_flows(self.net)
+            assert len(switch_flows) > 0
+
+            # compare requested object and flow table state
+            for important_element in check_elements(xml_string, keywords):
+                # log.info('important element: {}'.format(important_element.nodeName))
+                comparator = COMPARATORS.get(important_element.nodeName,
+                                             COMPARATORS['default'])
+
+                comparator(important_element, switch_flows[0])
+
+        return new_test
+
+    # generate list of available xml requests
+    xmlfiles = None
+    if xmls is not None:
+        xmlfiles = ('f%d.xml' % fid for fid in xmls)
+    else:
+        xmlfiles = (xml for xml in os.listdir(path) if xml.endswith('.xml'))
+
+    # define key getter for sorting
+    def get_test_number(test_name):
+        return int(test_name[1:-4])
+
+    for xmlfile in xmlfiles:
+        test_name = 'test_xml_%04d' % get_test_number(xmlfile)
+        setattr(TestOpenFlowXMLs,
+                test_name,
+                generate_test(os.path.join(path, xmlfile)))
+
+
+if __name__ == '__main__':
+    # set up logging
+    logging.basicConfig(level=logging.DEBUG)
+
+    # parse cmdline arguments
+    parser = argparse.ArgumentParser(description='Run switch <-> ODL tests '
+                                     'defined by xmls.')
+    parser.add_argument('--odlhost', default='127.0.0.1', help='host where '
+                        'odl controller is running')
+    parser.add_argument('--odlport', type=int, default=8080, help='port on '
+                        'which odl\'s RESTCONF is listening')
+    parser.add_argument('--mnport', type=int, default=6653, help='port on '
+                        'which odl\'s controller is listening')
+    parser.add_argument('--xmls', default=None, help='generete tests only '
+                        'from some xmls (i.e. 1,3,34) ')
+    args = parser.parse_args()
+
+    # set host and port of ODL controller for test cases
+    TestOpenFlowXMLs.port = args.odlport
+    TestOpenFlowXMLs.host = args.odlhost
+    TestOpenFlowXMLs.mn_port = args.mnport
+
+    keywords = None
+    with open('keywords.csv') as f:
+        keywords = dict(line.strip().split(';') for line in f
+                        if not line.startswith('#'))
+
+    match_keywords = None
+    with open('match-keywords.csv') as f:
+        match_keywords = dict(line.strip().split(';') for line in f
+                              if not line.startswith('#'))
+
+    action_keywords = None
+    with open('action-keywords.csv') as f:
+        action_keywords = dict(line.strip().split(';') for line in f
+                                    if not line.startswith('#'))
+
+    # fix arguments for unittest
+    del sys.argv[1:]
+
+    # generate tests for TestOpenFlowXMLs
+    if args.xmls is not None:
+        xmls = map(int, args.xmls.split(','))
+        generate_tests_from_xmls('xmls', xmls)
+    else:
+        generate_tests_from_xmls('xmls')
+
+    # run all tests
+    unittest.main()
diff --git a/test/tools/OF_Test/odl_tests.py.backup b/test/tools/OF_Test/odl_tests.py.backup
new file mode 100755 (executable)
index 0000000..73ad84a
--- /dev/null
@@ -0,0 +1,518 @@
+import os
+import sys
+import time
+import logging
+import argparse
+import unittest
+import requests
+import xml.dom.minidom as md
+from xml.etree import ElementTree as ET
+from netaddr import IPNetwork
+from string import lower
+
+import mininet.node
+import mininet.topo
+import mininet.net
+import mininet.util
+
+from mininet.node import RemoteController
+from mininet.node import OVSKernelSwitch
+
+def create_network(controller_ip, controller_port):
+    """Create topology and mininet network."""
+    topo = mininet.topo.Topo()
+
+    topo.addSwitch('s1')
+    topo.addHost('h1')
+    topo.addHost('h2')
+
+    topo.addLink('h1', 's1')
+    topo.addLink('h2', 's1')
+
+    switch=mininet.util.customConstructor(
+        {'ovsk':OVSKernelSwitch}, 'ovsk,protocols=OpenFlow13')
+
+    controller=mininet.util.customConstructor(
+        {'remote': RemoteController}, 'remote,ip=%s:%s' % (controller_ip,
+                                                           controller_port))
+
+
+    net = mininet.net.Mininet(topo=topo, switch=switch, controller=controller)
+
+    return net
+
+
+def get_flows(net):
+    """Get list of flows from network's first switch.
+
+    Return list of all flows on switch, sorted by duration (newest first)
+    One flow is a dictionary with all flow's attribute:value pairs. Matches
+    are stored under 'matches' key as another dictionary.
+    Example:
+
+        {
+            'actions': 'drop',
+            'cookie': '0xa,',
+            'duration': '3.434s,',
+            'hard_timeout': '12,',
+            'idle_timeout': '34,',
+            'matches': {
+                'ip': None,
+                'nw_dst': '10.0.0.0/24'
+            },
+            'n_bytes': '0,',
+            'n_packets': '0,',
+            'priority': '2',
+            'table': '1,'
+        }
+
+    """
+    log = logging.getLogger(__name__)
+    def parse_matches(flow, matches):
+        flow['matches'] = {}
+
+        for match in matches:
+            split_match = match.split('=', 1)
+            if len(split_match) == 1:
+                flow['matches'][split_match[0]] = None
+            else:
+                flow['matches'][split_match[0]] = split_match[1].rstrip(',')
+
+    switch = net.switches[0]
+    output = switch.cmdPrint(
+        'ovs-ofctl -O OpenFlow13 dump-flows %s' % switch.name)
+#    output = switch.cmdPrint(
+#        'ovs-ofctl -F openflow10 dump-flows %s' % switch.name)
+
+    log.debug('switch flow table: {}'.format(output))
+
+    flows = []
+
+    for line in output.splitlines()[1:]:
+        flow = {}
+        for word in line.split():
+            word.rstrip(',')
+            try:
+                key, value = word.split('=', 1)
+            except ValueError:
+                #TODO: need to figure out what to do here?
+                continue
+
+            if key == 'priority':
+                values = value.split(',')
+                flow[key] = values[0]
+                parse_matches(flow, values[1:])
+            else:
+                flow[key] = value.rstrip(',')
+
+        flows.append(flow)
+
+    # sort by duration 
+    return sorted(flows, key=lambda x: x['duration'].rstrip('s'))
+
+
+def translate_to_flow(flow, name, dictionary):
+    switch_flow_name = dictionary[name]
+
+    key_err = '{} needs to be present in flow definition. Flow definition ' \
+              'was: {}.'.format(switch_flow_name, flow)
+    assert switch_flow_name in flow, key_err
+    return switch_flow_name
+
+
+def get_text_value(element):
+    return element.childNodes[0].nodeValue
+
+
+def fallback_comparator(xml_element, switch_flow, kw):
+    # print 'fallback_comparator-xml_element', xml_element.toxml()
+    # print 'fallback_comparator: switch_flow', switch_flow
+    # print 'fallback_comparator: kw', kws
+
+    name = translate_to_flow(switch_flow, xml_element.nodeName, kw)
+
+    actual = switch_flow[name]
+    expected = xml_element.childNodes[0].nodeValue
+
+    data = xml_element.toxml(), name, actual
+    # print 'fallback_comparator: data', data
+
+    assert expected == actual, 'xml part: %s && switch %s=%s' % data
+
+
+def default_comparator(xml_element, switch_flow):
+    fallback_comparator(xml_element, switch_flow, keywords)
+
+
+def cookie_comparator(cookie, switch_flow):
+    name = translate_to_flow(switch_flow, cookie.nodeName, keywords)
+
+    actual = int(switch_flow[name], 0)
+    expected = int(cookie.childNodes[0].nodeValue)
+    data = cookie.toxml(), name, actual
+
+    assert expected == actual, 'xml part: %s && switch %s=%s' % data
+
+
+def ethernet_address_comparator(child, actual_match, kw):
+    expected_address = child.getElementsByTagName("address")[0].childNodes[0].data
+    actual_address = actual_match[kw.get(child.nodeName)]
+
+    data = child.toxml(), kw.get(child.nodeName), actual_address
+
+    assert lower(expected_address) == lower(actual_address), \
+        'xml address: %s && actual address %s=%s' % data
+
+
+def ethernet_match_comparator(expected_match, actual_match, kw):
+    def compare_etype(child, actual_match, kw):
+        expected_etype = int(child.getElementsByTagName("type")[0].childNodes[0].data)
+        name = kw.get(child.nodeName)
+        data = child.toxml(), name, actual_match
+
+        if expected_etype == 2048: # IP
+            assert ((actual_match.get('ip', 'IP Not-present') is None) or \
+                    (actual_match.get('tcp', 'TCP Not-present') is None) or \
+                    (actual_match.get('sctp', 'SCTP Not-present') is None) or \
+                    (actual_match.get('udp', 'UDP Not-present') is None)), \
+                     'Expected etype %s && actual etype %s=%s' % data
+        elif expected_etype == 2054: #ARP
+            assert actual_match.get('arp', 'ARP Not-present') is None, \
+                     'Expected etype %s && actual etype %s=%s' % data
+
+        else:
+            actual_etype = int(actual_match[name], 16)
+
+            assert expected_etype == actual_etype, 'xml etype: %s && actual etype %s=%s' % data
+
+
+    ETH_COMPARATORS = {
+        'ethernet-type': compare_etype, 
+        'ethernet-source': ethernet_address_comparator,
+        'ethernet-destination': ethernet_address_comparator,
+    }    
+
+    # print 'ethernet_match_comparator-expected_match:', expected_match.toxml()
+    # print 'ethernet_match_comparator-actual_match:', actual_match
+    # print 'ethernet_match_comparator-keywords:', keywords
+
+    for child in expected_match.childNodes:
+        if child.nodeType is expected_match.TEXT_NODE:
+            continue
+      
+        comparator = ETH_COMPARATORS.get(child.nodeName)
+        comparator(child, actual_match, kw)
+            
+
+def ip_v4_comparator(expected_match, actual_match, kw):
+    # print 'ip_v4_comparator:', expected_match.toxml(), actual_match
+    # print 'ip_v4_comparator-actual_match:', actual_match
+
+    expected_value = expected_match.childNodes[0].data
+    actual_value = actual_match[kw.get(expected_match.nodeName)]
+
+    data = expected_match.toxml(), kw.get(expected_match.nodeName), actual_value
+
+    assert IPNetwork(expected_value) == IPNetwork(actual_value), 'xml part: %s && address %s=%s' % data
+
+
+def ip_match_comparator(expected_match, actual_match, kw):
+    def compare_proto(child, actual_match, kw):
+        print 'compare_proto:', child.toxml(), actual_match
+        expected_proto = int(child.childNodes[0].data)
+
+        name = child.nodeName
+        data = expected_match.toxml(), name, actual_match
+
+        if expected_proto == 6: # TCP
+            assert actual_match.get('tcp', 'TCP Not-present') is None, \
+                   'ip protocol type: expected %s, actual %s=%s' % data
+
+        elif expected_proto == 17: #UDP
+            assert actual_match.get('udp', 'UDP Not-present') is None, \
+                   'ip protocol type: expected %s, actual %s=%s' % data
+
+        elif expected_proto == 132: #SCTP
+            assert actual_match.get('sctp', 'SCTP Not-present') is None, \
+                   'ip protocol type: expected %s, actual %s=%s' % data
+
+        else:
+            fallback_comparator(child, actual_match, kw)
+
+
+    def compare_dscp(child, actual_match, kw):
+        # print 'compare_dscp:', child.toxml(), actual_match
+
+        expected_dscp = int(child.childNodes[0].data)
+        name = kw.get(child.nodeName)
+        actual_dscp = int(actual_match[name])
+        
+        data = child.toxml(), name, actual_match
+
+        assert (expected_dscp * 4) == actual_dscp, 'dscp: expected %s, actual %s=%s' % data
+
+
+    IP_MATCH_COMPARATORS = {
+        'ip-protocol': compare_proto, 
+        'ip-dscp': compare_dscp,
+        'ip-ecn': fallback_comparator,
+    }    
+
+    # print 'ip_match_comparator:', expected_match.toxml(), actual_match
+
+    for child in expected_match.childNodes:
+        if child.nodeType is expected_match.TEXT_NODE:
+            continue
+      
+        comparator = IP_MATCH_COMPARATORS.get(child.nodeName)
+        comparator(child, actual_match, kw)
+
+
+def match_comparator(expected_match, switch_flow):
+    MATCH_COMPARATORS = {
+        'arp-source-hardware-address': ethernet_address_comparator,
+        'arp-target-hardware-address': ethernet_address_comparator,
+        'ethernet-match': ethernet_match_comparator,
+        'ip-match': ip_match_comparator,
+        'ipv4-destination': ip_v4_comparator,
+        'ipv4-source': ip_v4_comparator,
+        'default': fallback_comparator,
+    }
+
+    actual_match = switch_flow['matches']
+
+    # print 'match_comparator-expected_match:', expected_match.toxml()
+    # print 'match_comparator-actual_match:', actual_match
+    # print 'match_comparator: keywords', keywords
+
+    for child in expected_match.childNodes:
+        if child.nodeType is expected_match.TEXT_NODE:
+            continue
+        
+        comparator = MATCH_COMPARATORS.get(child.nodeName,
+                                           MATCH_COMPARATORS['default'])
+        comparator(child, actual_match, match_keywords)
+
+
+def actions_comparator(actions, switch_flow):
+    # print 'actions_comparator:', actions, switch_flow
+
+    actual_actions = switch_flow['actions'].split(",")
+    # print 'actions_comparator:', actual_actions
+
+    for action in actions.childNodes:
+        if action.nodeType is actions.TEXT_NODE:
+            continue
+
+        action_name = action.childNodes[3].nodeName
+        expected_action = action_keywords.get(action_name)
+
+        data = action.toxml(), expected_action
+        # print 'actions_comparator:', data
+
+        assert expected_action in actual_actions, 'xml part:\n%s\n expected action: %s' % data
+
+
+def null_comparator(element, switch_flow):
+    pass
+
+
+def instructions_comparator(instructions_element, switch_flow):
+    INSTRUCTION_COMPARATORS = {
+        'apply-actions': actions_comparator,
+        'default': null_comparator,
+    }
+    # print 'instructions_comparator:', instructions_element, switch_flow
+
+    instructions = instructions_element.childNodes
+
+    for instruction in instructions_element.childNodes:
+        if instruction.nodeType is instructions_element.TEXT_NODE:
+            continue
+        
+        for itype in instruction.childNodes:
+            if itype.nodeType is itype.TEXT_NODE:
+                continue
+
+            comparator = INSTRUCTION_COMPARATORS.get(itype.nodeName,
+                                                     INSTRUCTION_COMPARATORS['default'])
+            comparator(itype, switch_flow)
+
+
+COMPARATORS = {
+    'cookie': cookie_comparator,
+    'instructions': instructions_comparator,
+    'match': match_comparator,
+    'default': default_comparator,
+}
+
+def all_nodes(xml_root):
+    """
+    Generates every non-text nodes.
+    """
+    current_nodes = [xml_root]
+    next_nodes = []
+
+    while len(current_nodes) > 0:
+        for node in current_nodes:
+            if node.nodeType != xml_root.TEXT_NODE:
+                yield node
+                next_nodes.extend(node.childNodes)
+
+        current_nodes, next_nodes = next_nodes, []
+
+
+def check_elements(xmlstr, keywords):
+    # namespace = 'urn:opendaylight:flow:inventory'
+    tree = md.parseString(xmlstr)
+
+    for element in all_nodes(tree.documentElement):
+        # switch flow object contains only some data from xml
+        if element.nodeName not in keywords:
+            # print 'check_elements: element.nodeName', element.nodeName, 'NOT in keywords'
+            continue
+
+        yield element
+
+    raise StopIteration()
+
+
+class TestOpenFlowXMLs(unittest.TestCase):
+    @classmethod
+    def setUpClass(cls):
+        cls.net = create_network(cls.host, cls.mn_port)
+        cls.net.start()
+        time.sleep(15)
+
+    @classmethod
+    def tearDownClass(cls):
+        cls.net.stop()
+
+
+def get_values(node, *tags):
+    result = {tag: None for tag in tags}
+    for node in all_nodes(node):
+        if node.nodeName in result and len(node.childNodes) > 0:
+            result[node.nodeName] = node.childNodes[0].nodeValue
+    return result
+
+
+def generate_tests_from_xmls(path, xmls=None):
+    # generate test function from path to request xml
+    def generate_test(path_to_xml):
+        xml_string = ''
+        with open(path_to_xml) as f:
+            xml_string = f.read()
+
+        tree = md.parseString(xml_string)
+        ids = get_values(tree.documentElement, 'table_id', 'id')
+
+        def new_test(self):
+            log = logging.getLogger(__name__)
+            # send request throught RESTCONF
+            data = (self.host, self.port, ids['table_id'], ids['id'])
+            url = 'http://%s:%d/restconf/config/opendaylight-inventory:nodes' \
+                  '/node/openflow:1/table/%s/flow/%s' % data
+            headers = {
+                'Content-Type': 'application/xml',
+                'Accept': 'application/xml',
+            }
+            log.info('sending request to url: {}'.format(url))
+            rsp = requests.put(url, auth=('admin', 'admin'), data=xml_string,
+                               headers=headers)
+            log.info('received status code: {}'.format(rsp.status_code))
+            log.debug('received content: {}'.format(rsp.text))
+            assert rsp.status_code == 204 or rsp.status_code == 200, 'Status' \
+                    ' code returned %d' % rsp.status_code
+
+            # check request content against restconf's datastore
+            response = requests.get(url, auth=('admin', 'admin'),
+                                    headers={'Accept': 'application/xml'})
+            assert response.status_code == 200
+            req = ET.tostring(ET.fromstring(xml_string))
+            res = ET.tostring(ET.fromstring(response.text))
+            assert req == res, 'uploaded and stored xml, are not the same\n' \
+                'uploaded: %s\nstored:%s' % (req, res)
+
+            # collect flow table state on switch
+            switch_flows = get_flows(self.net)
+            assert len(switch_flows) > 0
+
+            # compare requested object and flow table state
+            for important_element in check_elements(xml_string, keywords):
+                # log.info('important element: {}'.format(important_element.nodeName))
+                comparator = COMPARATORS.get(important_element.nodeName,
+                                             COMPARATORS['default'])
+
+                comparator(important_element, switch_flows[0])
+
+        return new_test
+
+    # generate list of available xml requests
+    xmlfiles = None
+    if xmls is not None:
+        xmlfiles = ('f%d.xml' % fid for fid in xmls)
+    else:
+        xmlfiles = (xml for xml in os.listdir(path) if xml.endswith('.xml'))
+
+    # define key getter for sorting
+    def get_test_number(test_name):
+        return int(test_name[1:-4])
+
+    for xmlfile in xmlfiles:
+        test_name = 'test_xml_%04d' % get_test_number(xmlfile)
+        setattr(TestOpenFlowXMLs,
+                test_name,
+                generate_test(os.path.join(path, xmlfile)))
+
+
+if __name__ == '__main__':
+    # set up logging
+    logging.basicConfig(level=logging.DEBUG)
+
+    # parse cmdline arguments
+    parser = argparse.ArgumentParser(description='Run switch <-> ODL tests '
+                                     'defined by xmls.')
+    parser.add_argument('--odlhost', default='127.0.0.1', help='host where '
+                        'odl controller is running')
+    parser.add_argument('--odlport', type=int, default=8080, help='port on '
+                        'which odl\'s RESTCONF is listening')
+    parser.add_argument('--mnport', type=int, default=6653, help='port on '
+                        'which odl\'s controller is listening')
+    parser.add_argument('--xmls', default=None, help='generete tests only '
+                        'from some xmls (i.e. 1,3,34) ')
+    args = parser.parse_args()
+
+    # set host and port of ODL controller for test cases
+    TestOpenFlowXMLs.port = args.odlport
+    TestOpenFlowXMLs.host = args.odlhost
+    TestOpenFlowXMLs.mn_port = args.mnport
+
+    keywords = None
+    with open('keywords.csv') as f:
+        keywords = dict(line.strip().split(';') for line in f
+                        if not line.startswith('#'))
+
+    match_keywords = None
+    with open('match-keywords.csv') as f:
+        match_keywords = dict(line.strip().split(';') for line in f
+                              if not line.startswith('#'))
+
+    action_keywords = None
+    with open('action-keywords.csv') as f:
+        action_keywords = dict(line.strip().split(';') for line in f
+                                    if not line.startswith('#'))
+
+    # fix arguments for unittest
+    del sys.argv[1:]
+
+    # generate tests for TestOpenFlowXMLs
+    if args.xmls is not None:
+        xmls = map(int, args.xmls.split(','))
+        generate_tests_from_xmls('xmls', xmls)
+    else:
+        generate_tests_from_xmls('xmls')
+
+    # run all tests
+    unittest.main()
diff --git a/test/tools/OF_Test/ofctl/t1 b/test/tools/OF_Test/ofctl/t1
new file mode 100644 (file)
index 0000000..23f204b
--- /dev/null
@@ -0,0 +1 @@
+cookie=0xa, duration=1.451s, table=2, n_packets=0, n_bytes=0, priority=2,ip,nw_dst=10.0.0.0/24 actions=dec_ttl
diff --git a/test/tools/OF_Test/ofctl/t11 b/test/tools/OF_Test/ofctl/t11
new file mode 100644 (file)
index 0000000..1ceaf00
--- /dev/null
@@ -0,0 +1 @@
+cookie=0xa, duration=1.754s, table=2, n_packets=0, n_bytes=0, priority=2,ip,nw_dst=10.0.0.0/24 actions=push_vlan
diff --git a/test/tools/OF_Test/ofctl/t19 b/test/tools/OF_Test/ofctl/t19
new file mode 100644 (file)
index 0000000..4304461
--- /dev/null
@@ -0,0 +1 @@
+cookie=0xa, duration=1.753s, table=2, n_packets=0, n_bytes=0, priority=2,ip,nw_dst=10.0.0.0/24 actions=dec_ttl
diff --git a/test/tools/OF_Test/ofctl/t2 b/test/tools/OF_Test/ofctl/t2
new file mode 100644 (file)
index 0000000..6f39f37
--- /dev/null
@@ -0,0 +1 @@
+cookie=0xa, duration=1.557s, table=2, n_packets=0, n_bytes=0, priority=2,ip,nw_src=10.0.0.1 actions=drop
diff --git a/test/tools/OF_Test/ofctl/t20 b/test/tools/OF_Test/ofctl/t20
new file mode 100644 (file)
index 0000000..33d4c2e
--- /dev/null
@@ -0,0 +1 @@
+ cookie=0xa, duration=17.581s, table=2, n_packets=0, n_bytes=0, priority=2,ip,nw_dst=10.0.0.0/24 actions=drop
diff --git a/test/tools/OF_Test/ofctl/t21 b/test/tools/OF_Test/ofctl/t21
new file mode 100644 (file)
index 0000000..0c97c64
--- /dev/null
@@ -0,0 +1 @@
+ cookie=0xa, duration=14.319s, table=2, n_packets=0, n_bytes=0, priority=2,ip,nw_dst=10.0.0.0/24 actions=drop
diff --git a/test/tools/OF_Test/ofctl/t22 b/test/tools/OF_Test/ofctl/t22
new file mode 100644 (file)
index 0000000..3a4b0d1
--- /dev/null
@@ -0,0 +1 @@
+ cookie=0xa, duration=12.954s, table=2, n_packets=0, n_bytes=0, priority=2,ip,nw_dst=10.0.0.0/24 actions=drop
diff --git a/test/tools/OF_Test/ofctl/t25 b/test/tools/OF_Test/ofctl/t25
new file mode 100644 (file)
index 0000000..a7a3ead
--- /dev/null
@@ -0,0 +1 @@
+ cookie=0xa, duration=16.708s, table=2, n_packets=0, n_bytes=0, priority=2,ip,nw_dst=10.0.0.0/24 actions=drop
diff --git a/test/tools/OF_Test/ofctl/t27 b/test/tools/OF_Test/ofctl/t27
new file mode 100644 (file)
index 0000000..1008ca5
--- /dev/null
@@ -0,0 +1 @@
+ cookie=0xa, duration=38.123s, table=2, n_packets=0, n_bytes=0, priority=2,ip,nw_dst=10.0.0.0/24 actions=write_metadata:0xa/0xc
diff --git a/test/tools/OF_Test/ofctl/t29 b/test/tools/OF_Test/ofctl/t29
new file mode 100644 (file)
index 0000000..2ab911c
--- /dev/null
@@ -0,0 +1 @@
+ cookie=0xa, duration=20.251s, table=2, n_packets=0, n_bytes=0, priority=2,ip,nw_dst=10.0.0.0/24 actions=strip_vlan
diff --git a/test/tools/OF_Test/ofctl/t30 b/test/tools/OF_Test/ofctl/t30
new file mode 100644 (file)
index 0000000..44fe1ec
--- /dev/null
@@ -0,0 +1 @@
+ cookie=0xa, duration=17.729s, table=2, n_packets=0, n_bytes=0, priority=2,ip,nw_dst=10.0.0.0/24 actions=drop
diff --git a/test/tools/OF_Test/ofctl/t31 b/test/tools/OF_Test/ofctl/t31
new file mode 100644 (file)
index 0000000..3e9dbca
--- /dev/null
@@ -0,0 +1 @@
+ cookie=0xa, duration=14.874s, table=2, n_packets=0, n_bytes=0, priority=2,ip,nw_dst=10.0.0.0/24 actions=drop
diff --git a/test/tools/OF_Test/ofctl/t33 b/test/tools/OF_Test/ofctl/t33
new file mode 100644 (file)
index 0000000..1b74b0c
--- /dev/null
@@ -0,0 +1 @@
+ cookie=0xa, duration=23.141s, table=2, n_packets=0, n_bytes=0, priority=2,ip,nw_dst=10.0.0.0/24 actions=drop
diff --git a/test/tools/OF_Test/ofctl/t36 b/test/tools/OF_Test/ofctl/t36
new file mode 100644 (file)
index 0000000..03b530c
--- /dev/null
@@ -0,0 +1 @@
+ cookie=0xa, duration=35.125s, table=2, n_packets=0, n_bytes=0, priority=2,ip,nw_dst=10.0.0.0/24 actions=drop
diff --git a/test/tools/OF_Test/ofctl/t38 b/test/tools/OF_Test/ofctl/t38
new file mode 100644 (file)
index 0000000..0109e42
--- /dev/null
@@ -0,0 +1 @@
+ cookie=0xa, duration=69.848s, table=2, n_packets=0, n_bytes=0, priority=2,ip,nw_dst=10.0.0.0/24 actions=set_queue:1
diff --git a/test/tools/OF_Test/ofctl/t4 b/test/tools/OF_Test/ofctl/t4
new file mode 100644 (file)
index 0000000..c11ad89
--- /dev/null
@@ -0,0 +1 @@
+cookie=0xa, duration=3.098s, table=2, n_packets=0, n_bytes=0, priority=2,ip,dl_src=00
diff --git a/test/tools/OF_Test/ofctl/t41 b/test/tools/OF_Test/ofctl/t41
new file mode 100644 (file)
index 0000000..ede432e
--- /dev/null
@@ -0,0 +1 @@
+ cookie=0xa, duration=19.763s, table=2, n_packets=0, n_bytes=0, priority=2,ip,nw_dst=10.0.0.0/24 actions=drop
diff --git a/test/tools/OF_Test/ofctl/t43 b/test/tools/OF_Test/ofctl/t43
new file mode 100644 (file)
index 0000000..313dc26
--- /dev/null
@@ -0,0 +1 @@
+ cookie=0xa, duration=93.115s, table=2, n_packets=0, n_bytes=0, priority=2,ip,nw_dst=10.0.0.0/24 actions=drop
diff --git a/test/tools/OF_Test/ofctl/t45 b/test/tools/OF_Test/ofctl/t45
new file mode 100644 (file)
index 0000000..6e7ba48
--- /dev/null
@@ -0,0 +1 @@
+ cookie=0xa, duration=19.913s, table=2, n_packets=0, n_bytes=0, priority=2,metadata=0x100/0xffffff0000000101 actions=drop
diff --git a/test/tools/OF_Test/ofctl/t48 b/test/tools/OF_Test/ofctl/t48
new file mode 100644 (file)
index 0000000..5fc3381
--- /dev/null
@@ -0,0 +1 @@
+ cookie=0xa, duration=45.249s, table=2, n_packets=0, n_bytes=0, priority=2,tun_id=0x100/0xffffff0000000101 actions=goto_table:2
diff --git a/test/tools/OF_Test/ofctl/t5 b/test/tools/OF_Test/ofctl/t5
new file mode 100644 (file)
index 0000000..f0a6dd6
--- /dev/null
@@ -0,0 +1 @@
+cookie=0xa, duration=2.095s, table=2, n_packets=0, n_bytes=0, priority=2,ip,nw_dst=10.0.0.0/24 actions=drop
diff --git a/test/tools/OF_Test/ofctl/t6 b/test/tools/OF_Test/ofctl/t6
new file mode 100644 (file)
index 0000000..9b9cb26
--- /dev/null
@@ -0,0 +1 @@
+cookie=0xa, duration=4.08s, table=2, n_packets=0, n_bytes=0, priority=2,ip,nw_dst=10.0.0.0/24 actions=goto_table
diff --git a/test/tools/OF_Test/test.py b/test/tools/OF_Test/test.py
new file mode 100644 (file)
index 0000000..9b36f7a
--- /dev/null
@@ -0,0 +1,14 @@
+from xml.dom import minidom
+
+xmldoc=minidom.parse('./xmls/f1.xml')
+flow=xmldoc.childNodes[0]
+match=flow.childNodes[15]
+
+ipv4dst = match.getElementsByTagName("ipv4-destination")
+print ipv4dst[0].childNodes[0].data
+
+cvok = match.getElementsByTagName("cvok")
+print cvok
+
+print "ethernet type", match.getElementsByTagName("type")[0].childNodes[0].data
+# print "ethernet cvok", match.getElementsByTagName("cvok")[0].childNodes[0].data
diff --git a/test/tools/OF_Test/test1.py b/test/tools/OF_Test/test1.py
new file mode 100644 (file)
index 0000000..69e6ac3
--- /dev/null
@@ -0,0 +1,14 @@
+from xml.dom import minidom
+
+xmldoc=minidom.parse('./xmls/f7.xml')
+flow=xmldoc.childNodes[0]
+match=flow.childNodes[11]
+
+print match.toxml()
+
+ip_match = match.getElementsByTagName("ip-match")
+print 'ip-match:', ip_match
+
+
+# print "ethernet type", match.getElementsByTagName("type")[0].childNodes[0].data
+# print "ethernet cvok", match.getElementsByTagName("cvok")[0].childNodes[0].data
diff --git a/test/tools/OF_Test/xmls/f1.xml b/test/tools/OF_Test/xmls/f1.xml
new file mode 100644 (file)
index 0000000..7afe8fe
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <dec-nw-ttl/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>124</id>
+    <cookie_mask>255</cookie_mask>
+    <installHw>false</installHw>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.1.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>1</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf1</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f10.xml b/test/tools/OF_Test/xmls/f10.xml
new file mode 100644 (file)
index 0000000..2587391
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <dec-mpls-ttl/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>133</id>
+    <cookie_mask>255</cookie_mask>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+            <ethernet-destination>
+                <address>ff:ff:29:01:19:61</address>
+            </ethernet-destination>
+            <ethernet-source>
+                <address>00:00:00:11:23:ae</address>
+            </ethernet-source>
+        </ethernet-match>
+        <ipv4-source>17.1.2.3/8</ipv4-source>
+        <ipv4-destination>172.168.5.6/16</ipv4-destination>
+        <ip-match>
+            <ip-protocol>132</ip-protocol>
+            <ip-dscp>0</ip-dscp>
+            <ip-ecn>0</ip-ecn>
+        </ip-match>
+        <sctp-source-port>768</sctp-source-port>
+        <sctp-destination-port>384</sctp-destination-port>
+        <in-port>0</in-port>
+    </match>
+    <hard-timeout>1200</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>3400</idle-timeout>
+    <flow-name>FooXf10</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f11.xml b/test/tools/OF_Test/xmls/f11.xml
new file mode 100644 (file)
index 0000000..8384da2
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <dec-mpls-ttl/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>134</id>
+    <cookie_mask>255</cookie_mask>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+            <ethernet-destination>
+                <address>ff:ff:29:01:19:61</address>
+            </ethernet-destination>
+            <ethernet-source>
+                <address>00:00:00:11:23:ae</address>
+            </ethernet-source>
+        </ethernet-match>
+        <ipv4-source>17.1.2.3/8</ipv4-source>
+        <ipv4-destination>172.168.5.6/16</ipv4-destination>
+        <ip-match>
+            <ip-protocol>1</ip-protocol>
+            <ip-dscp>3f</ip-dscp>
+            <ip-ecn>3</ip-ecn>
+        </ip-match>
+       <icmpv4-match>
+            <icmpv4-type>6</icmpv4-type>
+            <icmpv4-code>3</icmpv4-code>
+       </icmpv4-match>
+        <in-port>0</in-port>
+    </match>
+    <hard-timeout>1200</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>11</cookie>
+    <idle-timeout>3400</idle-timeout>
+    <flow-name>FooXf11</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
+
diff --git a/test/tools/OF_Test/xmls/f12.xml b/test/tools/OF_Test/xmls/f12.xml
new file mode 100644 (file)
index 0000000..1eb7559
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <dec-nw-ttl/>
+                </action>
+                <action>
+                    <order>1</order>
+                    <dec-mpls-ttl/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>135</id>
+    <cookie_mask>255</cookie_mask>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2054</type>
+            </ethernet-type>
+            <ethernet-destination>
+                <address>ff:ff:ff:ff:ff:ff</address>
+            </ethernet-destination>
+            <ethernet-source>
+                <address>00:00:00:01:23:ae</address>
+            </ethernet-source>
+        </ethernet-match>
+        <arp-op>1</arp-op>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>12</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf12</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f13.xml b/test/tools/OF_Test/xmls/f13.xml
new file mode 100644 (file)
index 0000000..e93b571
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <dec-nw-ttl/>
+                </action>
+                <action>
+                    <order>1</order>
+                    <dec-mpls-ttl/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>136</id>
+    <cookie_mask>255</cookie_mask>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2054</type>
+            </ethernet-type>
+            <ethernet-destination>
+                <address>ff:ff:ff:ff:ff:ff</address>
+            </ethernet-destination>
+            <ethernet-source>
+                <address>00:00:00:01:23:ae</address>
+            </ethernet-source>
+        </ethernet-match>
+        <arp-op>1</arp-op>
+        <arp-source-transport-address>192.168.4.1</arp-source-transport-address>
+        <arp-target-transport-address>10.21.22.23</arp-target-transport-address>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>13</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf13</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
+
diff --git a/test/tools/OF_Test/xmls/f14.xml b/test/tools/OF_Test/xmls/f14.xml
new file mode 100644 (file)
index 0000000..6c075ae
--- /dev/null
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <dec-nw-ttl/>
+                </action>
+                <action>
+                    <order>1</order>
+                    <dec-mpls-ttl/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>137</id>
+    <cookie_mask>255</cookie_mask>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2054</type>
+            </ethernet-type>
+            <ethernet-destination>
+                <address>ff:ff:ff:ff:FF:ff</address>
+            </ethernet-destination>
+            <ethernet-source>
+                <address>00:00:FC:01:23:ae</address>
+            </ethernet-source>
+        </ethernet-match>
+        <arp-op>1</arp-op>
+        <arp-source-transport-address>192.168.4.1</arp-source-transport-address>
+        <arp-target-transport-address>10.21.22.23</arp-target-transport-address>
+        <arp-source-hardware-address>
+            <address>12:34:56:78:98:AB</address>
+        </arp-source-hardware-address>
+        <arp-target-hardware-address>
+            <address>FE:DC:BA:98:76:54</address>
+        </arp-target-hardware-address>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>14</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf14</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
+
diff --git a/test/tools/OF_Test/xmls/f15.xml b/test/tools/OF_Test/xmls/f15.xml
new file mode 100644 (file)
index 0000000..99d3eed
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <dec-mpls-ttl/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>138</id>
+    <cookie_mask>255</cookie_mask>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+            <ethernet-destination>
+                <address>ff:ff:29:01:19:61</address>
+            </ethernet-destination>
+            <ethernet-source>
+                <address>00:00:00:11:23:ae</address>
+            </ethernet-source>
+        </ethernet-match>
+        <vlan-match>
+            <vlan-id>
+                <vlan-id>78</vlan-id>
+                <vlan-id-present>true</vlan-id-present>
+            </vlan-id>
+        </vlan-match>
+    </match>
+    <hard-timeout>1200</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>15</cookie>
+    <idle-timeout>3400</idle-timeout>
+    <flow-name>FooXf15</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
+
diff --git a/test/tools/OF_Test/xmls/f16.xml b/test/tools/OF_Test/xmls/f16.xml
new file mode 100644 (file)
index 0000000..2c70f74
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <pop-vlan-action/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>139</id>
+    <cookie_mask>266</cookie_mask>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>16</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf16</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f17.xml b/test/tools/OF_Test/xmls/f17.xml
new file mode 100644 (file)
index 0000000..7f69eae
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <copy-ttl-out/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>140</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf17</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f18.xml b/test/tools/OF_Test/xmls/f18.xml
new file mode 100644 (file)
index 0000000..252075a
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <dec-mpls-ttl/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>141</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf18</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f19.xml b/test/tools/OF_Test/xmls/f19.xml
new file mode 100644 (file)
index 0000000..8c21a76
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <dec-nw-ttl/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>142</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf19</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f2.xml b/test/tools/OF_Test/xmls/f2.xml
new file mode 100644 (file)
index 0000000..46c1885
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <drop-action/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>125</id>
+    <cookie_mask>255</cookie_mask>
+    <installHw>false</installHw>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-source>10.0.0.1</ipv4-source>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>2</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf2</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f20.xml b/test/tools/OF_Test/xmls/f20.xml
new file mode 100644 (file)
index 0000000..b26b408
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <drop-action/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>143</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf20</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f21.xml b/test/tools/OF_Test/xmls/f21.xml
new file mode 100644 (file)
index 0000000..cc5aca0
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <flood-action/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>144</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf21</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f22.xml b/test/tools/OF_Test/xmls/f22.xml
new file mode 100644 (file)
index 0000000..9175388
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <flood-all-action/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>145</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf22</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f23.xml b/test/tools/OF_Test/xmls/f23.xml
new file mode 100644 (file)
index 0000000..8d1dbcc
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <group-action>
+                        <group>0</group>
+                        <group-id>1</group-id>
+                    </group-action>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>146</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf23</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f24.xml b/test/tools/OF_Test/xmls/f24.xml
new file mode 100644 (file)
index 0000000..f80ccaa
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <hw-path-action/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>147</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf24</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f25.xml b/test/tools/OF_Test/xmls/f25.xml
new file mode 100644 (file)
index 0000000..3a30568
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <loopback-action/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>148</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf25</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f26.xml b/test/tools/OF_Test/xmls/f26.xml
new file mode 100644 (file)
index 0000000..b2786c3
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <pop-mpls-action>
+                        <ethernet-type>11</ethernet-type>
+                    </pop-mpls-action>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>149</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf26</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f27.xml b/test/tools/OF_Test/xmls/f27.xml
new file mode 100644 (file)
index 0000000..0692782
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <write-metadata>
+                <metadata-mask>12</metadata-mask>
+                <metadata>10</metadata>
+            </write-metadata>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>150</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf27</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f28.xml b/test/tools/OF_Test/xmls/f28.xml
new file mode 100644 (file)
index 0000000..08e61e9
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <pop-pbb-action/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>151</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf28</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f29.xml b/test/tools/OF_Test/xmls/f29.xml
new file mode 100644 (file)
index 0000000..bbdba6d
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <pop-vlan-action/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>152</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf29</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f3.xml b/test/tools/OF_Test/xmls/f3.xml
new file mode 100644 (file)
index 0000000..07e4ebe
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <drop-action/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>126</id>
+    <cookie_mask>255</cookie_mask>
+    <installHw>false</installHw>
+    <match>
+        <ethernet-match>
+            <ethernet-source>
+                <address>00:00:00:00:00:01</address>
+            </ethernet-source>
+        </ethernet-match>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>3</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf3</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f30.xml b/test/tools/OF_Test/xmls/f30.xml
new file mode 100644 (file)
index 0000000..96125c9
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <set-dl-type-action>
+                        <dl-type>8</dl-type>
+                    </set-dl-type-action>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>153</id>
+    <cookie_mask>255</cookie_mask>
+    <installHw>false</installHw>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>30</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf30</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f31.xml b/test/tools/OF_Test/xmls/f31.xml
new file mode 100644 (file)
index 0000000..81cb38c
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action/>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>154</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf31</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f32.xml b/test/tools/OF_Test/xmls/f32.xml
new file mode 100644 (file)
index 0000000..3c83722
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <set-mpls-ttl-action>
+                        <mpls-ttl>1</mpls-ttl>
+                    </set-mpls-ttl-action>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>155</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf32</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f33.xml b/test/tools/OF_Test/xmls/f33.xml
new file mode 100644 (file)
index 0000000..0294b10
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <set-next-hop-action>
+                        <ipv4-address>10.0.0.1/24</ipv4-address>
+                    </set-next-hop-action>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>156</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf33</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f34.xml b/test/tools/OF_Test/xmls/f34.xml
new file mode 100644 (file)
index 0000000..27a0e7d
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <set-nw-dst-action>
+                        <ipv4-address>10.0.0.21/24</ipv4-address>
+                    </set-nw-dst-action>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>157</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf34</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f35.xml b/test/tools/OF_Test/xmls/f35.xml
new file mode 100644 (file)
index 0000000..60d3eaa
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <set-nw-src-action>
+                        <ipv4-address>10.0.23.21/24</ipv4-address>
+                    </set-nw-src-action>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>158</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf35</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f36.xml b/test/tools/OF_Test/xmls/f36.xml
new file mode 100644 (file)
index 0000000..8942668
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <set-nw-tos-action>
+                        <tos>1</tos>
+                    </set-nw-tos-action>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>159</id>
+    <cookie_mask>255</cookie_mask>
+    <installHw>false</installHw>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>36</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf36</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f37.xml b/test/tools/OF_Test/xmls/f37.xml
new file mode 100644 (file)
index 0000000..6b82df9
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <set-nw-ttl-action>
+                        <nw-ttl>1</nw-ttl>
+                    </set-nw-ttl-action>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>160</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf37</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f38.xml b/test/tools/OF_Test/xmls/f38.xml
new file mode 100644 (file)
index 0000000..faa2fe8
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <set-queue-action>
+                        <queue-id>1</queue-id>
+                    </set-queue-action>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>161</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf38</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f39.xml b/test/tools/OF_Test/xmls/f39.xml
new file mode 100644 (file)
index 0000000..5f2130e
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <set-tp-dst-action>
+                        <port>109</port>
+                    </set-tp-dst-action>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>162</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf39</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f4.xml b/test/tools/OF_Test/xmls/f4.xml
new file mode 100644 (file)
index 0000000..0f08362
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <dec-mpls-ttl/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>127</id>
+    <cookie_mask>255</cookie_mask>
+    <installHw>false</installHw>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>45</type>
+            </ethernet-type>
+            <ethernet-destination>
+                <address>ff:ff:ff:ff:ff:ff</address>
+            </ethernet-destination>
+            <ethernet-source>
+                <address>00:00:00:00:23:ae</address>
+            </ethernet-source>
+        </ethernet-match>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>4</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf4</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f40.xml b/test/tools/OF_Test/xmls/f40.xml
new file mode 100644 (file)
index 0000000..3eacd6e
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <set-tp-src-action>
+                        <port>109</port>
+                    </set-tp-src-action>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>163</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf40</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f41.xml b/test/tools/OF_Test/xmls/f41.xml
new file mode 100644 (file)
index 0000000..a1c4539
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <set-vlan-cfi-action>
+                        <vlan-cfi>2</vlan-cfi>
+                    </set-vlan-cfi-action>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>164</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf41</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f42.xml b/test/tools/OF_Test/xmls/f42.xml
new file mode 100644 (file)
index 0000000..538ff00
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <sw-path-action/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>165</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv4-destination>10.0.0.1/24</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf42</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f43.xml b/test/tools/OF_Test/xmls/f43.xml
new file mode 100644 (file)
index 0000000..b720bdc
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <dec-nw-ttl/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>166</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>34525</type>
+            </ethernet-type>
+        </ethernet-match>
+        <icmpv6-match>
+            <icmpv6-type>135</icmpv6-type>
+            <icmpv6-code>1</icmpv6-code>
+        </icmpv6-match>
+        <ip-match>
+            <ip-protocol>58</ip-protocol>
+        </ip-match>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf43</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f44.xml b/test/tools/OF_Test/xmls/f44.xml
new file mode 100644 (file)
index 0000000..ed37acc
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <drop-action/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>167</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <in-port>202</in-port>
+        <in-phy-port>10122</in-phy-port>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf44</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f45.xml b/test/tools/OF_Test/xmls/f45.xml
new file mode 100644 (file)
index 0000000..00d934e
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <drop-action/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>168</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <metadata>
+            <metadata-mask>[B@46645a66</metadata-mask>
+            <metadata>500</metadata>
+        </metadata>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf45</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f46.xml b/test/tools/OF_Test/xmls/f46.xml
new file mode 100644 (file)
index 0000000..59d482c
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <dec-nw-ttl/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>169</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>34525</type>
+            </ethernet-type>
+        </ethernet-match>
+        <ipv6-label>
+            <ipv6-flabel>10028</ipv6-flabel>
+        </ipv6-label>
+        <ipv6-nd-tll>00:0c:29:0e:4c:67</ipv6-nd-tll>
+        <ipv6-nd-sll>c2:00:54:f5:00:00</ipv6-nd-sll>
+        <icmpv6-match>
+            <icmpv6-type>135</icmpv6-type>
+            <icmpv6-code>0</icmpv6-code>
+        </icmpv6-match>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf46</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f47.xml b/test/tools/OF_Test/xmls/f47.xml
new file mode 100644 (file)
index 0000000..ba6fa13
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <controller-action>
+                        <max-length>5</max-length>
+                    </controller-action>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>170</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+        </ethernet-match>
+        <sctp-destination-port>22</sctp-destination-port>
+        <sctp-source-port>1435</sctp-source-port>
+        <ip-match>
+            <ip-protocol>132</ip-protocol>
+        </ip-match>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf47</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f48.xml b/test/tools/OF_Test/xmls/f48.xml
new file mode 100644 (file)
index 0000000..f20d5d7
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+                    <order>0</order>
+            <go-to-table>
+                <table_id>2</table_id>
+            </go-to-table>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>171</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <tunnel>
+            <tunnel-mask>[B@f7d120c</tunnel-mask>
+            <tunnel-id>10668</tunnel-id>
+        </tunnel>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf48</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f49.xml b/test/tools/OF_Test/xmls/f49.xml
new file mode 100644 (file)
index 0000000..1f8c5d7
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow 
+    xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <meter>
+                <meter-id>1</meter-id>
+            </meter>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>172</id>
+    <cookie_mask>10</cookie_mask>
+    <out_port>10</out_port>
+    <installHw>false</installHw>
+    <out_group>2</out_group>
+    <match>
+        <vlan-match>
+            <vlan-id>
+                <vlan-id>10</vlan-id>
+                <vlan-id-present>true</vlan-id-present>
+            </vlan-id>
+            <vlan-pcp>3</vlan-pcp>
+        </vlan-match>
+    </match>
+    <hard-timeout>0</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>10</cookie>
+    <idle-timeout>0</idle-timeout>
+    <flow-name>FooXf49</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f5.xml b/test/tools/OF_Test/xmls/f5.xml
new file mode 100644 (file)
index 0000000..9b1a870
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <dec-mpls-ttl/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>128</id>
+    <cookie_mask>255</cookie_mask>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+            <ethernet-destination>
+                <address>ff:ff:ff:ff:ff:ff</address>
+            </ethernet-destination>
+            <ethernet-source>
+                <address>00:00:00:00:23:ae</address>
+            </ethernet-source>
+        </ethernet-match>
+        <ipv4-source>10.1.2.3/24</ipv4-source>
+        <ipv4-destination>20.4.5.6/16</ipv4-destination>
+        <in-port>0</in-port>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>5</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf5</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f6.xml b/test/tools/OF_Test/xmls/f6.xml
new file mode 100644 (file)
index 0000000..a220752
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <dec-nw-ttl/>
+                </action>
+                <action>
+                    <order>1</order>
+                    <dec-mpls-ttl/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>129</id>
+    <cookie_mask>255</cookie_mask>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+            <ethernet-destination>
+                <address>ff:ff:ff:ff:ff:ff</address>
+            </ethernet-destination>
+            <ethernet-source>
+                <address>00:00:00:01:23:ae</address>
+            </ethernet-source>
+        </ethernet-match>
+        <ipv4-source>10.1.2.3/24</ipv4-source>
+        <ipv4-destination>40.4.5.6/16</ipv4-destination>
+    </match>
+    <hard-timeout>12</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>5</cookie>
+    <idle-timeout>34</idle-timeout>
+    <flow-name>FooXf5</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f7.xml b/test/tools/OF_Test/xmls/f7.xml
new file mode 100644 (file)
index 0000000..64047dd
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <dec-mpls-ttl/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>130</id>
+    <cookie_mask>255</cookie_mask>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+            <ethernet-destination>
+                <address>ff:ff:ff:ff:ff:aa</address>
+            </ethernet-destination>
+            <ethernet-source>
+                <address>00:00:00:11:23:ae</address>
+            </ethernet-source>
+        </ethernet-match>
+        <ipv4-source>10.1.2.3/24</ipv4-source>
+        <ipv4-destination>20.4.5.6/16</ipv4-destination>
+        <ip-match>
+            <ip-protocol>56</ip-protocol>
+            <ip-dscp>15</ip-dscp>
+            <ip-ecn>1</ip-ecn>
+        </ip-match>
+        <in-port>0</in-port>
+    </match>
+    <hard-timeout>12000</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>7</cookie>
+    <idle-timeout>12000</idle-timeout>
+    <flow-name>FooXf7</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
diff --git a/test/tools/OF_Test/xmls/f8.xml b/test/tools/OF_Test/xmls/f8.xml
new file mode 100644 (file)
index 0000000..8c19936
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <dec-mpls-ttl/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>131</id>
+    <cookie_mask>255</cookie_mask>
+    <match>
+        <ethernet-match>
+            <ethernet-type>
+                <type>2048</type>
+            </ethernet-type>
+            <ethernet-destination>
+                <address>ff:ff:29:01:19:61</address>
+            </ethernet-destination>
+            <ethernet-source>
+                <address>00:00:00:11:23:ae</address>
+            </ethernet-source>
+        </ethernet-match>
+        <ipv4-source>17.1.2.3/8</ipv4-source>
+        <ipv4-destination>172.168.5.6/16</ipv4-destination>
+        <ip-match>
+            <ip-protocol>6</ip-protocol>
+            <ip-dscp>2</ip-dscp>
+            <ip-ecn>2</ip-ecn>
+        </ip-match>
+        <tcp-source-port>25364</tcp-source-port>
+        <tcp-destination-port>8080</tcp-destination-port>
+        <in-port>0</in-port>
+    </match>
+    <hard-timeout>1200</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>8</cookie>
+    <idle-timeout>3400</idle-timeout>
+    <flow-name>FooXf8</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
+
+
diff --git a/test/tools/OF_Test/xmls/f9.xml b/test/tools/OF_Test/xmls/f9.xml
new file mode 100644 (file)
index 0000000..b32c398
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<flow xmlns="urn:opendaylight:flow:inventory">
+    <strict>false</strict>
+    <instructions>
+        <instruction>
+            <order>0</order>
+            <apply-actions>
+                <action>
+                    <order>0</order>
+                    <dec-mpls-ttl/>
+                </action>
+            </apply-actions>
+        </instruction>
+    </instructions>
+    <table_id>2</table_id>
+    <id>132</id>
+    <cookie_mask>255</cookie_mask>
+    <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>
+    <hard-timeout>1200</hard-timeout>
+    <flags>FlowModFlags [_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=false]</flags>
+    <cookie>9</cookie>
+    <idle-timeout>3400</idle-timeout>
+    <flow-name>FooXf9</flow-name>
+    <priority>2</priority>
+    <barrier>false</barrier>
+</flow>
+