Fix Flake8 errors
[integration/test.git] / csit / libraries / XmlComparator.py
index 3b0b829767280d9af96989b16d9f1c8df3f7fa15..7c2617539ccf08e375055e2d52bc11204f7ab870 100644 (file)
@@ -176,6 +176,7 @@ class XMLtoDictParserTools():
                 diff[key] = (KEY_NOT_FOUND, key)
         return diff
 
+
 IGNORED_TAGS_FOR_OPERATIONAL_COMPARISON = ['id', 'flow-name', 'barrier', 'cookie_mask', 'installHw', 'flags',
                                            'strict', 'byte-count', 'duration', 'packet-count', 'in-port',
                                            'vlan-id-present', 'out_group', 'out_port', 'hard-timeout', 'idle-timeout',
@@ -217,8 +218,6 @@ class XmlComparator:
             nodeDict = XMLtoDictParserTools.parseTreeToDict(node)
             XMLtoDictParserTools.addDictValue(reportDict, index, nodeDict)
             index += 1
-            # print nodeDict
-            # print origDict
             if nodeDict == origDict:
                 return True, ''
             if nodeDict['flow']['priority'] == origDict['flow']['priority']:
@@ -228,7 +227,6 @@ class XmlComparator:
 
     def is_flow_operational2(self, requested_flow, oper_resp, check_id=False):
         def _rem_unimplemented_tags(tagpath, recurs, tdict):
-            # print "_rem_unimplemented_tags", tagpath, tdict
             if len(tagpath) > 1 and tagpath[0] in tdict:
                 _rem_unimplemented_tags(tagpath[1:], recurs, tdict[tagpath[0]])
 
@@ -245,11 +243,9 @@ class XmlComparator:
                 del tdict[tagpath[0]]
             if tdict.keys() == ['order']:
                 del tdict['order']
-            # print "leaving", tdict
 
         def _add_tags(tagpath, newtag, value, tdict):
             '''if whole tagpath exists and the tag is not present, it is added with given value'''
-            # print "_add_tags", tagpath, newtag, value, tdict
             if len(tagpath) > 0 and tagpath[0] in tdict:
                 _add_tags(tagpath[1:], newtag, value, tdict[tagpath[0]])
             elif len(tagpath) == 0 and newtag not in tdict:
@@ -257,7 +253,6 @@ class XmlComparator:
 
         def _to_be_modified_tags(tagpath, tag, related_tag, tdict):
             '''if whole tagpath exists and the tag is not present, it is added with given value'''
-            # print "_to_be_modified_tags", tagpath, tag, related_tag, tdict
             if len(tagpath) > 0 and tagpath[0] in tdict:
                 _to_be_modified_tags(tagpath[1:], tag, related_tag, tdict[tagpath[0]])
             elif len(tagpath) == 0 and tag in tdict and related_tag in tdict:
@@ -283,9 +278,6 @@ class XmlComparator:
                 ignoreList=IGNORED_TAGS_LIST)
             XMLtoDictParserTools.addDictValue(reportDict, index, nodeDict)
             index += 1
-            # print nodeDict
-            # print origDict
-            # print reportDict
             if nodeDict == origDict:
                 return True, ''
             if nodeDict['flow']['priority'] == origDict['flow']['priority']:
@@ -297,8 +289,6 @@ class XmlComparator:
                     for (p, t, rt) in TAGS_TO_MODIFY_FOR_OC:
                         _to_be_modified_tags(p, t, rt, td)
 
-                    # print "comparing1", nodeDict
-                    # print "comparing2", td
                     if nodeDict == td:
                         return True, ''
                 if nodeDict == origDict: