Revision f9b10246

b/lib/cmdlib.py
539 539

  
540 540
  return env
541 541

  
542
def _PreBuildNICHooksList(lu, nics):
542
def _NICListToTuple(lu, nics):
543 543
  """Build a list of nic information tuples.
544 544

  
545
  This list is suitable to be passed to _BuildInstanceHookEnv.
545
  This list is suitable to be passed to _BuildInstanceHookEnv or as a return
546
  value in LUQueryInstanceData.
546 547

  
547 548
  @type lu:  L{LogicalUnit}
548 549
  @param lu: the logical unit on whose behalf we execute
......
587 588
    'status': instance.admin_up,
588 589
    'memory': bep[constants.BE_MEMORY],
589 590
    'vcpus': bep[constants.BE_VCPUS],
590
    'nics': _PreBuildNICHooksList(lu, instance.nics),
591
    'nics': _NICListToTuple(lu, instance.nics),
591 592
    'disk_template': instance.disk_template,
592 593
    'disks': [(disk.size, disk.mode) for disk in instance.disks],
593 594
    'bep': bep,
......
4646 4647
      os_type=self.op.os_type,
4647 4648
      memory=self.be_full[constants.BE_MEMORY],
4648 4649
      vcpus=self.be_full[constants.BE_VCPUS],
4649
      nics=_PreBuildNICHooksList(self, self.nics),
4650
      nics=_NICListToTuple(self, self.nics),
4650 4651
      disk_template=self.op.disk_template,
4651 4652
      disks=[(d["size"], d["mode"]) for d in self.disks],
4652 4653
      bep=self.be_full,

Also available in: Unified diff