Commit 1ba9227f authored by Guido Trotter's avatar Guido Trotter
Browse files

OSEnvironment: convert to NIC parameters


Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent b848ce79
......@@ -1680,7 +1680,11 @@ def OSEnvironment(instance, debug=0):
result['NIC_%d_MAC' % idx] = nic.mac
if nic.ip:
result['NIC_%d_IP' % idx] = nic.ip
result['NIC_%d_BRIDGE' % idx] = nic.bridge
result['NIC_%d_MODE' % idx] = nic.nicparams[constants.NIC_MODE]
if nic.nicparams[constants.NIC_MODE] == constants.NIC_MODE_BRIDGED:
result['NIC_%d_BRIDGE' % idx] = nic.nicparams[constants.NIC_LINK]
if nic.nicparams[constants.NIC_LINK]:
result['NIC_%d_LINK' % idx] = nic.nicparams[constants.NIC_LINK]
if constants.HV_NIC_TYPE in instance.hvparams:
result['NIC_%d_FRONTEND_TYPE' % idx] = \
instance.hvparams[constants.HV_NIC_TYPE]
......
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