Fix zuul error for IOSXR interfaces PRs (#61174)
* fix zuul error * fix utils
This commit is contained in:
parent
30c9abf6e4
commit
2ce3ce8477
3 changed files with 4 additions and 11 deletions
|
@ -20,8 +20,8 @@ from ansible.module_utils.network.common.utils import to_list
|
||||||
from ansible.module_utils.network.iosxr.facts.facts import Facts
|
from ansible.module_utils.network.iosxr.facts.facts import Facts
|
||||||
from ansible.module_utils.network.common.utils import dict_diff, remove_empties
|
from ansible.module_utils.network.common.utils import dict_diff, remove_empties
|
||||||
from ansible.module_utils.six import iteritems
|
from ansible.module_utils.six import iteritems
|
||||||
from ansible.module_utils.network.iosxr. \
|
from ansible.module_utils.network.common.utils import to_list, search_obj_in_list, dict_diff, remove_empties
|
||||||
utils.utils import search_obj_in_list, dict_delete, pad_commands, flatten_dict
|
from ansible.module_utils.network.iosxr.utils.utils import dict_delete, pad_commands, flatten_dict
|
||||||
|
|
||||||
|
|
||||||
class Lacp_interfaces(ConfigBase):
|
class Lacp_interfaces(ConfigBase):
|
||||||
|
|
|
@ -19,8 +19,8 @@ from ansible.module_utils.network.common.cfg.base import ConfigBase
|
||||||
from ansible.module_utils.network.common.utils import to_list, dict_diff, remove_empties
|
from ansible.module_utils.network.common.utils import to_list, dict_diff, remove_empties
|
||||||
from ansible.module_utils.network.iosxr.facts.facts import Facts
|
from ansible.module_utils.network.iosxr.facts.facts import Facts
|
||||||
from ansible.module_utils.six import iteritems
|
from ansible.module_utils.six import iteritems
|
||||||
from ansible.module_utils.network.iosxr. \
|
from ansible.module_utils.network.common.utils import to_list, search_obj_in_list, dict_diff, remove_empties
|
||||||
utils.utils import search_obj_in_list, dict_delete, pad_commands, flatten_dict
|
from ansible.module_utils.network.iosxr.utils.utils import dict_delete, pad_commands, flatten_dict
|
||||||
|
|
||||||
|
|
||||||
class Lldp_interfaces(ConfigBase):
|
class Lldp_interfaces(ConfigBase):
|
||||||
|
|
|
@ -11,13 +11,6 @@ __metaclass__ = type
|
||||||
from ansible.module_utils.six import iteritems
|
from ansible.module_utils.six import iteritems
|
||||||
|
|
||||||
|
|
||||||
def search_obj_in_list(name, lst, key='name'):
|
|
||||||
for item in lst:
|
|
||||||
if item[key] == name:
|
|
||||||
return item
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def remove_command_from_config_list(interface, cmd, commands):
|
def remove_command_from_config_list(interface, cmd, commands):
|
||||||
# To delete the passed config
|
# To delete the passed config
|
||||||
if interface not in commands:
|
if interface not in commands:
|
||||||
|
|
Loading…
Reference in a new issue