diff options
author | Manuel Buil <mbuil@suse.com> | 2018-05-21 10:06:17 +0000 |
---|---|---|
committer | Manuel Buil <mbuil@suse.com> | 2018-05-21 12:11:47 +0200 |
commit | d33815cddcf5886846a72d0e663504182bc9eafe (patch) | |
tree | 9eccad61995cf361fa709a13d2360302f071964f | |
parent | e29fe40e0c98d6c3b619de7f99f0a8fb9e4a9d7b (diff) |
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)
<type 'list'>
(Pdb) type(acl_types_names[0])
<type 'tuple'>
Therefore, this patch introduces an error
Change-Id: I7f7e69fb1855c7915b2c17d80a5b7ea76aaa8694
Signed-off-by: Manuel Buil <mbuil@suse.com>
-rw-r--r-- | sfc/lib/cleanup.py | 2 |
1 files changed, 1 insertions, 1 deletions
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) |