xenserver: Pass network UUID to controller for internal networks too.
vNetManager needs to know the xapi UUIDs for the networks that correspond
to OpenFlow connections. For some time now we have passed these to it
over the management connection using bridge.<bridgename>.xs-network-uuids
configuration keys, but only now did we notice that this didn't get set for
internal networks.
The reason that it didn't get set is that interface-reconfigure is the
script that sets up these configuration keys, but interface-reconfigure
is never called for internal networks. Instead, xapi creates them itself
using directly calls to bridge ioctls. So no amount of tweaks to
interface-reconfigure will help.
This commit fixes the problem by modifying the vif script instead. This
works acceptably only because xapi is lazy about creating bridges for
internal networks: it creates them only just before it is about to add the
first vif to them. Thus, by setting up the configuration key in the vif
script, it gets added just after the bridge itself is created. There is
a race, of course, meaning that there may be a delay between the initial
OpenFlow connection and the time when the configuration key is set up,
but vNetManager can tolerate that.