Commit graph

306 commits

Author SHA1 Message Date
Felix Fontein
6e104c962b
Extend documentation. (#96) 2022-05-24 22:51:27 +02:00
Felix Fontein
023f11f7e1
Add encoding option to API modules (#95)
* Set encoding to UTF-8.

* Add encoding parameter to API modules.

* librouteros is now patched.
2022-05-24 22:19:26 +02:00
Felix Fontein
7452195071 Prepare 2.1.0 release. 2022-05-24 18:39:59 +02:00
Felix Fontein
ff66ba9289
Add api_find_and_modify module. (#93) 2022-05-24 18:23:44 +02:00
Nikolay Dachev
d57de117f5
update community.routeros.api query functionality (#63)
* update query to accept multiple librouteros ADN parameters

* update query for new yml strucutre

* add extended_query as separate function:(code in progress)

* extended_query main code is ready for review

* add changelog #63

* small fix for code indentation

* fix pep

* clear all pep issues

* extended_query ready for review (new yml structure)

* small doc fix for std query

* Update changelogs/fragments/63-add-extended_query.yml

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

* Update changelogs/fragments/63-add-extended_query.yml

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

* Update argument spec.

* Other suggestions.

* Fix syntax errors ('is' and 'or' are keywords).

* Make everything work again.

* Add docs, simplify code.

* Add some first tests.

* Do not add fake message when there is no search result.

* Improve tests.

* Fix tests.

* update extened query docs and ros api module examples

* fix pep plugins/modules/api.py:154:1: W293: blank line contains whitespace

* fix extended query example intend

* Update plugins/modules/api.py

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

* Update plugins/modules/api.py

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

* fix example docs

Co-authored-by: dako <dako@syslin.sof.dachev.lan>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-23 14:44:02 +03:00
Felix Fontein
109e534976
ansible-core's devel version supports Python 3.11. (#94) 2022-05-22 17:14:53 +02:00
Felix Fontein
5f912dad16
Improve unit test performance. (Do not install library we do not use in the tests anyway.) (#92) 2022-05-15 22:42:26 +02:00
Felix Fontein
ea782c1cf2
Add module defaults group community.routeros.api. (#90) 2022-05-13 13:18:28 +02:00
Felix Fontein
3d80ccec5f
Add api_facts module (#88)
* Add API docs fragment.

* Improve documentation.

* Move API code to api module_utils.

* Improve docs.

* Add api_facts module.

Does not yet support 'config'. I'm not sure whether that's actually
possible with the API.

* Convert subnet to integer if possible.

* Cleanup.

* Linting and fix tests.

* Remove things that make no sense.

* Simplify code.

* Add basic tests.

* Lint.
2022-05-12 16:17:43 +02:00
Felix Fontein
a90c696589
Correctly handle \_ escape sequence. (#89) 2022-05-09 22:09:08 +02:00
Felix Fontein
02ecc0ca9d
Add filter documentation (#87)
* Add filter documentation.

* Update no-unwanted-files sanity check.
2022-04-30 16:40:59 +02:00
Felix Fontein
d56410b468
Accept new error. (#85) 2022-04-27 09:26:03 +02:00
Felix Fontein
0815b11bbf
Increase verbosity for EE tests (#84)
* Increase verbosity for EE tests.

* 2.9 compatibility.
2022-04-16 07:09:02 +02:00
Felix Fontein
30afb61f86
Make EE ready. (#83) 2022-04-15 17:22:39 +00:00
Felix Fontein
e22433b179
Schedule nightly CI at 5:15. (#81) 2022-04-15 15:07:03 +02:00
Felix Fontein
ebe6e93773
Bump codecov action. (#79) 2022-04-14 22:38:38 +02:00
Felix Fontein
7b3900fd6e
Update GHAs. (#77) 2022-04-11 09:03:47 +02:00
Felix Fontein
cf2882772f
Switch from antsibull to antsibull-docs. (#75) 2022-04-10 10:52:48 +02:00
Felix Fontein
3e39e8473f
Replace antsibull-lint collection-docs with antsibull-docs lint-collection-docs. (#73) 2022-03-30 08:06:30 +02:00
Felix Fontein
a8ba15e556
Add stable-2.13 to CI. (#72) 2022-03-29 06:16:43 +02:00
Felix Fontein
5105c423c8
Add collection links file. (#71) 2022-03-22 07:04:34 +01:00
Nikolay Dachev
a46c7df15c
Fix query (#68)
* fix issues #67

* fix query id check

* add changelog fragment

* fix changelog fragment new line

* fix changelog fragment new line2

* Update changelogs/fragments/68-fix-query-id-check.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-10 07:53:08 +01:00
txt-file
e9fdf19253
fix typo (#64) 2022-01-22 08:26:53 +01:00
Felix Fontein
1deeb9f372 Restrict branches for which to run tests. 2021-11-25 21:21:55 +01:00
Felix Fontein
656c115697
Also collect coverage during sanity tests. (#59) 2021-11-25 20:59:19 +01:00
Felix Fontein
e74687a8e0 Add patchback config. 2021-11-16 22:03:31 +01:00
Felix Fontein
4603507713
Restrict librouteros for Ansible 2.9 unit tests. (#57) 2021-11-16 22:00:07 +01:00
Felix Fontein
26b341f332 Release 2.0.0 2021-10-31 15:30:38 +01:00
Felix Fontein
9cb843b872 Prepare 2.0.0 release. 2021-10-31 15:11:49 +01:00
Felix Fontein
4ccd70cc8f
Fix sanity errors. (#55) 2021-10-19 13:04:30 +01:00
Felix Fontein
65034de769
Replace deprecated v1 codecov updater with v2. (#54) 2021-10-14 15:23:00 +02:00
Felix Fontein
e158fcf0ae Release 2.0.0-a2. 2021-10-14 08:33:45 +02:00
Felix Fontein
f6e929ae3a Prepare 2.0.0-a2 release. 2021-10-13 07:52:55 +02:00
Felix Fontein
d73eb1c144
Add module_utils and filters for quoting and unquoting (#53)
* Move splitting code to own file.

* Move list to dictionary code to quoting as well.

* Add quoting functionality.

* Add quoting filters.

* Add integration tests to CI.

* Fix bugs, increase coverage.

* Make parsing more strict.

* Extract function parse_argument_value from split_routeros_command to make proper parsing of WHERE possible.

* Adjust expected error message in integration tests.

* Simplify code and improve coverage.

* Add changelog fragment for WHERE strictness in api module.

* Add documenation.

* Fix typo.

* Add documentation references.

* Add example to api module which uses quote_argument_value.

* Fix bug, and add tests which prevent this in the future.

* Add more escape sequence tests.

* Make sure all control characters are quoted.
2021-10-12 00:44:40 +03:00
Felix Fontein
f9d246cd7a
Make command always return changed=true. (#50) 2021-10-09 13:36:14 +02:00
Akim Lindberg
5042905471
fix(api): fixed a bug when splitting the argument string (#45)
* fix(api): fixed a bug when splitting the argument string

* fix(api): added the shlex module for splitting

* fix(api): added the shlex module for splitting

* fix(api): moved shlex.split to self method split_params

* Fix indentation.

* Implement custom splitting algorithm.

* Raise AssertionError in case of internal error.

* Update plugins/modules/api.py

this is correct thanks !

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

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Nikolay Dachev <nikolay@dachev.info>
2021-09-29 15:02:28 +02:00
Felix Fontein
f432b1fa07
Update CI matrix to include ansible-core's stable-2.12 branch (#52)
* Update CI matrix to include ansible-core's stable-2.12 branch.

* Adjust README.
2021-09-28 15:35:05 +02:00
Felix Fontein
f99202812a Prepare ansible-core devel branch version bump that is planned for later today. 2021-09-24 18:45:56 +02:00
Felix Fontein
48c7920072
Improve split handling. (#47) 2021-09-09 23:19:57 +03:00
Felix Fontein
a88f4c804b
Fix sanity failures (#43)
* Fix sanity failures.

* Add changelog fragment.
2021-08-12 08:53:21 +02:00
Felix Fontein
bd113788ef Release 2.0.0-a1. 2021-07-31 11:16:14 +02:00
Felix Fontein
42babbe50f 2.0.0 -> 2.0.0-a1. 2021-07-31 11:13:25 +02:00
Felix Fontein
b45fd9415f Next version on main branch will be 2.0.0. 2021-07-11 15:54:16 +02:00
Felix Fontein
69682054e1
Allow api module to fail (#39)
* Allow api module to fail.

* Improve error handling.

* Fix api unit tests.

* Add very basic tests of return values.

* Update api.py

fix ignoring the Fail task if we get TrapError

* Do not mangle fail result, and adjust tests.

* Improve changelog fragment.

* Reclassify changelog fragment as minor_changes, improve text.

* Mark changelog as 'breaking change'.

Co-authored-by: Nikolay Dachev <nikolay@dachev.info>
2021-07-11 15:53:22 +02:00
Felix Fontein
df88a7ec99
Use devel docs links. (#41) 2021-07-07 13:29:49 +02:00
Felix Fontein
3e4427b53a
Fix extra-tests name. (#40) 2021-07-04 12:07:47 +02:00
Felix Fontein
4a6e2df45c Next expected release is 1.3.0. 2021-06-29 18:40:02 +02:00
Felix Fontein
efc563aaac Release 1.2.0. 2021-06-29 18:27:16 +02:00
Felix Fontein
12181c8dc0 Prepare 1.2.0 release. 2021-06-28 22:22:56 +02:00
Felix Fontein
75b4b966a6
Add options to control certificate validation for api module (#37)
* Add options to control certificate validation for api module.

* Linting.

* Extend documentation.

* Fix validate_cert_hostname=true.

* Add documentation on setting up certificates on a RouterOS device.
2021-06-28 20:33:37 +02:00