From patchwork Tue Jun 17 15:26:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 32060 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4C5CC206A0 for ; Tue, 17 Jun 2014 15:27:34 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id b6sf32654367yha.4 for ; Tue, 17 Jun 2014 08:27:34 -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=j5fNMIiifpMtRYFqVMVycfb59Qb2bXxnfyFVsPLzMqndZ3CuWUPop+jRIREcbUq5eh mXY64+9N5RX3UwHfJs/Cr42T1WX4O2kd40DOQ4zRYexxFo5sN9Scory8D+I8BPn5TKMQ RGAqHnzIoK7GAbUVhtHiSS7QwlzY6cZiP8T/fDeGWOuXOQkeC1Z3hINwxeNgbrNEB6NI FOjCqGF+G6Y9xZFUlS9T5yhbWYiQWQZtvArxawSFSkHXutbNSq19C78i5wFr2gbetOCA r9ThYpHUUBPfNMU9vc/+ZEvsdUjiV7NXoTNo3g8giYtK2Ovy3zSKlta1tG7Gv0E/qWKT UP2Q== X-Gm-Message-State: ALoCoQmxiMzKUj70Y/eWIDK4x8X8pO/EvQjkXaQ3kUL9o2mvhmR4CJIzqJjKJHqszJigCGfkYRqN X-Received: by 10.236.141.11 with SMTP id f11mr53497yhj.54.1403018854150; Tue, 17 Jun 2014 08:27:34 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.50.228 with SMTP id s91ls1294723qga.58.gmail; Tue, 17 Jun 2014 08:27:34 -0700 (PDT) X-Received: by 10.220.174.137 with SMTP id t9mr22901921vcz.12.1403018854048; Tue, 17 Jun 2014 08:27:34 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id xx2si5594101vdc.55.2014.06.17.08.27.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Jun 2014 08:27:34 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id hy10so6605053vcb.31 for ; Tue, 17 Jun 2014 08:27:34 -0700 (PDT) X-Received: by 10.58.56.71 with SMTP id y7mr11494387vep.24.1403018853969; Tue, 17 Jun 2014 08:27:33 -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 vs6csp217948vcb; Tue, 17 Jun 2014 08:27:33 -0700 (PDT) X-Received: by 10.220.190.197 with SMTP id dj5mr22344562vcb.19.1403018853662; Tue, 17 Jun 2014 08:27:33 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id sa4si4466709vdc.98.2014.06.17.08.27.33 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 17 Jun 2014 08:27:33 -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 1WwvHm-0006K0-SJ; Tue, 17 Jun 2014 15:26:58 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WwvHk-0006F0-B5 for xen-devel@lists.xen.org; Tue, 17 Jun 2014 15:26:56 +0000 Received: from [193.109.254.147:11005] by server-8.bemta-14.messagelabs.com id E5/8F-01877-F3E50A35; Tue, 17 Jun 2014 15:26:55 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-15.tower-27.messagelabs.com!1403018810!11891033!4 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 4942 invoked from network); 17 Jun 2014 15:26:54 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-15.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 17 Jun 2014 15:26:54 -0000 X-IronPort-AV: E=Sophos;i="5.01,494,1400025600"; d="scan'208";a="144521865" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 17 Jun 2014 15:26:51 +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:50 -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 1WwvHe-00010t-7Z; Tue, 17 Jun 2014 16:26:50 +0100 From: Ian Campbell To: Date: Tue, 17 Jun 2014 16:26:47 +0100 Message-ID: <1403018809-25509-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.172 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());