Xml compare library improvement 24/11224/1
authorPeter Gubka <pgubka@cisco.com>
Tue, 16 Sep 2014 10:03:22 +0000 (12:03 +0200)
committerPeter Gubka <pgubka@cisco.com>
Tue, 16 Sep 2014 10:03:22 +0000 (12:03 +0200)
Tests based on f45.xml and f218.xml needs to make
a value manipulation before the compare happen.

Change-Id: Icbffb618ae31a817900618fb7cb5450786f35b0d
Signed-off-by: Peter Gubka <pgubka@cisco.com>
test/csit/libraries/XmlComparator.py

index 1a1c4532283fe6235beab6d5b494f75ef4fa129d..3dca1c1ba507c1c089229be0701cd59129b9dfb6 100644 (file)
@@ -77,7 +77,7 @@ class XMLtoDictParserTools():
                 if key in ['ipv4-destination', 'ipv4-source', 'ipv6-destination', 'ipv6-source', 'ipv6-nd-target']:
                     nvalue = _allign_address(value)
                     m_dict[key] = nvalue
-                elif key in ['tunnel-mask','type']:
+                elif key in ['tunnel-mask','type','metadata-mask']:
                     nvalue = _convert_numbers(value)
                     m_dict[key] = nvalue
                 else:
@@ -195,6 +195,7 @@ TAGS_TO_ADD_FOR_OC = [(['flow', 'instructions', 'instruction', 'apply-actions',
 
 
 TAGS_TO_MODIFY_FOR_OC = [(['flow', 'match','metadata'], 'metadata', 'metadata-mask'),
+                         (['flow', 'match','tunnel'], 'tunnel-id', 'tunnel-mask'),
                         ]
 
 class XmlComparator: