nic_ip = ip
- # TODO: check the ip address for uniqueness
- if nic_mode == constants.NIC_MODE_ROUTED and not nic_ip:
- raise errors.OpPrereqError("Routed nic mode requires an ip address",
- errors.ECODE_INVAL)
-
# MAC address verification
mac = nic.get(constants.INIC_MAC, constants.VALUE_AUTO)
if mac not in (constants.VALUE_AUTO, constants.VALUE_GENERATE):
elif new_mode == constants.NIC_MODE_ROUTED:
ip = params.get(constants.INIC_IP, old_ip)
- if ip is None:
- raise errors.OpPrereqError("Cannot set the NIC IP address to None"
- " on a routed NIC", errors.ECODE_INVAL)
elif new_mode == constants.NIC_MODE_OVS:
# TODO: check OVS link