Revision 72f0ef8e lib/cmdlib.py

b/lib/cmdlib.py
7473 7473
                                     " in cluster" % mac,
7474 7474
                                     errors.ECODE_NOTUNIQUE)
7475 7475

  
7476
      # bridge verification
7477
      bridge = nic.get("bridge", None)
7478
      link = nic.get("link", None)
7479
      if bridge and link:
7480
        raise errors.OpPrereqError("Cannot pass 'bridge' and 'link'"
7481
                                   " at the same time", errors.ECODE_INVAL)
7482
      elif bridge and nic_mode == constants.NIC_MODE_ROUTED:
7483
        raise errors.OpPrereqError("Cannot pass 'bridge' on a routed nic",
7484
                                   errors.ECODE_INVAL)
7485
      elif bridge:
7486
        link = bridge
7487

  
7476
      #  Build nic parameters
7477
      link = nic.get(constants.INIC_LINK, None)
7488 7478
      nicparams = {}
7489 7479
      if nic_mode_req:
7490 7480
        nicparams[constants.NIC_MODE] = nic_mode_req

Also available in: Unified diff