mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 10:25:28 +00:00
Merge pull request #52 from tyll/test_connection_down
Taking a connection down does not work
This commit is contained in:
commit
fdcd0f8ea7
2 changed files with 8 additions and 8 deletions
|
|
@ -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']))
|
||||
|
||||
|
||||
###############################################################################
|
||||
|
|
|
|||
|
|
@ -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 }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue