Skip to content

Commit

Permalink
[ignore] Moved bfd_multi_hop_settings argument spec to the module uti…
Browse files Browse the repository at this point in the history
…ls mso.py
  • Loading branch information
sajagana committed Dec 13, 2024
1 parent d41e3e8 commit 78778f1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 22 deletions.
13 changes: 13 additions & 0 deletions plugins/module_utils/mso.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,19 @@ def ndo_remote_user_spec():
)


def ndo_bfd_multi_hop_settings_spec():
return dict(
type="dict",
options=dict(
state=dict(type="str", choices=["enabled", "disabled"]),
admin_state=dict(type="str", choices=["enabled", "disabled"]),
detection_multiplier=dict(type="int"),
min_receive_interval=dict(type="int"), # msec
min_transmit_interval=dict(type="int"), # msec
),
)


# Copied from ansible's module uri.py (url): https://github.com/ansible/ansible/blob/cdf62edc65f564fff6b7e575e084026fa7faa409/lib/ansible/modules/uri.py
def write_file(module, url, dest, content, resp, tmpsrc=None):
# create a tempfile with some test content
Expand Down
13 changes: 2 additions & 11 deletions plugins/modules/ndo_l3out_interface_routing_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@

import copy
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, ndo_bfd_multi_hop_settings_spec
from ansible_collections.cisco.mso.plugins.module_utils.template import MSOTemplate
from ansible_collections.cisco.mso.plugins.module_utils.constants import ENABLED_OR_DISABLED_TO_BOOL_STRING_MAP
from ansible_collections.cisco.mso.plugins.module_utils.utils import append_update_ops_data
Expand All @@ -361,16 +361,7 @@ def main():
interface_control=dict(type="str", choices=["enabled", "disabled"]),
),
),
bfd_multi_hop_settings=dict(
type="dict",
options=dict(
state=dict(type="str", choices=["enabled", "disabled"]),
admin_state=dict(type="str", choices=["enabled", "disabled"]),
detection_multiplier=dict(type="int"),
min_receive_interval=dict(type="int"),
min_transmit_interval=dict(type="int"),
),
),
bfd_multi_hop_settings=ndo_bfd_multi_hop_settings_spec(),
ospf_interface_settings=dict(
type="dict",
options=dict(
Expand Down
13 changes: 2 additions & 11 deletions plugins/modules/ndo_l3out_node_routing_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@

import copy
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, ndo_bfd_multi_hop_settings_spec
from ansible_collections.cisco.mso.plugins.module_utils.template import MSOTemplate


Expand All @@ -249,16 +249,7 @@ def main():
name=dict(type="str", aliases=["l3out_node_routing_policy_name"]),
uuid=dict(type="str", aliases=["l3out_node_routing_policy_uuid"]),
description=dict(type="str"),
bfd_multi_hop_settings=dict(
type="dict",
options=dict(
state=dict(type="str", choices=["enabled", "disabled"]),
admin_state=dict(type="str", choices=["enabled", "disabled"]),
detection_multiplier=dict(type="int"),
min_receive_interval=dict(type="int"), # msec
min_transmit_interval=dict(type="int"), # msec
),
),
bfd_multi_hop_settings=ndo_bfd_multi_hop_settings_spec(),
bgp_node_settings=dict(
type="dict",
options=dict(
Expand Down

0 comments on commit 78778f1

Please sign in to comment.