Revision 6ba0093c

b/lib/hypervisor/hv_kvm.py
998 998
      "MODE": nic.nicparams[constants.NIC_MODE],
999 999
      "INTERFACE": tap,
1000 1000
      "INTERFACE_INDEX": str(seq),
1001
      "INTERFACE_UUID": nic.uuid,
1001 1002
      "TAGS": " ".join(instance.GetTags()),
1002 1003
    }
1003 1004

  
1004 1005
    if nic.ip:
1005 1006
      env["IP"] = nic.ip
1006 1007

  
1008
    if nic.name:
1009
      env["INTERFACE_NAME"] = nic.name
1010

  
1007 1011
    if nic.nicparams[constants.NIC_LINK]:
1008 1012
      env["LINK"] = nic.nicparams[constants.NIC_LINK]
1009 1013

  
b/lib/hypervisor/hv_xen.py
409 409
        data.write("%s=%s\n" % (k, v))
410 410

  
411 411
    data.write("MAC=%s\n" % nic.mac)
412
    data.write("IP=%s\n" % nic.ip)
412
    if nic.ip:
413
      data.write("IP=%s\n" % nic.ip)
414
    data.write("INTERFACE_INDEX=%s\n" % str(idx))
415
    if nic.name:
416
      data.write("INTERFACE_NAME=%s\n" % nic.name)
417
    data.write("INTERFACE_UUID=%s\n" % nic.uuid)
413 418
    data.write("MODE=%s\n" % nic.nicparams[constants.NIC_MODE])
414 419
    data.write("LINK=%s\n" % nic.nicparams[constants.NIC_LINK])
415 420

  

Also available in: Unified diff