Commit 0afce24e authored by Michael Hanselmann's avatar Michael Hanselmann

Remove qa_config.GetInstanceNicMac

Call the wrapped instance method directly.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarBernardo Dal Seno <bdalseno@google.com>
parent 68c8c3df
......@@ -448,13 +448,6 @@ def GetDefaultHypervisor(*args):
return GetConfig().GetDefaultHypervisor(*args)
def GetInstanceNicMac(inst, default=None):
"""Returns MAC address for instance's network interface.
"""
return inst.GetNicMacAddr(0, default)
def GetMasterNode():
"""Wrapper for L{_QaConfig.GetMasterNode}.
......
......@@ -56,7 +56,8 @@ def _GetGenericAddParameters(inst, force_mac=None):
if force_mac:
nic0_mac = force_mac
else:
nic0_mac = qa_config.GetInstanceNicMac(inst)
nic0_mac = inst.GetNicMacAddr(0, None)
if nic0_mac:
params.extend(["--net", "0:mac=%s" % nic0_mac])
......
......@@ -558,8 +558,7 @@ def TestRapiInstanceAdd(node, use_client):
try:
disk_sizes = [utils.ParseUnit(size) for size in qa_config.get("disk")]
disks = [{"size": size} for size in disk_sizes]
nic0_mac = qa_config.GetInstanceNicMac(instance,
default=constants.VALUE_GENERATE)
nic0_mac = instance.GetNicMacAddr(0, constants.VALUE_GENERATE)
nics = [{
constants.INIC_MAC: nic0_mac,
}]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment