Skip to content

Commit

Permalink
aoscx_loopback_interface: fix issue found by sanity check
Browse files Browse the repository at this point in the history
  • Loading branch information
alagoutte committed Nov 14, 2023
1 parent 7606ac5 commit f970ade
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions plugins/modules/aoscx_loopback_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@

RETURN = r""" # """

from ansible.module_utils.basic import AnsibleModule

try:
from pyaoscx.device import Device

Expand All @@ -95,12 +97,11 @@
USE_PYAOSCX_SDK = False

if USE_PYAOSCX_SDK:
from ansible.module_utils.basic import AnsibleModule

from ansible_collections.arubanetworks.aoscx.plugins.module_utils.aoscx_pyaoscx import ( # NOQA
get_pyaoscx_session,
)


def main():
module_args = dict(
loopback_id=dict(type="str", required=True),
Expand All @@ -109,14 +110,14 @@ def main():
description=dict(type="str", default=None),
vrf=dict(type="str", default=None),
)
ansible_module = AnsibleModule(
argument_spec=module_args, supports_check_mode=True
)
if USE_PYAOSCX_SDK is False:
ansible_module.fail_json(
msg="Could not find the PYAOSCX SDK. Make sure it is installed."
)
else:
ansible_module = AnsibleModule(
argument_spec=module_args, supports_check_mode=True
)

loopback_id = ansible_module.params["loopback_id"]
ipv4 = ansible_module.params["ipv4"]
Expand Down

0 comments on commit f970ade

Please sign in to comment.