replace iterator.next() with next(iterator)

According to https://wiki.openstack.org/wiki/Python3 iterator.next()
should be replaced with next(iterator).

Change-Id: Ibbd3c7ae37363427fc57eb95945846561d3e9722