Keep python 3.X compatibility for xrange

Use six.move.xrange instead of  xrange. xrange is replaced
by range in python3.

closes-bug: #1291191

Change-Id: I15454421d3c120ba828efe1947437bba87d7357f
Merge "Keep python 3.X compatibility for xrange"