Commit 714ff97c authored by Andrea Spadaccini's avatar Andrea Spadaccini
Browse files

Use GetClassFromIpFamily in ActivateMasterIp


Signed-off-by: default avatarAndrea Spadaccini <spadaccio@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent c9f4b8e6
......@@ -265,9 +265,7 @@ def ActivateMasterIp():
err_msg = "Someone else has the master ip, not activating"
logging.error(err_msg)
else:
ipcls = netutils.IP4Address
if family == netutils.IP6Address.family:
ipcls = netutils.IP6Address
ipcls = netutils.IPAddress.GetClassFromIpFamily(family)
result = utils.RunCmd([constants.IP_COMMAND_PATH, "address", "add",
"%s/%s" % (master_ip, master_netmask),
......
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