Small cleanup to use class attribute directly instead of property for transport names
This commit is contained in:
parent
fee73100c4
commit
de306eb5da
3 changed files with 3 additions and 13 deletions
|
@ -43,10 +43,7 @@ except ImportError:
|
|||
class Connection(ConnectionBase):
|
||||
''' Local based connections '''
|
||||
|
||||
@property
|
||||
def transport(self):
|
||||
''' used to identify this connection object '''
|
||||
return 'local'
|
||||
transport = 'local'
|
||||
|
||||
def _connect(self):
|
||||
''' connect to the local host; nothing to do here '''
|
||||
|
|
|
@ -126,10 +126,7 @@ SFTP_CONNECTION_CACHE = {}
|
|||
class Connection(ConnectionBase):
|
||||
''' SSH based connections with Paramiko '''
|
||||
|
||||
@property
|
||||
def transport(self):
|
||||
''' used to identify this connection object from other classes '''
|
||||
return 'paramiko'
|
||||
transport = 'paramiko'
|
||||
|
||||
def _cache_key(self):
|
||||
return "%s__%s__" % (self._play_context.remote_addr, self._play_context.remote_user)
|
||||
|
|
|
@ -61,6 +61,7 @@ except ImportError:
|
|||
class Connection(ConnectionBase):
|
||||
'''WinRM connections over HTTP/HTTPS.'''
|
||||
|
||||
transport = 'winrm'
|
||||
module_implementation_preferences = ('.ps1', '')
|
||||
become_methods = []
|
||||
allow_executable = False
|
||||
|
@ -77,11 +78,6 @@ class Connection(ConnectionBase):
|
|||
|
||||
super(Connection, self).__init__(*args, **kwargs)
|
||||
|
||||
@property
|
||||
def transport(self):
|
||||
''' used to identify this connection object from other classes '''
|
||||
return 'winrm'
|
||||
|
||||
def set_host_overrides(self, host):
|
||||
'''
|
||||
Override WinRM-specific options from host variables.
|
||||
|
|
Loading…
Reference in a new issue