Fix reconstructing socket path in network_cli (#33572)

*  Persistent connection socket path is hash of
   remote address, port, remote user and connection
   type.

*  Integration test fixes
pull/33573/head
Ganesh Nalawade 7 years ago committed by GitHub
parent 6654d69569
commit 399e72abb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -216,7 +216,7 @@ class Connection(ConnectionBase):
value to None and the _connected value to False value to None and the _connected value to False
''' '''
ssh = connection_loader.get('ssh', class_only=True) ssh = connection_loader.get('ssh', class_only=True)
cp = ssh._create_control_path(self._play_context.remote_addr, self._play_context.port, self._play_context.remote_user) cp = ssh._create_control_path(self._play_context.remote_addr, self._play_context.port, self._play_context.remote_user, self._play_context.connection)
tmp_path = unfrackpath(C.PERSISTENT_CONTROL_PATH_DIR) tmp_path = unfrackpath(C.PERSISTENT_CONTROL_PATH_DIR)
socket_path = unfrackpath(cp % dict(directory=tmp_path)) socket_path = unfrackpath(cp % dict(directory=tmp_path))

@ -21,7 +21,7 @@
name: "{{ test_interface }}" name: "{{ test_interface }}"
state: up state: up
tx_rate: ge(0) tx_rate: ge(0)
rx_rate: le(0) rx_rate: ge(0)
authorize: yes authorize: yes
register: result register: result

@ -35,3 +35,6 @@
state: absent state: absent
authorize: yes authorize: yes
register: result register: result
- name: reset connection
meta: reset_connection

Loading…
Cancel
Save