Small cleanup to use class attribute directly instead of property for transport names

pull/15204/head
Toshio Kuratomi 9 years ago committed by James Cammarata
parent 14e164d1db
commit dcd751a767

@ -43,10 +43,7 @@ except ImportError:
class Connection(ConnectionBase): class Connection(ConnectionBase):
''' Local based connections ''' ''' Local based connections '''
@property transport = 'local'
def transport(self):
''' used to identify this connection object '''
return 'local'
def _connect(self): def _connect(self):
''' connect to the local host; nothing to do here ''' ''' connect to the local host; nothing to do here '''

@ -122,10 +122,7 @@ SFTP_CONNECTION_CACHE = {}
class Connection(ConnectionBase): class Connection(ConnectionBase):
''' SSH based connections with Paramiko ''' ''' SSH based connections with Paramiko '''
@property transport = 'paramiko'
def transport(self):
''' used to identify this connection object from other classes '''
return 'paramiko'
def _cache_key(self): def _cache_key(self):
return "%s__%s__" % (self._play_context.remote_addr, self._play_context.remote_user) return "%s__%s__" % (self._play_context.remote_addr, self._play_context.remote_user)

@ -61,6 +61,7 @@ except ImportError:
class Connection(ConnectionBase): class Connection(ConnectionBase):
'''WinRM connections over HTTP/HTTPS.''' '''WinRM connections over HTTP/HTTPS.'''
transport = 'winrm'
module_implementation_preferences = ('.ps1', '') module_implementation_preferences = ('.ps1', '')
become_methods = [] become_methods = []
allow_executable = False allow_executable = False
@ -77,11 +78,6 @@ class Connection(ConnectionBase):
super(Connection, self).__init__(*args, **kwargs) 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): def set_host_overrides(self, host):
''' '''
Override WinRM-specific options from host variables. Override WinRM-specific options from host variables.

Loading…
Cancel
Save