diff options
author | Timothy Redaelli <tredaelli@redhat.com> | 2019-12-20 18:35:08 +0100 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2019-12-20 12:23:06 -0800 |
commit | 0c4d144a989a444d038d58272d8571e97e00e86f (patch) | |
tree | e78d3a01c469f5f1842d3344f86801dcff30e761 /xenserver | |
parent | 24e6970809483d256c38cfd029ae9469b0d3e961 (diff) | |
download | openvswitch-0c4d144a989a444d038d58272d8571e97e00e86f.tar.gz |
Remove dependency on python3-six
Since Python 2 support was removed in 1ca0323e7c29 ("Require Python 3 and
remove support for Python 2."), python3-six is not needed anymore.
Moreover python3-six is not available on RHEL/CentOS7 without using EPEL
and so this patch is needed in order to release OVS 2.13 on RHEL7.
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'xenserver')
-rwxr-xr-x | xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync b/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync index ecd6f6d70..cf8960025 100755 --- a/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync +++ b/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync @@ -35,8 +35,6 @@ import ovs.dirs import ovs.unixctl import ovs.unixctl.server -import six - vlog = ovs.vlog.Vlog("ovs-xapi-sync") session = None flush_cache = False @@ -86,7 +84,7 @@ def get_network_by_bridge(br_name): recs = session.xenapi.network.get_all_records_where( 'field "bridge"="%s"' % br_name) if len(recs) > 0: - return next(six.itervalues(recs)) + return next(iter(recs.values())) return None @@ -296,7 +294,7 @@ def main(): txn = ovs.db.idl.Transaction(idl) new_bridges = {} - for row in six.itervalues(idl.tables["Bridge"].rows): + for row in idl.tables["Bridge"].rows.values(): bridge_id = bridges.get(row.name) if bridge_id is None: # Configure the new bridge. @@ -321,12 +319,12 @@ def main(): bridges = new_bridges iface_by_name = {} - for row in six.itervalues(idl.tables["Interface"].rows): + for row in idl.tables["Interface"].rows.values(): iface_by_name[row.name] = row new_iface_ids = {} new_vm_ids = {} - for row in six.itervalues(idl.tables["Interface"].rows): + for row in idl.tables["Interface"].rows.values(): # Match up paired vif and tap devices. if row.name.startswith("vif"): vif = row |