Commit graph

116 commits

Author SHA1 Message Date
Felix Fontein
98bb520ce7
Use ansible-community/ansible-test-gh-action for CI (#103)
* Use ansible-community/ansible-test-gh-action for CI

Based upon https://github.com/ansible-collections/collection_template/pull/29.

* Avoid trailing ';'.

* Fix relative paths for collection installs.

* Try multi-line command.

* Prevent trailing newline.
2022-08-04 22:34:00 +02:00
Felix Fontein
af6524a1fd
Fix docs. (#105) 2022-08-04 14:32:01 +02:00
Felix Fontein
a66bb78d7f Release 2.2.0. 2022-07-31 22:30:07 +02:00
Felix Fontein
fa13c5f9cb Prepare 2.2.0 release. 2022-07-31 22:08:09 +02:00
Felix Fontein
2911710f1b
Add api_info and api_modify modules (#91)
* Add api_info and api_modify modules.

* Add documentation, and cross-references for the modules.

* Bump version added for new modules.

* Ignore dynamic entries. Allow _info module to return them.

* Document behavior for dynamic entries.

* Update license headers.

* Add disclaimer.

* Improve formulation.

* Auto-generate path list in DOCUMENTATION.

* Add test to make sure lists have been generated automatically.
2022-07-31 22:06:19 +02:00
Felix Fontein
1abaa8e7ca
Improve sanity test, improve README. (#102) 2022-07-20 23:05:15 +02:00
Felix Fontein
7973f58661
Move licenses to LICENSES/, use SPDX-License-Identifier, mention all licenses in galaxy.yml, add missing license file (#101)
* Add SPDX license identifiers, mention all licenses in galaxy.yml.

* Add default copyright headers.

* Adjust remaining/missing entries.

* Fix/add more copyright statements.

* Add sanity test.

* Add changelog.

* Add missing license file.

* Remove colon after 'Copyright'.

* Avoid colon after 'Copyright' in lint script.
2022-07-18 23:16:54 +02:00
Felix Fontein
49fb46c4a3
Add docs PR workflow that a) builds docs and b) show the docs diff that a PR ceates. (#99) 2022-06-29 21:12:24 +02:00
Felix Fontein
b02cb44c1b
Improve CI. (#97) 2022-06-11 20:06:02 +00:00
Felix Fontein
3a34bb9ba4 Release 2.1.0. 2022-05-25 06:27:08 +02:00
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