Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KB-perByte committed Oct 27, 2023
1 parent eb9986a commit 0c154ed
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions plugins/module_utils/network/ios/rm_templates/acls.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,19 @@
the given network resource.
"""
import re
from ansible.module_utils._text import to_text

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.rm_base.network_template import (
NetworkTemplate,
)

def remarks_with_sequence(remarks_data):
cmd = "remark "
if remarks_data.get("remarks"):
cmd += remarks_data.get("remarks")
if remarks_data.get("sequence"):
cmd = remarks_data.get("sequence") + ' ' + cmd
return cmd

def _tmplt_access_list_entries(aces):
def source_destination_common_config(config_data, command, attr):
Expand Down Expand Up @@ -172,8 +180,10 @@ def __init__(self, lines=None):
$""",
re.VERBOSE,
),
"setval": "{{ (sequence|string + ' ') if sequence is defined else '' }}"
"remark {{ remarks }}",
# "setval": "{{ sequence|string if sequence is defined else '' }}"
# "{{ (' ') if sequence is defined else '' }}"
# "remark {{ remarks }}",
"setval": remarks_with_sequence,
"result": {
"acls": {
"{{ acl_name|d() }}": {
Expand Down

0 comments on commit 0c154ed

Please sign in to comment.