Revision 0af0f641 lib/cmdlib.py

b/lib/cmdlib.py
6278 6278
                                   " is missing the disk information",
6279 6279
                                   errors.ECODE_INVAL)
6280 6280

  
6281
    if (not self.op.nics and
6282
        einfo.has_option(constants.INISECT_INS, "nic_count")):
6283
      nics = []
6284
      for idx in range(einfo.getint(constants.INISECT_INS, "nic_count")):
6285
        ndict = {}
6286
        for name in list(constants.NICS_PARAMETERS) + ["ip", "mac"]:
6287
          v = einfo.get(constants.INISECT_INS, "nic%d_%s" % (idx, name))
6288
          ndict[name] = v
6289
        nics.append(ndict)
6290
      self.op.nics = nics
6291

  
6281 6292
    if (self.op.hypervisor is None and
6282 6293
        einfo.has_option(constants.INISECT_INS, "hypervisor")):
6283 6294
      self.op.hypervisor = einfo.get(constants.INISECT_INS, "hypervisor")

Also available in: Unified diff