From: Ian Jackson Subject: [OSSTEST PATCH 03/32] PDU: pdu-msw: Support APC v6 firmware Date: Tue, 24 Mar 2015 19:02:26 +0000 Message-ID: <1427223775-8592-4-git-send-email-ian.jackson@eu.citrix.com> References: <1427223775-8592-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YaU76-0000v9-Ew for xen-devel@lists.xenproject.org; Tue, 24 Mar 2015 19:03:44 +0000 In-Reply-To: <1427223775-8592-1-git-send-email-ian.jackson@eu.citrix.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: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org APC PDUs with firmware 6.x have a different OID space for turning ports on and off, to the one for querying. The old namespace still works to turn the port on and off but returns a genErr error response! Support a new command-line option --apc6 to use this other OID. Information about OIDs etc. obtained here: https://git.fedorahosted.org/cgit/fence-agents.git/commit/?id=55ccdd79f530092af06eea5b4ce6a24bd82c0875 Signed-off-by: Ian Jackson --- pdu-msw | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pdu-msw b/pdu-msw index fc4d314..6c25690 100755 --- a/pdu-msw +++ b/pdu-msw @@ -30,6 +30,15 @@ my $community= 'private'; my $baseoid= '.1.3.6.1.4.1.318.1.1.4.4.2.1'; my $baseoid_write= "$baseoid.3"; +while (@ARGV && $ARGV[0] =~ m/^-/) { + $_ = shift @ARGV; + if (m/^--apc6$/) { + $baseoid_write= '.1.3.6.1.4.1.318.1.1.12.3.3.1.1.4'; + } else { + die "$_ ?"; + } +} + if (@ARGV<2 || @ARGV>3 || $ARGV[0] =~ m/^-/) { die "bad usage\n$usagemsg"; } our ($dnsname,$outlet,$action) = @ARGV; -- 1.7.10.4