diff --git a/changelogs/fragments/227-add-upnp-graphing.yml b/changelogs/fragments/227-add-upnp-graphing.yml new file mode 100644 index 00000000..ae2f69e5 --- /dev/null +++ b/changelogs/fragments/227-add-upnp-graphing.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - add support for the ``ip upnp interfaces``, ``tool graphing interface``, ``tool graphing resource`` paths (https://github.com/ansible-collections/community.routeros/pull/227). diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index 32f24480..94165f4b 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -2393,6 +2393,18 @@ def join_path(path): }, ), ), + ('ip', 'upnp', 'interfaces'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('interface', 'type'), + fields={ + 'disabled': KeyInfo(default=False), + 'interface': KeyInfo(), + 'type': KeyInfo(), + 'forced-ip': KeyInfo(can_disable=True), + }, + ), + ), ('ipv6', 'dhcp-client'): APIData( unversioned=VersionedAPIData( fully_understood=True, @@ -3144,6 +3156,33 @@ def join_path(path): }, ), ), + ('tool', 'graphing', 'interface'): APIData( + versioned=[ + ('7', '>=', VersionedAPIData( + fully_understood=True, + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'allow-address': KeyInfo(default='0.0.0.0/0'), + 'interface': KeyInfo(default='all'), + 'store-on-disk': KeyInfo(default=True), + }, + )), + ], + ), + ('tool', 'graphing', 'resource'): APIData( + versioned=[ + ('7', '>=', VersionedAPIData( + fully_understood=True, + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'allow-address': KeyInfo(default='0.0.0.0/0'), + 'store-on-disk': KeyInfo(default=True), + }, + )), + ], + ), ('tool', 'mac-server'): APIData( unversioned=VersionedAPIData( single_value=True, diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index 048f4344..846ed5c6 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -131,6 +131,7 @@ - ip traffic-flow ipfix - ip traffic-flow target - ip upnp + - ip upnp interfaces - ipv6 address - ipv6 dhcp-client - ipv6 dhcp-server @@ -187,6 +188,8 @@ - tool bandwidth-server - tool e-mail - tool graphing + - tool graphing interface + - tool graphing resource - tool mac-server - tool mac-server mac-winbox - tool mac-server ping diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index 352f843a..8f4f28eb 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -140,6 +140,7 @@ - ip traffic-flow ipfix - ip traffic-flow target - ip upnp + - ip upnp interfaces - ipv6 address - ipv6 dhcp-client - ipv6 dhcp-server @@ -196,6 +197,8 @@ - tool bandwidth-server - tool e-mail - tool graphing + - tool graphing interface + - tool graphing resource - tool mac-server - tool mac-server mac-winbox - tool mac-server ping