Commit 0183a697 authored by Alessandro Cincaglini's avatar Alessandro Cincaglini Committed by Guido Trotter
Browse files

Fix missing bridge for xen instances

Xen instances nic definitions miss the target bridge.

This bug was introduced in commit 503b97a9

.
Signed-off-by: default avatarAlessandro Cincaglini <alessandro.ciancaglini@gmail.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
parent cea0534a
......@@ -496,9 +496,9 @@ class XenPvmHypervisor(XenHypervisor):
ip = getattr(nic, "ip", None)
if ip is not None:
nic_str += ", ip=%s" % ip
vif_data.append("'%s'" % nic_str)
if nic.nicparams[constants.NIC_MODE] == constants.NIC_MODE_BRIDGED:
nic_str += ", bridge=%s" % nic.nicparams[constants.NIC_LINK]
vif_data.append("'%s'" % nic_str)
disk_data = cls._GetConfigFileDiskData(block_devices)
......@@ -624,9 +624,9 @@ class XenHvmHypervisor(XenHypervisor):
ip = getattr(nic, "ip", None)
if ip is not None:
nic_str += ", ip=%s" % ip
vif_data.append("'%s'" % nic_str)
if nic.nicparams[constants.NIC_MODE] == constants.NIC_MODE_BRIDGED:
nic_str += ", bridge=%s" % nic.nicparams[constants.NIC_LINK]
vif_data.append("'%s'" % nic_str)
config.write("vif = [%s]\n" % ",".join(vif_data))
disk_data = cls._GetConfigFileDiskData(block_devices)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment