Revision 0973f9ed

b/lib/cmdlib/instance.py
757 757
      for idx in range(constants.MAX_NICS):
758 758
        if einfo.has_option(constants.INISECT_INS, "nic%d_mac" % idx):
759 759
          ndict = {}
760
          for name in list(constants.NICS_PARAMETERS) + ["ip", "mac"]:
760
          for name in [constants.INIC_IP, constants.INIC_MAC]:
761 761
            v = einfo.get(constants.INISECT_INS, "nic%d_%s" % (idx, name))
762 762
            ndict[name] = v
763
          network = einfo.get(constants.INISECT_INS,
764
                              "nic%d_%s" % (idx, constants.INIC_NETWORK))
765
          # in case network is given link and mode are inherited
766
          # from nodegroup's netparams and thus should not be passed here
767
          if network:
768
            ndict[constants.INIC_NETWORK] = network
769
          else:
770
            for name in list(constants.NICS_PARAMETERS):
771
              v = einfo.get(constants.INISECT_INS, "nic%d_%s" % (idx, name))
772
              ndict[name] = v
763 773
          nics.append(ndict)
764 774
        else:
765 775
          break

Also available in: Unified diff