From nobody Wed May 8 00:26:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1603806269; cv=none; d=zohomail.com; s=zohoarc; b=CbXzio2IPAzOFK+QGtm8ctrgVqMD/zR+d5dJqtn0D75K3rVq+lBKfn8QLOQJ0fj6fosaHIoM0NdVygDIRAsTIsyQ1ajYE0Z8iBrSEf5nr400YNwHg/oQaT+2qun/3vdZR+UrSXHTOtfvHa47n5y8iquAtWcNOkdxkt3ih3tbzQY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603806269; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=W8kgjbVEV7/nGoVLukrqwqdL8zpPCmjDYWvWoU+BKAk=; b=WalWQnioCQpXBh86FCqBe8q4JtEMjRa7af5uGl+GwiI67gFd9fXST5sWaZWtTuBiJRdpGgD+noHp4dMPtHizrW23oODaKTARKA6fgdIv5sWltB+1xWXA3CVGAf4kdV8Z1I/89ZrQ0sjfFW+zNMkuGLUv+tpK/1W0WwZsjqUWrDY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1603806269801313.206668116744; Tue, 27 Oct 2020 06:44:29 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.12854.33247 (Exim 4.92) (envelope-from ) id 1kXPGh-0001bE-Nj; Tue, 27 Oct 2020 13:44:07 +0000 Received: by outflank-mailman (output) from mailman id 12854.33247; Tue, 27 Oct 2020 13:44:07 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGh-0001b7-JP; Tue, 27 Oct 2020 13:44:07 +0000 Received: by outflank-mailman (input) for mailman id 12854; Tue, 27 Oct 2020 13:44:06 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGg-0001b2-Az for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:06 +0000 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 8df44da4-c4c6-4015-899c-7111f422603c; Tue, 27 Oct 2020 13:44:03 +0000 (UTC) Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGd-0007vu-NW for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:03 +0000 Received: from iwj (helo=mynotebook.example.org) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1kXPGd-00023F-MO for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:03 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1kXPGb-0002Uo-Rf; Tue, 27 Oct 2020 13:44:01 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGg-0001b2-Az for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:06 +0000 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 8df44da4-c4c6-4015-899c-7111f422603c; Tue, 27 Oct 2020 13:44:03 +0000 (UTC) Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGd-0007vu-NW for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:03 +0000 Received: from iwj (helo=mynotebook.example.org) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1kXPGd-00023F-MO for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:03 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1kXPGb-0002Uo-Rf; Tue, 27 Oct 2020 13:44:01 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 8df44da4-c4c6-4015-899c-7111f422603c DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=W8kgjbVEV7/nGoVLukrqwqdL8zpPCmjDYWvWoU+BKAk=; b=bdReNmeSoCnBKRfDwUoTsyN34u RRGfoqiebkV4ULig7/g08T7mo5/wbAB6juGozae7rwBpjdgbmvIszTHjaq5hAzeOyZ7dZXkfYzb0q 65elxdgA3K8NqnF+afNDJS9xYP1GmHAQ95++onQbt5FoKQr1+GX8bnWfmTEQqYFVUWGQ=; From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 1/7] README: Fix a typo Date: Tue, 27 Oct 2020 13:43:48 +0000 Message-Id: <20201027134354.25561-2-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201027134354.25561-1-iwj@xenproject.org> References: <20201027134354.25561-1-iwj@xenproject.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @xenproject.org) Content-Type: text/plain; charset="utf-8" Signed-off-by: Ian Jackson --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 1703e076..ef6c4e60 100644 --- a/README +++ b/README @@ -655,7 +655,7 @@ HostProp__PowerILOM unsupported Fails whenever a power operation is needed =20 msw [--apc6] - Control and APC masterswitch via SNMP. The SNMP + Control an APC masterswitch via SNMP. The SNMP community is `private'. See the `pdu-msw' script. =20 ipmi [ [ []]] --=20 2.20.1 From nobody Wed May 8 00:26:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1603806276; cv=none; d=zohomail.com; s=zohoarc; b=SmkX/cKFVWWrn9/p6zYC5lvtaoiMaBaQZHglWYkgTgFeTSPo65aEquZ9G6lhtJ7pqbbIHtvcLEWWthlg4jgKW5Qbx5zVflq9QWqklqHFlNSyATZ2W5LHc2O/1scz35azV5ZV/HAm1hsSnTDiycL+mlxh6lDDUgJmQPLKWdak9Ek= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603806276; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xllzJu2rVf2X8UnmOfyzoIVs8umEVd2ts2o3jPuGX7A=; b=hCwEpMuvGM9uhF9bg3pHyEvSQMS0zbWvqYqVI+/ypo+hiZ9WGDvYDHBC1UhdLxVJNye9k0hB7zcutdAmRMoCm28HvWvjfLskEc3B9HUE306pxDp8qIbFvE/XQp561Vp7glvLUlMycC9WdHKG6A9i+pU+Yn8wltHxSNGNzHfGKsY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1603806276157803.5494520164053; Tue, 27 Oct 2020 06:44:36 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.12857.33283 (Exim 4.92) (envelope-from ) id 1kXPGw-0001ky-MR; Tue, 27 Oct 2020 13:44:22 +0000 Received: by outflank-mailman (output) from mailman id 12857.33283; Tue, 27 Oct 2020 13:44:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGw-0001kn-JI; Tue, 27 Oct 2020 13:44:22 +0000 Received: by outflank-mailman (input) for mailman id 12857; Tue, 27 Oct 2020 13:44:21 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGv-0001b2-7P for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:21 +0000 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id a14440a3-c76a-4308-aae1-ceb979216295; Tue, 27 Oct 2020 13:44:04 +0000 (UTC) Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGd-0007vx-UJ for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:03 +0000 Received: from iwj (helo=mynotebook.example.org) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1kXPGd-00023g-TN for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:03 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1kXPGc-0002Uo-7J; Tue, 27 Oct 2020 13:44:02 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGv-0001b2-7P for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:21 +0000 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id a14440a3-c76a-4308-aae1-ceb979216295; Tue, 27 Oct 2020 13:44:04 +0000 (UTC) Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGd-0007vx-UJ for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:03 +0000 Received: from iwj (helo=mynotebook.example.org) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1kXPGd-00023g-TN for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:03 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1kXPGc-0002Uo-7J; Tue, 27 Oct 2020 13:44:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: a14440a3-c76a-4308-aae1-ceb979216295 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=xllzJu2rVf2X8UnmOfyzoIVs8umEVd2ts2o3jPuGX7A=; b=QERZ262VuOMUg98KAxp3jEQxUj OcoMDfabWuGwEjNd/YgRs/CfWLM8/rKXq6mRNfOSyJu3PW2z8p1uNTZTZFRb3LBsJ0VB6w67d6IeN u4h7mudX1C74P9dWyiYR7M/U5DXd6cP92v/zxswYvUuwdxvxbVLMG63H7inddR5jhbXg=; From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 2/7] pdu-snmp: Rename from pdu-msw Date: Tue, 27 Oct 2020 13:43:49 +0000 Message-Id: <20201027134354.25561-3-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201027134354.25561-1-iwj@xenproject.org> References: <20201027134354.25561-1-iwj@xenproject.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @xenproject.org) Content-Type: text/plain; charset="utf-8" We are going to make this script control PDUs other than APC ones. No overall functional change for internal callers. Anyone out-of-tree using this script will need to change the name of the program they run. Signed-off-by: Ian Jackson --- Osstest/PDU/msw.pm | 2 +- README | 2 +- pdu-msw =3D> pdu-snmp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) rename pdu-msw =3D> pdu-snmp (95%) diff --git a/Osstest/PDU/msw.pm b/Osstest/PDU/msw.pm index 19d9f56b..614216d4 100644 --- a/Osstest/PDU/msw.pm +++ b/Osstest/PDU/msw.pm @@ -33,7 +33,7 @@ sub new { sub pdu_power_state { my ($mo, $on) =3D @_; my $onoff=3D $on ? "on" : "off"; - system_checked("./pdu-msw @{ $mo->{Args} } $onoff"); + system_checked("./pdu-snmp @{ $mo->{Args} } $onoff"); } =20 1; diff --git a/README b/README index ef6c4e60..70f8ae73 100644 --- a/README +++ b/README @@ -656,7 +656,7 @@ HostProp__PowerILOM =20 msw [--apc6] Control an APC masterswitch via SNMP. The SNMP - community is `private'. See the `pdu-msw' script. + community is `private'. See the `pdu-snmp' script. =20 ipmi [ [ []]] Use IPMI by (by running ipmitool). is the name or diff --git a/pdu-msw b/pdu-snmp similarity index 95% rename from pdu-msw rename to pdu-snmp index c57f9f7c..581a60b0 100755 --- a/pdu-msw +++ b/pdu-snmp @@ -19,7 +19,7 @@ =20 my $usagemsg=3D <[2] ? '*' : ''), $t->[0], $t->[1]); } - die "pdu-msw $dnsname: ". + die "pdu-snmp $dnsname: ". (@found ? "multiple ports match" : "no ports match"). "\n"; } @@ -119,7 +119,7 @@ sub get () { =20 sub show () { my $mean =3D get(); - printf "pdu-msw $dnsname: #%s \"%s\" =3D %s\n", $useport, $usename, $m= ean; + printf "pdu-snmp $dnsname: #%s \"%s\" =3D %s\n", $useport, $usename, $= mean; return $mean; } =20 --=20 2.20.1 From nobody Wed May 8 00:26:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1603806271; cv=none; d=zohomail.com; s=zohoarc; b=hDOO98McINc52ZpsuS2R8a6tqICIeNO8s9+x3saEAJTNjJ3GgE9bTWBXGqv4x2PrYTnnAi/aAAXWPIzeeMll6V4PyXaoUIRrqV6S8ltT0IwZgsXHoMqm1VWEElLkCfUz+zrTTINY6wMfQWY20zpu9FzWRWehHMBNfuMOg1YGvuc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603806271; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=juiCgnMY9/QgNhWg1mZv5w6KyG10Ju4wvLuPHHdxwak=; b=XpAsIltYkRwUaq+IGnVnEZRFcFmWnuBQU/IQYPbNIqzYonn2BsENxsxLwF1mYEwfsuLxj3ZcgLbSZ1E/SC2M7YhTM+5J6STgHySuC4SllX25CP8iFFi7/0tFdYJPEgrTuDv+ZnWxQXjev36XTS7oDpppa62Ycgsjrv7o0l0YbDk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1603806271789119.05292959184305; Tue, 27 Oct 2020 06:44:31 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.12856.33271 (Exim 4.92) (envelope-from ) id 1kXPGr-0001gR-E6; Tue, 27 Oct 2020 13:44:17 +0000 Received: by outflank-mailman (output) from mailman id 12856.33271; Tue, 27 Oct 2020 13:44:17 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGr-0001gG-9w; Tue, 27 Oct 2020 13:44:17 +0000 Received: by outflank-mailman (input) for mailman id 12856; Tue, 27 Oct 2020 13:44:16 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGq-0001b2-78 for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:16 +0000 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id ca71bba4-5000-4fcb-9d25-00ed036ea09f; Tue, 27 Oct 2020 13:44:04 +0000 (UTC) Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGe-0007w0-7T for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:04 +0000 Received: from iwj (helo=mynotebook.example.org) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1kXPGe-00024D-5h for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:04 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1kXPGc-0002Uo-Eu; Tue, 27 Oct 2020 13:44:02 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGq-0001b2-78 for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:16 +0000 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id ca71bba4-5000-4fcb-9d25-00ed036ea09f; Tue, 27 Oct 2020 13:44:04 +0000 (UTC) Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGe-0007w0-7T for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:04 +0000 Received: from iwj (helo=mynotebook.example.org) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1kXPGe-00024D-5h for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:04 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1kXPGc-0002Uo-Eu; Tue, 27 Oct 2020 13:44:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ca71bba4-5000-4fcb-9d25-00ed036ea09f DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=juiCgnMY9/QgNhWg1mZv5w6KyG10Ju4wvLuPHHdxwak=; b=cfmBjS2VvCrPXT2Enw1FWAmqvT +e13+JUKzFNeQ7nHxEEzB4eNuVRR8UJNo70aN+Eb7Hnpjqlp6KZ34HUA1tdHOYrsO9AbQMLpAiy85 +LT8/tLo2aelV1/pvS+qUY3siqYvkVbzKFZyHjhviEhlv5ANufpOWqQivOU37qULxlCA=; From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 3/7] pdu-snmp: Centralise base OIDs Date: Tue, 27 Oct 2020 13:43:50 +0000 Message-Id: <20201027134354.25561-4-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201027134354.25561-1-iwj@xenproject.org> References: <20201027134354.25561-1-iwj@xenproject.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @xenproject.org) Content-Type: text/plain; charset="utf-8" Do not hardcoode .3 and .4 in the main logic. No functional change. Signed-off-by: Ian Jackson --- pdu-snmp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pdu-snmp b/pdu-snmp index 581a60b0..a4918f53 100755 --- a/pdu-snmp +++ b/pdu-snmp @@ -27,8 +27,11 @@ use Net::SNMP; use Data::Dumper; =20 my $community=3D 'private'; + my $baseoid=3D '.1.3.6.1.4.1.318.1.1.4.4.2.1'; my $baseoid_write=3D "$baseoid.3"; +my $baseoid_name=3D "$baseoid.4"; +my $baseoid_read=3D "$baseoid.3"; =20 while (@ARGV && $ARGV[0] =3D~ m/^-/) { $_ =3D shift @ARGV; @@ -52,7 +55,7 @@ die "SNMP error $error " unless defined $session; =20 sub getname ($) { my ($port) =3D @_; - my $oid=3D "$baseoid.4.$port"; + my $oid=3D "$baseoid_name.$port"; my $res=3D $session->get_request($oid); if ($res) { my $name=3D $res->{$oid}; @@ -96,7 +99,7 @@ if ($outlet =3D~ m/^\d+$/) { ($useport,$usename)=3D @{ $found[0] }; } =20 -my $read_oid=3D "$baseoid.3.$useport"; +my $read_oid=3D "$baseoid_read.$useport"; my $write_oid=3D "$baseoid_write.$useport"; =20 my @map=3D (undef, qw( --=20 2.20.1 From nobody Wed May 8 00:26:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1603806290; cv=none; d=zohomail.com; s=zohoarc; b=DrmSIfHziVebRMu+EwW2SPQ/vDAg7ZFJpHxhMcm04Mc7ynYb7RRJHaAjVMqfNb/o/QbFF15iR5KRzrCKtmUUfcM6q5p4x2RwUp5D5k1RSJjh+Q2keLAuoNfykCTkrC1W2PvhzduBuY46aGuAfVgkLLxkYafJmzYGKMLBCX96tQQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603806290; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0tVI4eo+1zS+zccZupV965ruxpbEgNilUw/RkAp3VIk=; b=nQfln6FhZpukQCZ5/NdzfXyVn8xvudQk27C1Nz7r0E0srQSAm8fIw5DOyNWkEgo5vMiwaXEs8CxgBMqUDE5AFgYhJLmsUlbgwpXzOAPJlmSFK+zTnnXFLmRLD6xkBd6Jew6nB39jClOam4xJQLffDhAeDKpDSDHX/8jdeipXvB0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1603806290370797.5115290877121; Tue, 27 Oct 2020 06:44:50 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.12859.33307 (Exim 4.92) (envelope-from ) id 1kXPH7-0001vk-9a; Tue, 27 Oct 2020 13:44:33 +0000 Received: by outflank-mailman (output) from mailman id 12859.33307; Tue, 27 Oct 2020 13:44:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPH7-0001vc-62; Tue, 27 Oct 2020 13:44:33 +0000 Received: by outflank-mailman (input) for mailman id 12859; Tue, 27 Oct 2020 13:44:31 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPH5-0001b2-7V for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:31 +0000 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id f23b889a-f9db-4df0-bd39-42713a532765; Tue, 27 Oct 2020 13:44:04 +0000 (UTC) Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGe-0007w3-Ee for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:04 +0000 Received: from iwj (helo=mynotebook.example.org) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1kXPGe-00024b-CL for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:04 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1kXPGc-0002Uo-MM; Tue, 27 Oct 2020 13:44:02 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPH5-0001b2-7V for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:31 +0000 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id f23b889a-f9db-4df0-bd39-42713a532765; Tue, 27 Oct 2020 13:44:04 +0000 (UTC) Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGe-0007w3-Ee for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:04 +0000 Received: from iwj (helo=mynotebook.example.org) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1kXPGe-00024b-CL for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:04 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1kXPGc-0002Uo-MM; Tue, 27 Oct 2020 13:44:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: f23b889a-f9db-4df0-bd39-42713a532765 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=0tVI4eo+1zS+zccZupV965ruxpbEgNilUw/RkAp3VIk=; b=En0amqcxDJ3ef96nNC1ptH1/zK DB0rGug4qsKF16JkFyfKhngx78Cuxc41vBRIfbC162XkQrjjxcSf4IpA3DNXg6Jo2MZYZMgDNf4iW Vzd4OsS/fTggZ3EFUAJuZBOkeisplk9C4E7vKbgo1t2kQ/GOMG/9Nfr2wqF+5o5he2Yg=; From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 4/7] pdu-snmp: Refactor model handling Date: Tue, 27 Oct 2020 13:43:51 +0000 Message-Id: <20201027134354.25561-5-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201027134354.25561-1-iwj@xenproject.org> References: <20201027134354.25561-1-iwj@xenproject.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @xenproject.org) Content-Type: text/plain; charset="utf-8" This makes it easier to see waht is going on and to add new model(s). No functional change. Signed-off-by: Ian Jackson --- pdu-snmp | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/pdu-snmp b/pdu-snmp index a4918f53..74244145 100755 --- a/pdu-snmp +++ b/pdu-snmp @@ -28,15 +28,28 @@ use Data::Dumper; =20 my $community=3D 'private'; =20 -my $baseoid=3D '.1.3.6.1.4.1.318.1.1.4.4.2.1'; -my $baseoid_write=3D "$baseoid.3"; -my $baseoid_name=3D "$baseoid.4"; -my $baseoid_read=3D "$baseoid.3"; +our ($baseoid, $baseoid_write, $baseoid_name, $baseoid_read); + +sub model_msw () { + # APC MasterSwitch + $baseoid=3D '.1.3.6.1.4.1.318.1.1.4.4.2.1'; + $baseoid_name=3D "$baseoid.4"; + $baseoid_read=3D "$baseoid.3"; + $baseoid_write=3D "$baseoid.3"; +} + +sub model_apc6 () { + # APC MasterSwitch protocol version 6 (?) + model_msw(); + $baseoid_write=3D '.1.3.6.1.4.1.318.1.1.12.3.3.1.1.4'; +} + +my $model_name =3D 'msw'; =20 while (@ARGV && $ARGV[0] =3D~ m/^-/) { $_ =3D shift @ARGV; - if (m/^--apc6$/) { - $baseoid_write=3D '.1.3.6.1.4.1.318.1.1.12.3.3.1.1.4'; + if (m/^--(\w+)$/ && ${*::}{"model_$1"}) { + $model_name=3D $1; } else { die "$_ ?"; } @@ -44,6 +57,8 @@ while (@ARGV && $ARGV[0] =3D~ m/^-/) { =20 if (@ARGV<2 || @ARGV>3 || $ARGV[0] =3D~ m/^-/) { die "bad usage\n$usagemsg= "; } =20 +${*::}{"model_$model_name"}->(); + our ($max_retries) =3D 16; # timeout =3D 0.05 * max_retries^2 our ($dnsname,$outlet,$action) =3D @ARGV; =20 --=20 2.20.1 From nobody Wed May 8 00:26:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1603806284; cv=none; d=zohomail.com; s=zohoarc; b=TfVDEj4+k2U/7KJJARaWShyFkiKUVW9orC2L7WPXK4l0YPsVcljCPA62L0InLhvL4n3xk8qeUpD13ZZCWt9lRPWIhJoz7xFV6KslNCyqLAjY5mKh8kjq1eo3Hvpin+JbPyahvkw6LcnnXrZwXBPfOZolH+tVj4rQG3vuC5+/XYE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603806284; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ht5aMArUMsbRZegTrAAwD7lR0CIO4rForYrTexZof/g=; b=DEwn7DdGX3UM8dYSd0QHwEqyAUV/THUtfbmG35mcfU4x9ToEqEWhxplCixN89EImp+uR2Je+/oiV9PSkf+9zpmYqzzuu2q+CGmU/2RkUDzj/rF4uGHt+wxPh0uRfRht2WWoaD4OVOxDqOm0kcTu6oo8yKqpwV/s4dtl7KMY3PEU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1603806284692923.7940815295987; Tue, 27 Oct 2020 06:44:44 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.12858.33295 (Exim 4.92) (envelope-from ) id 1kXPH1-0001q0-Vw; Tue, 27 Oct 2020 13:44:27 +0000 Received: by outflank-mailman (output) from mailman id 12858.33295; Tue, 27 Oct 2020 13:44:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPH1-0001pt-Rm; Tue, 27 Oct 2020 13:44:27 +0000 Received: by outflank-mailman (input) for mailman id 12858; Tue, 27 Oct 2020 13:44:26 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPH0-0001b2-7W for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:26 +0000 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 711c59bb-aa35-4855-b496-b03771642e22; Tue, 27 Oct 2020 13:44:04 +0000 (UTC) Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGe-0007w6-JZ for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:04 +0000 Received: from iwj (helo=mynotebook.example.org) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1kXPGe-00024r-If for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:04 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1kXPGc-0002Uo-Td; Tue, 27 Oct 2020 13:44:02 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPH0-0001b2-7W for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:26 +0000 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 711c59bb-aa35-4855-b496-b03771642e22; Tue, 27 Oct 2020 13:44:04 +0000 (UTC) Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGe-0007w6-JZ for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:04 +0000 Received: from iwj (helo=mynotebook.example.org) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1kXPGe-00024r-If for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:04 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1kXPGc-0002Uo-Td; Tue, 27 Oct 2020 13:44:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 711c59bb-aa35-4855-b496-b03771642e22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=ht5aMArUMsbRZegTrAAwD7lR0CIO4rForYrTexZof/g=; b=6No575w7BLbLgwxOa+OluzfAhV eSOnAue4Va2681FC/CaJB3Z3jKGahvAu4JKegrHsj7GkzaGMVK2F6OVM3PPaeYF/GcOTz7zlSTvwR xVHz3Y9wyCMxKVmCCVfFfXzGJg2bsGjtaiyz7rq8UTE9qlfJAl6hV7qNiuPsVGn5Gx6I=; From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 5/7] pdu-snmp: Support ServerTech PDUs "Pro 1/2" aka "Sentry4" Date: Tue, 27 Oct 2020 13:43:52 +0000 Message-Id: <20201027134354.25561-6-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201027134354.25561-1-iwj@xenproject.org> References: <20201027134354.25561-1-iwj@xenproject.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @xenproject.org) Content-Type: text/plain; charset="utf-8" Values from Sentry4.mib, from https://www.servertech.com/support/sentry-mib-oid-tree-downloads Useful runes used when developing and testing, with "Sentry.mib" from the Servertech zipfile renamed to "mibs/Sentry4-MIB": snmpwalk -On -m Sentry4-MIB -M +:mibs/ -Ci -v 2c -c private pdu1 iso.3.6.= 1.4.1.1718.4 snmpwalk -m Sentry4-MIB -M +:mibs/ -Ci -v 2c -c private pdu1 iso.3.6.1.4.= 1.1718.4 snmptranslate -Td -m Sentry4-MIB -M +:mibs/ Sentry4-MIB::st4OutletControl= Action.1.1.2 Signed-off-by: Ian Jackson --- pdu-snmp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pdu-snmp b/pdu-snmp index 74244145..61380766 100755 --- a/pdu-snmp +++ b/pdu-snmp @@ -44,6 +44,13 @@ sub model_apc6 () { $baseoid_write=3D '.1.3.6.1.4.1.318.1.1.12.3.3.1.1.4'; } =20 +sub model_sentry4 () { + $baseoid =3D ".1.3.6.1.4.1.1718.4.1.8"; + $baseoid_name =3D "$baseoid.2.1.3.1.1"; # st4OutletName.1.1 + $baseoid_read =3D "$baseoid.3.1.1.1.1"; # st4OutletState.1.1 + $baseoid_write=3D "$baseoid.5.1.2.1.1"; # st4OutletControlAction.1.1 +} + my $model_name =3D 'msw'; =20 while (@ARGV && $ARGV[0] =3D~ m/^-/) { --=20 2.20.1 From nobody Wed May 8 00:26:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1603806300; cv=none; d=zohomail.com; s=zohoarc; b=ESSKh22DYmN6XwjddgsC1SmA5DNjg9InupKcLoG0/L8NpZ44j5yWDRrgydvJSx3TG8pieTrPZdBJc5NiuK/7gLG7AW/UnwapWX/kjCAs7zu42oYLe2eF9Nm78j8bd4gnw9h4M9iRgsvhtegNP7kibJ9DDUhnaq918yNEPHSSM1w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603806300; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wq7mzu+ToDMU3LijsJ/aE5ctMgAPIjBlbDtSDRbuAHo=; b=YwHt4LYgOnXlVF9IPceDxMTLTM0i2nhgGZnYY2t5bdb6HjKNwj8kxxtF1P9s+aJ0bH51JSoQPOdvQEsYQwjYAtZQh7hMnfyqhjiPQqAbPIhag0lV8SOdiJ63BMEbZkRq9JUl57ZwXaQXX+7Oca0qdOXpiVGwuf7Zj/XzrElOkks= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1603806300763159.03797589608735; Tue, 27 Oct 2020 06:45:00 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.12863.33331 (Exim 4.92) (envelope-from ) id 1kXPHH-00027f-2C; Tue, 27 Oct 2020 13:44:43 +0000 Received: by outflank-mailman (output) from mailman id 12863.33331; Tue, 27 Oct 2020 13:44:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPHG-00027W-TS; Tue, 27 Oct 2020 13:44:42 +0000 Received: by outflank-mailman (input) for mailman id 12863; Tue, 27 Oct 2020 13:44:41 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPHF-0001b2-7f for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:41 +0000 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 2ba1eb07-fff5-4634-a0eb-c9e6eb2c3882; Tue, 27 Oct 2020 13:44:05 +0000 (UTC) Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGe-0007w9-TI for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:04 +0000 Received: from iwj (helo=mynotebook.example.org) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1kXPGe-00025I-RV for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:04 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1kXPGd-0002Uo-4S; Tue, 27 Oct 2020 13:44:03 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPHF-0001b2-7f for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:41 +0000 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 2ba1eb07-fff5-4634-a0eb-c9e6eb2c3882; Tue, 27 Oct 2020 13:44:05 +0000 (UTC) Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGe-0007w9-TI for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:04 +0000 Received: from iwj (helo=mynotebook.example.org) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1kXPGe-00025I-RV for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:04 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1kXPGd-0002Uo-4S; Tue, 27 Oct 2020 13:44:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 2ba1eb07-fff5-4634-a0eb-c9e6eb2c3882 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=wq7mzu+ToDMU3LijsJ/aE5ctMgAPIjBlbDtSDRbuAHo=; b=KFP2JGznwmC3nlWKz5vo4yJ1xs 6OHQE5SgihgX6Hoqr5tqEy/obBhH63LYdRCir5GTNPytlIkCZBBP7/Qewo4NfqlBJG0H/VvenCK2A da5yPGEz31JU6hu9nMFwqZqL7rCQW0je8S55Va7sUVMEocySGzQX0xqFnsnrdT3e8RPA=; From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 6/7] PDU::snmp, PDU::msw: Rename from msw to snmp Date: Tue, 27 Oct 2020 13:43:53 +0000 Message-Id: <20201027134354.25561-7-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201027134354.25561-1-iwj@xenproject.org> References: <20201027134354.25561-1-iwj@xenproject.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @xenproject.org) Content-Type: text/plain; charset="utf-8" Retain the old name for compatibility with existing configuration. No change other than to messages. Signed-off-by: Ian Jackson --- 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; =20 use Osstest; =20 -use parent qw(Osstest::PDU::unsupported); - -sub new { - my ($class, $ho, $methname, @args) =3D @_; - - return bless { Args =3D> \@args }, $class; -} - -sub pdu_power_state { - my ($mo, $on) =3D @_; - my $onoff=3D $on ? "on" : "off"; - system_checked("./pdu-snmp @{ $mo->{Args} } $onoff"); -} +use parent qw(Osstest::PDU::snmp); =20 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. +#=20 +# 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. +#=20 +# 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. +#=20 +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + + +package Osstest::PDU::snmp; + +use strict; +use warnings; + +use Osstest; + +use parent qw(Osstest::PDU::unsupported); + +sub new { + my ($class, $ho, $methname, @args) =3D @_; + + return bless { Args =3D> \@args }, $class; +} + +sub pdu_power_state { + my ($mo, $on) =3D @_; + my $onoff=3D $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__PowerILOM manual Asks the user on the controlling terminal unsupported Fails whenever a power operation is needed =20 - msw [--apc6] - Control an APC masterswitch via SNMP. The SNMP - community is `private'. See the `pdu-snmp' script. + snmp -- + Control a PDU via SNMP. The SNMP community is `private'. + See the `pdu-snmp' script for supported model names. =20 ipmi [ [ []]] Use IPMI by (by running ipmitool). is the name or @@ -667,6 +667,9 @@ HostProp__PowerILOM Does nothing if `on|off|both' is inapplicable, and has less error checking and less defaulting than ipmi. =20 + msw .... + Deprecated alias for snmp. + Supported specially are: =20 --=20 2.20.1 From nobody Wed May 8 00:26:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1603806291; cv=none; d=zohomail.com; s=zohoarc; b=V4GUVktW0jtjqgPggpypISTCwdwG4gLNyg21hN+wOLSelN26hqTaB+rAGuN1LmYoA5Xh5E0b4e/9pqQ3MfFGCS5Gvg9RhIBDw85yVFmPy6JA+m2+bOBDsEXPgWXMP5YyiXuuIc9fWX6SN8d1Do9ZR80ZGKiFZ6g4ddW2MrLy4sY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603806291; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=DE/eoGAmQvD+pJdKoW0UhbHdlhrfKgbDNu4rZs20/uA=; b=nogE1c+GlnYGTML0XaFmVwpe9bB4aOMol7dW1PZagP+zHMPHNfdjvjW+9rcfsAdfWM6//TvsM4YbXIAAQ5HkjT9zPJUfcGxu6WbSxj8O5Pf95G5rjaGRzygqYZNyWflV0xnt77JyLTdZNTRsKUO3cgtxuSgxHmVamqmIt9ZgQAE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1603806291050508.2820380295801; Tue, 27 Oct 2020 06:44:51 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.12861.33319 (Exim 4.92) (envelope-from ) id 1kXPHB-00021D-MV; Tue, 27 Oct 2020 13:44:37 +0000 Received: by outflank-mailman (output) from mailman id 12861.33319; Tue, 27 Oct 2020 13:44:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPHB-000212-HI; Tue, 27 Oct 2020 13:44:37 +0000 Received: by outflank-mailman (input) for mailman id 12861; Tue, 27 Oct 2020 13:44:36 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPHA-0001b2-7X for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:36 +0000 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id af43575d-5cd1-4af6-bb2d-3a86862fcf7c; Tue, 27 Oct 2020 13:44:05 +0000 (UTC) Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGf-0007wE-45 for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:05 +0000 Received: from iwj (helo=mynotebook.example.org) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1kXPGf-00025a-2Y for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:05 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1kXPGd-0002Uo-CI; Tue, 27 Oct 2020 13:44:03 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPHA-0001b2-7X for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:36 +0000 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id af43575d-5cd1-4af6-bb2d-3a86862fcf7c; Tue, 27 Oct 2020 13:44:05 +0000 (UTC) Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kXPGf-0007wE-45 for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:05 +0000 Received: from iwj (helo=mynotebook.example.org) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1kXPGf-00025a-2Y for xen-devel@lists.xenproject.org; Tue, 27 Oct 2020 13:44:05 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1kXPGd-0002Uo-CI; Tue, 27 Oct 2020 13:44:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: af43575d-5cd1-4af6-bb2d-3a86862fcf7c DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=DE/eoGAmQvD+pJdKoW0UhbHdlhrfKgbDNu4rZs20/uA=; b=KlFM8E9wKq0F2iUIWL+fguCwQj cD64qTWKnBO0zJ//jOJarmRAjQpJ/L8nlLnmUZkONYdseez/s+svFoBQ1Bkw8bczaqc4wiCLyr2bS X8NcKnn9hZUr/9NPkFBEQDNx2LhuF/KEka11c7GUOLkIRZI8u1NZgL4Vaj1yGRWBHp9s=; From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 7/7] pdu-snmp: Fix sleeping Date: Tue, 27 Oct 2020 13:43:54 +0000 Message-Id: <20201027134354.25561-8-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201027134354.25561-1-iwj@xenproject.org> References: <20201027134354.25561-1-iwj@xenproject.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @xenproject.org) Content-Type: text/plain; charset="utf-8" sleep takes only an integer. We have to use select to sleep for fractions of a second. Signed-off-by: Ian Jackson --- pdu-snmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdu-snmp b/pdu-snmp index 61380766..79d22e1f 100755 --- a/pdu-snmp +++ b/pdu-snmp @@ -172,7 +172,7 @@ if (!defined $action) { my $retries =3D 0; for (;;) { set($valset); - sleep $retries * 0.1; + select undef,undef,undef, $retries * 0.1; print "now: "; my $got =3D show(); if ($got eq $map[$valset]) { last; } if ($map[$valset] !~ m{^(?:off|on)$}) { --=20 2.20.1