Commit graph

72 commits

Author SHA1 Message Date
hansmi
84009262d0
Remove default value for "running" field in "interface wireless" (#264)
The `running` field can't be configured. By having a default value it's
written and shows up in diffs.
2024-03-03 08:32:41 +01:00
hansmi
ffd5a6370c
Add missing fields in "system package update" (#263)
Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2024-03-02 12:49:37 +01:00
liquorice-head
10fbc564a7
Change ip vrf for router OS v7 (#259)
* Update api_info.py

* Update api_modify.py

* Update _api_data.py

* Update _api_data.py

* Update _api_data.py

* Update api_info.py

* Update api_modify.py

* Update api_info.py

* Update api_modify.py

* Create 259-add-routeros7-support-for-ip-vrf.yml

* Update changelogs/fragments/259-add-routeros7-support-for-ip-vrf.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-02-17 22:49:12 +01:00
Johannes Münch
542a362cee
Fixes #256: make path user group modifiable and add comment attribute (#257)
* Fixes #256: make path `user group` modifiable and add `comment` attribute`

Add changelog fragment

* Update changelogs/fragments/257-make-user_group-modifiable.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-02-01 18:48:14 +01:00
Tim de Boer
d5a2686d20
Changed primary key of 'tool netwatch' (#247)
* Changed primary key of 'tool netwatch'

* Removed the primary key after discussion on PR #247

* Added changelog fragment
2024-01-07 14:04:20 +01:00
Johannes Münch
79dabbb67e
#162: Add 'routing rule' path (#246) 2024-01-06 16:52:17 +01:00
derdeagle
1d6feda0b7
Add the 'radius' path (#245)
* Fixes #241: Add the 'radius' path

* Add changelog fragment

---------

Co-authored-by: Johannes Münch <git@washiza.eu>
2023-12-28 08:35:28 +01:00
derdeagle
e4e5f64b46
Add '/routing bgp template' path (#243)
* Add '/routing bgp template' path

* Add changelog fragment

* Update changelogs/fragments/243-add-routing-bgp-template-path.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Johannes Münch <git@washiza.eu>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-12-26 16:46:40 +01:00
derdeagle
4fff1f1bbb
Add '/interface ovpn-client' path (#244)
* Fixes #242: Add '/interface ovpn-client' path

* Add changelog fragment

* Update changelogs/fragments/244-add-interface-ovpn-client-path.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Johannes Münch <git@washiza.eu>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-12-26 16:46:21 +01:00
hansmi
332955aff5
Add support for the "tx-power" wireless parameter (#239)
Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-12-14 07:52:37 +01:00
Yuri Timenkov
c5e51f9a93
Support for WifiWave2. (#226)
* Support for WifiWave2.

Added configuration profiles to configure Mikrotik APs which
have only WifiWave2 package.

* Addressed review comments

1. Sorted lexicographically new entries
2. Added versioning

* Added few related paths

* Fixed typos

* Lowered min version

* Added wifiwave2 interfaces

* Added upper version limit to WifiWave2

According to the documentation, new RouterOS version uses another
package.

* Addressed review comments
2023-12-14 07:51:48 +01:00
Felix Fontein
ac89aa0ab7
Allow to declare some versions as unsupported, and to provide an explicit message. (#238) 2023-12-07 08:01:47 +01:00
derdeagle
ad6faf275d
Fixes #236: Add missing parameters for the "ip firewall" subpaths and set the default value for the "disabled" parameter for most paths (#237)
* Fixes #236: Add missing parameters

The parameters "address-list", "address-list-timeout", and "realm" were
missing for some subpaths of "ip firewall" and are now added.
Additionally the default value of "False" for the "disabled" parameter
has been set so that an e.g. firewall rule, which was disabled
(disabled=True) is enabled (disabled=False) after removing the
"disabled" argument in the data.

Some more parameters can now be removed, e.g. "jump-target", "log", and "log-prefix",
which are not mandatory.

* Add missing changes for #236

Additionally fixed the PR id in the changelog fragment.

* Update changelogs/fragments/237-add-missing-ip-firewall-attributes.yml

Full stop added at the end of the changelog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update changelogs/fragments/237-add-missing-ip-firewall-attributes.yml

Full stop added at the end of the changelog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>

* Fix unit tests

---------

Co-authored-by: Johannes Münch <git@washiza.eu>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-12-03 13:02:08 +01:00
derdeagle
dac3b79a17
Fixes #230: Add missing DoH parameters in the "ip dns" path (#235)
- doh-max-concurrent-queries
- doh-max-server-connections
- doh-timeout

The parameters mentioned above seem to be added in version 7.8 as far as
I could tell from the changelogs.

Co-authored-by: Johannes Münch <git@washiza.eu>
2023-11-24 21:07:40 +01:00
derdeagle
92c6226394
Fix some bugs and adapt RouterOS v.7.12 changes (#234)
* Fix some bugs and adapt RouterOS v.7.12 changes

/ip traffic-flow target: make it a multiple value (single_value=False)
field
/routing id: add comment attribute
/tool e-mail: add versioning to the parameters as "address" was renamed to "server" in 7.12
/routing bgp connection: add missing attributes

* Add changelog fragment

* Fix duplicate key 'output.network'

* Split up the changelog fragment

---------

Co-authored-by: Johannes Münch <git@washiza.eu>
2023-11-19 10:39:33 +01:00
hansmi
479f3106bf
Make wireless parameter "running" read-only (#233)
Commit e4a21311 added API data for the "interface wireless" path. It
contained the read-only "running" parameter. Writing to the parameter
fails:

  Error while modifying for name="…" (ID *3): unknown parameter running

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-11-11 23:10:10 +01:00
Felix Fontein
6a68469209
Add some read-only values to the user path. (#228) 2023-10-07 14:38:54 +02:00
Andrei Costescu
a6979c7f3d
Support routing id and bgp connection (#220)
* Support "/routing id"

https://help.mikrotik.com/docs/pages/viewpage.action?pageId=59965506

* Support "/routing bgp connection"

https://help.mikrotik.com/docs/display/ROS/BGP#BGP-ConnectionMenu

* Add changelog fragment

* Add period.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-10-07 14:38:37 +02:00
Andrei Costescu
226649ac13
Add upnp interfaces, graphing interface and resource (#227)
* Add ip upnp interfaces

* Add tool graphing interface and resource

* Update changelog
2023-10-07 14:25:52 +02:00
hansmi
9b4774c78d
Add support for the "port remote-access" path (#224)
Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-10-07 14:25:11 +02:00
hansmi
29a01ea240
Add support for the "ip dhcp-server option" path (#223)
Make it possible to manage IPv4 DHCP server options.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-10-07 14:24:56 +02:00
Felix Fontein
dc110500db
Fix snmp path's engine-id/engine-id-suffix for ROS 7.10+. (#218) 2023-09-19 18:02:26 +02:00
hansmi
d235437f8f
Add support for the "user" path (#211)
Make it possible to manage users via the `user` path.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-09-18 06:48:13 +02:00
hansmi
f6ed27c588
Fix for "'VersionedAPIData' object has no attribute 'fully_supported'" (#219)
Commit 4b09951 added code looking for a non-existent `fully_supported`
attribute.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-09-18 06:45:08 +02:00
hansmi
d601e10e22
Add support for "tool netwatch" (#216)
Upstream documentation:
https://help.mikrotik.com/docs/display/ROS/Netwatch

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-09-17 14:37:54 +02:00
hansmi
2bbaf26484
Finalize fields for "ppp profile" (#217)
A few defaults were missing for `ppp profile`. Mark the path as fully
understood to enable its use in Ansible tasks.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-09-17 14:37:29 +02:00
Felix Fontein
cf6c79e1b3
Implement basic support for read-only and write-only keys in api_info and api_modify (#213)
* Implement basic support for read-only and write-only keys in api_info and api_modify.

* Do not show write-only fields as 'disabled'.
2023-09-17 14:34:09 +02:00
hansmi
4d8ebaeb8d
Add support for "routing table" (#215)
Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-09-10 21:46:14 +02:00
Felix Fontein
dcc1cf441d
Allow to differ on API paths based on RouterOS version (2/2) (#212)
* Allow to add versioned field for paths.

* The field added in 1aa41ad375 is RouterOS 7.7+.

* The fields added in 2e1159b4c4 are RouterOS 7.5+.
2023-09-01 23:17:47 +02:00
Felix Fontein
4b0995135c
Allow to differ on API paths based on RouterOS version (1/2) (#209)
* Allow to provide definition for path based on API version.

* The paths added in 343c4883c0 are RouterOS 7+.
2023-09-01 22:27:18 +02:00
hansmi
1ed4690240
Support "date", "time" and "gmt-offset" in "system clock" (#210)
These properties are necessary to read and set the time as seen by
RouterOS.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-09-01 22:02:11 +02:00
hansmi
193218446a
Add support for "iot modbus" (#205)
The default values match those of RouterOS 7.11 on a Mikrotik
RB924i-2nD-BT5&BG77 ("Knot").

Upstream documentation:
https://help.mikrotik.com/docs/pages/viewpage.action?pageId=61046813

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-08-26 11:23:14 +02:00
hansmi
b7569b9dfd
Add support for "ipv6 firewall nat" (#204)
RouterOS supports NAT for IPv6 under the `ipv6 firewall nat` path.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-08-26 11:23:00 +02:00
hansmi
adff9bbf8c
Finalize fields for "interface wireless security-profiles" (#203)
A few fields were missing for `interface wireless security-profiles`
(e.g. `disabled`). `default` on the other hand is a built-in property
which can't be modified.

Mark the `interface wireless security-profiles` path as fully understood
to enable its use in Ansible tasks.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-08-21 21:32:43 +02:00
hansmi
11d83bffe6
Add "apn", remove "running" property for ppp-client interfaces (#202)
Commit 2164261 added support for `interface ppp-client`. It missed the
`apn` property and added the runtime-only `running` property.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-08-20 21:25:33 +02:00
hansmi
b0a4743de8
Add support for "user settings" (#201)
The `user settings` path contains settings related to passwords.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-08-20 14:20:16 +02:00
hansmi
343c4883c0
Add support for "routing filter {rule|select-rule}" (#200)
RouterOS 7 added route selections and filters
(https://help.mikrotik.com/docs/display/ROS/Route+Selection+and+Filters).

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-08-20 14:19:11 +02:00
hansmi
2164261e09
Add "interface ppp-client" to API data (#199)
The default values match those of RouterOS 7.11 on a Mikrotik
RB924i-2nD-BT5&BG77 ("Knot").

Upstream documentation: https://help.mikrotik.com/docs/display/ROS/PPP

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-08-20 14:17:49 +02:00
hansmi
1aa41ad375
Support "mode" in IPv4 neighbor discovery configuration (#198)
RouterOS 7.7 added a `mode` parameter to the IPv4 neighbor discovery
configuration.

Changelog: https://forum.mikrotik.com/viewtopic.php?t=192427

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-08-20 14:17:14 +02:00
hansmi
e4a21311a1
Add "interface wireless" to API data (#195)
The default values match those of RouterOS 7.11 on a Mikrotik
RB924i-2nD-BT5&BG77 ("Knot"). They're cross-checked with upstream
documentation[1].

[1] https://help.mikrotik.com/docs/display/ROS/Wireless+Interface

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-08-20 14:15:38 +02:00
hansmi
2e1159b4c4
Support "address-list" and "match-subdomain" in static DNS records (#197)
RouterOS 7.5 added `address-list` and `match-subdomain` as fields for
static DNS records.

Changelog: https://forum.mikrotik.com/viewtopic.php?t=188851

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-08-20 14:11:04 +02:00
hansmi
3b127b12fa
Sort "interface wireless security-profiles" with other wireless paths (#196)
Move the API data for `interface wireless security-profiles` to be in
order with the other entries for `interface wireless …`.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2023-08-16 22:44:59 +02:00
derdeagle
53bb84ba2a
Fixes #193: Add caps-man channel and caps-man manager interface (#194)
* Fixes #193: Add caps-man channel and caps-man manager interface

Adding the caps-man channel path from scratch.
Activating the caps-man manager interface path.

* Add changelog fragment and documentation for both paths

---------

Co-authored-by: Johannes Münch <git@washiza.eu>
2023-08-12 15:57:00 +02:00
derdeagle
6e62283120
Fixes #191: Add path 'ip traffic-flow target' (#192)
* Fixes #191: Add path 'ip traffic-flow target'

* Fixes #191: Add changelog fragment

* Fixes #192: Change changetype from major to minor as it is only adding a path and neither breaking existing things nor adding completely new functionality

---------

Co-authored-by: Johannes Münch <git@washiza.eu>
2023-07-23 21:27:32 +02:00
derdeagle
e570c582d0
Fixes #189: Add missing /snmp parameter "engine-id-suffix" (#190)
* Fixes #189: Add missing /snmp parameter "engine-id-suffix"

* Fixes #189: Add changelog fragment after getting PR ID

* Update changelogs/fragments/180-fix-engine-id-suffix-in-snmp.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Johannes Münch <git@washiza.eu>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-07-16 21:15:48 +02:00
derdeagle
af28e6419f
Fixes #179: Add missing /tool/e-mail parameter "tls" (#180)
* Fixes #179: Add missing /tool/e-mail parameter "tls"

In the
[documentation](https://help.mikrotik.com/docs/display/ROS/E-mail#Email-Properties) the parameter "tls" is mentioned but it cannot be used. The old "start-tls" parameter is not mentioned there (only on the [old documentation](https://wiki.mikrotik.com/wiki/Manual:Tools/email#Properties)).
Trying to use the paramter "tls" lead to the erro message `FAILED! => {"changed": false, "msg": "Unknown key \"tls\"."}`.

* Add changelog fragment

* Update changelogs/fragments/180-fix-tls-in-tool-email.yml

As suggested by felixfontein

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Johannes Münch <git@washiza.eu>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-19 13:12:20 +02:00
Felix Fontein
4329928474
ip dhcp-client: dhcp-options can be removed with value '' (#154)
* dhcp-options can be removed with value ''.

* Fix handling of disabled keys on creation.

* Fix typo.
2023-03-19 13:14:55 +01:00
phox142
071f742100
Adapt SNMP support (#159)
* snmp support

* Add changelog fragment

* Update changelogs/fragments/159-snmp_community.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update changelogs/fragments/159-snmp_community.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-11 18:17:26 +01:00
phox142
720debb323
Add support to disable ipv6 in API paths `ipv6 settings` (#158)
* add support to disable ipv6

* Add changelogs fragment

* Update changelogs/fragments/158-ipv6_settings-disable.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-11 18:16:43 +01:00
phox142
4d86ba1a7d
Correction and Bugfix for ip dhcp-server network (#156)
* API_DATA > ('ip', 'dhcp-server', 'network') > netmask
replace "automatically_computed_from" by 'can_disable=True, remove_value=0'
automatically_computed_from does not seem to be used at any place in the code
without 'can_disable=True, remove_value=0' task is marked as changed at each execution.

* API_DATA > ('ip', 'dhcp-server', 'network') > next-server
replace "default=''" by 'can_disable=True'
The default in routeros is "no value" and it was not possible to remove a configured next-server

* API_DATA > ('ip', 'dhcp-server', 'network') > gateway
replace "automatically_computed_from" by "default=''"
automatically_computed_from does not seem to be used

* API_DATA > ('ip', 'dhcp-server', 'network') > dns-none
replace "default=''" by "default=False"

* Add changelogs fragment

* Update changelogs/fragments/156-ip_dhcp-server_network.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-10 07:01:26 +01:00