diff options
author | Ethan Jackson <ethan@nicira.com> | 2010-09-21 23:57:13 -0700 |
---|---|---|
committer | Ethan Jackson <ethan@nicira.com> | 2010-09-22 11:51:57 -0700 |
commit | b13300c7178527f85937604022a755e174a0e1aa (patch) | |
tree | bb68f12ea441b425ed1589c6efb62eade7903c4f /xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py | |
parent | e6494c64e35f62411f770be086ba6a0914afaf5d (diff) | |
download | openvswitch-b13300c7178527f85937604022a755e174a0e1aa.tar.gz |
xenserver: Only put the primary XenServer UUID in default bridge-id
This patch defensively guarantees that the first id in
xs-network-uuids will belong to the primary network (as opposed to
a vlan). Given that the primary network id comes first, it parses
xs-network-ids and only copies the primary id to bridge-id when
monitor-external-ids is run.
Feature #3647
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Reviewed-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py')
-rw-r--r-- | xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py index bc311f803..c352594ac 100644 --- a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py +++ b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py @@ -342,7 +342,12 @@ def set_br_external_ids(pif): # log("Network PIF %s not currently attached (%s)" % (rec['uuid'],pifrec['uuid'])) # continue nwrec = db().get_network_record(rec['network']) - xs_network_uuids += [nwrec['uuid']] + + uuid = nwrec['uuid'] + if pif_is_vlan(nwpif): + xs_network_uuids.append(uuid) + else: + xs_network_uuids.insert(0, uuid) vsctl_argv = [] vsctl_argv += ['# configure xs-network-uuids'] |