network/tests
Gris Ge c4643e56bb nm provider: Refactor the down action of network connection
When deactivating a profile in libNM, we should:

 * Check `NM.ActionConnection` existence
 * Check `NM.ActionConnection.props.state` not DEACTIVATED
 * Use signal `state-changed` of `NM.ActionConnection`.
 * Only invoke `NM.Client.deactivate_connection_async()` if not
   in DEACTIVATING state.
 * Ignore `NM.ManagerError.CONNECTIONNOTACTIVE` error.

This patch also introduced a new class `NetworkManagerProvider`
in `module_utils/network_lsr/nm`:

 * Independent from Ansible but need to use absolute import due to
   limitation of ansible 2.8.
 * Provide sync function wrapping async calls of libNM.
 * Use stable logging method of python.
 * Only load this module when provider is nm.

This patch also changed how logging is handling in
`Cmd_nm.run_action_down()` as initial step on isolate ansible log
mechanism from provider module.

By moving provider codes to `module_utils` folder, we can eventually
simplify the bloated `library/network_connections.py`.

Signed-off-by: Gris Ge <fge@redhat.com>
2020-11-19 18:58:26 +08:00
..
files Add support for domain-suffix-match 802.1x option 2020-05-04 13:01:41 +02:00
integration nm provider: Refactor the down action of network connection 2020-11-19 18:58:26 +08:00
playbooks Install NetworkManager-team package when team profiles are configured 2020-10-07 11:18:30 +02:00
roles/linux-system-roles.network Modularize role 2018-08-15 10:04:47 +02:00
tasks Install NetworkManager-team package when team profiles are configured 2020-10-07 11:18:30 +02:00
unit Update formatting according to new black version 2020-08-28 09:11:56 +02:00
.gitignore Move tests to /tests directory and rename to new naming scheme 2018-05-16 19:48:23 +02:00
covstats Add helper scripts to get coverage data 2018-05-24 15:14:04 +02:00
ensure_provider_tests.py Remove comment about host selection workaround 2020-10-15 07:40:33 +02:00
get_coverage.sh Rename files to be valid python identifiers 2020-04-22 17:40:03 +02:00
get_coverage.yml Rename files to be valid python identifiers 2020-04-22 17:40:03 +02:00
get_total_coverage.sh Rename files to be valid python identifiers 2020-04-22 17:40:03 +02:00
merge_coverage.sh Rename files to be valid python identifiers 2020-04-22 17:40:03 +02:00
module_utils Integration tests: Fix coverage collection 2020-04-15 22:12:22 +02:00
modules Integration tests: Fix coverage collection 2020-04-15 22:12:22 +02:00
setup_module_utils.sh support testing/linting module_utils code 2020-04-06 19:14:42 +02:00
tests_802_1x_nm.yml Remove comment about host selection workaround 2020-10-15 07:40:33 +02:00
tests_802_1x_updated_nm.yml Remove comment about host selection workaround 2020-10-15 07:40:33 +02:00
tests_bond_initscripts.yml tests: add simple bond tests for both nm and initscripts 2020-08-20 17:06:05 +02:00
tests_bond_nm.yml Remove comment about host selection workaround 2020-10-15 07:40:33 +02:00
tests_bridge_initscripts.yml Provider sets: Always run essential tasks 2020-06-25 22:48:25 +02:00
tests_bridge_nm.yml Remove comment about host selection workaround 2020-10-15 07:40:33 +02:00
tests_default.yml library: Separate debug and info logs from warnings 2020-05-06 21:57:34 +02:00
tests_default_initscripts.yml tests: Fix yamllint issues 2020-03-24 13:55:27 +01:00
tests_default_nm.yml tests: Fix yamllint issues 2020-03-24 13:55:27 +01:00
tests_ethernet_initscripts.yml Provider sets: Always run essential tasks 2020-06-25 22:48:25 +02:00
tests_ethernet_nm.yml Remove comment about host selection workaround 2020-10-15 07:40:33 +02:00
tests_ethtool_features_initscripts.yml Add support for ethtool features 2019-06-14 15:18:11 +02:00
tests_ethtool_features_nm.yml Remove comment about host selection workaround 2020-10-15 07:40:33 +02:00
tests_helpers_and_asserts.yml Rename files to be valid python identifiers 2020-04-22 17:40:03 +02:00
tests_integration_pytest.yml Add playbooks to automate integration testing 2020-08-24 21:52:25 +02:00
tests_provider_nm.yml Remove comment about host selection workaround 2020-10-15 07:40:33 +02:00
tests_reapply_nm.yml Remove comment about host selection workaround 2020-10-15 07:40:33 +02:00
tests_regression_nm.yml Integration tests: Explicitly select provider 2020-04-19 21:08:56 +02:00
tests_states_initscripts.yml States: Ignore already removed profile for absent 2020-06-26 20:08:51 +02:00
tests_states_nm.yml Remove comment about host selection workaround 2020-10-15 07:40:33 +02:00
tests_team_nm.yml Remove comment about host selection workaround 2020-10-15 07:40:33 +02:00
tests_unit.yml tests: Fix yamllint issues 2020-03-24 13:55:27 +01:00
tests_vlan_mtu_initscripts.yml Provider sets: Always run essential tasks 2020-06-25 22:48:25 +02:00
tests_vlan_mtu_nm.yml Remove comment about host selection workaround 2020-10-15 07:40:33 +02:00
tests_wireless_nm.yml Remove comment about host selection workaround 2020-10-15 07:40:33 +02:00