summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/connection_delegation/connection_plugins/delegation_connection.py
blob: f61846cfab3a365e4e8990f0c9a5bd676f349eb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

DOCUMENTATION = """
author: Ansible Core Team
connection: delegation_connection
short_description: Test connection for delegated host check
description:
- Some further description that you don't care about.
options:
  remote_password:
    description: The remote password
    type: str
    vars:
    - name: ansible_password
    # Tests that an aliased key gets the -k option which hardcodes the value to password
    aliases:
    - password
"""

from ansible.plugins.connection import ConnectionBase


class Connection(ConnectionBase):

    transport = 'delegation_connection'
    has_pipelining = True

    def __init__(self, *args, **kwargs):
        super(Connection, self).__init__(*args, **kwargs)

    def _connect(self):
        super(Connection, self)._connect()

    def exec_command(self, cmd, in_data=None, sudoable=True):
        super(Connection, self).exec_command(cmd, in_data, sudoable)

    def put_file(self, in_path, out_path):
        super(Connection, self).put_file(in_path, out_path)

    def fetch_file(self, in_path, out_path):
        super(Connection, self).fetch_file(in_path, out_path)

    def close(self):
        super(Connection, self).close()