Merge branch 'rel/5.2' into core-rest-flask
This commit is contained in:
commit
83902a2215
2 changed files with 4 additions and 5 deletions
|
@ -274,7 +274,7 @@ class GreTap(PyCoreNetIf):
|
||||||
|
|
||||||
if remoteip is None:
|
if remoteip is None:
|
||||||
raise ValueError, "missing remote IP required for GRE TAP device"
|
raise ValueError, "missing remote IP required for GRE TAP device"
|
||||||
args = ["ip", "link", "add", self.localname, "type", "gretap",
|
args = [constants.IP_BIN, "link", "add", self.localname, "type", "gretap",
|
||||||
"remote", str(remoteip)]
|
"remote", str(remoteip)]
|
||||||
if localip:
|
if localip:
|
||||||
args += ["local", str(localip)]
|
args += ["local", str(localip)]
|
||||||
|
@ -283,7 +283,7 @@ class GreTap(PyCoreNetIf):
|
||||||
if key:
|
if key:
|
||||||
args += ["key", str(key)]
|
args += ["key", str(key)]
|
||||||
utils.check_cmd(args)
|
utils.check_cmd(args)
|
||||||
args = ["ip", "link", "set", self.localname, "up"]
|
args = [constants.IP_BIN, "link", "set", self.localname, "up"]
|
||||||
utils.check_cmd(args)
|
utils.check_cmd(args)
|
||||||
self.up = True
|
self.up = True
|
||||||
|
|
||||||
|
@ -295,9 +295,9 @@ class GreTap(PyCoreNetIf):
|
||||||
"""
|
"""
|
||||||
if self.localname:
|
if self.localname:
|
||||||
try:
|
try:
|
||||||
args = ["ip", "link", "set", self.localname, "down"]
|
args = [constants.IP_BIN, "link", "set", self.localname, "down"]
|
||||||
utils.check_cmd(args)
|
utils.check_cmd(args)
|
||||||
args = ["ip", "link", "del", self.localname]
|
args = [constants.IP_BIN, "link", "del", self.localname]
|
||||||
utils.check_cmd(args)
|
utils.check_cmd(args)
|
||||||
except CoreCommandError:
|
except CoreCommandError:
|
||||||
logger.exception("error during shutdown")
|
logger.exception("error during shutdown")
|
||||||
|
|
|
@ -705,7 +705,6 @@ class CoreXmlReader(object):
|
||||||
name = hook.get("name")
|
name = hook.get("name")
|
||||||
state = hook.get("state")
|
state = hook.get("state")
|
||||||
data = hook.text
|
data = hook.text
|
||||||
self.session.add_state_hook()
|
|
||||||
hook_type = "hook:%s" % state
|
hook_type = "hook:%s" % state
|
||||||
logger.info("reading hook: state(%s) name(%s)", state, name)
|
logger.info("reading hook: state(%s) name(%s)", state, name)
|
||||||
self.session.set_hook(hook_type, file_name=name, source_name=None, data=data)
|
self.session.set_hook(hook_type, file_name=name, source_name=None, data=data)
|
||||||
|
|
Loading…
Add table
Reference in a new issue