X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=xenserver%2Fusr_share_vswitch_scripts_dump-vif-details;h=430ec54349624636c43e0d25f2badccbfa9bbfc5;hb=7446f1480bb27ccb63feab066d901cc940d52462;hp=7b05abfc28353aa62e471ff591bd4f90ec829ced;hpb=96aa6a2a6dd417486a64fd5a51aee0917a707d87;p=openvswitch diff --git a/xenserver/usr_share_vswitch_scripts_dump-vif-details b/xenserver/usr_share_vswitch_scripts_dump-vif-details index 7b05abfc..430ec543 100755 --- a/xenserver/usr_share_vswitch_scripts_dump-vif-details +++ b/xenserver/usr_share_vswitch_scripts_dump-vif-details @@ -4,7 +4,7 @@ # needed by the controller. This is called by the "vif" script, # which is run when virtual interfaces are added and removed. -# Copyright (C) 2009 Nicira Networks, Inc. +# Copyright (C) 2009, 2010 Nicira Networks, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright @@ -39,7 +39,7 @@ def dump_vif_info(domid, devid, vif_ref): vif_info.append(('xs-vif-uuid', vif_rec["uuid"])) vif_info.append(('xs-vm-uuid', vm_uuid)) for key, value in vif_info: - print("-- iface-set-external-id vif%s.%s %s %s" + print("-- set interface vif%s.%s external-ids:\"%s\"=\"%s\"" % (domid, devid, key, value)) # vNetManager needs to know the network UUID(s) associated with @@ -54,10 +54,14 @@ def dump_vif_info(domid, devid, vif_ref): # configuration variable, but vNetManager can tolerate that. if not net_rec['PIFs']: bridge = net_rec['bridge'] - key = "xs-network-uuids" - value = net_rec['uuid'] + + xs_network_uuid = net_rec['uuid'] + print("-- br-set-external-id %s %s %s" + % (bridge, "xs-network-uuids", xs_network_uuid)) + + xs_network_name = net_rec['name_label'] print("-- br-set-external-id %s %s %s" - % (bridge, key, value)) + % (bridge, "xs-network-names", xs_network_name)) finally: session.xenapi.session.logout()