mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
Use Remote.shortname in logs
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
This commit is contained in:
parent
30d1d518d5
commit
3352b58d30
@ -104,7 +104,7 @@ class Remote(object):
|
||||
|
||||
TODO refactor to move run.run here?
|
||||
"""
|
||||
r = self._runner(client=self.ssh, name=self.hostname, **kwargs)
|
||||
r = self._runner(client=self.ssh, name=self.shortname, **kwargs)
|
||||
r.remote = self
|
||||
return r
|
||||
|
||||
|
@ -41,13 +41,13 @@ class TestRemote(object):
|
||||
exitstatus=None,
|
||||
exited=None,
|
||||
)
|
||||
r = remote.Remote(name='jdoe@xyzzy.example.com', ssh=ssh)
|
||||
run.expects_call().with_args(
|
||||
client=fudge.inspector.arg.passes_test(lambda v: v is ssh),
|
||||
args=fudge.inspector.arg.passes_test(lambda v: v is args),
|
||||
foo=fudge.inspector.arg.passes_test(lambda v: v is foo),
|
||||
name='xyzzy.example.com'
|
||||
name=r.shortname,
|
||||
).returns(ret)
|
||||
r = remote.Remote(name='jdoe@xyzzy.example.com', ssh=ssh)
|
||||
# monkey patch ook ook
|
||||
r._runner = run
|
||||
got = r.run(
|
||||
|
Loading…
Reference in New Issue
Block a user