From: Ian Campbell Subject: Re: [PATCH osstest 00/10] Add initial support for testing arm32 on arm servers (Calxeda Midway) Date: Thu, 5 Sep 2013 12:27:56 +0100 Message-ID: <1378380476.14745.34.camel@kazak.uk.xensource.com> References: <1378313870.17510.172.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1378313870.17510.172.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On Wed, 2013-09-04 at 17:57 +0100, Ian Campbell wrote: > > HostProp_marilith-n4_PowerMethod xenuse Which needs the following patch. Here are ipmi runes too if that fits better with the non standalone version: ipmitool -I lanplus -U admin -P admin -H marilith-n-mgmt power on ipmitool -I lanplus -U admin -P admin -H marilith-n-mgmt power off This sytem seems to need ipmitool -I lanplus -U admin -P admin -H marilith-n-mgmt chassis bootdev pxe which doesn't appear to be sticky, so needs to happen each time. 8<------------------------------ >From 545c44cb27bcdc27848a07b646b47d4650834da9 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 5 Sep 2013 12:24:30 +0100 Subject: [PATCH] PDU: support for xenuse controlled machines xenuse is a Citrix internal utility for rebooting machines and accessing their consoles etc. So this is more of a proof of concept for folks outside our infrastructure. --- Osstest/PDU/xenuse.pm | 59 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Osstest/PDU/xenuse.pm diff --git a/Osstest/PDU/xenuse.pm b/Osstest/PDU/xenuse.pm new file mode 100644 index 0000000..82a5999 --- /dev/null +++ b/Osstest/PDU/xenuse.pm @@ -0,0 +1,59 @@ +# This is part of "osstest", an automated testing framework for Xen. +# Copyright (C) 2009-2013 Citrix Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + + +package Osstest::PDU::xenuse; + +use strict; +use warnings; + +use Osstest; +use Osstest::TestSupport; +use IO::File; + +BEGIN { + use Exporter (); + our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); + $VERSION = 1.00; + @ISA = qw(Exporter); + @EXPORT = qw(); + %EXPORT_TAGS = ( ); + + @EXPORT_OK = qw(); +} + +our $tty; + +sub new { + my ($class, $ho) = @_; + logm("new xenuse PDU for $ho->{Name}"); + return bless { Host => $ho }, $class; +} + +sub pdu_power_state { + my ($mo, $on) = @_; + my $onoff= $on ? "on" : "off"; + + if ( $on ) { + #XXX this should be conditional + system_checked(qw(ipmitool -H), "$mo->{Host}{Name}-mgmt",qw(-U admin -P admin chassis bootdev pxe)); + system_checked(qw(xenuse --on), "$mo->{Host}{Name}"); + } else { + system_checked(qw(xenuse --off), "$mo->{Host}{Name}"); + } +} + +1; -- 1.7.10.4