fix control net method naming error
This commit is contained in:
parent
fd29b4a141
commit
603179d8ca
1 changed files with 4 additions and 4 deletions
|
@ -122,7 +122,7 @@ class HookManager(object):
|
||||||
|
|
||||||
:param tuple hook: hook to run
|
:param tuple hook: hook to run
|
||||||
:param dict environment: environment to run hook with
|
:param dict environment: environment to run hook with
|
||||||
:return:
|
:return: nothing
|
||||||
"""
|
"""
|
||||||
file_name, data = hook
|
file_name, data = hook
|
||||||
logger.info("running hook: %s", file_name)
|
logger.info("running hook: %s", file_name)
|
||||||
|
@ -1073,7 +1073,7 @@ class Session(object):
|
||||||
|
|
||||||
obj.validate()
|
obj.validate()
|
||||||
|
|
||||||
def get_control_lnet_prefixes(self):
|
def get_control_net_prefixes(self):
|
||||||
"""
|
"""
|
||||||
Retrieve control net prefixes.
|
Retrieve control net prefixes.
|
||||||
|
|
||||||
|
@ -1118,7 +1118,7 @@ class Session(object):
|
||||||
index = int(dev[4])
|
index = int(dev[4])
|
||||||
if index == 0:
|
if index == 0:
|
||||||
return index
|
return index
|
||||||
if index < 4 and self.get_control_lnet_prefixes()[index] is not None:
|
if index < 4 and self.get_control_net_prefixes()[index] is not None:
|
||||||
return index
|
return index
|
||||||
return -1
|
return -1
|
||||||
|
|
||||||
|
@ -1140,7 +1140,7 @@ class Session(object):
|
||||||
:return: control net object
|
:return: control net object
|
||||||
:rtype: core.netns.nodes.CtrlNet
|
:rtype: core.netns.nodes.CtrlNet
|
||||||
"""
|
"""
|
||||||
prefix_spec_list = self.get_control_lnet_prefixes()
|
prefix_spec_list = self.get_control_net_prefixes()
|
||||||
prefix_spec = prefix_spec_list[net_index]
|
prefix_spec = prefix_spec_list[net_index]
|
||||||
if not prefix_spec:
|
if not prefix_spec:
|
||||||
if conf_required:
|
if conf_required:
|
||||||
|
|
Loading…
Add table
Reference in a new issue