@@ -22,18 +22,6 @@ use warnings;
use Osstest;
-use parent qw(Osstest::PDU::unsupported);
-
-sub new {
- my ($class, $ho, $methname, @args) = @_;
-
- return bless { Args => \@args }, $class;
-}
-
-sub pdu_power_state {
- my ($mo, $on) = @_;
- my $onoff= $on ? "on" : "off";
- system_checked("./pdu-snmp @{ $mo->{Args} } $onoff");
-}
+use parent qw(Osstest::PDU::snmp);
1;
new file mode 100644
@@ -0,0 +1,39 @@
+# 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::snmp;
+
+use strict;
+use warnings;
+
+use Osstest;
+
+use parent qw(Osstest::PDU::unsupported);
+
+sub new {
+ my ($class, $ho, $methname, @args) = @_;
+
+ return bless { Args => \@args }, $class;
+}
+
+sub pdu_power_state {
+ my ($mo, $on) = @_;
+ my $onoff= $on ? "on" : "off";
+ system_checked("./pdu-snmp @{ $mo->{Args} } $onoff");
+}
+
+1;
@@ -654,9 +654,9 @@ HostProp_<host>_PowerILOM
manual Asks the user on the controlling terminal
unsupported Fails whenever a power operation is needed
- msw [--apc6] <pdu> <port-name-regexp|port-num>
- Control an APC masterswitch via SNMP. The SNMP
- community is `private'. See the `pdu-snmp' script.
+ snmp --<model> <pdu> <port-name-regexp|port-num>
+ Control a PDU via SNMP. The SNMP community is `private'.
+ See the `pdu-snmp' script for supported model names.
ipmi <mgmt> [<user> [<pass> [<ipmitool options...>]]]
Use IPMI by (by running ipmitool). <mgmt> is the name or
@@ -667,6 +667,9 @@ HostProp_<host>_PowerILOM
Does nothing if `on|off|both' is inapplicable, and has
less error checking and less defaulting than ipmi.
+ msw ....
+ Deprecated alias for snmp.
+
Supported specially are:
<delay>
Retain the old name for compatibility with existing configuration. No change other than to messages. Signed-off-by: Ian Jackson <iwj@xenproject.org> --- Osstest/PDU/msw.pm | 14 +------------- Osstest/PDU/snmp.pm | 39 +++++++++++++++++++++++++++++++++++++++ README | 9 ++++++--- 3 files changed, 46 insertions(+), 16 deletions(-) create mode 100644 Osstest/PDU/snmp.pm