further removal and refactoring of methods used within misc/utils.py

This commit is contained in:
Blake J. Harnden 2018-03-02 09:15:52 -08:00
parent 6211b09585
commit 00b3c97448
23 changed files with 181 additions and 293 deletions

View file

@ -67,7 +67,7 @@ class VEth(PyCoreNetIf):
logger.exception("error shutting down interface")
if self.localname:
utils.mutedetach([constants.IP_BIN, "link", "delete", self.localname])
utils.mute_detach([constants.IP_BIN, "link", "delete", self.localname])
self.up = False
@ -164,8 +164,8 @@ class TunTap(PyCoreNetIf):
"""
def localdevexists():
args = (constants.IP_BIN, "link", "show", self.localname)
return utils.mutecall(args)
args = [constants.IP_BIN, "link", "show", self.localname]
return utils.cmd(args)
self.waitfor(localdevexists)
@ -269,7 +269,7 @@ class GreTap(PyCoreNetIf):
if remoteip is None:
raise ValueError, "missing remote IP required for GRE TAP device"
args = ("ip", "link", "add", self.localname, "type", "gretap",
"remote", str(remoteip))
"remote", str(remoteip))
if localip:
args += ("local", str(localip))
if ttl: