From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [OSSTEST PATCH 5/8] Publish: Introduce publish_ssh_opts
Date: Wed, 11 Jul 2018 15:14:17 +0100 [thread overview]
Message-ID: <1531318460-4509-6-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1531318460-4509-1-git-send-email-ian.jackson@eu.citrix.com>
We need to pass it $cfgbase because this will soon be configurable.
No functional change right now.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
Osstest/Management.pm | 10 ++++++++--
cr-publish-flight-logs | 3 ++-
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/Osstest/Management.pm b/Osstest/Management.pm
index 2c875a7..c1ed2ac 100644
--- a/Osstest/Management.pm
+++ b/Osstest/Management.pm
@@ -27,7 +27,7 @@ BEGIN {
our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
$VERSION = 1.00;
@ISA = qw(Exporter);
- @EXPORT = qw(
+ @EXPORT = qw(publish_ssh_opts
);
%EXPORT_TAGS = (
'logs' => [qw(logs_select onloghost logcfg
@@ -40,7 +40,12 @@ BEGIN {
}
our ($logcfgbase, $loghost, $logdir);
-our @logsshopts= qw(-o batchmode=yes);
+our @logsshopts;
+
+sub publish_ssh_opts ($) {
+ my ($cfgbase) = @_; # LogsPublish or ResultsPublish
+ return (qw(-o batchmode=yes));
+}
sub logs_select ($) {
($logcfgbase) = @_;
@@ -48,6 +53,7 @@ sub logs_select ($) {
return 0 unless $cfgvalue;
if ($cfgvalue =~ m/\:/) {
($loghost, $logdir) = ($`,$'); #');
+ @logsshopts = publish_ssh_opts($logcfgbase);
} else {
($loghost, $logdir) = (undef, $cfgvalue);
}
diff --git a/cr-publish-flight-logs b/cr-publish-flight-logs
index 9e13652..7249d03 100755
--- a/cr-publish-flight-logs
+++ b/cr-publish-flight-logs
@@ -21,6 +21,7 @@ use strict qw(refs vars);
use Fcntl qw(:flock);
BEGIN { unshift @INC, qw(.); }
use Osstest;
+use Osstest::Management;
our %c;
@@ -61,7 +62,7 @@ sub copydir ($$) {
return unless $c{"${cfgbase}Publish"};
my $src = $c{$cfgbase}.$subdir."/";
my $dst = $c{"${cfgbase}Publish"}.$subdir;
- my @ssh = qw(ssh -o batchmode=yes);
+ my @ssh = (qw(ssh), publish_ssh_opts("${cfgbase}Publish"));
my @cmd= qw(rsync --compress --compress-level=9 --stats --delete -auH);
push @cmd, '-e', join(' ', map { s/\'/''/g; "'$_'"; } @ssh);
#--bwlimit=50
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-07-11 14:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-11 14:14 [OSSTEST PATCH 0/8] Log publication from Citrix Cambridge Ian Jackson
2018-07-11 14:14 ` [OSSTEST PATCH 1/8] cr-ensure-disk-space: With -D, print check_space command Ian Jackson
2018-07-11 14:14 ` [OSSTEST PATCH 2/8] Publish: Default LogsPublish and ResultsPublish from Publish Ian Jackson
2018-07-11 14:14 ` [OSSTEST PATCH 3/8] cr-publish-flight-logs: Refactor copydir args Ian Jackson
2018-07-11 14:14 ` [OSSTEST PATCH 4/8] cr-publish-flight-logs: Refactor rsync -e option construction Ian Jackson
2018-07-11 14:14 ` Ian Jackson [this message]
2018-07-11 14:14 ` [OSSTEST PATCH 6/8] Publish: Introduce {Logs, Results}PublishSshOpts Ian Jackson
2018-07-11 14:14 ` [OSSTEST PATCH 7/8] Publish: Cambridge: Publish to new public host Ian Jackson
2018-07-11 14:14 ` [OSSTEST PATCH 8/8] Publish: Cambridge: Get the public URL right Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1531318460-4509-6-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).