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

cisco.ios.ios_acls module port_protocol range to be str instead of int #1142

Open
fmcavalcanti opened this issue Nov 28, 2024 · 0 comments
Open

Comments

@fmcavalcanti
Copy link

SUMMARY

Change the variable type accepted by the cisco.ios.ios_acls module:
All port protocols type are str, except for range, which is int.

"port_protocol": {
    "options": {
        "eq": {"type": "str"},
        "gt": {"type": "str"},
        "lt": {"type": "str"},
        "neq": {"type": "str"},
        "range": {
            "options": {
                "end": {"type": "int"},
                "start": {"type": "int"},
            },
            "type": "dict",
        },
    },
    "type": "dict",
}
ISSUE TYPE
  • Streamline port_protocol variable types, so they are all strings
COMPONENT NAME

cisco.ios.ios_acls
https://github.com/ansible-collections/cisco.ios/blob/main/plugins/module_utils/network/ios/argspec/acls/acls.py

ADDITIONAL INFORMATION

This change would solve a problem when gathering the ACLs from devices. as ranges with string are accepted on cisco ios:

Switch(config)#ip access-list extended fmc-test
Switch(config-ext-nacl)#permit udp any range ?
  <0-65535>      Port number
  biff           Biff (mail notification, comsat, 512)
  bootpc         Bootstrap Protocol (BOOTP) client (68)
  bootps         Bootstrap Protocol (BOOTP) server (67)
  discard        Discard (9)
  dnsix          DNSIX security protocol auditing (195)
  domain         Domain Name Service (DNS, 53)
  echo           Echo (7)
.
.
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant