Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix import errors caused by ansible.netcommon 2.0.0 breaking changes #531

Merged
merged 2 commits into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelogs/fragments/0-fix_imports.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bugfixes:
- cnos_l3_interface - fix import errors (https://github.com/ansible-collections/community.network/pull/531).
- icx_l3_interface - fix import errors (https://github.com/ansible-collections/community.network/pull/531).
- slxos_l3_interface - fix import errors (https://github.com/ansible-collections/community.network/pull/531).
6 changes: 4 additions & 2 deletions plugins/modules/cnos_l3_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,10 @@
from ansible_collections.community.network.plugins.module_utils.network.cnos.cnos import run_commands
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import NetworkConfig
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import remove_default_spec
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import is_netmask, is_masklen
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_netmask, to_masklen
try:
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import is_netmask, is_masklen, to_netmask, to_masklen
except ImportError:
from ansible.module_utils.common.network import is_netmask, is_masklen, to_netmask, to_masklen


def validate_ipv4(value, module):
Expand Down
5 changes: 4 additions & 1 deletion plugins/modules/icx_l3_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,10 @@
from ansible_collections.community.network.plugins.module_utils.network.icx.icx import get_config, load_config
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import NetworkConfig
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import remove_default_spec
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import is_netmask, is_masklen, to_netmask, to_masklen
try:
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import is_netmask, is_masklen, to_netmask, to_masklen
except ImportError:
from ansible.module_utils.common.network import is_netmask, is_masklen, to_netmask, to_masklen


def validate_ipv4(value, module):
Expand Down
5 changes: 4 additions & 1 deletion plugins/modules/slxos_l3_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@
from ansible_collections.community.network.plugins.module_utils.network.slxos.slxos import get_config, load_config
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import NetworkConfig
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import conditional, remove_default_spec
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import is_netmask, is_masklen, to_netmask, to_masklen
try:
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import is_netmask, is_masklen, to_netmask, to_masklen
except ImportError:
from ansible.module_utils.common.network import is_netmask, is_masklen, to_netmask, to_masklen


def validate_ipv4(value, module):
Expand Down