Revision d89168ff lib/backend.py
b/lib/backend.py | ||
---|---|---|
2498 | 2498 |
result["NIC_%d_BRIDGE" % idx] = nic.nicparams[constants.NIC_LINK] |
2499 | 2499 |
if nic.nicparams[constants.NIC_LINK]: |
2500 | 2500 |
result["NIC_%d_LINK" % idx] = nic.nicparams[constants.NIC_LINK] |
2501 |
if nic.network: |
|
2502 |
result["NIC_%d_NETWORK" % idx] = nic.network |
|
2501 |
if nic.netinfo: |
|
2502 |
nobj = objects.Network.FromDict(nic.netinfo) |
|
2503 |
result.update(nobj.HooksDict("NIC_%d_" % idx)) |
|
2504 |
elif nic.network: |
|
2505 |
# FIXME: broken network reference: the instance NIC specifies a network, |
|
2506 |
# but the relevant network entry was not in the config. This should be |
|
2507 |
# made impossible. |
|
2508 |
result["INSTANCE_NIC%d_NETWORK" % idx] = nic.network |
|
2503 | 2509 |
if constants.HV_NIC_TYPE in instance.hvparams: |
2504 | 2510 |
result["NIC_%d_FRONTEND_TYPE" % idx] = \ |
2505 | 2511 |
instance.hvparams[constants.HV_NIC_TYPE] |
Also available in: Unified diff