summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/resource.py
diff options
context:
space:
mode:
Diffstat (limited to 'geo-replication/syncdaemon/resource.py')
-rw-r--r--geo-replication/syncdaemon/resource.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py
index 401bca7f8..297cdabcb 100644
--- a/geo-replication/syncdaemon/resource.py
+++ b/geo-replication/syncdaemon/resource.py
@@ -1059,16 +1059,17 @@ class SSH(AbstractUrl, SlaveRemote):
self.volume = inner_url[1:]
@staticmethod
- def parse_ssh_address(addr):
- m = re.match('([^@]+)@(.+)', addr)
+ def parse_ssh_address(self):
+ m = re.match('([^@]+)@(.+)', self.remote_addr)
if m:
u, h = m.groups()
else:
- u, h = syncdutils.getusername(), addr
+ u, h = syncdutils.getusername(), self.remote_addr
+ self.remotehost = h
return {'user': u, 'host': h}
def canonical_path(self):
- rap = self.parse_ssh_address(self.remote_addr)
+ rap = self.parse_ssh_address(self)
remote_addr = '@'.join([rap['user'], gethostbyname(rap['host'])])
return ':'.join([remote_addr, self.inner_rsc.get_url(canonical=True)])