Revision 8a147bba

b/lib/config.py
232 232
    return self._config_data.cluster.FillND(node, nodegroup)
233 233

  
234 234
  @locking.ssynchronized(_config_lock, shared=1)
235
  def GetInstanceDiskParams(self, instance):
236
    """Get the disk params populated with inherit chain.
237

  
238
    @type instance: L{objects.Instance}
239
    @param instance: The instance we want to know the params for
240
    @return: A dict with the filled in disk params
241

  
242
    """
243
    node = self._UnlockedGetNodeInfo(instance.primary_node)
244
    nodegroup = self._UnlockedGetNodeGroup(node.group)
245
    return self._config_data.cluster.SimpleFillDP(nodegroup.diskparams)
246

  
247
  @locking.ssynchronized(_config_lock, shared=1)
235 248
  def GenerateMAC(self, ec_id):
236 249
    """Generate a MAC for an instance.
237 250

  
b/lib/objects.py
1610 1610
      obj.tcpudp_port_pool = set(obj.tcpudp_port_pool)
1611 1611
    return obj
1612 1612

  
1613
  def SimpleFillDP(self, diskparams):
1614
    """Fill a given diskparams dict with cluster defaults.
1615

  
1616
    @param diskparams: The diskparams
1617
    @return: The defaults dict
1618

  
1619
    """
1620
    return FillDiskParams(self.diskparams, diskparams)
1621

  
1613 1622
  def GetHVDefaults(self, hypervisor, os_name=None, skip_keys=None):
1614 1623
    """Get the default hypervisor parameters for the cluster.
1615 1624

  

Also available in: Unified diff