Export bridge information too
authorGuido Trotter <ultrotter@google.com>
Wed, 30 Jan 2008 11:14:36 +0000 (11:14 +0000)
committerGuido Trotter <ultrotter@google.com>
Wed, 30 Jan 2008 11:14:36 +0000 (11:14 +0000)
gnt-backup export used to export the ip and mac of each nic, but not which
bridge it was connected to. Adding this information.

Reviewed-by: iustinp

lib/backend.py

index 1cea6e3..df376c5 100644 (file)
@@ -1256,6 +1256,7 @@ def FinalizeExport(instance, snap_disks):
     config.set(constants.INISECT_INS, 'nic%d_mac' %
                nic_count, '%s' % nic.mac)
     config.set(constants.INISECT_INS, 'nic%d_ip' % nic_count, '%s' % nic.ip)
+    config.set(constants.INISECT_INS, 'nic%d_bridge' % nic_count, '%s' % nic.bridge)
   # TODO: redundant: on load can read nics until it doesn't exist
   config.set(constants.INISECT_INS, 'nic_count' , '%d' % nic_count)