From patchwork Tue Jun 17 15:26:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 32076 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f72.google.com (mail-pb0-f72.google.com [209.85.160.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A8B91206A0 for ; Tue, 17 Jun 2014 15:28:30 +0000 (UTC) Received: by mail-pb0-f72.google.com with SMTP id ma3sf26123660pbc.11 for ; Tue, 17 Jun 2014 08:28:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=WKF9mipMdVUw8xexD3QJQQpNsQrwefrGWdHBKSsGuxM=; b=YhPg3Qtmis27xKNXqTZMaNbfLrSGg5iqT+hMWlGp06YqWZUpuOoYmX5wRwJtsjhIB6 YD8QqwpZj2lhpdojDX7swPuOaTchC2Mhe7U9rZihbIkqIiv7Vc8khusBwwhDxwQkEcDJ 0Eidx3FdhkIg+9s97GtAQ+p4zY5cJBstqIxvuTm8jsc5vyBpQNbIE31ReMRlRJAVx+BM f6tzKwpfAXyU7sxSsIe8dksJbat037shSHTNstmX+pbIZ67gvQ2noIBRrtqid9abCq6s jT/Nn6X1gEicpF1XAL4YgJZw3KYJwInKR0Mi+Oz3L/fFgHkyrs1uWECetbn/TNlAZgV8 yOWQ== X-Gm-Message-State: ALoCoQmlgT19X7djfA+WpwLTjv9T4T3kiNFwRpSp2arzUUDP/n//jQR9wGFfA+wcPUDHQpEP52ri X-Received: by 10.68.180.132 with SMTP id do4mr1923777pbc.4.1403018909998; Tue, 17 Jun 2014 08:28:29 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.22.145 with SMTP id 17ls4880008qgn.21.gmail; Tue, 17 Jun 2014 08:28:29 -0700 (PDT) X-Received: by 10.58.122.138 with SMTP id ls10mr23193335veb.13.1403018909863; Tue, 17 Jun 2014 08:28:29 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id kz4si5593574vdb.74.2014.06.17.08.28.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Jun 2014 08:28:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.178 as permitted sender) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id ij19so6555209vcb.37 for ; Tue, 17 Jun 2014 08:28:29 -0700 (PDT) X-Received: by 10.58.169.115 with SMTP id ad19mr2835312vec.15.1403018909772; Tue, 17 Jun 2014 08:28:29 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp218015vcb; Tue, 17 Jun 2014 08:28:29 -0700 (PDT) X-Received: by 10.224.147.80 with SMTP id k16mr35643490qav.40.1403018909279; Tue, 17 Jun 2014 08:28:29 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id j92si10005544qgf.38.2014.06.17.08.28.28 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 17 Jun 2014 08:28:29 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WwvHP-0005tu-Cl; Tue, 17 Jun 2014 15:26:35 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WwvHM-0005qf-VN for xen-devel@lists.xen.org; Tue, 17 Jun 2014 15:26:33 +0000 Received: from [193.109.254.147:53520] by server-4.bemta-14.messagelabs.com id B7/F6-02781-82E50A35; Tue, 17 Jun 2014 15:26:32 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-12.tower-27.messagelabs.com!1403018788!11897229!3 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 19841 invoked from network); 17 Jun 2014 15:26:31 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-12.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 17 Jun 2014 15:26:31 -0000 X-IronPort-AV: E=Sophos;i="5.01,494,1400025600"; d="scan'208";a="144521694" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 17 Jun 2014 15:26:29 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.3.181.6; Tue, 17 Jun 2014 11:26:28 -0400 Received: from kazak.uk.xensource.com ([10.80.2.80] helo=kazak.uk.xensource.com.) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1WwvHH-00010a-Mg; Tue, 17 Jun 2014 16:26:27 +0100 From: Ian Campbell To: Date: Tue, 17 Jun 2014 16:26:25 +0100 Message-ID: <1403018787-25442-7-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1403018758.25074.5.camel@kazak.uk.xensource.com>#> References: <1403018758.25074.5.camel@kazak.uk.xensource.com>#> MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian Campbell , xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH RFC OSSTEST 7/9] Toolstack: Abstract away migration support check. X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: Not implemented for libvirt (the check that is) Signed-off-by: Ian Campbell --- Osstest/Toolstack/libvirt.pm | 5 +++++ Osstest/Toolstack/xend.pm | 5 +++++ Osstest/Toolstack/xl.pm | 9 +++++++++ ts-migrate-support-check | 10 +--------- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm index c1d2b09..2dffd09 100644 --- a/Osstest/Toolstack/libvirt.pm +++ b/Osstest/Toolstack/libvirt.pm @@ -50,4 +50,9 @@ sub create ($$) { target_cmd_root($ho, "virsh create --file $cfg.xml", 100); } +sub migrate_check ($) { + my ($self) = @_; + die "libvirt migration not supported yet." +} + 1; diff --git a/Osstest/Toolstack/xend.pm b/Osstest/Toolstack/xend.pm index 4f093bc..934f1a5 100644 --- a/Osstest/Toolstack/xend.pm +++ b/Osstest/Toolstack/xend.pm @@ -36,4 +36,9 @@ sub new { sub destroy { return Osstest::Toolstack::xl::destroy(@_); } sub create { return Osstest::Toolstack::xl::create(@_); } +sub migrate_check ($) { + my ($self) = @_; + return 0; +} + 1; diff --git a/Osstest/Toolstack/xl.pm b/Osstest/Toolstack/xl.pm index ca46094..1c97a9d 100644 --- a/Osstest/Toolstack/xl.pm +++ b/Osstest/Toolstack/xl.pm @@ -42,4 +42,13 @@ sub create ($$) { target_cmd_root($self->{Host}, $self->{_Command}." create $cfg", 100); } +sub migrate_check ($) { + my $self = @_; + my $ho = $self->{Host}; + my $help = target_cmd_output_root($ho, $self->{_Command}." help"); + my $rc = ($help =~ m/^\s*migrate/m) ? 0 : 1; + logm("rc=$rc"); + return $rc; +} + 1; diff --git a/ts-migrate-support-check b/ts-migrate-support-check index c70b77a..cd41f68 100755 --- a/ts-migrate-support-check +++ b/ts-migrate-support-check @@ -24,12 +24,4 @@ tsreadconfig(); our $ho = selecthost($ARGV[0]); -# all xend/xm platforms support migration -exit(0) if toolstack($ho)->{Command} eq "xm"; - -my $help = target_cmd_output_root($ho, toolstack($ho)->{Command}." help"); - -my $rc = ($help =~ m/^\s*migrate/m) ? 0 : 1; - -logm("rc=$rc"); -exit($rc); +exit(toolstack($ho)->migrate_check());