Skip to content

Commit

Permalink
Fixed collection sanity check errors (#160)
Browse files Browse the repository at this point in the history
* Fixed sanity check error

* Fixed sanity check errors

* Fixed sanity check errors

---------

Co-authored-by: Shade Talabi <[email protected]>
  • Loading branch information
stalabi1 and Shade Talabi authored Feb 23, 2023
1 parent 045fbf2 commit 474491a
Show file tree
Hide file tree
Showing 37 changed files with 1 addition and 76 deletions.
2 changes: 0 additions & 2 deletions plugins/cliconf/sonic.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@

import json

from itertools import chain

from ansible.errors import AnsibleConnectionFailure
from ansible.module_utils._text import to_bytes, to_text
from ansible.module_utils.common._collections_compat import Mapping
Expand Down
9 changes: 0 additions & 9 deletions plugins/module_utils/network/sonic/config/bgp/bgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,20 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

try:
from urllib import quote
except ImportError:
from urllib.parse import quote

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
ConfigBase,
)
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
to_list,
search_obj_in_list,
remove_empties
)
from ansible_collections.dellemc.enterprise_sonic.plugins.module_utils.network.sonic.facts.facts import Facts
from ansible_collections.dellemc.enterprise_sonic.plugins.module_utils.network.sonic.sonic import (
to_request,
edit_config
)
from ansible_collections.dellemc.enterprise_sonic.plugins.module_utils.network.sonic.utils.utils import (
dict_to_set,
update_states,
get_diff,
remove_empties_from_list
)
from ansible_collections.dellemc.enterprise_sonic.plugins.module_utils.network.sonic.sonic import to_request
from ansible.module_utils.connection import ConnectionError
Expand Down
1 change: 0 additions & 1 deletion plugins/module_utils/network/sonic/config/bgp_af/bgp_af.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
)
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
to_list,
search_obj_in_list
)
from ansible_collections.dellemc.enterprise_sonic.plugins.module_utils.network.sonic.facts.facts import Facts
from ansible_collections.dellemc.enterprise_sonic.plugins.module_utils.network.sonic.sonic import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

try:
from urllib import quote
except ImportError:
from urllib.parse import quote

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
ConfigBase,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
from ansible_collections.dellemc.enterprise_sonic.plugins.module_utils.network.sonic.utils.utils import (
get_diff,
update_states,
remove_empties_from_list
)
from ansible.module_utils.connection import ConnectionError

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
to_request,
edit_config
)
from ansible.module_utils._text import to_native
from ansible.module_utils.connection import ConnectionError

TEST_KEYS = [
Expand Down
4 changes: 0 additions & 4 deletions plugins/module_utils/network/sonic/config/logging/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
ConfigBase,
)
Expand All @@ -32,8 +30,6 @@
update_states,
send_requests,
get_normalize_interface_name,
normalize_interface_name,
normalize_interface_name_list
)
from ansible.module_utils.connection import ConnectionError

Expand Down
3 changes: 0 additions & 3 deletions plugins/module_utils/network/sonic/config/ntp/ntp.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
ConfigBase,
)
Expand All @@ -32,7 +30,6 @@
get_replaced_config,
send_requests,
update_states,
normalize_interface_name,
normalize_interface_name_list
)
from ansible.module_utils.connection import ConnectionError
Expand Down
1 change: 0 additions & 1 deletion plugins/module_utils/network/sonic/config/users/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
edit_config
)
from ansible_collections.dellemc.enterprise_sonic.plugins.module_utils.network.sonic.utils.utils import (
dict_to_set,
update_states,
get_diff,
)
Expand Down
15 changes: 1 addition & 14 deletions plugins/module_utils/network/sonic/config/vlans/vlans.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import json

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
ConfigBase,
)
Expand All @@ -35,19 +33,8 @@
to_request,
edit_config
)
from ansible.module_utils._text import to_native
from ansible.module_utils.connection import ConnectionError
import traceback

LIB_IMP_ERR = None
ERR_MSG = None
try:
import jinja2
HAS_LIB = True
except Exception as e:
HAS_LIB = False
ERR_MSG = to_native(e)
LIB_IMP_ERR = traceback.format_exc()


TEST_KEYS = [
{'config': {'vlan_id': ''}},
Expand Down
1 change: 0 additions & 1 deletion plugins/module_utils/network/sonic/facts/aaa/aaa.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
1 change: 0 additions & 1 deletion plugins/module_utils/network/sonic/facts/bgp/bgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
1 change: 0 additions & 1 deletion plugins/module_utils/network/sonic/facts/bgp_af/bgp_af.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
1 change: 0 additions & 1 deletion plugins/module_utils/network/sonic/facts/mclag/mclag.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
1 change: 0 additions & 1 deletion plugins/module_utils/network/sonic/facts/ntp/ntp.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import re
import json
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import re
import json
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
1 change: 0 additions & 1 deletion plugins/module_utils/network/sonic/facts/system/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import re
import json
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
1 change: 0 additions & 1 deletion plugins/module_utils/network/sonic/facts/users/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
1 change: 0 additions & 1 deletion plugins/module_utils/network/sonic/facts/vlans/vlans.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
1 change: 0 additions & 1 deletion plugins/module_utils/network/sonic/facts/vrfs/vrfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
1 change: 0 additions & 1 deletion plugins/module_utils/network/sonic/facts/vxlans/vxlans.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
Expand Down
1 change: 0 additions & 1 deletion plugins/module_utils/network/sonic/sonic.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import re

from ansible.module_utils._text import to_text
from ansible.module_utils.basic import env_fallback
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
to_list,
ComplexList
Expand Down
6 changes: 0 additions & 6 deletions plugins/module_utils/network/sonic/utils/bgp_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,10 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import re
from copy import deepcopy

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
utils,
)
from ansible_collections.dellemc.enterprise_sonic.plugins.module_utils.network.sonic.utils.utils import (
normalize_interface_name,
)
from ansible_collections.dellemc.enterprise_sonic.plugins.module_utils.network.sonic.argspec.bgp.bgp import BgpArgs
from ansible_collections.dellemc.enterprise_sonic.plugins.module_utils.network.sonic.sonic import (
to_request,
edit_config
Expand Down

0 comments on commit 474491a

Please sign in to comment.