Older versions of tenacity doesn't support iterator in the Retrying class, so updating the function to use the decorator instead, so we can keep compatibility. Change-Id: I33fa112975f355cf4f4396ec331200b15a366161