+def collect_linkpairs(opts, util, formatter):
+ def collect_func():
+ col = Collector(opts, util, formatter)
+ if opts.remote_sshkey is not None:
+ col.set_remote_sshkey(opts.remote_sshkey)
+ col.connect_ssh()
+ if opts.remote_password is not None:
+ col.set_remote_password(opts.remote_password)
+ col.connect_ssh()
+ col.run()
+ return col.get_linkpairs()
+ return collect_func
+