mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 06:10:22 -07:00
Network module cleanup (#17334)
* Clean up EOS, IOS, IOS-XR, Junos, NX-OS, and OpenSwitch * Cleanup net* files * Re-add NetworkModule import to network module_utils files This will trick modules into importing code from module_utils code, thus including it in the final Ansiballz zipfile. * Give asa a look over, too
This commit is contained in:
parent
9fe4308670
commit
972dc3fc97
9 changed files with 140 additions and 163 deletions
|
@ -28,12 +28,9 @@
|
|||
|
||||
import itertools
|
||||
import re
|
||||
import shlex
|
||||
import time
|
||||
|
||||
from ansible.module_utils.basic import BOOLEANS_TRUE, BOOLEANS_FALSE
|
||||
from ansible.module_utils.six import string_types
|
||||
from ansible.module_utils.six.moves import zip_longest
|
||||
from ansible.module_utils.six.moves import zip, zip_longest
|
||||
|
||||
DEFAULT_COMMENT_TOKENS = ['#', '!', '/*', '*/']
|
||||
|
||||
|
@ -46,6 +43,7 @@ def to_list(val):
|
|||
else:
|
||||
return list()
|
||||
|
||||
|
||||
class Config(object):
|
||||
|
||||
def __init__(self, connection):
|
||||
|
@ -299,7 +297,7 @@ class NetworkConfig(object):
|
|||
if len(other.items) != len(self.items):
|
||||
diff.extend(self.items)
|
||||
else:
|
||||
for ours, theirs in itertools.izip(self.items, other.items):
|
||||
for ours, theirs in zip(self.items, other.items):
|
||||
if ours != theirs:
|
||||
diff.extend(self.items)
|
||||
break
|
||||
|
@ -406,5 +404,3 @@ class NetworkConfig(object):
|
|||
item.parents = ancestors
|
||||
ancestors[-1].children.append(item)
|
||||
self.items.append(item)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue