CP-36392: Do not use a loop for only one iteration.
CP-36392: Do not use a loop for only one iteration.

Signed-off-by: Konstantina Chremmou <a7d1f757a659045fb6db8c1e3849a1c8ad00b97a@citrix.com>

xenserver/xenadmin,kc284/xenadmin,xenserver/xenadmin,kc284/xenadmin,xenserver/xenadmin,kc284/xenadmin,kc284/xenadmin,kc284/xenadmin