1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
Commit graph

12 commits

Author SHA1 Message Date
Justin Bronn
7722800561
nmcli: module refactor (#1113)
* * Refactor `nmcli` module to use consistent parameters when creating/modifying connections and detecting changes.
* Keep DNS list arguments as lists internally.
* Remove duplicated code where practical.

* DBus and GObject dependencies are not necessary.

* Update changelog fragment.

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

* Update changelog fragment.

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

* Use identity operator instead of equality for type comparison.

* Don't start changelog notes with a capital letter.

* * Have `settings_type` return `str` by default instead of `None`.
* Improve variable naming, use `convert_func` instead of `type_cast`.

* Revert new feature of allowing ethernet types as slaves.

* Bring back `list_connection_info` to list all connections with `nmcli con show`.

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-23 07:13:39 +02:00
Felix Fontein
e48083e66b
nmcli: set C locale when executing nmcli (#992)
* Set C locale when calling nmcli.

* Add changelog.
2020-09-29 22:57:07 +02:00
Felix Fontein
95531d24ea
nmcli: fix package name (#712)
* Type: Wrong package names

In Red Hat systems, python packages are preceeded by `python3-`

* Use Python 2 packages on CentOS 7 and Fedora <= 28.

Co-authored-by: Frank Brütting <fbruetting@users.noreply.github.com>
2020-07-30 06:35:12 +00:00
Andrew Klychkov
c055340ecb
modules: fix examples to use FQCN for builtin modules (#648)
* modules: fix examples to use FQCN for builtin modules

* fix

* fix

* fix

* fix

* fix

* fix

* fix
2020-07-14 18:28:08 +03:00
Andrew Klychkov
41cfdda6a3
modules: fix examples to use FQCN (#644)
* modules: fix examples to use FQCN

* fix

* fix

* fix
2020-07-13 21:50:31 +02:00
Joey Zhang
d2ee51253d
nmcli: add idempotent support for any kinds of connections (#562)
* nmcli: add idemptent support for any kinds of connections

Fixes #481: nmcli reports changed status even if nothing needs to change
- Implement show_connection() to retrieve connection profile from command line
- Parse integer enumeration values in show_connection()
- Convert 'bond.options' to alias shortcuts
- Modify connection only if changes are detected
- Support generic alias in during the property comparison

* nmcli: add idemptent support for any kinds of connections

Add mock object for modification cases when connection state changes

* nmcli: add idempotent support for any kinds of connections

- Add more test cases to check idempotent for each type of connections
- Verify 'changed' and 'failed' in the result of each test
- Append prefixlen for 'ip4' values in test data
- Fix the incorrect 'return_value' of execute_command() in previous mockers
- Ignore the empty string in _compare_conn_params()
- Fix the property key mapping of 'bridge-port.hairpin-mode' for bridge-slave
- Add 'override_options' in the result output for playboot debug

* nmcli: add idempotent support for any kinds of connections

Fix pep8 issues in test_nmcli.py: Comparison to False should be 'not expr'

* nmcli: add idempotent support for any kinds of connections

Support setting 'ipv4.method' or 'ipv6.method' via nmcli if the configuration method changes

* nmcli: add idempotent support for any kinds of connections

Simplify the if statements in show_connection() according to vlours's advice

* nmcli: add idempotent support for any kinds of connections

Fix the list argument comparison method with multiple values.

* nmcli: add idempotent support for any kinds of connections

Use ansible --diff option output to show detailed changes instead of a private return value.

* nmcli: add idempotent support for any kinds of connections

Add changelog fragment for bugfix.
2020-06-30 05:43:39 +02:00
Abhijeet Kasurde
58eba98de9
nmcli: Fix documentation example (#515)
Migrated from https://github.com/ansible/ansible/pull/68259

This is based upon the work done by https://github.com/cdomingos

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-06-15 17:04:17 +05:30
Abhijeet Kasurde
2aaab59d04
nmcli: Typecast parameter values to string as required (#477) 2020-06-15 17:02:55 +05:30
Jeffrey Cutter
4e7732586f
Fix NetworkManager-libnm typo in nmcli.py documentation. (#403) 2020-05-22 22:14:04 +02:00
Andrew Klychkov
a7c830f49d
Fix examples formatting (#345) 2020-05-16 15:07:51 +02:00
Andrew Klychkov
5d226f86b6
Remove ANSIBLE_METADATA (#339)
* Remove ANSIBLE_METADATA

* remove from other modules

* remove from plugins and scripts
2020-05-14 14:03:42 +01:00
Ansible Core Team
aebc1b03fd Initial commit 2020-03-09 09:11:07 +00:00