]> xenbits.xensource.com Git - osstest.git/commitdiff
PDU: provide explicit "unsupported" method
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 14 Feb 2013 15:00:34 +0000 (15:00 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 14 Feb 2013 15:00:34 +0000 (15:00 +0000)
Osstest/PDU/unsupported.pm [new file with mode: 0644]

diff --git a/Osstest/PDU/unsupported.pm b/Osstest/PDU/unsupported.pm
new file mode 100644 (file)
index 0000000..f28da4c
--- /dev/null
@@ -0,0 +1,49 @@
+# 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 <http://www.gnu.org/licenses/>.
+
+
+package Osstest::PDU::manual;
+
+use strict;
+use warnings;
+
+use Osstest;
+
+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) = @_;
+    return bless { Host => $ho }, $class;
+}
+
+sub power_state {
+    my ($mo, $on) = @_;
+
+    die "power switch request for $mo->{Host}{Name} ($on) not supported\n";
+}
+
+1;