Make bond.create function more efficient
Make bond.create function more efficient

The original code used to call the function Xapi_vm.get_possible_hosts,
which is a very expensive function, more than necessary. This patch
changes that to call the function only when really needed.

This should provide a substantial speed-up in certain cases, especially when
joining a newly installed host to a pool with bonded NICs and many VMs.

Signed-off-by: Rob Hoes <8783b3376fb07d39edffc8d7da68a6de3874a7e6@citrix.com>

djs55/xcp-rrdd,johnelse/xcp-rrdd,sharady/xcp-networkd,koushikcgit/xcp-rrdd,sharady/xcp-networkd,koushikcgit/xcp-networkd,djs55/xcp-rrdd,simonjbeaumont/xcp-rrdd,koushikcgit/xcp-networkd,djs55/xcp-networkd,koushikcgit/xcp-rrdd,johnelse/xcp-rrdd,djs55/squeezed,koushikcgit/xcp-rrdd,djs55/xcp-networkd,robhoes/squeezed,simonjbeaumont/xcp-rrdd