From d33815cddcf5886846a72d0e663504182bc9eafe Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Mon, 21 May 2018 10:06:17 +0000 Subject: Revert "Add iteritems() when parsing dict in Python 2.x" This reverts commit e29fe40e0c98d6c3b619de7f99f0a8fb9e4a9d7b. acl_types_names is not a dictionary but a list of tuples: (Pdb) pp acl_types_names [(u'ietf-access-control-list:ipv4-acl', u'04a5ce7c-6aac-4f26-b3f9-a19749d814f3'), (u'ietf-access-control-list:ipv4-acl', u'75737a58-c894-46d9-9319-8d2b4785b0f3'), (u'ietf-access-control-list:ipv4-acl', u'bb422318-c3a3-4356-a67c-f44e8874edf6')] (Pdb) type(acl_types_names) (Pdb) type(acl_types_names[0]) Therefore, this patch introduces an error Change-Id: I7f7e69fb1855c7915b2c17d80a5b7ea76aaa8694 Signed-off-by: Manuel Buil --- sfc/lib/cleanup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfc/lib/cleanup.py b/sfc/lib/cleanup.py index 9ee16c6e..ca802da3 100644 --- a/sfc/lib/cleanup.py +++ b/sfc/lib/cleanup.py @@ -19,7 +19,7 @@ def delete_odl_resources(odl_ip, odl_port, resource): def delete_odl_ietf_access_lists(odl_ip, odl_port): acl_list = odl_utils.get_odl_acl_list(odl_ip, odl_port) acl_types_names = odl_utils.odl_acl_types_names(acl_list) - for acl_type, acl_name in acl_types_names.iteritems(): + for acl_type, acl_name in acl_types_names: odl_utils.delete_odl_acl(odl_ip, odl_port, acl_type, acl_name) -- cgit 1.2.3-korg