Revision 94c2ed34 lib/hypervisor/hv_kvm.py

b/lib/hypervisor/hv_kvm.py
183 183
      script.write("  # Connect the interface to the bridge\n")
184 184
      script.write("  /usr/sbin/brctl addif $BRIDGE $INTERFACE\n")
185 185
    elif nic.nicparams[constants.NIC_MODE] == constants.NIC_MODE_ROUTED:
186
      if not nic.ip:
187
        raise errors.HypervisorError("nic/%d is routed, but has no ip." % seq)
186 188
      script.write("  # Route traffic targeted at the IP to the interface\n")
187 189
      if nic.nicparams[constants.NIC_LINK]:
188 190
        script.write("  while /sbin/ip rule del dev $INTERFACE; do :; done\n")

Also available in: Unified diff