python3: Add python3 compatibility support
python3: Add python3 compatibility support

Add python2/python3 compatibility support:

- Use six.iteritems() to replace dictionary.iteritems()
  on python2 or dictionary.items() on python3.

- Use six.advanced_iterator as a replacement to call
  it.next() on python2 and next(it) on python3.

Change-Id: I48442696b66392de33520714b9beb2c645ec1b58
Signed-off-by: Chuck Short <753a8074f04ffd62a8fff7516e3ae689be8e35ad@canonical.com>

vikt0rs/oslo.db,akash1808/oslo.db,magic0704/oslo.db,malor/oslo.db,openstack/oslo.db,JioCloud/oslo.db,openstack/oslo.db,varunarya10/oslo.db