diff --git a/library/network_connections.py b/library/network_connections.py index 0493f19..02e330d 100644 --- a/library/network_connections.py +++ b/library/network_connections.py @@ -1120,7 +1120,7 @@ class ArgValidator_ListConnections(ArgValidatorList): def _validate_post(self, value, name, result): for idx, connection in enumerate(result): - if connection['state'] in ['down', 'up']: + if connection['state'] in ['up']: if connection['state'] == 'up' and 'type' in connection: pass elif not ArgUtil.connection_find_by_name(connection['name'], result, idx): @@ -2661,9 +2661,10 @@ class Cmd_nm(Cmd): self.log_error(idx, 'down connection failed while waiting: %s' % (e)) cons = self.nmutil.connection_list(name = connection['name']) - if not changed: - self.log_info(idx, 'down connection %s failed: no connection' % (connection['name'])) + self.log_error(idx, + 'down connection %s failed: connection not found' % + (connection['name'])) ############################################################################### diff --git a/tests/tests_ethernet.yml b/tests/tests_ethernet.yml index 55f2ae2..b4ea31a 100644 --- a/tests/tests_ethernet.yml +++ b/tests/tests_ethernet.yml @@ -30,11 +30,10 @@ - linux-system-roles.network # FIXME: assert profile present # FIXME: assert profile/device up + IP address -# FIXME: state down does not work currently -#- import_playbook: down-profile.yml -# vars: -# profile: "{{ interface }}" -## FIXME: assert profile/device down +- import_playbook: down-profile.yml + vars: + profile: "{{ interface }}" +# FIXME: assert profile/device down - import_playbook: remove-profile.yml vars: profile: "{{ interface }}"