diff --git a/changelogs/fragments/2.15.0.yml b/changelogs/fragments/2.15.0.yml new file mode 100644 index 00000000..512efc99 --- /dev/null +++ b/changelogs/fragments/2.15.0.yml @@ -0,0 +1 @@ +release_summary: Feature release. diff --git a/changelogs/fragments/269-add-queue_simple-path.yml b/changelogs/fragments/269-add-queue_simple-path.yml new file mode 100644 index 00000000..f943de52 --- /dev/null +++ b/changelogs/fragments/269-add-queue_simple-path.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - add missing path ``/queue simple`` (https://github.com/ansible-collections/community.routeros/pull/269). \ No newline at end of file diff --git a/changelogs/fragments/270_fix_ipv6_from_pool_default_value.yml b/changelogs/fragments/270_fix_ipv6_from_pool_default_value.yml new file mode 100644 index 00000000..30e99ca4 --- /dev/null +++ b/changelogs/fragments/270_fix_ipv6_from_pool_default_value.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - add default value for ``from-pool`` field in ``/ipv6 address`` (https://github.com/ansible-collections/community.routeros/pull/270). \ No newline at end of file diff --git a/changelogs/fragments/271-mpls_ldp_routeros_7_support.yml b/changelogs/fragments/271-mpls_ldp_routeros_7_support.yml new file mode 100644 index 00000000..c8a8ebd1 --- /dev/null +++ b/changelogs/fragments/271-mpls_ldp_routeros_7_support.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - Add RouterOS 7.x support to ``/mpls ldp`` path (https://github.com/ansible-collections/community.routeros/pull/271). \ No newline at end of file diff --git a/changelogs/fragments/272-additional_mpls_path_support.yml b/changelogs/fragments/272-additional_mpls_path_support.yml new file mode 100644 index 00000000..594ea53e --- /dev/null +++ b/changelogs/fragments/272-additional_mpls_path_support.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - add support for paths ``/mpls interface``, ``/mpls ldp accept-filter``, ``/mpls ldp advertise-filter`` and ``mpls ldp interface`` (https://github.com/ansible-collections/community.routeros/pull/272). \ No newline at end of file diff --git a/changelogs/fragments/273-add_interface_pppoe-server_support.yml b/changelogs/fragments/273-add_interface_pppoe-server_support.yml new file mode 100644 index 00000000..dbd43f32 --- /dev/null +++ b/changelogs/fragments/273-add_interface_pppoe-server_support.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - add missing path ``/interface pppoe-server server`` (https://github.com/ansible-collections/community.routeros/pull/273). \ No newline at end of file diff --git a/changelogs/fragments/274-add_queue_type_path.yml b/changelogs/fragments/274-add_queue_type_path.yml new file mode 100644 index 00000000..8406b3f8 --- /dev/null +++ b/changelogs/fragments/274-add_queue_type_path.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - add missing path ``/queue type`` (https://github.com/ansible-collections/community.routeros/pull/274). \ No newline at end of file diff --git a/galaxy.yml b/galaxy.yml index 0ddaab42..3f226f34 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -7,7 +7,7 @@ namespace: community name: routeros -version: 2.14.0 +version: 2.15.0 readme: README.md authors: - Egor Zaitsev (github.com/heuels) diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index 73d0c071..efd5d200 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -1414,7 +1414,7 @@ def join_path(path): 'comment': KeyInfo(can_disable=True, remove_value=''), 'disabled': KeyInfo(default=False), 'eui-64': KeyInfo(default=False), - 'from-pool': KeyInfo(), + 'from-pool': KeyInfo(default=''), 'interface': KeyInfo(required=True), 'no-dad': KeyInfo(default=False), }, @@ -1514,6 +1514,28 @@ def join_path(path): }, ), ), + ('interface', 'pppoe-server', 'server'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('interface', ), + fields={ + 'accept-empty-service': KeyInfo(default=True), + 'authentication': KeyInfo(default='pap,chap,mschap1,mschap2'), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'default-profile': KeyInfo(default='default'), + 'disabled': KeyInfo(default=True), + 'interface': KeyInfo(required=True), + 'keepalive-timeout': KeyInfo(default=10), + 'max-mru': KeyInfo(default='auto'), + 'max-mtu': KeyInfo(default='auto'), + 'max-sessions': KeyInfo(default='unlimited'), + 'mrru': KeyInfo(default='disabled'), + 'one-session-per-host': KeyInfo(default=False), + 'pado-delay': KeyInfo(default=0), + 'service-name': KeyInfo(default=''), + }, + ), + ), ('interface', 'pptp-server', 'server'): APIData( unversioned=VersionedAPIData( single_value=True, @@ -3608,29 +3630,90 @@ def join_path(path): ), ('mpls', 'interface'): APIData( unversioned=VersionedAPIData( - unknown_mechanism=True, - # primary_keys=('default', ), + fully_understood=True, fields={ - 'default': KeyInfo(), - 'disabled': KeyInfo(), - 'interface': KeyInfo(), + 'disabled': KeyInfo(default=False), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'interface': KeyInfo(required=True), 'mpls-mtu': KeyInfo(), + 'info': KeyInfo(can_disable=True), }, ), ), ('mpls', 'ldp'): APIData( + versioned=[ + ('7.1', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('vrf', ), + fields={ + 'afi': KeyInfo(can_disable=True), + 'distribute-for-default': KeyInfo(can_disable=True), + 'path-vector-limit': KeyInfo(can_disable=True), + 'vrf': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'hop-limit': KeyInfo(can_disable=True), + 'preferred-afi': KeyInfo(can_disable=True), + 'loop-detect': KeyInfo(can_disable=True), + 'transport-addresses': KeyInfo(can_disable=True), + 'disabled': KeyInfo(default=False), + 'lsr-id': KeyInfo(can_disable=True), + 'use-explicit-null': KeyInfo(can_disable=True), + }, + )), + ('7.1', '<', VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'distribute-for-default-route': KeyInfo(default=False), + 'enabled': KeyInfo(default=False), + 'hop-limit': KeyInfo(default=255), + 'loop-detect': KeyInfo(default=False), + 'lsr-id': KeyInfo(default='0.0.0.0'), + 'path-vector-limit': KeyInfo(default=255), + 'transport-address': KeyInfo(default='0.0.0.0'), + 'use-explicit-null': KeyInfo(default=False), + }, + )), + ], + ), + ('mpls', 'ldp', 'accept-filter'): APIData( unversioned=VersionedAPIData( - single_value=True, fully_understood=True, fields={ - 'distribute-for-default-route': KeyInfo(default=False), - 'enabled': KeyInfo(default=False), - 'hop-limit': KeyInfo(default=255), - 'loop-detect': KeyInfo(default=False), - 'lsr-id': KeyInfo(default='0.0.0.0'), - 'path-vector-limit': KeyInfo(default=255), - 'transport-address': KeyInfo(default='0.0.0.0'), - 'use-explicit-null': KeyInfo(default=False), + 'accept': KeyInfo(can_disable=True), + 'disabled': KeyInfo(default=False), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'neighbor': KeyInfo(can_disable=True), + 'prefix': KeyInfo(can_disable=True), + 'vrf': KeyInfo(can_disable=True), + }, + ), + ), + ('mpls', 'ldp', 'advertise-filter'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'advertise': KeyInfo(default=''), + 'disabled': KeyInfo(default=False), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'neighbor': KeyInfo(), + 'prefix': KeyInfo(), + 'vrf': KeyInfo(), + }, + ), + ), + ('mpls', 'ldp', 'interface'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'disabled': KeyInfo(default=False), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'accept-dynamic-neighbors': KeyInfo(can_disable=True), + 'afi': KeyInfo(can_disable=True), + 'hello-interval': KeyInfo(can_disable=True), + 'hold-time': KeyInfo(can_disable=True), + 'interface': KeyInfo(required=True), + 'transport-addresses': KeyInfo(can_disable=True), }, ), ), @@ -4256,6 +4339,30 @@ def join_path(path): }, ), ), + ('queue', 'simple'): APIData( + unversioned=VersionedAPIData( + primary_keys=('name', ), + fully_understood=True, + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'dst': KeyInfo(can_disable=True, remove_value=''), + 'time': KeyInfo(can_disable=True, remove_value=''), + 'bucket-size': KeyInfo(default='0.1/0.1'), + 'burst-limit': KeyInfo(default='0/0'), + 'burst-threshold': KeyInfo(default='0/0'), + 'burst-time': KeyInfo(default='0s/0s'), + 'disabled': KeyInfo(default=False), + 'limit-at': KeyInfo(default='0/0'), + 'max-limit': KeyInfo(default='0/0'), + 'name': KeyInfo(), + 'packet-marks': KeyInfo(default=''), + 'parent': KeyInfo(default='none'), + 'priority': KeyInfo(default='8/8'), + 'queue': KeyInfo(default='default-small/default-small'), + 'target': KeyInfo(required=True), + }, + ), + ), ('queue', 'tree'): APIData( unversioned=VersionedAPIData( primary_keys=('name', ), @@ -4277,6 +4384,64 @@ def join_path(path): }, ), ), + ('queue', 'type'): APIData( + unversioned=VersionedAPIData( + primary_keys=('name', ), + fully_understood=True, + fields={ + 'name': KeyInfo(), + 'kind': KeyInfo(required=True), + 'bfifo-limit': KeyInfo(default=15000), + 'cake-ack-filter': KeyInfo(default='none'), + 'cake-atm': KeyInfo(default='none'), + 'cake-autorate-ingress': KeyInfo(can_disable=True), + 'cake-bandwidth': KeyInfo(can_disable=True, remove_value=0), + 'cake-diffserv': KeyInfo(default='diffserv3'), + 'cake-flowmode': KeyInfo(default='triple-isolate'), + 'cake-memlimit': KeyInfo(default=0), + 'cake-mpu': KeyInfo(can_disable=True, remove_value=''), + 'cake-nat': KeyInfo(can_disable=True, remove_value=False), + 'cake-overhead': KeyInfo(default=0), + 'cake-overhead-scheme': KeyInfo(can_disable=True, remove_value=''), + 'cake-rtt': KeyInfo(default='100ms'), + 'cake-rtt-scheme': KeyInfo(default='none'), + 'cake-wash': KeyInfo(can_disable=True, remove_value=False), + 'codel-ce-threshold': KeyInfo(can_disable=True, remove_value=''), + 'codel-ecn': KeyInfo(can_disable=True, remove_value=False), + 'codel-interval': KeyInfo(default='100ms'), + 'codel-limit': KeyInfo(default=1000), + 'codel-target': KeyInfo(default='5ms'), + 'fq-codel-ce-threshold': KeyInfo(can_disable=True, remove_value=''), + 'fq-codel-ecn': KeyInfo(default=True), + 'fq-codel-flows': KeyInfo(default=1024), + 'fq-codel-interval': KeyInfo(default='100ms'), + 'fq-codel-limit': KeyInfo(default=10240), + 'fq-codel-memlimit': KeyInfo(default=33554432), + 'fq-codel-quantum': KeyInfo(default=1514), + 'fq-codel-target': KeyInfo(default='5ms'), + 'mq-pfifo-limit': KeyInfo(default=50), + 'pcq-burst-rate': KeyInfo(default=0), + 'pcq-burst-threshold': KeyInfo(default=0), + 'pcq-burst-time': KeyInfo(default='10s'), + 'pcq-classifier': KeyInfo(can_disable=True, remove_value=''), + 'pcq-dst-address-mask': KeyInfo(default=32), + 'pcq-dst-address6-mask': KeyInfo(default=128), + 'pcq-limit': KeyInfo(default=50), + 'pcq-rate': KeyInfo(default=0), + 'pcq-src-address-mask': KeyInfo(default=32), + 'pcq-src-address6-mask': KeyInfo(default=128), + 'pcq-total-limit': KeyInfo(default=2000), + 'pfifo-limit': KeyInfo(default=50), + 'red-avg-packet': KeyInfo(default=1000), + 'red-burst': KeyInfo(default=20), + 'red-limit': KeyInfo(default=60), + 'red-max-threshold': KeyInfo(default=50), + 'red-min-threshold': KeyInfo(default=10), + 'sfq-allot': KeyInfo(default=1514), + 'sfq-perturb': KeyInfo(default=5), + }, + ), + ), ('interface', 'ethernet', 'switch'): APIData( unversioned=VersionedAPIData( fixed_entries=True, @@ -4352,35 +4517,6 @@ def join_path(path): }, ), ), - ('queue', 'type'): APIData( - unversioned=VersionedAPIData( - has_identifier=True, - fields={ - 'kind': KeyInfo(), - 'mq-pfifo-limit': KeyInfo(), - 'name': KeyInfo(), - 'pcq-burst-rate': KeyInfo(), - 'pcq-burst-threshold': KeyInfo(), - 'pcq-burst-time': KeyInfo(), - 'pcq-classifier': KeyInfo(), - 'pcq-dst-address-mask': KeyInfo(), - 'pcq-dst-address6-mask': KeyInfo(), - 'pcq-limit': KeyInfo(), - 'pcq-rate': KeyInfo(), - 'pcq-src-address-mask': KeyInfo(), - 'pcq-src-address6-mask': KeyInfo(), - 'pcq-total-limit': KeyInfo(), - 'pfifo-limit': KeyInfo(), - 'red-avg-packet': KeyInfo(), - 'red-burst': KeyInfo(), - 'red-limit': KeyInfo(), - 'red-max-threshold': KeyInfo(), - 'red-min-threshold': KeyInfo(), - 'sfq-allot': KeyInfo(), - 'sfq-perturb': KeyInfo(), - }, - ), - ), ('routing', 'bgp', 'connection'): APIData( unversioned=VersionedAPIData( fully_understood=True, diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index fce52cc3..fe9c73f5 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -75,6 +75,7 @@ - interface ovpn-server server - interface ppp-client - interface pppoe-client + - interface pppoe-server server - interface pptp-server server - interface sstp-server server - interface vlan @@ -175,13 +176,19 @@ - ipv6 route - ipv6 settings - mpls + - mpls interface - mpls ldp + - mpls ldp accept-filter + - mpls ldp advertise-filter + - mpls ldp interface - port firmware - port remote-access - ppp aaa - ppp profile - queue interface + - queue simple - queue tree + - queue type - radius - radius incoming - routing bgp connection diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index 112a23c6..05fdde04 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -84,6 +84,7 @@ - interface ovpn-server server - interface ppp-client - interface pppoe-client + - interface pppoe-server server - interface pptp-server server - interface sstp-server server - interface vlan @@ -184,13 +185,19 @@ - ipv6 route - ipv6 settings - mpls + - mpls interface - mpls ldp + - mpls ldp accept-filter + - mpls ldp advertise-filter + - mpls ldp interface - port firmware - port remote-access - ppp aaa - ppp profile - queue interface + - queue simple - queue tree + - queue type - radius - radius incoming - routing bgp connection