Debian Codegraph @

test/integration/targets/shell-plugins/connection_plugins/test_connection_override.py

raw
1 # Copyright (c) 2019 Ansible Project
2 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
3
4 from __future__ import annotations
5
6 DOCUMENTATION = """
7 connection: test_connection_override
8 short_description: test connection plugin used in tests
9 description:
10 - This is a test connection plugin used for shell testing
11 author: ansible (@core)
12 version_added: historical
13 options:
14 """
15
16 from ansible.plugins.connection import ConnectionBase
17
18
19 class Connection(ConnectionBase):
20 """ test connection """
21
22 transport = 'test_connection_override'
23
24 def __init__(self, *args, **kwargs):
25 self._shell_type = 'powershell' # Set a shell type that is not sh
26 super(Connection, self).__init__(*args, **kwargs)
27
28 def _connect(self):
29 pass
30
31 def exec_command(self, cmd, in_data=None, sudoable=True):
32 pass
33
34 def put_file(self, in_path, out_path):
35 pass
36
37 def fetch_file(self, in_path, out_path):
38 pass
39
40 def close(self):
41 pass