[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [OSSTEST PATCH 6/7] PDU::snmp, PDU::msw: Rename from msw to snmp
Retain the old name for compatibility with existing configuration. No change other than to messages. Signed-off-by: Ian Jackson <iwj@xxxxxxxxxxxxxx> --- 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 diff --git a/Osstest/PDU/msw.pm b/Osstest/PDU/msw.pm index 614216d4..099ef778 100644 --- a/Osstest/PDU/msw.pm +++ b/Osstest/PDU/msw.pm @@ -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; diff --git a/Osstest/PDU/snmp.pm b/Osstest/PDU/snmp.pm new file mode 100644 index 00000000..dca60df7 --- /dev/null +++ b/Osstest/PDU/snmp.pm @@ -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; diff --git a/README b/README index 70f8ae73..33c4d2cc 100644 --- a/README +++ b/README @@ -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> -- 2.20.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |